#include <EdgeStrengthHandle.h>
Inheritance diagram for Track::EditAssist::EdgeStrengthHandle:
Public Types | |
EE_SOURCE = 0 | |
EE_DESTINATION = 1 | |
enum | EdgeEnd { EE_SOURCE = 0, EE_DESTINATION = 1 } |
Public Member Functions | |
EdgeStrengthHandle (std::size_t edge_index, EdgeEnd adjust_end) | |
Create linked to a specific edge. | |
virtual | ~EdgeStrengthHandle () |
void | update (btVector3 position, btQuaternion angle, btScalar length) |
Update the position of the line. | |
virtual boost::shared_ptr< Document::DocumentDelta > | make_delta (btVector3 position) const |
Make a DocumentDelta that moves the object to a new position. | |
virtual void | draw () const |
Draw the control point for the editor. | |
Protected Attributes | |
std::size_t | edge_index |
EdgeEnd | adjust_end |
There is a handle for each end. It controls where the beizer control point that doesn't neceserially meet the edge is. The farther out the handle is from the vertex, the more the vertices angle affects the path.
We do not allow any placement of the control point, as the gradient at the vertex must be correct for the segments to line up. It is constrained along a line.
Definition at line 33 of file EdgeStrengthHandle.h.
Track::EditAssist::EdgeStrengthHandle::EdgeStrengthHandle | ( | std::size_t | edge_index, | |
EdgeEnd | adjust_end | |||
) |
Create linked to a specific edge.
edge_index | The name of the edge to link to. | |
adjust_end | The end of the edge the handle adjusts. |
Definition at line 25 of file EdgeStrengthHandle.cpp.
Track::EditAssist::EdgeStrengthHandle::~EdgeStrengthHandle | ( | ) | [virtual] |
Definition at line 32 of file EdgeStrengthHandle.cpp.
void Track::EditAssist::EdgeStrengthHandle::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.
Reimplemented from Track::EditAssist::LineConstrainedControlPoint.
Definition at line 61 of file EdgeStrengthHandle.cpp.
boost::shared_ptr< Document::DocumentDelta > Track::EditAssist::EdgeStrengthHandle::make_delta | ( | btVector3 | position | ) | const [virtual] |
Make a DocumentDelta that moves the object to a new position.
position | the desired position of the Selectable after the DocumentDelta is applied. |
Implements Track::EditAssist::Dragable.
Definition at line 46 of file EdgeStrengthHandle.cpp.
void Track::EditAssist::EdgeStrengthHandle::update | ( | btVector3 | position, | |
btQuaternion | angle, | |||
btScalar | length | |||
) |
Update the position of the line.
Should be called when the connected vertex moves or rotates. This needs to be called before snap().
Definition at line 36 of file EdgeStrengthHandle.cpp.
Definition at line 60 of file EdgeStrengthHandle.h.
std::size_t Track::EditAssist::EdgeStrengthHandle::edge_index [protected] |
Definition at line 59 of file EdgeStrengthHandle.h.
Generated at Mon Sep 6 00:41:19 2010 by Doxygen version 1.4.7 for Racer version svn335.