class Model
A model.
public int AnimationCount { get; }
Number of animations this model has.
public string GetAnimationName( int animationIndex )
Returns name of an animation at given animation index.
animationIndexAnimation index to get name of, starting at 0.- Returns Name of the animation.
public AnimationGraph AnimGraph { get; }
Get the animgraph this model uses.
public ModelAttachments Attachments { get; }
Access to bones of this model.
public int AttachmentCount { get; }
Returns amount of attachment points this model has.
public Nullable<Transform> GetAttachment( string name )
Retrieves attachment transform based on given attachment name.
nameName of the attachment to retrieve transform of.- Returns The attachment transform, or null if attachment by given name is not found.
public Nullable<Transform> GetAttachment( int index )
Retrieves attachment transform based on given attachment index.
index>Index of the attachment to look up, starting at 0.- Returns The attachment transform.
public string GetAttachmentName( int index )
Returns name of an attachment at given index.
indexIndex of the attachment to look up, starting at 0.- Returns The name of the attachment at given index.
public BBox Bounds { get; }
Total bounds of all the meshes.
public BBox PhysicsBounds { get; }
Total bounds of all the physics shapes.
public BBox RenderBounds { get; }
Render view bounds.
public bool IsError { get; }
Whether this model is an error model or invalid or not.
public string Name { get; }
Name of the model, usually being its file path.
public bool IsProcedural { get; }
Whether this model is procedural, i.e. it was created at runtime via .
public int MeshCount { get; }
Total number of meshes this model is made out of.
public MeshTraceRequest Trace { get; }
Trace against the triangles in this mesh
public bool TryGetData( Type t, ref object data )
Tries to extract data from model based on the given type's ModelDoc.GameDataAttribute.
dataThe extracted data, or default on failure.tThe class with ModelDoc.GameDataAttribute.- Returns true if data was extracted successfully, false otherwise.
public HitboxSet HitboxSet { get; }
Access to default hitbox set of this model
public static Model Load( string filename )
Load a model by file path.
filenameThe file path to load as a model.- Returns The loaded model, or null
public static Task<Model> LoadAsync( string filename )
Load a model by file path.
filenameThe file path to load as a model.- Returns The loaded model, or null
public int MaterialGroupCount { get; }
Number of material groups this model has.
public string GetMaterialGroupName( int groupIndex )
Returns name of a material group at given group index.
groupIndexGroup index to get name of, starting at 0.- Returns Name of the group.
public int GetMaterialGroupIndex( string groupIndex )
Retrieves the index of a material group given its name.
groupIndexThe name of the material group.- Returns The index of the material group, or a negative value if the group does not exist.
public IEnumerable<Material> Materials { get; }
Retrieves an enumerable collection of all Materials on the meshes.
- Returns An IEnumerable of Materials.
public IEnumerable<Material> GetMaterials( int groupIndex )
Retrieves an enumerable collection of Materials belonging to a specified group.
groupIndexThe index of the material group. Default value is 0.- Returns An IEnumerable of Materials in the specified group.
public IEnumerable<Material> GetMaterials( string groupName )
Retrieves an enumerable collection of Materials belonging to a specified group.
groupNameThe name of the material group.- Returns An IEnumerable of Materials in the specified group.
public ModelMorphs Morphs { get; }
Access to bones of this model.
public int MorphCount { get; }
Number of morph controllers this model has.
public string GetMorphName( int morph )
Returns name of a morph controller at given index.
morphMorph controller index to get name of, starting at 0.- Returns Name of the morph controller at given index.
public float GetVisemeMorph( string viseme, int morph )
Get morph weight for viseme.
public BoneCollection Bones { get; }
Access to bones of this model.
public int BoneCount { get; }
Number of bones this model has.
public string GetBoneName( int boneIndex )
Returns name of a bone at given bone index.
boneIndexBone index to get name of, starting at 0.- Returns Name of the bone.
public int GetBoneParent( int boneIndex )
Returns the id of given bone's parent bone.
boneIndexThe bone to look up parent of.- Returns The id of the parent bone, or -1 if given bone has no parent.
public Transform GetBoneTransform( int boneIndex )
Returns transform of given bone at bind position.
public Transform GetBoneTransform( string bone )
Returns transform of given bone at bind position.
public static ModelBuilder Builder { get; }
Returns a static instance, allowing for runtime model creation.
public static Model Cube { get; }
A cube model
public static Model Sphere { get; }
A sphere model
public static Model Plane { get; }
A plane model
public static Model Error { get; }
An error model
public int GetBaseVertex( int drawcall )
😔 No documentation found.
public int GetIndexCount( int drawcall )
😔 No documentation found.
public string ResourcePath { get; }
😔 No documentation found.
public string ResourceName { get; }
😔 No documentation found.
public bool IsValid { get; }
😔 No documentation found.
public bool HasUnsavedChanges { get; }
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public void StateHasChanged( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public int GetIndexStart( int drawcall )
😔 No documentation found.
public int ResourceId { get; }
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public Vertex[] GetVertices( )
😔 No documentation found.
public Dictionary<string,string[]> GetBreakCommands( )
😔 No documentation found.
public PhysicsGroupDescription Physics { get; }
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public IReadOnlyList<string> AnimationNames { get; }
😔 No documentation found.
public int BodyGroupCount { get; }
😔 No documentation found.
public ulong DefaultBodyGroupMask { get; }
😔 No documentation found.
public IEnumerable<Model.BodyPart> BodyParts { get; }
😔 No documentation found.
public bool TryGetData( ref T data )
😔 No documentation found.
public bool HasData( )
😔 No documentation found.
public uint[] GetIndices( )
😔 No documentation found.
public T GetData( )
😔 No documentation found.