Class SkinnedModelLOD
Represents single Level Of Detail for the skinned model. Contains a collection of the meshes.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Content/Assets/SkinnedModel.h
Syntax
public class SkinnedModelLOD : public ModelLODBase
Fields
Meshes
The meshes array.
Declaration
public Array<SkinnedMesh> Meshes
Field Value
Array<SkinnedMesh>
|
Methods
Draw(const RenderContext& renderContext, const SkinnedMesh::DrawInfo& info, float lodDitherFactor)
Draws all the meshes from the model LOD.
Declaration
public void Draw(const RenderContext& renderContext, const SkinnedMesh::DrawInfo& info, float lodDitherFactor) const
Parameters
RenderContext
renderContext
The rendering context. |
SkinnedMesh::DrawInfo
info
The packed drawing info data. |
float
lodDitherFactor
The LOD transition dither factor. |
Returns
void
|
Draw(const RenderContextBatch& renderContextBatch, const SkinnedMesh::DrawInfo& info, float lodDitherFactor)
Draws all the meshes from the model LOD.
Declaration
public void Draw(const RenderContextBatch& renderContextBatch, const SkinnedMesh::DrawInfo& info, float lodDitherFactor) const
Parameters
RenderContextBatch
renderContextBatch
The rendering context batch. |
SkinnedMesh::DrawInfo
info
The packed drawing info data. |
float
lodDitherFactor
The LOD transition dither factor. |
Returns
void
|
GetMesh(int32 index)
Gets the specific mesh in this LOD.
Declaration
public virtual MeshBase* GetMesh(int32 index) const override
Parameters
int32
index
|
Returns
MeshBase
|
Overrides
GetMeshes(Array<const MeshBase* >& meshes)
Gets the meshes in this LOD.
Declaration
public virtual void GetMeshes(Array<const MeshBase* >& meshes) const override
Parameters
Array<MeshBase >
meshes
|
Overrides
GetMeshes(Array<MeshBase* >& meshes)
Gets the meshes in this LOD.
Declaration
public virtual void GetMeshes(Array<MeshBase* >& meshes) override
Parameters
Array<MeshBase >
meshes
|
Overrides
GetMeshesCount()
Gets the amount of meshes in this LOD.
Declaration
public virtual int32 GetMeshesCount() const override
Returns
int32
|
Overrides
Intersects(const Ray& ray, const Matrix& world, Real& distance, Vector3& normal, SkinnedMesh* *mesh)
Determines if there is an intersection between the Model and a Ray in given world using given instance
Declaration
public bool Intersects(const Ray& ray, const Matrix& world, Real& distance, Vector3& normal, SkinnedMesh* *mesh)
Parameters
Ray
ray
The ray to test |
Matrix
world
World to test |
Real
distance
When the method completes, contains the distance of the intersection (if any valid). |
Vector3
normal
When the method completes, contains the intersection surface normal vector (if any valid). |
SkinnedMesh
mesh
Mesh, or null |
Returns
bool
True whether the two objects intersected |
Intersects(const Ray& ray, const Transform& transform, Real& distance, Vector3& normal, SkinnedMesh* *mesh)
Determines if there is an intersection between the Model and a Ray in given world using given instance
Declaration
public bool Intersects(const Ray& ray, const Transform& transform, Real& distance, Vector3& normal, SkinnedMesh* *mesh)
Parameters
Ray
ray
The ray to test |
Transform
transform
Instance transformation |
Real
distance
When the method completes, contains the distance of the intersection (if any valid). |
Vector3
normal
When the method completes, contains the intersection surface normal vector (if any valid). |
SkinnedMesh
mesh
Mesh, or null |
Returns
bool
True whether the two objects intersected |
Render(GPUContext* context)
Draws the meshes. Binds vertex and index buffers and invokes the draw calls.
Declaration
public void Render(GPUContext* context)
Parameters
GPUContext
context
The GPU context to draw with. |
Returns
void
|