Track::EditAssist::EdgeStrengthHandle Class Reference

A handle for adjusting the gradient stength of a Track::PathEdge. More...

#include <EdgeStrengthHandle.h>

Inheritance diagram for Track::EditAssist::EdgeStrengthHandle:

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

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

Detailed Description

A handle for adjusting the gradient stength of a Track::PathEdge.

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.


Member Enumeration Documentation

enum Track::EditAssist::EdgeStrengthHandle::EdgeEnd

Enumerator:
EE_SOURCE 
EE_DESTINATION 

Definition at line 37 of file EdgeStrengthHandle.h.


Constructor & Destructor Documentation

Track::EditAssist::EdgeStrengthHandle::EdgeStrengthHandle ( std::size_t  edge_index,
EdgeEnd  adjust_end 
)

Create linked to a specific edge.

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


Member Function Documentation

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.

Parameters:
position the desired position of the Selectable after the DocumentDelta is applied.
Returns:
A shared pointer to a DocumentDelta which moves the selectable from its current position to the requested position.

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.


Member Data Documentation

EdgeEnd Track::EditAssist::EdgeStrengthHandle::adjust_end [protected]

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.


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.