Track::EditAssist::TrackAttachmentHandle Class Reference

Control point for an object which can be dragged along an edge. More...

#include <TrackAttachmentHandle.h>

Inheritance diagram for Track::EditAssist::TrackAttachmentHandle:

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

Public Member Functions

 TrackAttachmentHandle (const PathEdge &edge, std::size_t attachment_index)
virtual void draw () const
 Draw the control point for the editor.
virtual void snap (btVector3 &position, btVector3 normal) const
 Adjust a position the object was dragged to to the nearest valid location.
virtual boost::shared_ptr<
Document::DocumentDelta
make_delta (btVector3 position) const
 Make a DocumentDelta that moves the object to a new position.
boost::shared_ptr< Document::DocumentDeltamake_remove_delta () const
 Make a delta which will remove the TrackAttachment from the edge.

Protected Attributes

const PathEdgem_edge
std::size_t m_attachment_index

Detailed Description

Control point for an object which can be dragged along an edge.

Definition at line 26 of file TrackAttachmentHandle.h.


Constructor & Destructor Documentation

Track::EditAssist::TrackAttachmentHandle::TrackAttachmentHandle ( const PathEdge edge,
std::size_t  attachment_index 
)

Definition at line 23 of file TrackAttachmentHandle.cpp.


Member Function Documentation

void Track::EditAssist::TrackAttachmentHandle::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.

Definition at line 29 of file TrackAttachmentHandle.cpp.

boost::shared_ptr< Document::DocumentDelta > Track::EditAssist::TrackAttachmentHandle::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 45 of file TrackAttachmentHandle.cpp.

boost::shared_ptr< Document::DocumentDelta > Track::EditAssist::TrackAttachmentHandle::make_remove_delta (  )  const

Make a delta which will remove the TrackAttachment from the edge.

Definition at line 63 of file TrackAttachmentHandle.cpp.

void Track::EditAssist::TrackAttachmentHandle::snap ( btVector3 &  position,
btVector3  normal 
) const [virtual]

Adjust a position the object was dragged to to the nearest valid location.

Parameters:
position to adjust.
normal direction which the user cannot see as their view is looking down it.

Reimplemented from Track::EditAssist::Dragable.

Definition at line 39 of file TrackAttachmentHandle.cpp.


Member Data Documentation

std::size_t Track::EditAssist::TrackAttachmentHandle::m_attachment_index [protected]

Definition at line 40 of file TrackAttachmentHandle.h.

const PathEdge& Track::EditAssist::TrackAttachmentHandle::m_edge [protected]

Definition at line 39 of file TrackAttachmentHandle.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.