Hosted by: BerliOS Developer Logo

OpenMBV C++ Interface

BerliOS Project Page
Public Member Functions | Protected Attributes | Friends
OpenMBV::DynamicColoredBody Class Reference

Abstract base class for all dynamically colored bodies. More...

#include <dynamiccoloredbody.h>

Inheritance diagram for OpenMBV::DynamicColoredBody:
OpenMBV::Body OpenMBV::Object OpenMBV::Arrow OpenMBV::CoilSpring OpenMBV::NurbsDisk OpenMBV::RigidBody OpenMBV::SpineExtrusion OpenMBV::CompoundRigidBody OpenMBV::Cube OpenMBV::Cuboid OpenMBV::Extrusion OpenMBV::Frame OpenMBV::Frustum OpenMBV::Grid OpenMBV::InvisibleBody OpenMBV::IvBody OpenMBV::Rotation OpenMBV::Sphere

List of all members.

Public Member Functions

void setMinimalColorValue (double min)
 Set the minimal color value.
double getMinimalColorValue ()
void setMaximalColorValue (double max)
 Set the maximal color value.
double getMaximalColorValue ()
void setDynamicColor (const double col)
 Set the color for the body dynamically.
double getDynamicColor ()
void setDiffuseColor (const std::vector< double > &hsv)
 Set the diffuse color of the body (HSV values from 0 to 1).
void setDiffuseColor (double h, double s, double v)
std::vector< double > getDiffuseColor ()
void setTransparency (double t)
 Set the transparency of the body.
double getTransparency ()
virtual void initializeUsingXML (xercesc::DOMElement *element)
 Initializes the time invariant part of the object using a XML node.
xercesc::DOMElement * writeXMLFile (xercesc::DOMNode *parent)

Protected Attributes

double minimalColorValue
double maximalColorValue
double dynamicColor
std::vector< double > diffuseColor
double transparency

Friends

class ObjectFactory

Detailed Description

Abstract base class for all dynamically colored bodies.


Member Function Documentation

void OpenMBV::DynamicColoredBody::setDiffuseColor ( const std::vector< double > &  hsv) [inline]

Set the diffuse color of the body (HSV values from 0 to 1).

If the hue is less then 0 (default = -1) then the dynamic color from the append routine is used as hue value.

void OpenMBV::DynamicColoredBody::setDynamicColor ( const double  col) [inline]

Set the color for the body dynamically.

If this value is set, the color given to the append function (as last element of the data row) is overwritten with this value.

Set the maximal color value.

See also minimalColorValue

Set the minimal color value.

The color value of the body in linearly mapped between minimalColorValue and maximalColorValue to blue(minimal) over cyan, green, yellow to red(maximal).

void OpenMBV::DynamicColoredBody::setTransparency ( double  t) [inline]

Set the transparency of the body.


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