Track::EditAssist::RotationHandle Class Reference

A ControlPoint that stays a fixed distance from another point. More...

#include <RotationHandle.h>

Inheritance diagram for Track::EditAssist::RotationHandle:

Track::EditAssist::ControlPoint Track::EditAssist::Dragable Track::EditAssist::Selectable Track::EditAssist::VertexRotationHandle List of all members.

Public Member Functions

virtual void snap (btVector3 &position, btVector3 normal) const
 Snap a position to a valid location.
virtual void draw () const
 Draw the control point for the editor.
void set_length (btScalar new_length)
 Set the distance between the centre point and the control point.
void set_centre (btVector3 new_centre)
 Set the point where the RotationHandle moves around.

Protected Attributes

btVector3 centre
btScalar length

Detailed Description

A ControlPoint that stays a fixed distance from another point.

The distance doesn't really mean anything, but the direction does.

Definition at line 25 of file RotationHandle.h.


Member Function Documentation

void Track::EditAssist::RotationHandle::draw (  )  const [virtual]

Draw the control point for the editor.

May draw additional lines to show bounds or to indicate what it relates to.

Uses OpenGL commands. It expects the modelview matrix to translate points from world space. Point and line primitives may be drawn. After calling, the current OpenGL colour could be anything.

Implements Track::EditAssist::ControlPoint.

Reimplemented in Track::EditAssist::VertexRotationHandle.

Definition at line 85 of file RotationHandle.cpp.

void Track::EditAssist::RotationHandle::set_centre ( btVector3  new_centre  ) 

Set the point where the RotationHandle moves around.

Definition at line 137 of file RotationHandle.cpp.

void Track::EditAssist::RotationHandle::set_length ( btScalar  new_length  ) 

Set the distance between the centre point and the control point.

This does not affect the direction.

Definition at line 132 of file RotationHandle.cpp.

void Track::EditAssist::RotationHandle::snap ( btVector3 &  position,
btVector3  normal 
) const [virtual]

Snap a position to a valid location.

If the position is outside of the allowed radius, it is moved to the nearest position on the circle around the normal. If it is less than the allowed radius, it is moved along normal until it reaches the sphere.

Parameters:
position position to adjust.
normal unit vector pointing into the user's view.

Reimplemented from Track::EditAssist::Dragable.

Definition at line 24 of file RotationHandle.cpp.


Member Data Documentation

btVector3 Track::EditAssist::RotationHandle::centre [protected]

Definition at line 50 of file RotationHandle.h.

btScalar Track::EditAssist::RotationHandle::length [protected]

Definition at line 51 of file RotationHandle.h.


The documentation for this class was generated from the following files:
Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:19 2010 by Doxygen version 1.4.7 for Racer version svn335.