BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BALL::VIEW::GeometricObject Class Reference

#include <BALL/VIEW/KERNEL/geometricObject.h>

Inheritance diagram for BALL::VIEW::GeometricObject:
BALL::VIEW::Box BALL::VIEW::Disc BALL::VIEW::GridVisualisation BALL::VIEW::Label BALL::VIEW::Line BALL::VIEW::Mesh BALL::VIEW::MultiLine BALL::VIEW::Point BALL::VIEW::QuadMesh BALL::VIEW::SimpleBox BALL::VIEW::Sphere BALL::VIEW::Tube BALL::VIEW::TwoColoredLine BALL::VIEW::TwoColoredTube

Public Member Functions

 GeometricObject ()
 
 GeometricObject (const GeometricObject &object)
 
virtual ~GeometricObject ()
 
virtual void clear ()
 
Assignment methods
void set (const GeometricObject &object)
 
GeometricObjectoperator= (const GeometricObject &object)
 
void swap (GeometricObject &object)
 
Accessors: inspectors and mutators
void setComposite (const Composite *composite)
 
const CompositegetComposite () const
 
debuggers and diagnostics
virtual bool isValid () const
 
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
 
void setColor (const ColorRGBA &color)
 
void setColor (const ColorUnit &red, const ColorUnit &green, const ColorUnit &blue, const ColorUnit &alpha=(float) 1)
 
const ColorRGBAgetColor () const
 
ColorRGBAgetColor ()
 
void getColor (ColorUnit &red, ColorUnit &green, ColorUnit &blue, ColorUnit &alpha) const
 
void getColors (HashSet< String > &colors)
 Insert the colors of this object into the hashset. More...
 
bool operator== (const GeometricObject &object) const
 Needed for MSVC. More...
 
bool operator< (const GeometricObject &object) const
 Needed for MSVC. More...
 
virtual void getVertices (std::vector< Vector3 > &) const
 

Private Member Functions

void clear_ ()
 

Private Attributes

ColorRGBA color_
 
const Compositecomposite_
 

Detailed Description

GeometricObject class. The class GeometricObject is the most important base class for a geometric primitive. All geometric primitives must be derived from this class. This class contains only the general information like color, name and the composite pointer.

Definition at line 36 of file geometricObject.h.

Constructor & Destructor Documentation

BALL::VIEW::GeometricObject::GeometricObject ( )

Default Constructor. The state of this geometricObject is:

  • selected color is set to yellow (1.0, 1.0, 0.0, 1.0)
  • name is set to "unknown"
  • typename is set to "GeometricObject"
    Returns
    GeometricObject new constructed geometricObject
    See Also
    ColorRGBA
BALL::VIEW::GeometricObject::GeometricObject ( const GeometricObject object)

Copy constructor.

Parameters
objectthe geometricObject to be copied (cloned)
virtual BALL::VIEW::GeometricObject::~GeometricObject ( )
virtual

Destructor.

Member Function Documentation

virtual void BALL::VIEW::GeometricObject::clear ( )
virtual

Explicit default initialization. Set the state of this geometricObject to the default values. The state of this geometricObject is:

  • selected color is set to yellow (1.0, 1.0, 0.0, 1.0)
  • name is set to "unknown"

Reimplemented in BALL::VIEW::TwoColoredTube, BALL::VIEW::TwoColoredLine, BALL::VIEW::Label, BALL::VIEW::Tube, BALL::VIEW::Box, BALL::VIEW::Line, BALL::VIEW::Mesh, BALL::VIEW::Point, BALL::VIEW::SimpleBox, BALL::VIEW::Disc, BALL::VIEW::Sphere, and BALL::VIEW::MultiLine.

void BALL::VIEW::GeometricObject::clear_ ( )
private
virtual void BALL::VIEW::GeometricObject::dump ( std::ostream &  s = std::cout,
Size  depth = 0 
) const
virtual

Internal value dump. Dump the current state of this geometricObject to the output ostream s with dumping depth depth.

Parameters
soutput stream where to output the state of this geometricObject
depththe dumping depth
See Also
ColorRGBA::dump

Reimplemented in BALL::VIEW::TwoColoredTube, BALL::VIEW::Label, BALL::VIEW::TwoColoredLine, BALL::VIEW::Tube, BALL::VIEW::Sphere, BALL::VIEW::Line, BALL::VIEW::Box, BALL::VIEW::Disc, BALL::VIEW::Point, BALL::VIEW::SimpleBox, BALL::VIEW::Mesh, and BALL::VIEW::MultiLine.

const ColorRGBA& BALL::VIEW::GeometricObject::getColor ( ) const
inline

Definition at line 143 of file geometricObject.h.

ColorRGBA& BALL::VIEW::GeometricObject::getColor ( )
inline

Definition at line 147 of file geometricObject.h.

void BALL::VIEW::GeometricObject::getColor ( ColorUnit red,
ColorUnit green,
ColorUnit blue,
ColorUnit alpha 
) const
inline

Definition at line 152 of file geometricObject.h.

void BALL::VIEW::GeometricObject::getColors ( HashSet< String > &  colors)

Insert the colors of this object into the hashset.

const Composite* BALL::VIEW::GeometricObject::getComposite ( ) const
inline

Definition at line 104 of file geometricObject.h.

virtual void BALL::VIEW::GeometricObject::getVertices ( std::vector< Vector3 > &  ) const
inlinevirtual
virtual bool BALL::VIEW::GeometricObject::isValid ( ) const
inlinevirtual

Internal state and consistency self-validation. Initiate self-validation of the internal state and data structure consistencies of this geometricObject. If the internal state of this geometricObject is correct (self-validated) and consistent true is returned, false otherwise.

Returns
bool true if the internal state of this geometricObject is correct

Reimplemented in BALL::VIEW::TwoColoredTube, BALL::VIEW::Label, BALL::VIEW::TwoColoredLine, BALL::VIEW::Tube, BALL::VIEW::Sphere, BALL::VIEW::Line, BALL::VIEW::Box, BALL::VIEW::Disc, BALL::VIEW::Mesh, BALL::VIEW::Point, BALL::VIEW::SimpleBox, and BALL::VIEW::MultiLine.

Definition at line 118 of file geometricObject.h.

bool BALL::VIEW::GeometricObject::operator< ( const GeometricObject object) const
inline

Needed for MSVC.

Definition at line 165 of file geometricObject.h.

GeometricObject& BALL::VIEW::GeometricObject::operator= ( const GeometricObject object)

Assignment operator. Calls set.

bool BALL::VIEW::GeometricObject::operator== ( const GeometricObject object) const
inline

Needed for MSVC.

Definition at line 160 of file geometricObject.h.

void BALL::VIEW::GeometricObject::set ( const GeometricObject object)

Assignment

void BALL::VIEW::GeometricObject::setColor ( const ColorRGBA color)
inline

Definition at line 132 of file geometricObject.h.

void BALL::VIEW::GeometricObject::setColor ( const ColorUnit red,
const ColorUnit green,
const ColorUnit blue,
const ColorUnit alpha = (float)1 
)
inline

Definition at line 137 of file geometricObject.h.

void BALL::VIEW::GeometricObject::setComposite ( const Composite composite)
inline

Definition at line 100 of file geometricObject.h.

void BALL::VIEW::GeometricObject::swap ( GeometricObject object)

Swapping of geometricObjects.

Parameters
objectthe geometricObject being swapped with this geometricObject

Member Data Documentation

ColorRGBA BALL::VIEW::GeometricObject::color_
private

Definition at line 177 of file geometricObject.h.

const Composite* BALL::VIEW::GeometricObject::composite_
private

Definition at line 180 of file geometricObject.h.