OGRE 14.3
Object-Oriented Graphics Rendering Engine
|
Utility class for provides optimised functions. More...
#include <OgreOptimisedUtil.h>
Static Public Member Functions | |
static OptimisedUtil * | getImplementation (void) |
Gets the implementation of this class. | |
Utility class for provides optimised functions.
|
inline |
|
inlinevirtual |
|
inlinestatic |
Gets the implementation of this class.
|
pure virtual |
Performs software vertex skinning.
srcPosPtr | Pointer to source position buffer. |
destPosPtr | Pointer to destination position buffer. |
srcNormPtr | Pointer to source normal buffer, if NULL, means blend position only. |
destNormPtr | Pointer to destination normal buffer, it's ignored if srcNormPtr is NULL. |
blendWeightPtr | Pointer to blend weight buffer. |
blendIndexPtr | Pointer to blend index buffer. |
blendMatrices | An array of pointer of blend matrix, the matrix must be aligned to SIMD alignment, but not necessary for the array itself. |
srcPosStride | The stride of source position in bytes. |
destPosStride | The stride of destination position in bytes. |
srcNormStride | The stride of source normal in bytes, it's ignored if srcNormPtr is NULL. |
destNormStride | The stride of destination normal in bytes, it's ignored if srcNormPtr is NULL. |
blendWeightStride | The stride of blend weight buffer in bytes. |
blendIndexStride | The stride of blend index buffer in bytes. |
numWeightsPerVertex | Number of blend weights per-vertex, as well as for blend indices. |
numVertices | Number of vertices to blend. |
|
pure virtual |
Performs a software vertex morph, of the kind used for morph animation although it can be used for other purposes.
This function will linearly interpolate positions between two source buffers, into a third buffer.
t | Parametric distance between the start and end positions |
srcPos1 | Pointer to buffer for the start positions |
srcPos2 | Pointer to buffer for the end positions |
dstPos | Pointer to buffer for the destination positions |
pos1VSize,pos2VSize,dstVSize | Vertex sizes in bytes of each of the 3 buffers referenced |
numVertices | Number of vertices to morph, which agree with the number in start, end and destination buffer. Bear in mind three floating-point values per vertex |
morphNormals |
|
pure virtual |
Concatenate an affine matrix to an array of affine matrices.
baseMatrix | The matrix used as first operand. |
srcMatrices | An array of matrix used as second operand. |
dstMatrices | An array of matrix to store matrix concatenate results. |
numMatrices | Number of matrices in the array. |
|
pure virtual |
Calculate the face normals for the triangles based on position information.
positions | Pointer to position information, which packed in (x, y, z) format, indexing by vertex index in the triangle. No alignment requests. |
triangles | The triangles need to calculate face normal, the vertex positions is indexed by vertex index to position information. |
faceNormals | The array of Vector4 used to store triangles face normal, Must be aligned to SIMD alignment. |
numTriangles | Number of triangles to calculate face normal. |
|
pure virtual |
Calculate the light facing state of the triangle's face normals.
This is normally the first stage of calculating a silhouette, i.e. establishing which tris are facing the light and which are facing away.
lightPos | 4D position of the light in object space, note that for directional lights (which have no position), the w component is 0 and the x/y/z position are the direction. |
faceNormals | An array of face normals for the triangles, the face normal are unit vector orthogonal to the triangles, plus distance from origin. This array must be aligned to SIMD alignment. |
lightFacings | An array of flags for store light facing state results, the result flag is true if corresponding face normal facing the light, false otherwise. This array no alignment requires. |
numFaces | Number of face normals to calculate. |
|
pure virtual |
Extruding vertices by a fixed distance based on light position.
lightPos | 4D light position, when w=0.0f this represents a directional light, otherwise, w must be equal to 1.0f, which represents a point light. |
extrudeDist | The distance to extrude. |
srcPositions | Pointer to source vertex's position buffer, which the position is a 3D vector packed in xyz format. No SIMD alignment requirement but loss performance for unaligned data. |
destPositions | Pointer to destination vertex's position buffer, which the position is a 3D vector packed in xyz format. No SIMD alignment requirement but loss performance for unaligned data. |
numVertices | Number of vertices need to extruding, which agree with source and destination buffers. |