Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::WireBoundingBox Class Reference

Allows the rendering of a wireframe bounding box. More...

#include <OgreWireBoundingBox.h>

Inheritance diagram for Ogre::WireBoundingBox:

Ogre::SimpleRenderable Ogre::MovableObject Ogre::Renderable List of all members.

Public Methods

 WireBoundingBox ()
 ~WireBoundingBox ()
void setupBoundingBox (AxisAlignedBox aabb)
 Builds the wireframe line list. More...

Real getSquaredViewDepth (const Camera *cam) const
 Returns the camera-relative squared depth of this renderable. More...

Real ** getVertexCache ()
ushort ** getIndexCache ()
Real ** getNormalCache ()
RGBA ** getDiffuseCache ()
RGBA ** getSpecularCache ()
Real ** getTexCoordCache (unsigned short cn)
void setMaterial (const String &matName)
virtual MaterialgetMaterial (void) const
 Retrieves a pointer to the material this renderable object uses. More...

virtual void setRenderOperation (const RenderOperation &rend)
virtual void getRenderOperation (RenderOperation &rend)
 Gets the render operation required to send this object to the frame buffer. More...

RenderOperationgetRenderOperation ()
void setWorldTransform (const Matrix4 &xform)
virtual SceneNodegetParentNode (void)
 Returns the node to which this object is attached. More...

virtual void _notifyAttached (SceneNode *parent)
 Internal method called to notify the object that it has been attached to a node. More...

virtual void _notifyCurrentCamera (Camera *cam)
 Internal method to notify the object of the camera to be used for the next rendering operation. More...

void setBoundingBox (const AxisAlignedBox &box)
virtual const AxisAlignedBoxgetBoundingBox (void) const
 Retrieves the local axis-aligned bounding box for this object. More...

virtual void _updateRenderQueue (RenderQueue *queue)
 Internal method by which the movable object must add Renderable subclass instances to the rendering queue. More...

virtual const StringgetName (void) const
 Overridden from MovableObject. More...

virtual const String getMovableType (void) const
 Overridden from MovableObject. More...

virtual bool isAttached (void) const
 Returns true if this object is attached to a SceneNode. More...

virtual void setVisible (bool visible)
 Tells this object whether to be visible or not, if it has a renderable component. More...

virtual bool isVisible (void) const
 Returns whether or not this object is supposed to be visible or not. More...

virtual void setUserObject (UserDefinedObject *obj)
 Call this to associate your own custom user object instance with this MovableObject. More...

virtual UserDefinedObjectgetUserObject (void)
 Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject. More...

virtual void setRenderQueueGroup (RenderQueueGroupID queueID)
 Sets the render queue group this entity will be rendered through. More...

virtual RenderQueueGroupID getRenderQueueGroup (void)
 Gets the queue group for this entity, see setRenderQueueGroup for full details. More...

virtual unsigned short getNumWorldTransforms (void)
 Returns the number of world transform matrices this renderable requires. More...

virtual bool useIdentityProjection (void)
 Returns whether or not to use an 'identity' projection. More...

virtual bool useIdentityView (void)
 Returns whether or not to use an 'identity' projection. More...

virtual SceneDetailLevel getRenderDetail ()
 Returns the preferred rasterisation mode of this renderable. More...


Protected Methods

void getWorldTransforms (Matrix4 *xform)
 Override this method to prevent parent transforms (rotation,translation,scale). More...

void setupBoundingBoxVertices (AxisAlignedBox &aab)
 Builds the wireframe line list. More...


Protected Attributes

float mVertexData [12 *6]
 Pointer to the wireframe vertex data. More...

long mDiffuses [24]
 Pointer to the wireframe color data. More...

RenderOperation mRendOp
Matrix4 m_matWorldTransform
AxisAlignedBox mBox
String m_strMatName
Materialm_pMaterial
Realm_pVertexCache
ushortm_pIndexCache
Realm_pNormalCache
RGBAm_pDiffuseCache
RGBAm_pSpecularCache
Realm_pTexCache [OGRE_MAX_TEXTURE_COORD_SETS]
SceneManagerm_pParentSceneManager
 The scene manager for the current frame. More...

Cameram_pCamera
 The camera for the current frame. More...

String m_strName
 The name of the object. More...

SceneNodemParentNode
 node to which this object is attached. More...

bool mVisible
 Is this object visible? More...

UserDefinedObjectmUserObject
 User defined object which is linked to this object. More...

RenderQueueGroupID mRenderQueueID
 The render queue to use when rendering this object. More...


Static Protected Attributes

uint ms_uGenNameCount = 0
 Static member used to automatically generate names for SimpleRendaerable objects. More...


Detailed Description

Allows the rendering of a wireframe bounding box.

Remarks:
This class builds a wireframe renderable from a given aabb. A pointer to this class can be added to a render queue to display the bounding box of an object.


Constructor & Destructor Documentation

Ogre::WireBoundingBox::WireBoundingBox  
 

Ogre::WireBoundingBox::~WireBoundingBox  
 


Member Function Documentation

void Ogre::SimpleRenderable::_notifyAttached SceneNode   parent [virtual, inherited]
 

Internal method called to notify the object that it has been attached to a node.

Reimplemented from Ogre::MovableObject.

void Ogre::SimpleRenderable::_notifyCurrentCamera Camera   cam [virtual, inherited]
 

Internal method to notify the object of the camera to be used for the next rendering operation.

Remarks:
Certain objects may want to do specific processing based on the camera position. This method notifies them incase they wish to do this.

Implements Ogre::MovableObject.

void Ogre::SimpleRenderable::_updateRenderQueue RenderQueue   queue [virtual, inherited]
 

Internal method by which the movable object must add Renderable subclass instances to the rendering queue.

Remarks:
The engine will call this method when this object is to be rendered. The object must then create one or more Renderable subclass instances which it places on the passed in Queue for rendering.

Implements Ogre::MovableObject.

const AxisAlignedBox & Ogre::SimpleRenderable::getBoundingBox void    const [virtual, inherited]
 

Retrieves the local axis-aligned bounding box for this object.

Remarks:
This bounding box is in local coordinates so will need to be transformed and converted into a world bounding box by the SceneNode.

Implements Ogre::MovableObject.

RGBA ** Ogre::SimpleRenderable::getDiffuseCache   [inherited]
 

unsigned short ** Ogre::SimpleRenderable::getIndexCache   [inherited]
 

Material * Ogre::SimpleRenderable::getMaterial void    const [virtual, inherited]
 

Retrieves a pointer to the material this renderable object uses.

Implements Ogre::Renderable.

const String Ogre::SimpleRenderable::getMovableType void    const [virtual, inherited]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

const String & Ogre::SimpleRenderable::getName void    const [virtual, inherited]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

Real ** Ogre::SimpleRenderable::getNormalCache   [inherited]
 

virtual unsigned short Ogre::Renderable::getNumWorldTransforms void    [inline, virtual, inherited]
 

Returns the number of world transform matrices this renderable requires.

Remarks:
When a renderable uses vertex blending, it uses multiple world matrices instead of a single one. Each vertex sent to the pipeline can reference one or more matrices in this list with given weights. If a renderable does not use vertex blending this method returns 1, which is the default for simplicity.

Reimplemented in Ogre::SubEntity.

SceneNode * Ogre::SimpleRenderable::getParentNode void    [virtual, inherited]
 

Returns the node to which this object is attached.

Remarks:
An object is not visible in the scene unless attached to a SceneNode.

Attaching an object is done via the SceneNode::attachObject method.

Reimplemented from Ogre::MovableObject.

virtual SceneDetailLevel Ogre::Renderable::getRenderDetail   [inline, virtual, inherited]
 

Returns the preferred rasterisation mode of this renderable.

Reimplemented in Ogre::SubEntity.

RenderOperation & Ogre::SimpleRenderable::getRenderOperation   [inherited]
 

void Ogre::SimpleRenderable::getRenderOperation RenderOperation   rend [virtual, inherited]
 

Gets the render operation required to send this object to the frame buffer.

Parameters:
rend  RenderOperation structure to update.

Implements Ogre::Renderable.

RenderQueueGroupID Ogre::MovableObject::getRenderQueueGroup void    [virtual, inherited]
 

Gets the queue group for this entity, see setRenderQueueGroup for full details.

RGBA ** Ogre::SimpleRenderable::getSpecularCache   [inherited]
 

Real Ogre::WireBoundingBox::getSquaredViewDepth const Camera   cam const [virtual]
 

Returns the camera-relative squared depth of this renderable.

Remarks:
Used to sort transparent objects. Squared depth is used rather than actual depth to avoid having to perform a square root on the result.

Implements Ogre::Renderable.

Real ** Ogre::SimpleRenderable::getTexCoordCache unsigned short    cn [inherited]
 

virtual UserDefinedObject* Ogre::MovableObject::getUserObject void    [inline, virtual, inherited]
 

Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.

Real ** Ogre::SimpleRenderable::getVertexCache   [inherited]
 

void Ogre::WireBoundingBox::getWorldTransforms Matrix4   xform [protected, virtual]
 

Override this method to prevent parent transforms (rotation,translation,scale).

Reimplemented from Ogre::SimpleRenderable.

bool Ogre::MovableObject::isAttached void    const [virtual, inherited]
 

Returns true if this object is attached to a SceneNode.

bool Ogre::MovableObject::isVisible void    const [virtual, inherited]
 

Returns whether or not this object is supposed to be visible or not.

void Ogre::SimpleRenderable::setBoundingBox const AxisAlignedBox   box [inherited]
 

void Ogre::SimpleRenderable::setMaterial const String   matName [inherited]
 

void Ogre::SimpleRenderable::setRenderOperation const RenderOperation   rend [virtual, inherited]
 

void Ogre::MovableObject::setRenderQueueGroup RenderQueueGroupID    queueID [virtual, inherited]
 

Sets the render queue group this entity will be rendered through.

Remarks:
Render queues are grouped to allow you to more tightly control the ordering of rendered objects. If you do not call this method, all Entity objects default to RENDER_QUEUE_MAIN which is fine for most objects. You may want to alter this if you want this entity to always appear in front of other objects, e.g. for a 3D menu system or such.

See RenderQueue for more details.

Parameters:
queueID  Enumerated value of the queue group to use.

void Ogre::WireBoundingBox::setupBoundingBox AxisAlignedBox    aabb
 

Builds the wireframe line list.

Parameters:
aabb  bounding box to build a wireframe from.

void Ogre::WireBoundingBox::setupBoundingBoxVertices AxisAlignedBox   aab [protected]
 

Builds the wireframe line list.

virtual void Ogre::MovableObject::setUserObject UserDefinedObject   obj [inline, virtual, inherited]
 

Call this to associate your own custom user object instance with this MovableObject.

Remarks:
By simply making your game / application object a subclass of UserDefinedObject, you can establish a link between an OGRE instance of MovableObject and your own application classes. Call this method to establish the link.

void Ogre::MovableObject::setVisible bool    visible [virtual, inherited]
 

Tells this object whether to be visible or not, if it has a renderable component.

Reimplemented in Ogre::Light.

void Ogre::SimpleRenderable::setWorldTransform const Matrix4   xform [inherited]
 

virtual bool Ogre::Renderable::useIdentityProjection void    [inline, virtual, inherited]
 

Returns whether or not to use an 'identity' projection.

Remarks:
Usually Renderable objects will use a projection matrix as determined by the active camera. However, if they want they can cancel this out and use an identity projection, which effectively projects in 2D using a {-1, 1} view space. Useful for overlay rendering. Normal renderables need not override this.

Reimplemented in Ogre::GuiElement.

virtual bool Ogre::Renderable::useIdentityView void    [inline, virtual, inherited]
 

Returns whether or not to use an 'identity' projection.

Remarks:
Usually Renderable objects will use a view matrix as determined by the active camera. However, if they want they can cancel this out and use an identity matrix, which means all geometry is assumed to be relative to camera space already. Useful for overlay rendering. Normal renderables need not override this.

Reimplemented in Ogre::GuiElement.


Member Data Documentation

Matrix4 Ogre::SimpleRenderable::m_matWorldTransform [protected, inherited]
 

Camera* Ogre::SimpleRenderable::m_pCamera [protected, inherited]
 

The camera for the current frame.

RGBA* Ogre::SimpleRenderable::m_pDiffuseCache [protected, inherited]
 

ushort* Ogre::SimpleRenderable::m_pIndexCache [protected, inherited]
 

Material* Ogre::SimpleRenderable::m_pMaterial [protected, inherited]
 

Real* Ogre::SimpleRenderable::m_pNormalCache [protected, inherited]
 

SceneManager* Ogre::SimpleRenderable::m_pParentSceneManager [protected, inherited]
 

The scene manager for the current frame.

RGBA* Ogre::SimpleRenderable::m_pSpecularCache [protected, inherited]
 

Real* Ogre::SimpleRenderable::m_pTexCache[OGRE_MAX_TEXTURE_COORD_SETS] [protected, inherited]
 

Real* Ogre::SimpleRenderable::m_pVertexCache [protected, inherited]
 

String Ogre::SimpleRenderable::m_strMatName [protected, inherited]
 

String Ogre::SimpleRenderable::m_strName [protected, inherited]
 

The name of the object.

AxisAlignedBox Ogre::SimpleRenderable::mBox [protected, inherited]
 

long Ogre::WireBoundingBox::mDiffuses[24] [protected]
 

Pointer to the wireframe color data.

SceneNode* Ogre::MovableObject::mParentNode [protected, inherited]
 

node to which this object is attached.

RenderQueueGroupID Ogre::MovableObject::mRenderQueueID [protected, inherited]
 

The render queue to use when rendering this object.

RenderOperation Ogre::SimpleRenderable::mRendOp [protected, inherited]
 

uint Ogre::SimpleRenderable::ms_uGenNameCount = 0 [static, protected, inherited]
 

Static member used to automatically generate names for SimpleRendaerable objects.

UserDefinedObject* Ogre::MovableObject::mUserObject [protected, inherited]
 

User defined object which is linked to this object.

float Ogre::WireBoundingBox::mVertexData[12*6] [protected]
 

Pointer to the wireframe vertex data.

bool Ogre::MovableObject::mVisible [protected, inherited]
 

Is this object visible?

Copyright © 2002 by The OGRE Team