Go to the documentation of this file.
28 #ifndef __BaseInstanceBatchVTF_H__
29 #define __BaseInstanceBatchVTF_H__
125 void createVertexTexture(
const SubMesh* baseSubMesh );
131 size_t convert3x4MatricesToDualQuaternions(
float* matrices,
size_t numOfMatrices,
float* outDualQuaternions);
134 void updateVertexTexture(
void);
137 virtual bool matricesTogetherPerRow()
const = 0;
140 virtual void updateSharedLookupIndexes();
155 void getWorldTransforms(
Matrix4* xform )
const;
156 unsigned short getNumWorldTransforms(
void)
const;
173 void setBoneMatrixLookup(
bool enable,
size_t maxLookupTableInstances) { assert(mInstancedEntities.empty());
174 mUseBoneMatrixLookup = enable; mMaxLookupTableInstances = maxLookupTableInstances; }
182 mUseBoneDualQuaternions = enable; mRowLength = (mUseBoneDualQuaternions ? 2 : 3); }
187 mForceOneWeight = enable; }
192 mUseOneWeight = enable; }
207 void setupVertices(
const SubMesh* baseSubMesh );
208 void setupIndices(
const SubMesh* baseSubMesh );
222 size_t calculateMaxNumInstances(
const SubMesh *baseSubMesh,
uint16 flags )
const;
vector< unsigned short >::type IndexMap
bool forceOneWeight() const
vector< Matrix4 >::type Matrix4Vec
vector< float >::type HWBoneWgtVec
void setBoneDualQuaternions(bool enable)
This is the main starting point for the new instancing system.
TexturePtr mMatrixTexture
size_t mMatricesPerInstance
float * mTempTransformsArray3x4
void setUseOneWeight(bool enable)
void setForceOneWeight(bool enable)
void setBoneMatrixLookup(bool enable, size_t maxLookupTableInstances)
Sets the state of the usage of bone matrix lookup.
Summary class collecting together vertex source information.
bool mUseBoneDualQuaternions
Class encapsulating a standard 4x4 homogeneous matrix.
bool mUseBoneMatrixLookup
virtual size_t getMaxLookupTableInstances() const
Defines a part of a complete mesh.
size_t mWidthFloatsPadding
virtual bool useBoneWorldMatrices() const
virtual bool matricesTogetherPerRow() const
Affects VTF texture's width dimension.
bool useBoneDualQuaternions() const
Instancing implementation using vertex texture through Vertex Texture Fetch (VTF) This implementation...
size_t mMaxLookupTableInstances
bool useOneWeight() const
bool useBoneMatrixLookup() const
Tells whether to use bone matrix lookup.
InstanceBatch forms part of the new Instancing system This is an abstract class that must be derived ...
TextureType
Enum identifying the texture type.
'New' rendering operation using vertex buffers.
Class to manage the scene object rendering queue.
vector< uint8 >::type HWBoneIdxVec
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15