cherish
Public Member Functions | Protected Member Functions | Friends | List of all members
entity::DraggableWire Class Reference

A scene graph class that contains all the geometric entities of entity::SVMData. More...

#include <DraggableWire.h>

Inheritance diagram for entity::DraggableWire:

Public Member Functions

 DraggableWire ()
 
osg::Vec3f getCenter3D () const
 
osg::Vec3f getCenter2D () const
 
osg::Plane getPlane () const
 
const osg::Geode * getGeode () const
 
void editPick (double u, double v)
 
void unselect ()
 
void select ()
 
void pick (int index)
 
void unpick ()
 
void drag ()
 
void dragStop ()
 
osg::Vec3f getPoint2D (int i) const
 
osg::Vec3f getPoint3D (int i) const
 

Protected Member Functions

void setColorPointsDefaults ()
 
void setColorWire (osg::Vec4f color)
 
void setColorPoint (int index, osg::Vec4f color)
 
void setColorPointWire (int index, osg::Vec4f color)
 
void updateGeometry (osg::Geometry *geom)
 

Friends

class SVMData
 

Detailed Description

A scene graph class that contains all the geometric entities of entity::SVMData.

Constructor & Destructor Documentation

§ DraggableWire()

entity::DraggableWire::DraggableWire ( )

A constructor - initializes the scene graph and sets default wire colors

Member Function Documentation

§ drag()

void entity::DraggableWire::drag ( )

A method to set up gragged colors to a point and adjacent edges of the wire.

§ dragStop()

void entity::DraggableWire::dragStop ( )

A method to indicate color changes from state drag to state hover over point.

§ editPick()

void entity::DraggableWire::editPick ( double  u,
double  v 
)

A method to edit a location of a selected point within the plane of the wire.

Parameters
uis the new local u coordinate,
vis the new local v coordinate.

§ getCenter2D()

osg::Vec3f entity::DraggableWire::getCenter2D ( ) const
Returns
local center of the wire plane.

§ getCenter3D()

osg::Vec3f entity::DraggableWire::getCenter3D ( ) const
Returns
global center of the wire plane. In local coordinates, the center is always (0,0).

§ getGeode()

const osg::Geode * entity::DraggableWire::getGeode ( ) const
Returns
const pointer on geode node which contains all the drawables (wire and points).

§ getPlane()

osg::Plane entity::DraggableWire::getPlane ( ) const
Returns
a plane that describes the position of all the points of the wire.

§ getPoint2D()

osg::Vec3f entity::DraggableWire::getPoint2D ( int  i) const
Returns
i-th point coordinates in local coordinate system.

§ getPoint3D()

osg::Vec3f entity::DraggableWire::getPoint3D ( int  i) const
Returns
i-th point coordinates in global coordinate system.

§ pick()

void entity::DraggableWire::pick ( int  index)

A method to set up selected color to a specified point.

Parameters
indexis the point index at which the color will be assigned.

§ select()

void entity::DraggableWire::select ( )

A method to set up selected color for the wire geometry.

§ setColorPoint()

void entity::DraggableWire::setColorPoint ( int  index,
osg::Vec4f  color 
)
protected

A method to assign a color to a specific point.

Parameters
indexis the point index,
coloris the input color.

§ setColorPointsDefaults()

void entity::DraggableWire::setColorPointsDefaults ( )
protected

A method to set up default colors to all the points.

§ setColorPointWire()

void entity::DraggableWire::setColorPointWire ( int  index,
osg::Vec4f  color 
)
protected

A method to assign a color to a specific point and wire index.

See also
setColorPoint().

§ setColorWire()

void entity::DraggableWire::setColorWire ( osg::Vec4f  color)
protected

Set a given color to the whole wire geometry.

Parameters
coloris the color input.

§ unpick()

void entity::DraggableWire::unpick ( )

A method to set up selected point color to defaults.

§ unselect()

void entity::DraggableWire::unselect ( )

A method to set up defult colors for wire and point geometries.

§ updateGeometry()

void entity::DraggableWire::updateGeometry ( osg::Geometry *  geom)
protected

A method to update geometries after new colors are assigned.


The documentation for this class was generated from the following files: