#include <RotationHandle.h>
Inheritance diagram for Track::EditAssist::RotationHandle:
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 |
The distance doesn't really mean anything, but the direction does.
Definition at line 25 of file RotationHandle.h.
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.
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.
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.
Generated at Mon Sep 6 00:41:19 2010 by Doxygen version 1.4.7 for Racer version svn335.