Track::EditAssist::LineConstrainedControlPoint Class Reference

A handle constrained to a line, half line, or line segment. More...

#include <LineConstrainedControlPoint.h>

Inheritance diagram for Track::EditAssist::LineConstrainedControlPoint:

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

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.

Detailed Description

A handle constrained to a line, half line, or line segment.

Definition at line 24 of file LineConstrainedControlPoint.h.


Constructor & Destructor Documentation

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.

Parameters:
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.


Member Function Documentation

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.

Parameters:
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.


Member Data Documentation

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.


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.