Loading...
Searching...
No Matches
geometricObject.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: geometricObject.h,v 1.39.16.2 2007-03-28 13:51:45 amoll Exp $
//
#ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H
#define BALL_VIEW_KERNEL_GEOMETRICOBJECT_H
#ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
# include <BALL/VIEW/DATATYPE/colorRGBA.h>
#endif
#ifndef BALL_MATHS_VECTOR3_H
# include <BALL/MATHS/vector3.h>
#endif
#ifdef BALL_DATATYPE_HASHSET_H
# include <BALL/DATATYPE/hashSet.h>
#endif
namespace BALL
{
class Composite;
namespace VIEW
{
class BALL_VIEW_EXPORT GeometricObject
{
public:
BALL_CREATE(GeometricObject)
//@} /** @name Constructors and Destructors*/ //@{
GeometricObject();
GeometricObject(const GeometricObject& object);
virtual ~GeometricObject();
virtual void clear();
void set(const GeometricObject& object);
GeometricObject& operator = (const GeometricObject& object);
void swap(GeometricObject& object);
void setComposite(const Composite* composite)
{ composite_ = composite;}
const Composite* getComposite() const
{ return composite_;}
virtual bool isValid() const
{return true;}
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
void setColor(const ColorRGBA& color)
{ color_ = color; }
void setColor(const ColorUnit& red, const ColorUnit& green,
const ColorUnit& blue, const ColorUnit& alpha = (float)1)
{ color_.set(red, green, blue, alpha);}
const ColorRGBA& getColor() const
{ return color_; }
ColorRGBA& getColor()
{ return color_; }
void getColor(ColorUnit& red, ColorUnit& green,
ColorUnit& blue, ColorUnit& alpha) const
{ color_.get(red, green, blue, alpha); }
void getColors(HashSet<String>& colors);
bool operator == (const GeometricObject& object) const
{ return this == &object;}
bool operator < (const GeometricObject& object) const
{ return this < &object;}
// Method to get all vertices from a geometric object
virtual void getVertices(std::vector<Vector3>&) const {};
private:
void clear_();
ColorRGBA color_;
// the composite, which is represented by this geometric object
const Composite* composite_;
};
typedef std::list<GeometricObject*> GeometricObjectList;
} } // namespaces
#endif // BALL_VIEW_KERNEL_GEOMETIRCOBJECT_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::Composite
Definition composite.h:74
BALL::HashSet
Definition hashSet.h:46
BALL::VIEW::ColorRGBA
Definition colorRGBA.h:32
BALL::VIEW::ColorUnit
Definition colorUnit.h:33
BALL::VIEW::GeometricObject::setColor
void setColor(const ColorUnit &red, const ColorUnit &green, const ColorUnit &blue, const ColorUnit &alpha=(float) 1)
Definition geometricObject.h:137
BALL::VIEW::GeometricObject::set
void set(const GeometricObject &object)
BALL::VIEW::GeometricObject::setComposite
void setComposite(const Composite *composite)
Definition geometricObject.h:100
BALL::VIEW::GeometricObject::GeometricObject
GeometricObject()
BALL::VIEW::GeometricObject::isValid
virtual bool isValid() const
Definition geometricObject.h:118
BALL::VIEW::GeometricObject::getVertices
virtual void getVertices(std::vector< Vector3 > &) const
Definition geometricObject.h:169
BALL::VIEW::GeometricObject::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::VIEW::GeometricObject::getColor
const ColorRGBA & getColor() const
Definition geometricObject.h:143
BALL::VIEW::GeometricObject::getComposite
const Composite * getComposite() const
Definition geometricObject.h:104
BALL::VIEW::GeometricObject::clear
virtual void clear()
BALL::VIEW::GeometricObject::setColor
void setColor(const ColorRGBA &color)
Definition geometricObject.h:132
BALL::VIEW::GeometricObject::getColor
ColorRGBA & getColor()
Definition geometricObject.h:147
BALL::VIEW::GeometricObject::swap
void swap(GeometricObject &object)
BALL::VIEW::GeometricObject::getColor
void getColor(ColorUnit &red, ColorUnit &green, ColorUnit &blue, ColorUnit &alpha) const
Definition geometricObject.h:152
BALL::VIEW::GeometricObject::getColors
void getColors(HashSet< String > &colors)
Insert the colors of this object into the hashset.
colorRGBA.h
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
hashSet.h
BALL::VIEW
Definition constraints.h:35
BALL::VIEW::GeometricObjectList
std::list< GeometricObject * > GeometricObjectList
Definition geometricObject.h:185
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
vector3.h