PixelLightAPI
.
|
A morph target alters the vertex data for each frame. More...
#include <MeshMorphTarget.h>
Public Member Functions | |
PLMESH_API | MeshMorphTarget (Mesh *pMesh=nullptr) |
Constructor. | |
PLMESH_API | ~MeshMorphTarget () |
Destructor. | |
PLMESH_API Mesh * | GetMesh () const |
Returns the mesh the morph target belongs to. | |
PLMESH_API void | SetMesh (Mesh *pMesh=nullptr) |
Sets the mesh the morph target belongs to. | |
PLMESH_API PLCore::String | GetName () const |
Returns the name of this morph target. | |
PLMESH_API void | SetName (const PLCore::String &sName) |
Sets the name of this morph target. | |
PLMESH_API bool | IsRelative () const |
Returns whether this morph target is relative to the basis morph target or not. | |
PLMESH_API void | SetRelative (bool bRelative=false) |
Sets whether this morph target is relative to the basis morph target or not. | |
PLMESH_API PLCore::Array < PLCore::uint32 > & | GetVertexIDs () |
Returns the vertex ID's. | |
PLMESH_API PLRenderer::VertexBuffer * | GetVertexBuffer () const |
Returns the vertex buffer. | |
PLMESH_API MeshMorphTarget & | operator= (const MeshMorphTarget &cSource) |
Copy operator. | |
PLMESH_API void | BuildTrianglePlaneList () |
Builds the current triangle planes. | |
PLMESH_API PLCore::Array < PLMath::Plane > & | GetTrianglePlaneList () |
Gets the triangle plane list. | |
PLMESH_API bool | CalculateNormals () |
Calculate the vertex normals of the morph target. | |
PLMESH_API bool | CalculateTangentSpaceVectors (bool bTangent=true, bool bBinormal=true) |
Calculates all tangent space vectors of the morph target. | |
PLMESH_API bool | CalculateBoundingBox (PLMath::Vector3 &vMinPos, PLMath::Vector3 &vMaxPos) const |
Calculates the morph target bounding box. | |
PLMESH_API bool | CalculateBoundingSphere (PLMath::Vector3 &vPos, float &fRadius) const |
Calculates the morph target bounding sphere. |
A morph target alters the vertex data for each frame.
PLMESH_API PLMesh::MeshMorphTarget::MeshMorphTarget | ( | Mesh * | pMesh = nullptr | ) |
Constructor.
[in] | pMesh | Pointer to the owner mesh, can be a null pointer |
PLMESH_API PLMesh::MeshMorphTarget::~MeshMorphTarget | ( | ) |
Destructor.
PLMESH_API Mesh* PLMesh::MeshMorphTarget::GetMesh | ( | ) | const |
Returns the mesh the morph target belongs to.
PLMESH_API void PLMesh::MeshMorphTarget::SetMesh | ( | Mesh * | pMesh = nullptr | ) |
Sets the mesh the morph target belongs to.
[in] | pMesh | Pointer to the owner mesh, can be a null pointer |
PLMESH_API PLCore::String PLMesh::MeshMorphTarget::GetName | ( | ) | const |
Returns the name of this morph target.
PLMESH_API void PLMesh::MeshMorphTarget::SetName | ( | const PLCore::String & | sName | ) |
Sets the name of this morph target.
[in] | sName | Name of this morph target |
PLMESH_API bool PLMesh::MeshMorphTarget::IsRelative | ( | ) | const |
Returns whether this morph target is relative to the basis morph target or not.
PLMESH_API void PLMesh::MeshMorphTarget::SetRelative | ( | bool | bRelative = false | ) |
Sets whether this morph target is relative to the basis morph target or not.
[in] | bRelative | 'true' if it's relative, else 'false' |
PLMESH_API PLCore::Array<PLCore::uint32>& PLMesh::MeshMorphTarget::GetVertexIDs | ( | ) |
Returns the vertex ID's.
PLMESH_API PLRenderer::VertexBuffer* PLMesh::MeshMorphTarget::GetVertexBuffer | ( | ) | const |
Returns the vertex buffer.
PLMESH_API MeshMorphTarget& PLMesh::MeshMorphTarget::operator= | ( | const MeshMorphTarget & | cSource | ) |
Copy operator.
[in] | cSource | Source to copy from |
PLMESH_API void PLMesh::MeshMorphTarget::BuildTrianglePlaneList | ( | ) |
Builds the current triangle planes.
PLMESH_API PLCore::Array<PLMath::Plane>& PLMesh::MeshMorphTarget::GetTrianglePlaneList | ( | ) |
PLMESH_API bool PLMesh::MeshMorphTarget::CalculateNormals | ( | ) |
Calculate the vertex normals of the morph target.
PLMESH_API bool PLMesh::MeshMorphTarget::CalculateTangentSpaceVectors | ( | bool | bTangent = true , |
bool | bBinormal = true |
||
) |
Calculates all tangent space vectors of the morph target.
[in] | bTangent | Create tangent vectors? |
[in] | bBinormal | Create binormal vectors? |
PLMESH_API bool PLMesh::MeshMorphTarget::CalculateBoundingBox | ( | PLMath::Vector3 & | vMinPos, |
PLMath::Vector3 & | vMaxPos | ||
) | const |
Calculates the morph target bounding box.
[out] | vMinPos | Will receive the minimum bounding box position |
[out] | vMaxPos | Will receive the maximum bounding box position |
PLMESH_API bool PLMesh::MeshMorphTarget::CalculateBoundingSphere | ( | PLMath::Vector3 & | vPos, |
float & | fRadius | ||
) | const |
Calculates the morph target bounding sphere.
[out] | vPos | Will receive the bounding sphere position |
[out] | fRadius | Will receive the bounding sphere radius |
|