Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Ring Class Reference

Main compomnent to build a timeline. More...

#include <ring.h>

Inheritance diagram for Ring:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Collision { NONE, LEFT, RIGHT, BOTH }
enum  Transformation { TRANSLATION, ROTATION, TOOL_ANGLE, NO_TRANSFORM }

Public Member Functions

 Ring (float position, std::string name, bool fixed=false)
 Constructor.
 ~Ring ()
 Destructor.
float getPosition () const
 Get the position.
void setPosition (const float f)
 Set the position.
float getWidth () const
 Get the position.
void setWidth (const float h)
 Set the width.
float getRight () const
 Get the right position.
void setRight (const float r)
 Set right the position.
float getLeft () const
 Get the left position.
void setLeft (const float l)
 Set the left position.
void setColor (float r, float g, float b)
 Set the color of the ring in the RGB convention.
bool isFixed ()
int getTransformType ()
SoSeparator * getNode ()
Ringnext ()
 Get the next ring in the timeline.
Ringprev ()
 Get the previous ring in the timeline.

Static Public Member Functions

static float highlight (const float &color, const float &factor)
 Get a new highlighted color.
static RinggetRing (SoPath *path)
 Get a ring from a path.
static void collisionerCB (void *data, void *unused)
 Callback for handling the collisions.
static void leftHandleCB (void *data, void *unused)
 Callback for the left handle of the ring.
static void rightHandleCB (void *data, void *unused)
 Callback for the right handle of the ring.

Public Attributes

bool solid

Protected Attributes

std::string name
bool fixed
int transform_type
SoSeparator * root
SoSeparator * separator
SoCylinder * cylinder
SoTransform * transform
SoTranslate1Dragger * dragger
SoTranslate1Dragger * leftDragger
SoTranslate1Dragger * rightDragger
SoMaterial * normalMaterial
SoMaterial * activeMaterial
SoSeparator * normalCylinder
SoSeparator * activeCylinder
SoSeparator * leftNormalCylinder
SoSeparator * leftActiveCylinder
SoSeparator * rightNormalCylinder
SoSeparator * rightActiveCylinder

Private Types

typedef std::list< Ring
* >::const_iterator 
const_iterator
typedef std::list< Ring
* >::iterator 
iterator

Private Member Functions

int insert ()
 Insert this instance of Ring in the list of rings.
void erase ()
 Erase this instance of Ring of the list of rings.

Static Private Attributes

static std::list< Ring * > rings

Friends

class ringTest

Detailed Description

Main compomnent to build a timeline.

Author:
Loïc Duviquet

Sébastien Boisgérault

Nicolas Rémond

Version:
0.1
Date:
16 Februar 2005
Class that give us a ring for making a timeline. The behaviour of the ring for the collision and for the redimensionning is handled by the class


Member Typedef Documentation

std::list< Ring * >::const_iterator Ring::const_iterator [private]
 

Const iterator type over the list of rings

std::list< Ring * >::iterator Ring::iterator [private]
 

Iterator type over the list of rings


Member Enumeration Documentation

enum Ring::Collision
 

Enumerator:
NONE  no collision
LEFT  collision of the left of the ring
RIGHT  collision of the right of the ring
BOTH  collision on the both side of the ring

enum Ring::Transformation
 

Enumerator:
TRANSLATION  tool translation
ROTATION  tool rotation
TOOL_ANGLE  modification of the opening angle of a tool
NO_TRANSFORM  no modification allowed


Constructor & Destructor Documentation

Ring::Ring float  position,
std::string  name,
bool  fixed = false
 

Constructor.

Parameters:
position Initial position of the ring
name Name of the ring
fixed Is the ring fixed ?

Ring::~Ring  ) 
 

Destructor.


Member Function Documentation

void Ring::collisionerCB void *  data,
void *  unused
[static]
 

Callback for handling the collisions.

Parameters:
data Ring
unused Unused

void Ring::erase  )  [private]
 

Erase this instance of Ring of the list of rings.

float Ring::getLeft  )  const
 

Get the left position.

Returns:
The left position of the ring

SoSeparator* Ring::getNode  )  [inline]
 

float Ring::getPosition  )  const
 

Get the position.

Returns:
The position of the ring

float Ring::getRight  )  const
 

Get the right position.

Returns:
The right position of the ring

Ring * Ring::getRing SoPath *  path  )  [static]
 

Get a ring from a path.

Parameters:
path from the ring
Returns:
Return the right ring

int Ring::getTransformType  )  [inline]
 

float Ring::getWidth  )  const
 

Get the position.

Returns:
The width of the ring

float Ring::highlight const float &  c,
const float &  factor
[static]
 

Get a new highlighted color.

Parameters:
c Color to highlight
factor Highlight factor
Returns:
Return a new highlighted color

int Ring::insert  )  [private]
 

Insert this instance of Ring in the list of rings.

bool Ring::isFixed  )  [inline]
 

void Ring::leftHandleCB void *  data,
void *  unused
[static]
 

Callback for the left handle of the ring.

Parameters:
data Ring
unused Unused

Ring * Ring::next  ) 
 

Get the next ring in the timeline.

Returns:
Return the next ring in the timeline

Ring * Ring::prev  ) 
 

Get the previous ring in the timeline.

Returns:
Return the previous ring in the timeline

void Ring::rightHandleCB void *  data,
void *  unused
[static]
 

Callback for the right handle of the ring.

Parameters:
data Ring
unused Unused

void Ring::setColor float  r,
float  g,
float  b
 

Set the color of the ring in the RGB convention.

Parameters:
r Red
g Green
b Blue

void Ring::setLeft const float  left  ) 
 

Set the left position.

Parameters:
left The new left position of the ring

void Ring::setPosition const float  f  ) 
 

Set the position.

Parameters:
f The new position of the ring

void Ring::setRight const float  right  ) 
 

Set right the position.

Parameters:
right The new right position of the ring

void Ring::setWidth const float  h  ) 
 

Set the width.

Parameters:
h The new width of the ring


Friends And Related Function Documentation

friend class ringTest [friend]
 


Member Data Documentation

SoSeparator* Ring::activeCylinder [protected]
 

Picked up base ring

SoMaterial* Ring::activeMaterial [protected]
 

Material when the ring is picked up

SoCylinder* Ring::cylinder [protected]
 

Base cylinder of the ring

SoTranslate1Dragger* Ring::dragger [protected]
 

Dragger use for the base cylider of the ring

bool Ring::fixed [protected]
 

Is the ring fixed ?

SoSeparator* Ring::leftActiveCylinder [protected]
 

Picked up left handle

SoTranslate1Dragger* Ring::leftDragger [protected]
 

Dragger use for the left handle of the ring

SoSeparator* Ring::leftNormalCylinder [protected]
 

Normal left handle

std::string Ring::name [protected]
 

Name of the ring

SoSeparator* Ring::normalCylinder [protected]
 

Normal ring base

SoMaterial* Ring::normalMaterial [protected]
 

Normal material for the ring

SoSeparator* Ring::rightActiveCylinder [protected]
 

Picked up right handle

SoTranslate1Dragger* Ring::rightDragger [protected]
 

Dragger use for the right handle of the ring

SoSeparator* Ring::rightNormalCylinder [protected]
 

Normal right handle

std::list< Ring * > Ring::rings [static, private]
 

Static list of every instantiated ring ordered by the rings positions

SoSeparator* Ring::root [protected]
 

Root separator of the ring

SoSeparator* Ring::separator [protected]
 

Base of the ring

bool Ring::solid
 

SoTransform* Ring::transform [protected]
 

Transform for the base cylinder

int Ring::transform_type [protected]
 

Kind of transformation associated to the ring


The documentation for this class was generated from the following files:
Generated on Tue Jul 12 16:40:31 2005 for CosmeProject by  doxygen 1.4.3