Go to the documentation of this file.
32 #ifndef _BillboardChain_H__
33 #define _BillboardChain_H__
117 bool useTextureCoords =
true,
bool useColours =
true,
bool dynamic =
true);
210 const Element& billboardChainElement);
222 const Element& billboardChainElement);
275 bool debugRenderables =
false);
Real getBoundingRadius(void) const
Retrieves the radius of the origin-centered bounding sphere for this object.
ElementList mChainElementList
The list holding the chain elements.
const String & getMovableType(void) const
Returns the type name of this object.
void getRenderOperation(RenderOperation &)
Gets the render operation required to send this object to the frame buffer.
size_t mChainCount
Number of chains.
Defines the functionality of a 3D API.
virtual void setUseTextureCoords(bool use)
Sets whether texture coordinate information should be included in the final buffers generated.
bool mFaceCamera
When true, the billboards always face the camera.
vector< Element >::type ElementList
virtual void updateVertexBuffer(Camera *cam)
Update the contents of the vertex buffer.
A viewpoint from which the scene will be rendered.
bool mUseVertexColour
Use vertex colour?
const AxisAlignedBox & getBoundingBox(void) const
Retrieves the local axis-aligned bounding box for this object.
TexCoordDirection
The direction in which texture coordinates from elements of the chain are used.
virtual void setDynamic(bool dyn)
Sets whether or not the buffers created for this object are suitable for dynamic alteration.
size_t start
The start of this chains subset of the buffer.
virtual void addChainElement(size_t chainIndex, const Element &billboardChainElement)
Add an element to the 'head' of a chain.
const MaterialPtr & getMaterial(void) const
Retrieves a weak reference to the material this renderable object uses.
bool mBoundsDirty
Do the bounds need redefining?
IndexData * mIndexData
Index data (to allow multiple unconnected chains)
Simple struct defining a chain segment by referencing a subset of the preallocated buffer (which will...
size_t head
The 'head' of the chain, relative to start.
virtual void clearChain(size_t chainIndex)
Remove all elements of a given chain (but leave the chain intact).
virtual const Element & getChainElement(size_t chainIndex, size_t elementIndex) const
Get the detail of a chain element.
Abstract class defining a movable object in a scene.
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
bool mBuffersNeedRecreating
Do the buffers need recreating?
VertexData * mVertexData
Vertex data.
Interface definition for a factory class which produces a certain kind of MovableObject,...
size_t mMaxElementsPerChain
Maximum length of each chain.
static const Vector3 UNIT_X
virtual size_t getNumChainElements(size_t chainIndex) const
Returns the number of chain elements.
virtual bool getDynamic(void) const
Gets whether or not the buffers created for this object are suitable for dynamic alteration.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
virtual void setOtherTextureCoordRange(Real start, Real end)
Set the range of the texture coordinates generated across the width of the chain elements.
Summary class collecting together vertex source information.
bool mVertexDeclDirty
Is the vertex declaration dirty?
Implementation of a Quaternion, i.e.
virtual void setNumberOfChains(size_t numChains)
Set the number of chain segments (this class can render multiple chains at once using the same materi...
virtual void clearAllChains(void)
Remove all elements from all chains (but leave the chains themselves intact).
void destroyInstance(MovableObject *obj)
Destroy an instance of the object.
Class encapsulating a standard 4x4 homogeneous matrix.
Manages the organisation and rendering of a 'scene' i.e.
Vector3 mNormalBase
Used when mFaceCamera == false; determines the billboard's "normal".
bool mUseTexCoords
Use texture coords?
virtual void setUseVertexColours(bool use)
Sets whether vertex colour information should be included in the final buffers generated.
MovableObject * createInstanceImpl(const String &name, const NameValuePairList *params)
Internal implementation of create method - must be overridden.
Quaternion orientation
Only used when mFaceCamera == false.
A 3D box aligned with the x/y/z axes.
Real mRadius
Bounding radius.
virtual ~BillboardChain()
Destructor.
Contains the data of an element of the BillboardChain.
bool mVertexContentDirty
Is the vertex buffer dirty?
const String & getType(void) const
Get the type of the object to be created.
virtual void setTextureCoordDirection(TexCoordDirection dir)
Sets the direction in which texture coords specified on each element are deemed to run along the leng...
virtual void setMaxChainElements(size_t maxElements)
Set the maximum number of chain elements per chain.
static const size_t SEGMENT_EMPTY
Chain segment has no elements.
ChainSegmentList mChainSegmentList
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable.
Factory object for creating BillboardChain instances.
void getWorldTransforms(Matrix4 *) const
Gets the world transform matrix / matrices for this renderable object.
BillboardChain(const String &name, size_t maxElements=20, size_t numberOfChains=1, bool useTextureCoords=true, bool useColours=true, bool dynamic=true)
Constructor (don't use directly, use factory)
virtual bool getUseTextureCoords(void) const
Gets whether texture coordinate information should be included in the final buffers generated.
virtual void updateBoundingBox(void) const
Class representing colour.
Element(const Vector3 &position, Real width, Real texCoord, const ColourValue &colour, const Quaternion &orientation)
virtual void setMaterialName(const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Set the material name to use for rendering.
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
virtual bool preRender(SceneManager *sm, RenderSystem *rsys)
Called just prior to the Renderable being rendered.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
vector< ChainSegment >::type ChainSegmentList
bool mDynamic
Dynamic use?
void _updateRenderQueue(RenderQueue *)
Internal method by which the movable object must add Renderable subclass instances to the rendering q...
void setFaceCamera(bool faceCamera, const Vector3 &normalVector=Vector3::UNIT_X)
Sets whether the billboard should always be facing the camera or a custom direction set by each point...
Real texCoord
U or V texture coord depending on options.
Abstract class defining the interface all renderable objects must implement.
String mMaterialName
Material.
size_t tail
The 'tail' of the chain, relative to start.
AxisAlignedBox mAABB
AABB.
float Real
Software floating point type.
virtual void setupChainContainers(void)
Setup the STL collections.
TexCoordDirection mTexCoordDir
Texture coord direction.
Allows the rendering of a chain of connected billboards.
virtual void setupBuffers(void)
Setup buffers.
virtual bool getUseVertexColours(void) const
Gets whether vertex colour information should be included in the final buffers generated.
@ TCD_U
Tex coord in elements is treated as the 'u' texture coordinate.
virtual size_t getNumberOfChains(void) const
Get the number of chain segments (this class can render multiple chains at once using the same materi...
virtual size_t getMaxChainElements(void) const
Get the maximum number of chain elements per chain.
Real getSquaredViewDepth(const Camera *cam) const
Returns the camera-relative squared depth of this renderable.
virtual void updateChainElement(size_t chainIndex, size_t elementIndex, const Element &billboardChainElement)
Update the details of an existing chain element.
virtual void setupVertexDeclaration(void)
Setup vertex declaration.
Summary class collecting together index data source information.
Standard 3-dimensional vector.
'New' rendering operation using vertex buffers.
virtual const String & getMaterialName(void) const
Get the material name in use.
static String FACTORY_TYPE_NAME
bool mIndexContentDirty
Is the index buffer dirty?
virtual void updateIndexBuffer(void)
Update the contents of the index buffer.
virtual void removeChainElement(size_t chainIndex)
Remove an element from the 'tail' of a chain.
Class to manage the scene object rendering queue.
Camera * mVertexCameraUsed
Camera last used to build the vertex buffer.
virtual const Real * getOtherTextureCoordRange(void) const
Get the range of the texture coordinates generated across the width of the chain elements.
virtual TexCoordDirection getTextureCoordDirection(void)
Gets the direction in which texture coords specified on each element are deemed to run.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.