32 #ifndef _BillboardChain_H__
33 #define _BillboardChain_H__
116 bool useTextureCoords =
true,
bool useColours =
true,
bool dynamic =
true);
122 virtual void setMaxChainElements(
size_t maxElements);
129 virtual void setNumberOfChains(
size_t numChains);
141 virtual void setUseTextureCoords(
bool use);
161 virtual void setTextureCoordDirection(TexCoordDirection dir);
172 virtual void setOtherTextureCoordRange(
Real start,
Real end);
184 virtual void setUseVertexColours(
bool use);
193 virtual void setDynamic(
bool dyn);
208 virtual void addChainElement(
size_t chainIndex,
209 const Element& billboardChainElement);
213 virtual void removeChainElement(
size_t chainIndex);
220 virtual void updateChainElement(
size_t chainIndex,
size_t elementIndex,
221 const Element& billboardChainElement);
227 virtual const Element& getChainElement(
size_t chainIndex,
size_t elementIndex)
const;
230 virtual size_t getNumChainElements(
size_t chainIndex)
const;
233 virtual void clearChain(
size_t chainIndex);
235 virtual void clearAllChains(
void);
262 Real getSquaredViewDepth(
const Camera* cam)
const;
263 Real getBoundingRadius(
void)
const;
266 const String& getMovableType(
void)
const;
270 void getWorldTransforms(
Matrix4 *)
const;
274 bool debugRenderables =
false);
348 virtual void setupChainContainers(
void);
350 virtual void setupVertexDeclaration(
void);
352 virtual void setupBuffers(
void);
354 virtual void updateVertexBuffer(
Camera* cam);
356 virtual void updateIndexBuffer(
void);
357 virtual void updateBoundingBox(
void)
const;
375 const String& getType(
void)
const;
size_t mMaxElementsPerChain
Maximum length of each chain.
A viewpoint from which the scene will be rendered.
Class encapsulating a standard 4x4 homogeneous matrix.
VertexData * mVertexData
Vertex data.
float Real
Software floating point type.
bool mIndexContentDirty
Is the index buffer dirty?
size_t start
The start of this chains subset of the buffer.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
String mMaterialName
Material.
Vector3 mNormalBase
Used when mFaceCamera == false; determines the billboard's "normal".
Contains the data of an element of the BillboardChain.
Class representing colour.
vector< ChainSegment >::type ChainSegmentList
Manages the organisation and rendering of a 'scene' i.e.
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
virtual const Real * getOtherTextureCoordRange(void) const
Get the range of the texture coordinates generated across the width of the chain elements.
A 3D box aligned with the x/y/z axes.
IndexData * mIndexData
Index data (to allow multiple unconnected chains)
Real texCoord
U or V texture coord depending on options.
ChainSegmentList mChainSegmentList
virtual bool getUseVertexColours(void) const
Gets whether vertex colour information should be included in the final buffers generated.
Interface definition for a factory class which produces a certain kind of MovableObject, and can be registered with Root in order to allow all clients to produce new instances of this object, integrated with the standard Ogre processing.
virtual size_t getMaxChainElements(void) const
Get the maximum number of chain elements per chain.
Abstract class defining a movable object in a scene.
virtual const String & getMaterialName(void) const
Get the material name in use.
Camera * mVertexCameraUsed
Camera last used to build the vertex buffer.
bool mVertexContentDirty
Is the vertex buffer dirty?
Abstract class defining the interface all renderable objects must implement.
Implementation of a Quaternion, i.e.
virtual size_t getNumberOfChains(void) const
Get the number of chain segments (this class can render multiple chains at once using the same materi...
Allows the rendering of a chain of connected billboards.
size_t mChainCount
Number of chains.
size_t tail
The 'tail' of the chain, relative to start.
ElementList mChainElementList
The list holding the chain elements.
TexCoordDirection
The direction in which texture coordinates from elements of the chain are used.
AxisAlignedBox mAABB
AABB.
Real mRadius
Bounding radius.
vector< Element >::type ElementList
bool mBoundsDirty
Do the bounds need redefining?
Summary class collecting together index data source information.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
Tex coord in elements is treated as the 'u' texture coordinate.
size_t head
The 'head' of the chain, relative to start.
bool mDynamic
Dynamic use?
Standard 3-dimensional vector.
bool mUseTexCoords
Use texture coords?
bool mVertexDeclDirty
Is the vertex declaration dirty?
Summary class collecting together vertex source information.
'New' rendering operation using vertex buffers.
static const Vector3 UNIT_X
Class to manage the scene object rendering queue.
bool mBuffersNeedRecreating
Do the buffers need recreating?
TexCoordDirection mTexCoordDir
Texture coord direction.
Factory object for creating BillboardChain instances.
static String FACTORY_TYPE_NAME
Specialisation of SharedPtr to allow SharedPtr to be assigned to MaterialPtr.
static const size_t SEGMENT_EMPTY
Chain segment has no elements.
Defines the functionality of a 3D API.
bool mFaceCamera
When true, the billboards always face the camera.
virtual bool getUseTextureCoords(void) const
Gets whether texture coordinate information should be included in the final buffers generated...
virtual TexCoordDirection getTextureCoordDirection(void)
Gets the direction in which texture coords specified on each element are deemed to run...
Simple struct defining a chain segment by referencing a subset of the preallocated buffer (which will...
virtual bool getDynamic(void) const
Gets whether or not the buffers created for this object are suitable for dynamic alteration.
bool mUseVertexColour
Use vertex colour?