#include <LineConstrainedControlPoint.h>
Inheritance diagram for Track::EditAssist::LineConstrainedControlPoint:
Public Member Functions | |
LineConstrainedControlPoint () | |
Create using a line You must specify start and stop points before using snap. | |
virtual | ~LineConstrainedControlPoint () |
virtual void | snap (btVector3 &position, btVector3 normal) const |
Snap to the nearest screen space position along the line. | |
virtual void | draw () const |
Draw the control point for the editor. | |
Protected Member Functions | |
LineConstrainedControlPoint (bool allow_before_start, bool allow_after_end) | |
Create specifying snap limits. | |
Protected Attributes | |
btVector3 | start |
The starting vertex of the line to constrain to. | |
btVector3 | stop |
The ending vertex of the line to constrain to. | |
bool | allow_before_start |
set true to accept positions behind the starting vertex | |
bool | allow_after_end |
set true to accept positions after the stop vertex. |
Definition at line 24 of file LineConstrainedControlPoint.h.
Track::EditAssist::LineConstrainedControlPoint::LineConstrainedControlPoint | ( | ) |
Create using a line You must specify start and stop points before using snap.
Definition at line 23 of file LineConstrainedControlPoint.cpp.
Track::EditAssist::LineConstrainedControlPoint::~LineConstrainedControlPoint | ( | ) | [virtual] |
Definition at line 35 of file LineConstrainedControlPoint.cpp.
Track::EditAssist::LineConstrainedControlPoint::LineConstrainedControlPoint | ( | bool | allow_before_start, | |
bool | allow_after_end | |||
) | [protected] |
Create specifying snap limits.
You must specify start and stop points before using snap. With both parameters false, you get a line segment. Both true is a line. One true and one false gives you a half line.
allow_before_start | true to allow positions that are behind the starting vertex. | |
allow_after_end | true to allow positions that are infront of the ending vertex. |
Definition at line 29 of file LineConstrainedControlPoint.cpp.
void Track::EditAssist::LineConstrainedControlPoint::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::EdgeStrengthHandle.
Definition at line 85 of file LineConstrainedControlPoint.cpp.
void Track::EditAssist::LineConstrainedControlPoint::snap | ( | btVector3 & | position, | |
btVector3 | normal | |||
) | const [virtual] |
Snap to the nearest screen space position along the line.
The line should have been previously specified using start and stop. allow_before_start and allow_after_end control weather to use a line, half line, or line segment.
position | The position to snap to the line. | |
normal | A unit vector pointing into the screen. |
Reimplemented from Track::EditAssist::Dragable.
Definition at line 50 of file LineConstrainedControlPoint.cpp.
bool Track::EditAssist::LineConstrainedControlPoint::allow_after_end [protected] |
set true to accept positions after the stop vertex.
Definition at line 62 of file LineConstrainedControlPoint.h.
bool Track::EditAssist::LineConstrainedControlPoint::allow_before_start [protected] |
set true to accept positions behind the starting vertex
Definition at line 60 of file LineConstrainedControlPoint.h.
btVector3 Track::EditAssist::LineConstrainedControlPoint::start [protected] |
The starting vertex of the line to constrain to.
Definition at line 56 of file LineConstrainedControlPoint.h.
btVector3 Track::EditAssist::LineConstrainedControlPoint::stop [protected] |
The ending vertex of the line to constrain to.
Definition at line 58 of file LineConstrainedControlPoint.h.
Generated at Mon Sep 6 00:41:19 2010 by Doxygen version 1.4.7 for Racer version svn335.