Particle Universe  1.2
ParticleUniverse::Box Class Reference

#include <ParticleUniverseBox.h>

Inheritance diagram for ParticleUniverse::Box:

Public Member Functions

 Box (void)
 
virtual ~Box (void)
 
 Box (const Vector3 &position, BoxSet *owner)
 
const Vector3getCorner (size_t index)
 
const Vector3getWorldspaceCorner (size_t index)
 
void setPosition (const Vector3 &position)
 
void setPosition (Real x, Real y, Real z)
 
const Vector3getPosition (void) const
 
void setColour (const ColourValue &colour)
 
const ColourValuegetColour (void) const
 
void resetDimensions (void)
 
void setDimensions (Real width, Real height, Real depth)
 
bool hasOwnDimensions (void) const
 
Real getOwnWidth (void) const
 
Real getOwnHeight (void) const
 
Real getOwnDepth (void) const
 
void _notifyOwner (BoxSet *owner)
 

Public Attributes

Vector3 mPosition
 
ColourValue mColour
 
Quaternion mOrientation
 
BoxSetmParentSet
 

Protected Member Functions

void _calculateCorners (void)
 

Protected Attributes

bool mOwnDimensions
 
Real mWidth
 
Real mHeight
 
Real mDepth
 
Real mHalfWidth
 
Real mHalfHeight
 
Real mHalfDepth
 
bool mDimensionsChanged
 
Vector3 mCorners [8]
 
Vector3 mTempCorner
 

Friends

class BoxSet
 
class BoxRenderer
 

Constructor & Destructor Documentation

ParticleUniverse::Box::Box ( void  )

Default constructor.

virtual ParticleUniverse::Box::~Box ( void  )
virtual

Default destructor.

ParticleUniverse::Box::Box ( const Vector3 position,
BoxSet owner 
)

Constructor as called by BoxSet.

Member Function Documentation

void ParticleUniverse::Box::_calculateCorners ( void  )
protected

Calculates the corners.

void ParticleUniverse::Box::_notifyOwner ( BoxSet owner)

Internal method for notifying the box of it's owner.

const ColourValue& ParticleUniverse::Box::getColour ( void  ) const

Get the colour of this box.

const Vector3& ParticleUniverse::Box::getCorner ( size_t  index)

Return the boxcorner in local space of a specified corner.

Real ParticleUniverse::Box::getOwnDepth ( void  ) const

Retrieves the box's personal depth, if hasOwnDimensions is true.

Real ParticleUniverse::Box::getOwnHeight ( void  ) const

Retrieves the box's personal height, if hasOwnDimensions is true.

Real ParticleUniverse::Box::getOwnWidth ( void  ) const

Retrieves the box's personal width, if hasOwnDimensions is true.

const Vector3& ParticleUniverse::Box::getPosition ( void  ) const
const Vector3& ParticleUniverse::Box::getWorldspaceCorner ( size_t  index)

Return the boxcorner in world space of a specified corner.

bool ParticleUniverse::Box::hasOwnDimensions ( void  ) const

Returns true if this box deviates from the BoxSet's default dimensions.

See also
Box::setDimensions
void ParticleUniverse::Box::resetDimensions ( void  )
inline

Resets this box to use the parent BoxSet's dimensions instead of it's own.

void ParticleUniverse::Box::setColour ( const ColourValue colour)

Sets the colour of this box.

void ParticleUniverse::Box::setDimensions ( Real  width,
Real  height,
Real  depth 
)

Sets the width, height and depth for this box.

void ParticleUniverse::Box::setPosition ( const Vector3 position)
void ParticleUniverse::Box::setPosition ( Real  x,
Real  y,
Real  z 
)

Friends And Related Function Documentation

friend class BoxRenderer
friend
friend class BoxSet
friend

Member Data Documentation

ColourValue ParticleUniverse::Box::mColour
Vector3 ParticleUniverse::Box::mCorners[8]
protected

Corners of the box in local space.

Real ParticleUniverse::Box::mDepth
protected
bool ParticleUniverse::Box::mDimensionsChanged
protected
Real ParticleUniverse::Box::mHalfDepth
protected
Real ParticleUniverse::Box::mHalfHeight
protected
Real ParticleUniverse::Box::mHalfWidth
protected
Real ParticleUniverse::Box::mHeight
protected
Quaternion ParticleUniverse::Box::mOrientation
bool ParticleUniverse::Box::mOwnDimensions
protected
BoxSet* ParticleUniverse::Box::mParentSet
Vector3 ParticleUniverse::Box::mPosition
Vector3 ParticleUniverse::Box::mTempCorner
protected
Real ParticleUniverse::Box::mWidth
protected

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