28#ifndef __OptimisedUtil_H__
29#define __OptimisedUtil_H__
108 size_t numVertices) = 0;
205 size_t numVertices) = 0;
215 return (
const T*)((
const char*)(ptr) + offset);
221 return (
T*)((
char*)(ptr) + offset);
Class encapsulating a standard 4x4 homogeneous matrix.
Utility class for provides optimised functions.
virtual void softwareVertexMorph(Real t, const float *srcPos1, const float *srcPos2, float *dstPos, size_t pos1VSize, size_t pos2VSize, size_t dstVSize, size_t numVertices, bool morphNormals)=0
Performs a software vertex morph, of the kind used for morph animation although it can be used for ot...
virtual void concatenateAffineMatrices(const Matrix4 &baseMatrix, const Matrix4 *srcMatrices, Matrix4 *dstMatrices, size_t numMatrices)=0
Concatenate an affine matrix to an array of affine matrices.
static OptimisedUtil * _detectImplementation(void)
Detect best implementation based on run-time environment.
virtual void extrudeVertices(const Vector4 &lightPos, Real extrudeDist, const float *srcPositions, float *destPositions, size_t numVertices)=0
Extruding vertices by a fixed distance based on light position.
virtual void softwareVertexSkinning(const float *srcPosPtr, float *destPosPtr, const float *srcNormPtr, float *destNormPtr, const float *blendWeightPtr, const unsigned char *blendIndexPtr, const Matrix4 *const *blendMatrices, size_t srcPosStride, size_t destPosStride, size_t srcNormStride, size_t destNormStride, size_t blendWeightStride, size_t blendIndexStride, size_t numWeightsPerVertex, size_t numVertices)=0
Performs software vertex skinning.
static OptimisedUtil * getImplementation(void)
Gets the implementation of this class.
OptimisedUtil & operator=(const OptimisedUtil &rhs)
Privated operator=, to prevent misuse.
virtual void calculateFaceNormals(const float *positions, const EdgeData::Triangle *triangles, Vector4 *faceNormals, size_t numTriangles)=0
Calculate the face normals for the triangles based on position information.
virtual void calculateLightFacing(const Vector4 &lightPos, const Vector4 *faceNormals, char *lightFacings, size_t numFaces)=0
Calculate the light facing state of the triangle's face normals.
OptimisedUtil(const OptimisedUtil &rhs)
Privated copy constructor, to prevent misuse.
static OptimisedUtil * msImplementation
Store a pointer to the implementation.
Reference-counted shared pointer, used for objects where implicit destruction is required.
4-dimensional homogeneous vector.
static FORCEINLINE void advanceRawPointer(const T *&ptr, ptrdiff_t offset)
Advance the pointer with raw offset.
static FORCEINLINE const T * rawOffsetPointer(const T *ptr, ptrdiff_t offset)
Returns raw offseted of the given pointer.
Basic triangle structure.