internal class, the tool class of PUBeamRender. More...
Inherited by PURibbonTrail.
Classes | |
class | Element |
Contains the data of an element of the BillboardChain. More... | |
Public Types | |
enum | TexCoordDirection { TCD_U, TCD_V } |
The direction in which texture coordinates from elements of the chain are used. More... | |
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 | |
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... | |
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... | |
var | setOtherTextureCoordRange ( var start, var end) |
Set the range of the texture coordinates generated across the width of the chain elements. More... | |
local | setOtherTextureCoordRange ( local start, local 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... | |
var | addChainElement ( var chainIndex, var 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... | |
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). | |
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... | |
void | setDepthTest (bool isDepthTest) |
Set whether use depth test. More... | |
void | setDepthWrite (bool isDepthWrite) |
Set whether use depth write. More... | |
void | setBlendFunc (const BlendFunc &blendFunc) |
Set whether use blend. More... | |
void | render (Renderer *renderer, const Mat4 &transform, ParticleSystem3D *particleSystem) |
Rendering Chain. More... | |
GLuint | getTextureName () |
internal class, the tool class of PUBeamRender.
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.
The name to give this object. The maximum number of elements per chain. The number of separate chain segments contained in this object. If true, use texture coordinates from the chain elements. If true, use vertex colours from the chain elements. 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.
The name to give this object. The maximum number of elements per chain. The number of separate chain segments contained in this object. If true, use texture coordinates from the chain elements. If true, use vertex colours from the chain elements. 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.
The name to give this object. The maximum number of elements per chain. The number of separate chain segments contained in this object. If true, use texture coordinates from the chain elements. If true, use vertex colours from the chain elements. If true, buffers are created with the intention of being updated.
|
virtual |
Set the maximum number of chain elements per chain.
The maximum number of elements per chain.
|
virtual |
Set the maximum number of chain elements per chain.
The maximum number of elements per chain.
|
virtual |
Set the maximum number of chain elements per chain.
The maximum number of elements per chain.
|
inlinevirtual |
Get the maximum number of chain elements per chain.
The maximum number of elements per chain.
|
inlinevirtual |
Get the maximum number of chain elements per chain.
The maximum number of elements per chain.
|
inlinevirtual |
Get the maximum number of chain elements per chain.
The maximum number of elements per chain.
|
virtual |
Set the number of chain segments (this class can render multiple chains at once using the same material).
The number of chain segments.
|
virtual |
Set the number of chain segments (this class can render multiple chains at once using the same material).
The number of chain segments.
|
virtual |
Set the number of chain segments (this class can render multiple chains at once using the same material).
The number of chain segments.
|
inlinevirtual |
Get the number of chain segments (this class can render multiple chains at once using the same material).
The number of chain segments.
|
inlinevirtual |
Get the number of chain segments (this class can render multiple chains at once using the same material).
The number of chain segments.
|
inlinevirtual |
Get the number of chain segments (this class can render multiple chains at once using the same material).
The number of chain segments.
|
virtual |
Sets whether texture coordinate information should be included in the final buffers generated.
If use texture coordinate. You must use either texture coordinates or vertex colour since the vertices have no normals and without one of these there is no source of colour for the vertices.
|
virtual |
Sets whether texture coordinate information should be included in the final buffers generated.
If use texture coordinate. You must use either texture coordinates or vertex colour since the vertices have no normals and without one of these there is no source of colour for the vertices.
|
virtual |
Sets whether texture coordinate information should be included in the final buffers generated.
If use texture coordinate. You must use either texture coordinates or vertex colour since the vertices have no normals and without one of these there is no source of colour for the vertices.
|
inlinevirtual |
Gets whether texture coordinate information should be included in the final buffers generated.
If use texture coordinate.
|
inlinevirtual |
Gets whether texture coordinate information should be included in the final buffers generated.
If use texture coordinate.
|
inlinevirtual |
Gets whether texture coordinate information should be included in the final buffers generated.
If use texture coordinate.
|
virtual |
Sets the direction in which texture coords specified on each element are deemed to run along the length of the chain.
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.
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.
The direction, default is TCD_U.
|
inlinevirtual |
Gets the direction in which texture coords specified on each element are deemed to run.
The direction.
|
inlinevirtual |
Gets the direction in which texture coords specified on each element are deemed to run.
The direction.
|
inlinevirtual |
Gets the direction in which texture coords specified on each element are deemed to run.
The direction.
|
virtual |
Set the range of the texture coordinates generated across the width of the chain elements.
Start coordinate, default 0.0. End coordinate, default 1.0.
|
virtual |
Set the range of the texture coordinates generated across the width of the chain elements.
Start coordinate, default 0.0. End coordinate, default 1.0.
|
virtual |
Set the range of the texture coordinates generated across the width of the chain elements.
Start coordinate, default 0.0. End coordinate, default 1.0.
|
inlinevirtual |
Get the range of the texture coordinates generated across the width of the chain elements.
Start and End coordinate.
|
inlinevirtual |
Get the range of the texture coordinates generated across the width of the chain elements.
Start and End coordinate.
|
inlinevirtual |
Get the range of the texture coordinates generated across the width of the chain elements.
Start and End coordinate.
|
virtual |
Sets whether vertex colour information should be included in the final buffers generated.
If use vertex colour. You must use either texture coordinates or vertex colour since the vertices have no normals and without one of these there is no source of colour for the vertices.
|
virtual |
Sets whether vertex colour information should be included in the final buffers generated.
If use vertex colour. You must use either texture coordinates or vertex colour since the vertices have no normals and without one of these there is no source of colour for the vertices.
|
virtual |
Sets whether vertex colour information should be included in the final buffers generated.
If use vertex colour. You must use either texture coordinates or vertex colour since the vertices have no normals and without one of these there is no source of colour for the vertices.
|
inlinevirtual |
Gets whether vertex colour information should be included in the final buffers generated.
If use vertex colour.
|
inlinevirtual |
Gets whether vertex colour information should be included in the final buffers generated.
If use vertex colour.
|
inlinevirtual |
Gets whether vertex colour information should be included in the final buffers generated.
If use vertex colour.
|
virtual |
Sets whether or not the buffers created for this object are suitable for dynamic alteration.
If use dynamic buffers.
|
virtual |
Sets whether or not the buffers created for this object are suitable for dynamic alteration.
If use dynamic buffers.
|
virtual |
Sets whether or not the buffers created for this object are suitable for dynamic alteration.
If use dynamic buffers.
|
inlinevirtual |
Gets whether or not the buffers created for this object are suitable for dynamic alteration.
If use dynamic buffers.
|
inlinevirtual |
Gets whether or not the buffers created for this object are suitable for dynamic alteration.
If use dynamic buffers.
|
inlinevirtual |
Gets whether or not the buffers created for this object are suitable for dynamic alteration.
If use dynamic buffers.
|
virtual |
Add an element to the 'head' of a chain.
The index of the chain. The details to add. If this causes the number of elements to exceed the maximum elements per chain, the last element in the chain (the 'tail') will be removed to allow the additional element to be added.
|
virtual |
Add an element to the 'head' of a chain.
The index of the chain. The details to add. If this causes the number of elements to exceed the maximum elements per chain, the last element in the chain (the 'tail') will be removed to allow the additional element to be added.
|
virtual |
Add an element to the 'head' of a chain.
The index of the chain. The details to add. If this causes the number of elements to exceed the maximum elements per chain, the last element in the chain (the 'tail') will be removed to allow the additional element to be added.
|
virtual |
Remove an element from the 'tail' of a chain.
The index of the chain.
|
virtual |
Remove an element from the 'tail' of a chain.
The index of the chain.
|
virtual |
Remove an element from the 'tail' of a chain.
The index of the chain.
|
virtual |
Update the details of an existing chain element.
The index of the chain. The element index within the chain, measured from the 'head' of the chain. The details to set.
|
virtual |
Update the details of an existing chain element.
The index of the chain. The element index within the chain, measured from the 'head' of the chain. The details to set.
|
virtual |
Update the details of an existing chain element.
The index of the chain. The element index within the chain, measured from the 'head' of the chain. The details to set.
|
virtual |
Get the detail of a chain element.
The index of the chain. The element index within the chain, measured from the 'head' of the chain. The details to set.
|
virtual |
Get the detail of a chain element.
The index of the chain. The element index within the chain, measured from the 'head' of the chain. The details to set.
|
virtual |
Get the detail of a chain element.
The index of the chain. The element index within the chain, measured from the 'head' of the chain. The details to set.
|
virtual |
Returns the number of chain elements.
The index of the chain.
|
virtual |
Returns the number of chain elements.
The index of the chain.
|
virtual |
Returns the number of chain elements.
The index of the chain.
|
virtual |
Remove all elements of a given chain (but leave the chain intact).
The index of the chain.
|
virtual |
Remove all elements of a given chain (but leave the chain intact).
The index of the chain.
|
virtual |
Remove all elements of a given chain (but leave the chain intact).
The index of the chain.
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.
If facing the camera. Only used when faceCamera == false. Must be a non-zero vector. Billboards facing the camera are useful for smoke trails, light beams, etc by simulating a cylinder. However, because of this property, wide trails can cause several artefacts unless the head is properly covered. Therefore, non-camera-facing billboards are much more convenient for leaving big trails of movement from thin objects, for example a sword swing as seen in many fighting games.
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.
If facing the camera. Only used when faceCamera == false. Must be a non-zero vector. Billboards facing the camera are useful for smoke trails, light beams, etc by simulating a cylinder. However, because of this property, wide trails can cause several artefacts unless the head is properly covered. Therefore, non-camera-facing billboards are much more convenient for leaving big trails of movement from thin objects, for example a sword swing as seen in many fighting games.
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.
If facing the camera. Only used when faceCamera == false. Must be a non-zero vector. Billboards facing the camera are useful for smoke trails, light beams, etc by simulating a cylinder. However, because of this property, wide trails can cause several artefacts unless the head is properly covered. Therefore, non-camera-facing billboards are much more convenient for leaving big trails of movement from thin objects, for example a sword swing as seen in many fighting games.
void setDepthTest | ( | bool | isDepthTest | ) |
Set whether use depth test.
Whether use depth test.
var setDepthTest | ( | var | isDepthTest | ) |
Set whether use depth test.
Whether use depth test.
local setDepthTest | ( | local | isDepthTest | ) |
Set whether use depth test.
Whether use depth test.
void setDepthWrite | ( | bool | isDepthWrite | ) |
Set whether use depth write.
Whether use depth write.
var setDepthWrite | ( | var | isDepthWrite | ) |
Set whether use depth write.
Whether use depth write.
local setDepthWrite | ( | local | isDepthWrite | ) |
Set whether use depth write.
Whether use depth write.
void setBlendFunc | ( | const BlendFunc & | blendFunc | ) |
Set whether use blend.
The blend function.
var setBlendFunc | ( | var | blendFunc | ) |
Set whether use blend.
The blend function.
local setBlendFunc | ( | local | blendFunc | ) |
Set whether use blend.
The blend function.
void render | ( | Renderer * | renderer, |
const Mat4 & | transform, | ||
ParticleSystem3D * | particleSystem | ||
) |
Rendering Chain.
The Renderer. The transform to world. The current particle system.
var render | ( | var | renderer, |
var | transform, | ||
var | particleSystem | ||
) |
Rendering Chain.
The Renderer. The transform to world. The current particle system.
local render | ( | local | renderer, |
local | transform, | ||
local | particleSystem | ||
) |
Rendering Chain.
The Renderer. The transform to world. The current particle system.
GLuint getTextureName | ( | ) |
var getTextureName | ( | ) |
local getTextureName | ( | ) |