TriLib
Search Results for

    Show / Hide Table of Contents

    Class ModelExtensions

    Represents a series of Model utility methods.

    Inheritance
    object
    ModelExtensions
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: TriLibCore.Extensions
    Assembly: TriLibCore.dll
    Syntax
    public static class ModelExtensions

    Methods

    CalculateBounds(IModel)

    Calculates the given Model Local Bounds.

    Declaration
    public static Bounds CalculateBounds(this IModel model)
    Parameters
    Type Name Description
    IModel model

    The Model to calculate the Bounds.

    Returns
    Type Description
    Bounds

    The calculated Local Bounds

    CountChild(IModel)

    Recursively counts the Model children.

    Declaration
    public static int CountChild(this IModel model)
    Parameters
    Type Name Description
    IModel model

    The Model to count the children.

    Returns
    Type Description
    int

    The children count.

    GetBones(IModel, AssetLoaderContext, List<Transform>)

    Finds all Game Objects with Transform components only and returns them as bones on a List.

    Declaration
    public static void GetBones(this IModel model, AssetLoaderContext assetLoaderContext, List<Transform> bones)
    Parameters
    Type Name Description
    IModel model

    The Model to extract the bones.

    AssetLoaderContext assetLoaderContext

    The Asset Loader Context reference. Asset Loader Context contains the Model loading data.

    List<Transform> bones

    The List to append the found bones.

    GetGlobalMatrix(IModel)

    Gets the given model Global Transform Matrix.

    Declaration
    public static Matrix4x4 GetGlobalMatrix(this IModel model)
    Parameters
    Type Name Description
    IModel model

    The model.

    Returns
    Type Description
    Matrix4x4

    The Global Transform Matrix.

    GetGlobalMatrixNoScale(IModel)

    Gets the given model Global Transform Matrix without scale.

    Declaration
    public static Matrix4x4 GetGlobalMatrixNoScale(this IModel model)
    Parameters
    Type Name Description
    IModel model

    The model.

    Returns
    Type Description
    Matrix4x4

    The Global Transform Matrix.

    GetGlobalParentMatrix(IModel)

    Gets the given model parent Global Transform Matrix.

    Declaration
    public static Matrix4x4 GetGlobalParentMatrix(this IModel model)
    Parameters
    Type Name Description
    IModel model

    The model.

    Returns
    Type Description
    Matrix4x4

    The Global Transform Matrix.

    GetLocalMatrix(IModel)

    Gets the given model Local Transform Matrix.

    Declaration
    public static Matrix4x4 GetLocalMatrix(this IModel model)
    Parameters
    Type Name Description
    IModel model

    The model.

    Returns
    Type Description
    Matrix4x4

    The Local Transform Matrix.

    GetLocalMatrixNoScale(IModel)

    Gets the given model Local Transform Matrix without scale.

    Declaration
    public static Matrix4x4 GetLocalMatrixNoScale(this IModel model)
    Parameters
    Type Name Description
    IModel model

    The model.

    Returns
    Type Description
    Matrix4x4

    The Local Transform Matrix.

    MovePivot(IModel, AssetLoaderContext)

    Moves the given Model pivot position to the selected position.

    Declaration
    public static void MovePivot(this IModel model, AssetLoaderContext assetLoaderContext)
    Parameters
    Type Name Description
    IModel model
    AssetLoaderContext assetLoaderContext

    SortByName(IModel)

    Sorts the Model hierarchy by name.

    Declaration
    public static void SortByName(this IModel model)
    Parameters
    Type Name Description
    IModel model

    The Model to sort hierarchy.

    In this article
    Back to top Generated by DocFX