GCS::GForm Class Reference

Defines the geometry of an element. More...

#include <GForm.h>

Inheritance diagram for GCS::GForm:

Inheritance graph
[legend]
Collaboration diagram for GCS::GForm:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GForm (const GVector3 &position=GVector3(0, 0, 0), const GVector3 &ellipsoid=GVector3(1, 1, 1), const GVector3 &rotation_vector=GVector3(0, 0, 0), double rotation_angle=0)
 GForm (const GForm &original)
virtual ~GForm ()
GVector3 getPosition () const
void setPosition (const GVector3 &position)
GVector3 getEllipsoid () const
void setEllipsoid (const GVector3 &size)
GVector3 getRotationVector () const
void setRotationVector (const GVector3 &rotation)
double getRotationAngle () const
void setRotationAngle (double angle)
virtual double getRadiusMax () const
virtual double getRadiusMin () const
GFormoperator= (const GCS::GForm &form)

Public Attributes

GVector3 Position
GVector3 Ellipsoid
GVector3 RotationVector
double RotationAngle

Detailed Description

Defines the geometry of an element.

Author:
Raphael Langerhorst
GForm represents the form of an object. This includes all kinds of geometric figures like spheres, boxes, cylinders, pyramides, ...

Note that in GForm only parameters for geometric figures are given and no absolute values (face lists) like in a polygonal mesh. Giving absolute values would restrict the flexibility too much. The more computing power is available the more detailed a geometric figure can be calculated. These things should be implemented in specialisations of GForm.

Also note that an object's energy exactly outlines its GForm object. So if one wants to create an element that radiates a certain distance than there have to be at least two elements: one that represents the energy body (which is then the bigger one) and another element that represents it's visible form.

The solidness of a form is given by the objects energy level.

The GForm class itself is just a placeholder for actual form types, which are derived from GForm and implement all abstract methods. Since also the way forms are represented is different from application to application there is no restriction laid upon it by the GForm base class and it is totally left to the form developer to decide how forms should be represented by providing a proper subclass.

Todo:
redesign the rotation concept and reintegrate into reparent agent and openglframe and scene


Constructor & Destructor Documentation

GCS::GForm::GForm ( const GVector3 position = GVector3(0, 0, 0),
const GVector3 ellipsoid = GVector3(1, 1, 1),
const GVector3 rotation_vector = GVector3(0, 0, 0),
double  rotation_angle = 0 
)

Initializes form with given attributes.

GCS::GForm::GForm ( const GForm original  ) 

Copy constructor.

GCS::GForm::~GForm (  )  [virtual]

Virtual destructor makes sure that objects of subclasses get deleted properly.


Member Function Documentation

GVector3 GCS::GForm::getEllipsoid (  )  const

This can be used even with a const GCS::GForm

Returns:
Ellipsoid of this form

GVector3 GCS::GForm::getPosition (  )  const

This can be used even with a const GCS::GForm

Returns:
Position of this form

double GCS::GForm::getRadiusMax (  )  const [virtual]

Every point of the form is guranteed to be inside a sphere with returned radius and a center at GForm::Position.

Returns:
the maximum radius this form has.

double GCS::GForm::getRadiusMin (  )  const [virtual]

It is guranteed that the form would totally enclose a sphere with returned radius and a center at GForm::Position

Returns:
the minimum radius this form has.

double GCS::GForm::getRotationAngle (  )  const

Returns:
Rotation angle around RotationVector of this form.

GVector3 GCS::GForm::getRotationVector (  )  const

This can be used even with a const GCS::GForm object.

Returns:
Rotation of this form

GForm & GCS::GForm::operator= ( const GCS::GForm form  ) 

Copies all data from given form to this form.

void GCS::GForm::setEllipsoid ( const GVector3 size  ) 

Sets the Ellipsoid of this form.

void GCS::GForm::setPosition ( const GVector3 position  ) 

Sets the position.

void GCS::GForm::setRotationAngle ( double  angle  ) 

Sets the rotation angle.

void GCS::GForm::setRotationVector ( const GVector3 rotation  ) 

Sets the rotation vector.


Member Data Documentation

GVector3 GCS::GForm::Ellipsoid

The general ellipsoid (size) form of the element.

GVector3 GCS::GForm::Position

The position of the form.

double GCS::GForm::RotationAngle

The rotation angle (around vector) of the form.

GVector3 GCS::GForm::RotationVector

The rotation vector (direction) of the form.


The documentation for this class was generated from the following files:
Generated on Thu Nov 16 07:49:35 2006 for G System by  doxygen 1.4.7