Particle Universe  1.2
ParticleUniverse::BoxSet Class Reference

#include <ParticleUniverseBoxSet.h>

Inheritance diagram for ParticleUniverse::BoxSet:

Public Member Functions

 BoxSet (const String &name, unsigned int poolSize=20, bool externalData=false)
 
 BoxSet (void)
 
virtual ~BoxSet (void)
 
BoxcreateBox (const Vector3 &position)
 
BoxcreateBox (Real x, Real y, Real z)
 
unsigned int getNumBoxes (void) const
 
void setAutoextend (bool autoextend)
 
bool isAutoextend (void) const
 
void setPoolSize (size_t size)
 
unsigned int getPoolSize (void) const
 
void clear (void)
 
BoxgetBox (unsigned int index) const
 
void removeBox (unsigned int index)
 
void removeBox (Box *box)
 
void setDefaultDimensions (Real width, Real height, Real depth)
 
void setDefaultWidth (Real width)
 
Real getDefaultWidth (void) const
 
void setDefaultHeight (Real height)
 
Real getDefaultHeight (void) const
 
void setDefaultDepth (Real depth)
 
Real getDefaultDepth (void) const
 
void beginBoxes (size_t numBoxes=0)
 
void injectBox (Box &bb)
 
void endBoxes (void)
 
void setBounds (const AxisAlignedBox &box, Real radius)
 
virtual void _updateRenderQueue (Ogre::RenderQueue *queue)
 
virtual void getRenderOperation (Ogre::RenderOperation &op)
 
virtual const StringgetMovableType (void) const
 
virtual void _updateBounds (void)
 
void setBoxesInWorldSpace (bool ws)
 
- Public Member Functions inherited from ParticleUniverse::PrimitiveShapeSet
 PrimitiveShapeSet (const String &name, unsigned int poolSize=20, bool externalData=false)
 
 PrimitiveShapeSet (void)
 
virtual ~PrimitiveShapeSet (void)
 
virtual void setZRotated (bool zRotated)
 
virtual bool isZRotated (void) const
 
virtual void _notifyZRotated (void)
 
virtual void setMaterialName (const String &name)
 
virtual const StringgetMaterialName (void) const
 
virtual void _notifyResized (void)
 
virtual void _notifyCurrentCamera (Camera *cam)
 
virtual const AxisAlignedBoxgetBoundingBox (void) const
 
virtual Real getBoundingRadius (void) const
 
virtual const Ogre::MaterialPtrgetMaterial (void) const
 
virtual void getWorldTransforms (Ogre::Matrix4 *xform) const
 
virtual const QuaterniongetWorldOrientation (void) const
 
virtual const Vector3getWorldPosition (void) const
 
virtual bool isCullIndividually (void) const
 
virtual void setCullIndividually (bool cullIndividual)
 
virtual Real getSquaredViewDepth (const Camera *cam) const
 
virtual const Ogre::LightListgetLights (void) const
 
virtual uint32 getTypeFlags (void) const
 
virtual void rotateTexture (Real speed)
 
virtual void visitRenderables (Ogre::Renderable::Visitor *visitor, bool debugRenderables=false)
 
- Public Member Functions inherited from Ogre::MovableObject
 MovableObject ()
 
 MovableObject (const String &name)
 
virtual ~MovableObject ()
 
MovableObjectFactory_getCreator (void) const
 
LightList_getLightList ()
 
SceneManager_getManager (void) const
 
virtual const Matrix4_getParentNodeFullTransform (void) const
 
virtual void _notifyAttached (Node *parent, bool isTagPoint=false)
 
virtual void _notifyCreator (MovableObjectFactory *fact)
 
virtual void _notifyManager (SceneManager *man)
 
virtual void _notifyMoved (void)
 
virtual void _releaseManualHardwareResources ()
 
virtual void _restoreManualHardwareResources ()
 
void addQueryFlags (uint32 flags)
 
void addVisibilityFlags (uint32 flags)
 
virtual AnimableValuePtr createAnimableValue (const String &valueName)
 
void detachFromParent (void)
 
const StringVectorgetAnimableValueNames (void) const
 
bool getCastShadows (void) const
 
const AxisAlignedBoxgetDarkCapBounds (const Light &light, Real dirLightExtrusionDist) const
 
EdgeDatagetEdgeList (void)
 
const AxisAlignedBoxgetLightCapBounds (void) const
 
uint32 getLightMask () const
 
ListenergetListener (void) const
 
const StringgetName (void) const
 
NodegetParentNode (void) const
 
SceneNodegetParentSceneNode (void) const
 
Real getPointExtrusionDistance (const Light *l) const
 
uint32 getQueryFlags (void) const
 
bool getReceivesShadows ()
 
Real getRenderingDistance (void) const
 
Real getRenderingMinPixelSize () const
 
uint8 getRenderQueueGroup (void) const
 
ShadowRenderableListIterator getShadowVolumeRenderableIterator (ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, size_t *indexBufferUsedSize, bool extrudeVertices, Real extrusionDist, unsigned long flags=0)
 
const AnygetUserAny (void) const
 
UserObjectBindingsgetUserObjectBindings ()
 
const UserObjectBindingsgetUserObjectBindings () const
 
uint32 getVisibilityFlags (void) const
 
bool getVisible (void) const
 
virtual const AxisAlignedBoxgetWorldBoundingBox (bool derive=false) const
 
virtual const SpheregetWorldBoundingSphere (bool derive=false) const
 
bool hasEdgeList (void)
 
bool isAttached (void) const
 
bool isDebugDisplayEnabled (void) const
 
virtual bool isInScene (void) const
 
bool isParentTagPoint () const
 
virtual bool isVisible (void) const
 
const LightListqueryLights (void) const
 
void removeQueryFlags (uint32 flags)
 
void removeVisibilityFlags (uint32 flags)
 
void setCastShadows (bool enabled)
 
void setDebugDisplayEnabled (bool enabled)
 
void setLightMask (uint32 lightMask)
 
void setListener (Listener *listener)
 
void setQueryFlags (uint32 flags)
 
void setRenderingDistance (Real dist)
 
void setRenderingMinPixelSize (Real pixelSize)
 
virtual void setRenderQueueGroup (uint8 queueID)
 
virtual void setRenderQueueGroupAndPriority (uint8 queueID, ushort priority)
 
void setUserAny (const Any &anything)
 
void setVisibilityFlags (uint32 flags)
 
void setVisible (bool visible)
 
- Public Member Functions inherited from Ogre::ShadowCaster
virtual ~ShadowCaster ()
 
- Public Member Functions inherited from Ogre::AnimableObject
 AnimableObject ()
 
virtual ~AnimableObject ()
 
const StringVectorgetAnimableValueNames (void) const
 
- Public Member Functions inherited from Ogre::Renderable
 Renderable ()
 
virtual ~Renderable ()
 
virtual void _updateCustomGpuParameter (const GpuProgramParameters::AutoConstantEntry &constantEntry, GpuProgramParameters *params) const
 
virtual bool getCastsShadows (void) const
 
const Vector4getCustomParameter (size_t index) const
 
virtual unsigned short getNumWorldTransforms (void) const
 
bool getPolygonModeOverrideable (void) const
 
const RenderSystemDataPtrgetRenderSystemData () const
 
virtual TechniquegetTechnique (void) const
 
bool getUseIdentityProjection (void) const
 
bool getUseIdentityView (void) const
 
const AnygetUserAny (void) const
 
UserObjectBindingsgetUserObjectBindings ()
 
const UserObjectBindingsgetUserObjectBindings () const
 
bool hasCustomParameter (size_t index) const
 
virtual void postRender (SceneManager *sm, RenderSystem *rsys)
 
virtual bool preRender (SceneManager *sm, RenderSystem *rsys)
 
void removeCustomParameter (size_t index)
 
void setCustomParameter (size_t index, const Vector4 &value)
 
void setPolygonModeOverrideable (bool override)
 
void setRenderSystemData (RenderSystemDataPtr val) const
 
void setUseIdentityProjection (bool useIdentityProjection)
 
void setUseIdentityView (bool useIdentityView)
 
void setUserAny (const Any &anything)
 

Protected Types

typedef list< Box * > ActiveBoxList
 
typedef list< Box * > FreeBoxList
 
typedef vector< Box * > BoxPool
 
typedef vector< Ogre::FloatRectTextureCoordSets
 

Protected Member Functions

bool boxVisible (Camera *cam, const Box &box)
 
virtual void increasePool (size_t size)
 
void _genDefaultCorners (void)
 
void _genVertices (Box &box)
 
void _initTextCoord (void)
 

Protected Attributes

Real mDefaultWidth
 
Real mDefaultHeight
 
Real mDefaultDepth
 
Real mDefaultHalfWidth
 
Real mDefaultHalfHeight
 
Real mDefaultHalfDepth
 
Vector2 mTextCoord [16]
 
bool mAutoExtendPool
 
Vector3 mDefaultCorners [16]
 
ActiveBoxList mActiveBoxes
 
FreeBoxList mFreeBoxes
 
BoxPool mBoxPool
 
Ogre::VertexDatamVertexData
 
Ogre::HardwareVertexBufferSharedPtr mMainBuf
 
float * mLockPtr
 
Ogre::IndexDatamIndexData
 
TextureCoordSets mTextureCoords
 
unsigned short mNumVisibleBoxes
 
- Protected Attributes inherited from ParticleUniverse::PrimitiveShapeSet
AxisAlignedBox mAABB
 
Real mBoundingRadius
 
String mMaterialName
 
Ogre::MaterialPtr mpMaterial
 
bool mCullIndividual
 
bool mWorldSpace
 
CameramCurrentCamera
 
bool mZRotated
 
bool mAllDefaultSize
 

Private Member Functions

void _createBuffers (void)
 
void _destroyBuffers (void)
 

Private Attributes

bool mBuffersCreated
 
size_t mPoolSize
 
bool mExternalData
 

Additional Inherited Members

- Public Types inherited from Ogre::MovableObject
typedef vector< ShadowRenderable * >::type ShadowRenderableList
 
typedef VectorIterator< ShadowRenderableListShadowRenderableListIterator
 
- Public Types inherited from Ogre::ShadowCaster
typedef vector< ShadowRenderable * >::type ShadowRenderableList
 
typedef VectorIterator< ShadowRenderableListShadowRenderableListIterator
 
- Public Types inherited from Ogre::Renderable
typedef SharedPtr< RenderSystemDataRenderSystemDataPtr
 
- Static Public Member Functions inherited from Ogre::MovableObject
static void clearShadowRenderableList (ShadowRenderableList &shadowRenderables)
 
static void extrudeVertices (const HardwareVertexBufferSharedPtr &vertexBuffer, size_t originalVertexCount, const Vector4 &lightPos, Real extrudeDist)
 
static uint32 getDefaultQueryFlags ()
 
static uint32 getDefaultVisibilityFlags ()
 
static void setDefaultQueryFlags (uint32 flags)
 
static void setDefaultVisibilityFlags (uint32 flags)
 
- Static Public Member Functions inherited from Ogre::ShadowCaster
static void clearShadowRenderableList (ShadowRenderableList &shadowRenderables)
 
static void extrudeVertices (const HardwareVertexBufferSharedPtr &vertexBuffer, size_t originalVertexCount, const Vector4 &lightPos, Real extrudeDist)
 

Detailed Description

The BoxSet and Box classes are comparable with the BillboardSet and Billboard classes in Ogre, instead Boxes are rendered.

Remarks
The uv mapping is done like this:
|—|—|
1 4
2 5
3 6

Member Typedef Documentation

Constructor & Destructor Documentation

ParticleUniverse::BoxSet::BoxSet ( const String name,
unsigned int  poolSize = 20,
bool  externalData = false 
)

Default constructor.

ParticleUniverse::BoxSet::BoxSet ( void  )

Default constructor.

virtual ParticleUniverse::BoxSet::~BoxSet ( void  )
virtual

Default destructor.

Member Function Documentation

void ParticleUniverse::BoxSet::_createBuffers ( void  )
private

Internal method creates vertex and index buffers.

void ParticleUniverse::BoxSet::_destroyBuffers ( void  )
private

Internal method destroys vertex and index buffers.

void ParticleUniverse::BoxSet::_genDefaultCorners ( void  )
protected
void ParticleUniverse::BoxSet::_genVertices ( Box box)
protected

Internal method for generating vertex data

void ParticleUniverse::BoxSet::_initTextCoord ( void  )
protected

Internal method for generating texture coordinates

virtual void ParticleUniverse::BoxSet::_updateBounds ( void  )
virtual

Update the bounds of the box set

virtual void ParticleUniverse::BoxSet::_updateRenderQueue ( Ogre::RenderQueue queue)
virtual

Overridden from MovableObject

See also
MovableObject

Implements Ogre::MovableObject.

void ParticleUniverse::BoxSet::beginBoxes ( size_t  numBoxes = 0)

Begin injection of box data; applicable when constructing the BoxSet for external data use.

bool ParticleUniverse::BoxSet::boxVisible ( Camera cam,
const Box box 
)
inlineprotected

Internal method for culling individual boxes

void ParticleUniverse::BoxSet::clear ( void  )

Empties this set of all boxes.

Box* ParticleUniverse::BoxSet::createBox ( const Vector3 position)

Creates a new box and adds it to this set.

Box* ParticleUniverse::BoxSet::createBox ( Real  x,
Real  y,
Real  z 
)

Creates a new box and adds it to this set.

void ParticleUniverse::BoxSet::endBoxes ( void  )

Finish defining boxes.

Box* ParticleUniverse::BoxSet::getBox ( unsigned int  index) const

Returns a pointer to the box at the supplied index.

Real ParticleUniverse::BoxSet::getDefaultDepth ( void  ) const

See setDefaultDimensions - this gets 1 component individually.

Real ParticleUniverse::BoxSet::getDefaultHeight ( void  ) const

See setDefaultDimensions - this gets 1 component individually.

Real ParticleUniverse::BoxSet::getDefaultWidth ( void  ) const

See setDefaultDimensions - this gets 1 component individually.

virtual const String& ParticleUniverse::BoxSet::getMovableType ( void  ) const
virtual

Overridden from MovableObject

Implements Ogre::MovableObject.

unsigned int ParticleUniverse::BoxSet::getNumBoxes ( void  ) const

Returns the number of active boxes which currently make up this set.

unsigned int ParticleUniverse::BoxSet::getPoolSize ( void  ) const

Returns the current size of the box pool.

virtual void ParticleUniverse::BoxSet::getRenderOperation ( Ogre::RenderOperation op)
virtual

Overridden from MovableObject

See also
MovableObject

Implements Ogre::Renderable.

virtual void ParticleUniverse::BoxSet::increasePool ( size_t  size)
protectedvirtual

Internal method for increasing pool size

void ParticleUniverse::BoxSet::injectBox ( Box bb)

Define a box.

bool ParticleUniverse::BoxSet::isAutoextend ( void  ) const

Returns true if the box pool automatically extends.

void ParticleUniverse::BoxSet::removeBox ( unsigned int  index)

Removes the box at the supplied index.

void ParticleUniverse::BoxSet::removeBox ( Box box)

Removes a box from the set.

void ParticleUniverse::BoxSet::setAutoextend ( bool  autoextend)

Tells the set whether to allow automatic extension of the pool of boxes.

void ParticleUniverse::BoxSet::setBounds ( const AxisAlignedBox box,
Real  radius 
)

Set the bounds of the BoxSet.

void ParticleUniverse::BoxSet::setBoxesInWorldSpace ( bool  ws)
inline

Sets whether boxes should be treated as being in world space.

void ParticleUniverse::BoxSet::setDefaultDepth ( Real  depth)

See setDefaultDimensions - this gets 1 component individually.

void ParticleUniverse::BoxSet::setDefaultDimensions ( Real  width,
Real  height,
Real  depth 
)

Sets the default dimensions of the boxes in this set.

void ParticleUniverse::BoxSet::setDefaultHeight ( Real  height)

See setDefaultDimensions - this sets 1 component individually.

void ParticleUniverse::BoxSet::setDefaultWidth ( Real  width)

See setDefaultDimensions - this sets 1 component individually.

void ParticleUniverse::BoxSet::setPoolSize ( size_t  size)

Adjusts the size of the pool of boxes available in this set.

Member Data Documentation

ActiveBoxList ParticleUniverse::BoxSet::mActiveBoxes
protected

Active box list.

Remarks
This is a linked list of pointers to boxes in the box pool.
bool ParticleUniverse::BoxSet::mAutoExtendPool
protected

Flag indicating whether to autoextend pool

BoxPool ParticleUniverse::BoxSet::mBoxPool
protected

Pool of box instances for use and reuse in the active box list.

bool ParticleUniverse::BoxSet::mBuffersCreated
private

Flag indicating whether the HW buffers have been created.

Vector3 ParticleUniverse::BoxSet::mDefaultCorners[16]
protected

Contains the local positions of the box corners, repeated because of texture mapping.

Real ParticleUniverse::BoxSet::mDefaultDepth
protected

Default depth of each box

Real ParticleUniverse::BoxSet::mDefaultHalfDepth
protected
Real ParticleUniverse::BoxSet::mDefaultHalfHeight
protected
Real ParticleUniverse::BoxSet::mDefaultHalfWidth
protected

Half values

Real ParticleUniverse::BoxSet::mDefaultHeight
protected

Default height of each box

Real ParticleUniverse::BoxSet::mDefaultWidth
protected

Default width of each box

bool ParticleUniverse::BoxSet::mExternalData
private

Is external box data in use?

FreeBoxList ParticleUniverse::BoxSet::mFreeBoxes
protected

Free box queue.

Ogre::IndexData* ParticleUniverse::BoxSet::mIndexData
protected

The vertex index data for all boxes in this set (1 set only)

float* ParticleUniverse::BoxSet::mLockPtr
protected

Locked pointer to buffer

Ogre::HardwareVertexBufferSharedPtr ParticleUniverse::BoxSet::mMainBuf
protected

Shortcut to main buffer

unsigned short ParticleUniverse::BoxSet::mNumVisibleBoxes
protected

Number of visible boxes

size_t ParticleUniverse::BoxSet::mPoolSize
private

The number of boxes in the pool.

Vector2 ParticleUniverse::BoxSet::mTextCoord[16]
protected

Texture coordinates.

TextureCoordSets ParticleUniverse::BoxSet::mTextureCoords
protected
Ogre::VertexData* ParticleUniverse::BoxSet::mVertexData
protected

The vertex position data for all boxes in this set.


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