#include <CCPUBillboardChain.h>
Classes | |
| struct | ChainSegment |
| Simple struct defining a chain segment by referencing a subset of the preallocated buffer (which will be mMaxElementsPerChain * mChainCount long), by it's chain index, and a head and tail value which describe the current chain. More... | |
| class | Element |
| Contains the data of an element of the BillboardChain. More... | |
| struct | VertexInfo |
Public Types | |
| enum | TexCoordDirection { TCD_U, TCD_V } |
| The direction in which texture coordinates from elements of the chain are used. More... | |
| typedef std::vector< Element > | ElementList |
Public Member Functions | |
| PUBillboardChain (const std::string &name, const std::string &texFile="", size_t maxElements=20, size_t numberOfChains=1, bool useTextureCoords=true, bool useColours=true, bool dynamic=true) | |
| Constructor. More... | |
| PUBillboardChain ( var name, var 20, var 1, var true, var true, var true) | |
| Constructor. More... | |
| PUBillboardChain ( local name, local 20, local 1, local true, local true, local true) | |
| Constructor. More... | |
| virtual | ~PUBillboardChain () |
| destructor More... | |
| virtual void | setMaxChainElements (size_t maxElements) |
| Set the maximum number of chain elements per chain. More... | |
| virtual size_t | getMaxChainElements (void) const |
| Get the maximum number of chain elements per chain. More... | |
| virtual void | setNumberOfChains (size_t numChains) |
| Set the number of chain segments (this class can render multiple chains at once using the same material). More... | |
| virtual size_t | getNumberOfChains (void) const |
| Get the number of chain segments (this class can render multiple chains at once using the same material). More... | |
| virtual void | setUseTextureCoords (bool use) |
| Sets whether texture coordinate information should be included in the final buffers generated. More... | |
| virtual bool | getUseTextureCoords (void) const |
| Gets whether texture coordinate information should be included in the final buffers generated. More... | |
| var | getUseTextureCoords () |
| Gets whether texture coordinate information should be included in the final buffers generated. More... | |
| local | getUseTextureCoords () |
| Gets whether texture coordinate information should be included in the final buffers generated. More... | |
| virtual void | setTextureCoordDirection (TexCoordDirection dir) |
| Sets the direction in which texture coords specified on each element are deemed to run along the length of the chain. More... | |
| virtual TexCoordDirection | getTextureCoordDirection (void) |
| Gets the direction in which texture coords specified on each element are deemed to run. More... | |
| local | getTextureCoordDirection () |
| Gets the direction in which texture coords specified on each element are deemed to run. More... | |
| virtual void | setOtherTextureCoordRange (float start, float end) |
| Set the range of the texture coordinates generated across the width of the chain elements. More... | |
| virtual const float * | getOtherTextureCoordRange (void) const |
| Get the range of the texture coordinates generated across the width of the chain elements. More... | |
| virtual void | setUseVertexColours (bool use) |
| Sets whether vertex colour information should be included in the final buffers generated. More... | |
| virtual bool | getUseVertexColours (void) const |
| Gets whether vertex colour information should be included in the final buffers generated. More... | |
| virtual void | setDynamic (bool dyn) |
| Sets whether or not the buffers created for this object are suitable for dynamic alteration. More... | |
| virtual bool | getDynamic (void) const |
| Gets whether or not the buffers created for this object are suitable for dynamic alteration. More... | |
| virtual void | addChainElement (size_t chainIndex, const Element &billboardChainElement) |
| Add an element to the 'head' of a chain. More... | |
| local | addChainElement ( local chainIndex, local billboardChainElement) |
| Add an element to the 'head' of a chain. More... | |
| virtual void | removeChainElement (size_t chainIndex) |
| Remove an element from the 'tail' of a chain. More... | |
| virtual void | updateChainElement (size_t chainIndex, size_t elementIndex, const Element &billboardChainElement) |
| Update the details of an existing chain element. More... | |
| var | updateChainElement ( var chainIndex, var elementIndex, var billboardChainElement) |
| Update the details of an existing chain element. More... | |
| local | updateChainElement ( local chainIndex, local elementIndex, local billboardChainElement) |
| Update the details of an existing chain element. More... | |
| virtual const Element & | getChainElement (size_t chainIndex, size_t elementIndex) const |
| Get the detail of a chain element. More... | |
| local | getChainElement ( local chainIndex, local elementIndex) |
| Get the detail of a chain element. More... | |
| virtual size_t | getNumChainElements (size_t chainIndex) const |
| Returns the number of chain elements. More... | |
| virtual void | clearChain (size_t chainIndex) |
| Remove all elements of a given chain (but leave the chain intact). More... | |
| virtual void | clearAllChains (void) |
| Remove all elements from all chains (but leave the chains themselves intact). More... | |
| void | setFaceCamera (bool faceCamera, const Vec3 &normalVector=Vec3::UNIT_X) |
| Sets whether the billboard should always be facing the camera or a custom direction set by each point element. More... | |
| virtual void | setDepthTest (bool isDepthTest) |
| virtual void | setDepthWrite (bool isDepthWrite) |
| void | render (Renderer *renderer, const Mat4 &transform, ParticleSystem3D *particleSystem) |
Protected Types | |
| typedef std::vector< ChainSegment > | ChainSegmentList |
Protected Member Functions | |
| virtual void | setupChainContainers (void) |
| virtual void | setupVertexDeclaration (void) |
| Setup vertex declaration. More... | |
| virtual void | setupBuffers (void) |
| virtual void | updateVertexBuffer (const Mat4 &camMat) |
| Update the contents of the vertex buffer. More... | |
| local | updateVertexBuffer ( local camMat) |
| Update the contents of the vertex buffer. More... | |
| virtual void | updateIndexBuffer (void) |
| Update the contents of the index buffer. More... | |
| void | init (const std::string &texFile) |
Protected Attributes | |
| size_t | _maxElementsPerChain |
| Maximum length of each chain. More... | |
| size_t | _chainCount |
| Number of chains. More... | |
| bool | _useTexCoords |
| Use texture coords? More... | |
| bool | _useVertexColour |
| Use vertex colour? More... | |
| var | _useVertexColour |
| Use vertex colour? More... | |
| local | _useVertexColour |
| Use vertex colour? More... | |
| bool | _dynamic |
| Dynamic use? More... | |
| bool | _vertexDeclDirty |
| Is the vertex declaration dirty? More... | |
| bool | _buffersNeedRecreating |
| Do the buffers need recreating? More... | |
| bool | _boundsDirty |
| Do the bounds need redefining? More... | |
| bool | _indexContentDirty |
| Is the index buffer dirty? More... | |
| var | _indexContentDirty |
| Is the index buffer dirty? More... | |
| local | _indexContentDirty |
| Is the index buffer dirty? More... | |
| bool | _vertexContentDirty |
| Is the vertex buffer dirty? More... | |
| TexCoordDirection | _texCoordDir |
| Texture coord direction. More... | |
| float | _otherTexCoordRange [2] |
| Other texture coord range. More... | |
| bool | _faceCamera |
| When true, the billboards always face the camera. More... | |
| Vec3 | _normalBase |
| Used when mFaceCamera == false; determines the billboard's "normal". More... | |
| ElementList | _chainElementList |
| The list holding the chain elements. More... | |
| ChainSegmentList | _chainSegmentList |
| MeshCommand * | _meshCommand |
| Texture2D * | _texture |
| GLProgramState * | _glProgramState |
| IndexBuffer * | _indexBuffer |
| VertexBuffer * | _vertexBuffer |
| std::vector< VertexInfo > | _vertices |
| var | _vertices |
| local | _vertices |
| std::vector< unsigned short > | _indices |
Static Protected Attributes | |
| static const size_t | SEGMENT_EMPTY |
| Chain segment has no elements. More... | |
|
protected |
|
protected |
|
protected |
| typedef std::vector<Element> ElementList |
| var ElementList |
| local ElementList |
| enum TexCoordDirection |
| local TexCoordDirection |
| PUBillboardChain | ( | const std::string & | name, |
| const std::string & | texFile = "", |
||
| size_t | maxElements = 20, |
||
| size_t | numberOfChains = 1, |
||
| bool | useTextureCoords = true, |
||
| bool | useColours = true, |
||
| bool | dynamic = true |
||
| ) |
Constructor.
| name | The name to give this object |
| maxElements | The maximum number of elements per chain |
| numberOfChains | The number of separate chain segments contained in this object |
| useTextureCoords | If true, use texture coordinates from the chain elements |
| useVertexColours | If true, use vertex colours from the chain elements |
| dynamic | If true, buffers are created with the intention of being updated |
| var PUBillboardChain | ( | var | name, |
| var | texFile = "", |
||
| var | maxElements = 20, |
||
| var | numberOfChains = 1, |
||
| var | useTextureCoords = true, |
||
| var | useColours = true, |
||
| var | dynamic = true |
||
| ) |
Constructor.
| name | The name to give this object |
| maxElements | The maximum number of elements per chain |
| numberOfChains | The number of separate chain segments contained in this object |
| useTextureCoords | If true, use texture coordinates from the chain elements |
| useVertexColours | If true, use vertex colours from the chain elements |
| dynamic | If true, buffers are created with the intention of being updated |
| local PUBillboardChain | ( | local | name, |
| local | texFile = "", |
||
| local | maxElements = 20, |
||
| local | numberOfChains = 1, |
||
| local | useTextureCoords = true, |
||
| local | useColours = true, |
||
| local | dynamic = true |
||
| ) |
Constructor.
| name | The name to give this object |
| maxElements | The maximum number of elements per chain |
| numberOfChains | The number of separate chain segments contained in this object |
| useTextureCoords | If true, use texture coordinates from the chain elements |
| useVertexColours | If true, use vertex colours from the chain elements |
| dynamic | If true, buffers are created with the intention of being updated |
|
virtual |
destructor
|
virtual |
destructor
|
virtual |
destructor
|
virtual |
Add an element to the 'head' of a chain.
| chainIndex | The index of the chain |
| billboardChainElement | The details to add |
|
virtual |
Add an element to the 'head' of a chain.
| chainIndex | The index of the chain |
| billboardChainElement | The details to add |
|
virtual |
Add an element to the 'head' of a chain.
| chainIndex | The index of the chain |
| billboardChainElement | The details to add |
|
virtual |
Remove all elements from all chains (but leave the chains themselves intact).
|
virtual |
Remove all elements from all chains (but leave the chains themselves intact).
|
virtual |
Remove all elements from all chains (but leave the chains themselves intact).
|
virtual |
Remove all elements of a given chain (but leave the chain intact).
Reimplemented in PURibbonTrail.
|
virtual |
Remove all elements of a given chain (but leave the chain intact).
Reimplemented in PURibbonTrail.
|
virtual |
Remove all elements of a given chain (but leave the chain intact).
Reimplemented in PURibbonTrail.
|
virtual |
Get the detail of a chain element.
| chainIndex | The index of the chain |
| elementIndex | The element index within the chain, measured from the 'head' of the chain |
|
virtual |
Get the detail of a chain element.
| chainIndex | The index of the chain |
| elementIndex | The element index within the chain, measured from the 'head' of the chain |
|
virtual |
Get the detail of a chain element.
| chainIndex | The index of the chain |
| elementIndex | The element index within the chain, measured from the 'head' of the chain |
|
inlinevirtual |
Gets whether or not the buffers created for this object are suitable for dynamic alteration.
|
inlinevirtual |
Gets whether or not the buffers created for this object are suitable for dynamic alteration.
|
inlinevirtual |
Gets whether or not the buffers created for this object are suitable for dynamic alteration.
|
inlinevirtual |
Get the maximum number of chain elements per chain.
|
inlinevirtual |
Get the maximum number of chain elements per chain.
|
inlinevirtual |
Get the maximum number of chain elements per chain.
|
inlinevirtual |
Get the number of chain segments (this class can render multiple chains at once using the same material).
|
inlinevirtual |
Get the number of chain segments (this class can render multiple chains at once using the same material).
|
inlinevirtual |
Get the number of chain segments (this class can render multiple chains at once using the same material).
|
virtual |
Returns the number of chain elements.
|
virtual |
Returns the number of chain elements.
|
virtual |
Returns the number of chain elements.
|
inlinevirtual |
Get the range of the texture coordinates generated across the width of the chain elements.
|
inlinevirtual |
Get the range of the texture coordinates generated across the width of the chain elements.
|
inlinevirtual |
Get the range of the texture coordinates generated across the width of the chain elements.
|
inlinevirtual |
Gets the direction in which texture coords specified on each element are deemed to run.
|
inlinevirtual |
Gets the direction in which texture coords specified on each element are deemed to run.
|
inlinevirtual |
Gets the direction in which texture coords specified on each element are deemed to run.
|
inlinevirtual |
Gets whether texture coordinate information should be included in the final buffers generated.
|
inlinevirtual |
Gets whether texture coordinate information should be included in the final buffers generated.
|
inlinevirtual |
Gets whether texture coordinate information should be included in the final buffers generated.
|
inlinevirtual |
Gets whether vertex colour information should be included in the final buffers generated.
|
inlinevirtual |
Gets whether vertex colour information should be included in the final buffers generated.
|
inlinevirtual |
Gets whether vertex colour information should be included in the final buffers generated.
|
protected |
|
protected |
|
protected |
|
virtual |
Remove an element from the 'tail' of a chain.
| chainIndex | The index of the chain |
|
virtual |
Remove an element from the 'tail' of a chain.
| chainIndex | The index of the chain |
|
virtual |
Remove an element from the 'tail' of a chain.
| chainIndex | The index of the chain |
| void render | ( | Renderer * | renderer, |
| const Mat4 & | transform, | ||
| ParticleSystem3D * | particleSystem | ||
| ) |
| var render | ( | var | renderer, |
| var | transform, | ||
| var | particleSystem | ||
| ) |
| local render | ( | local | renderer, |
| local | transform, | ||
| local | particleSystem | ||
| ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Sets whether or not the buffers created for this object are suitable for dynamic alteration.
|
virtual |
Sets whether or not the buffers created for this object are suitable for dynamic alteration.
|
virtual |
Sets whether or not the buffers created for this object are suitable for dynamic alteration.
| void setFaceCamera | ( | bool | faceCamera, |
| const Vec3 & | normalVector = Vec3::UNIT_X |
||
| ) |
Sets whether the billboard should always be facing the camera or a custom direction set by each point element.
| faceCamera | True to be always facing the camera (Default value: True) |
| normalVector | Only used when faceCamera == false. Must be a non-zero vector. This vector is the "point of reference" for each point orientation. For example, if normalVector is Vector3::UNIT_Z, and the point's orientation is an identity matrix, the segment corresponding to that point will be facing towards UNIT_Z This vector is internally normalized. |
| var setFaceCamera | ( | var | faceCamera, |
| var | normalVector = Vec3::UNIT_X |
||
| ) |
Sets whether the billboard should always be facing the camera or a custom direction set by each point element.
| faceCamera | True to be always facing the camera (Default value: True) |
| normalVector | Only used when faceCamera == false. Must be a non-zero vector. This vector is the "point of reference" for each point orientation. For example, if normalVector is Vector3::UNIT_Z, and the point's orientation is an identity matrix, the segment corresponding to that point will be facing towards UNIT_Z This vector is internally normalized. |
| local setFaceCamera | ( | local | faceCamera, |
| local | normalVector = Vec3::UNIT_X |
||
| ) |
Sets whether the billboard should always be facing the camera or a custom direction set by each point element.
| faceCamera | True to be always facing the camera (Default value: True) |
| normalVector | Only used when faceCamera == false. Must be a non-zero vector. This vector is the "point of reference" for each point orientation. For example, if normalVector is Vector3::UNIT_Z, and the point's orientation is an identity matrix, the segment corresponding to that point will be facing towards UNIT_Z This vector is internally normalized. |
|
virtual |
Set the maximum number of chain elements per chain.
Reimplemented in PURibbonTrail.
|
virtual |
Set the maximum number of chain elements per chain.
Reimplemented in PURibbonTrail.
|
virtual |
Set the maximum number of chain elements per chain.
Reimplemented in PURibbonTrail.
|
virtual |
Set the number of chain segments (this class can render multiple chains at once using the same material).
Reimplemented in PURibbonTrail.
|
virtual |
Set the number of chain segments (this class can render multiple chains at once using the same material).
Reimplemented in PURibbonTrail.
|
virtual |
Set the number of chain segments (this class can render multiple chains at once using the same material).
Reimplemented in PURibbonTrail.
|
virtual |
Set the range of the texture coordinates generated across the width of the chain elements.
| start | Start coordinate, default 0.0 |
| end | End coordinate, default 1.0 |
|
virtual |
Set the range of the texture coordinates generated across the width of the chain elements.
| start | Start coordinate, default 0.0 |
| end | End coordinate, default 1.0 |
|
virtual |
Set the range of the texture coordinates generated across the width of the chain elements.
| start | Start coordinate, default 0.0 |
| end | End coordinate, default 1.0 |
|
virtual |
Sets the direction in which texture coords specified on each element are deemed to run along the length of the chain.
| dir | The direction, default is TCD_U. |
|
virtual |
Sets the direction in which texture coords specified on each element are deemed to run along the length of the chain.
| dir | The direction, default is TCD_U. |
|
virtual |
Sets the direction in which texture coords specified on each element are deemed to run along the length of the chain.
| dir | The direction, default is TCD_U. |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Setup the STL collections
|
protectedvirtual |
Setup the STL collections
|
protectedvirtual |
Setup the STL collections
|
protectedvirtual |
Setup vertex declaration.
|
protectedvirtual |
Setup vertex declaration.
|
protectedvirtual |
Setup vertex declaration.
|
virtual |
Sets whether texture coordinate information should be included in the final buffers generated.
|
virtual |
Sets whether texture coordinate information should be included in the final buffers generated.
|
virtual |
Sets whether texture coordinate information should be included in the final buffers generated.
|
virtual |
Sets whether vertex colour information should be included in the final buffers generated.
|
virtual |
Sets whether vertex colour information should be included in the final buffers generated.
|
virtual |
Sets whether vertex colour information should be included in the final buffers generated.
|
virtual |
Update the details of an existing chain element.
| chainIndex | The index of the chain |
| elementIndex | The element index within the chain, measured from the 'head' of the chain |
| billboardChainElement | The details to set |
|
virtual |
Update the details of an existing chain element.
| chainIndex | The index of the chain |
| elementIndex | The element index within the chain, measured from the 'head' of the chain |
| billboardChainElement | The details to set |
|
virtual |
Update the details of an existing chain element.
| chainIndex | The index of the chain |
| elementIndex | The element index within the chain, measured from the 'head' of the chain |
| billboardChainElement | The details to set |
|
protectedvirtual |
Update the contents of the index buffer.
|
protectedvirtual |
Update the contents of the index buffer.
|
protectedvirtual |
Update the contents of the index buffer.
|
protectedvirtual |
Update the contents of the vertex buffer.
|
protectedvirtual |
Update the contents of the vertex buffer.
|
protectedvirtual |
Update the contents of the vertex buffer.
|
mutableprotected |
Do the bounds need redefining?
|
mutableprotected |
Do the bounds need redefining?
|
mutableprotected |
Do the bounds need redefining?
|
protected |
Do the buffers need recreating?
|
protected |
Do the buffers need recreating?
|
protected |
Do the buffers need recreating?
|
protected |
Number of chains.
|
protected |
Number of chains.
|
protected |
Number of chains.
|
protected |
The list holding the chain elements.
|
protected |
The list holding the chain elements.
|
protected |
The list holding the chain elements.
|
protected |
|
protected |
|
protected |
|
protected |
Dynamic use?
|
protected |
Dynamic use?
|
protected |
Dynamic use?
|
protected |
When true, the billboards always face the camera.
|
protected |
When true, the billboards always face the camera.
|
protected |
When true, the billboards always face the camera.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Is the index buffer dirty?
|
protected |
Is the index buffer dirty?
|
protected |
Is the index buffer dirty?
|
protected |
|
protected |
|
protected |
|
protected |
Maximum length of each chain.
|
protected |
|
protected |
|
protected |
|
protected |
Used when mFaceCamera == false; determines the billboard's "normal".
i.e. when the orientation is identity, the billboard is perpendicular to this vector
|
protected |
Used when mFaceCamera == false; determines the billboard's "normal".
i.e. when the orientation is identity, the billboard is perpendicular to this vector
|
protected |
Used when mFaceCamera == false; determines the billboard's "normal".
i.e. when the orientation is identity, the billboard is perpendicular to this vector
|
protected |
Other texture coord range.
|
protected |
Other texture coord range.
|
protected |
Other texture coord range.
|
protected |
Texture coord direction.
|
protected |
Texture coord direction.
|
protected |
Texture coord direction.
|
protected |
|
protected |
|
protected |
|
protected |
Use texture coords?
|
protected |
Use texture coords?
|
protected |
Use texture coords?
|
protected |
Use vertex colour?
|
protected |
Use vertex colour?
|
protected |
Use vertex colour?
|
protected |
|
protected |
|
protected |
|
protected |
Is the vertex buffer dirty?
|
protected |
Is the vertex buffer dirty?
|
protected |
Is the vertex buffer dirty?
|
protected |
Is the vertex declaration dirty?
|
protected |
Is the vertex declaration dirty?
|
protected |
Is the vertex declaration dirty?
|
protected |
|
protected |
|
protected |
|
staticprotected |
Chain segment has no elements.
|
staticprotected |
Chain segment has no elements.
|
staticprotected |
Chain segment has no elements.