Class TSkinnedMesh

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSkinnedMesh = class(TAnimatedMesh)

Description

Mesh class for using some special functions of Skinned meshes.

Hierarchy

Overview

Methods

Public function AddJoint(Parent: TSkinnedMeshJoint = nil): TSkinnedMeshJoint; inline;
Public function AddMeshBuffer: TSkinMeshBuffer; inline;
Public function AddPositionKey(Joint: TSkinnedMeshJoint): TSkinnedMeshPositionKey; inline;
Public function AddRotationKey(Joint: TSkinnedMeshJoint): TSkinnedMeshRotationKey; inline;
Public function AddScaleKey(Joint: TSkinnedMeshJoint): TSkinnedMeshScaleKey; inline;
Public function AddWeight(Joint: TSkinnedMeshJoint): TSkinnedMeshWeight; inline;
Public function EnableHardwareSkinning(Enable: Boolean = True): Boolean; inline;
Public function GetJoint(Index: LongWord): TSkinnedMeshJoint; inline;
Public function GetJointIndex(const Name: AnsiString): LongInt; inline;
Public function GetJointName(Index: LongWord): AnsiString; inline;
Public function GetMeshBuffer(Index: LongWord): TSkinMeshBuffer; inline;
Public function UseAnimationFrom(Mesh: TSkinnedMesh): Boolean; inline;
Public procedure AnimateMesh(Frame, Blend: Single); inline;
Public procedure ConvertMeshToTangents; inline;
Public procedure Finalize; inline;
Public procedure SetInterpolationMode(Mode: TInterpolationMode); inline;
Public procedure SkinMesh; inline;

Properties

Public property IsStatic: Boolean read GetIsStatic;
Public property JointCount: LongWord read GetJointCount;
Public property MeshBufferCount: LongWord read GetMeshBufferCount;
Public property UpdateNormalsWhenAnimating: Boolean write SetUpdateNormalsWhenAnimating;

Description

Methods

Public function AddJoint(Parent: TSkinnedMeshJoint = nil): TSkinnedMeshJoint; inline;

Adds a new joint to the mesh, access it as last one.

Public function AddMeshBuffer: TSkinMeshBuffer; inline;

Adds a new meshbuffer to the mesh, access it as last one.

Public function AddPositionKey(Joint: TSkinnedMeshJoint): TSkinnedMeshPositionKey; inline;

Adds a new position key to the mesh, access it as last one.

Public function AddRotationKey(Joint: TSkinnedMeshJoint): TSkinnedMeshRotationKey; inline;

Adds a new rotation key to the mesh, access it as last one.

Public function AddScaleKey(Joint: TSkinnedMeshJoint): TSkinnedMeshScaleKey; inline;

Adds a new scale key to the mesh, access it as last one.

Public function AddWeight(Joint: TSkinnedMeshJoint): TSkinnedMeshWeight; inline;

Adds a new weight to the mesh, access it as last one.

Public function EnableHardwareSkinning(Enable: Boolean = True): Boolean; inline;

Enables or disables hardware skinning.

Public function GetJoint(Index: LongWord): TSkinnedMeshJoint; inline;

Returns a single joint based on its index.

Public function GetJointIndex(const Name: AnsiString): LongInt; inline;

Retrieves a joint's index based on its name. The index on success, else -1

Public function GetJointName(Index: LongWord): AnsiString; inline;

Returns a joint's name

Public function GetMeshBuffer(Index: LongWord): TSkinMeshBuffer; inline;

Returns a single mesh buffer based on its index.

Public function UseAnimationFrom(Mesh: TSkinnedMesh): Boolean; inline;

Use animation from another mesh.
The animation is linked (not copied) based on joint names so make sure they are unique.

Returns

True if all joints in this mesh were matched up (empty names will not be matched, and it's case sensitive). Unmatched joints will not be animated.

Public procedure AnimateMesh(Frame, Blend: Single); inline;

Animates this mesh's joints based on frame input.

Public procedure ConvertMeshToTangents; inline;

Converts the vertex type of all meshbuffers to tangents. E.g. used for bump mapping.

Public procedure Finalize; inline;

Loaders should call this function after populating the mesh.

Public procedure SetInterpolationMode(Mode: TInterpolationMode); inline;

Specifies how the animation will be interpolated between frames.

Public procedure SkinMesh; inline;

Performs a software skin on this mesh based on joint positions.

Properties

Public property IsStatic: Boolean read GetIsStatic;

Whether the mesh is non-animated.

Public property JointCount: LongWord read GetJointCount;

The number of joints currently in the mesh.

Public property MeshBufferCount: LongWord read GetMeshBufferCount;

The number of mesh buffers currently in the mesh.

Public property UpdateNormalsWhenAnimating: Boolean write SetUpdateNormalsWhenAnimating;

Whether to update Normals when Animating.
Disabling this option increases animation performance, enabling allows for more accurate lighting of animated meshes.


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22