TriLib
Search Results for

    Show / Hide Table of Contents

    Class CommonGeometryGroup

    Represents a TriLib Geometry Group. A Geometry Group contains child Geometries.

    Inheritance
    object
    CommonGeometryGroup
    Implements
    IGeometryGroup
    IObject
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: TriLibCore.Geometries
    Assembly: TriLibCore.dll
    Syntax
    public class CommonGeometryGroup : IGeometryGroup, IObject

    Constructors

    CommonGeometryGroup()

    Declaration
    public CommonGeometryGroup()

    Fields

    TempColor

    Declaration
    public Color TempColor
    Field Value
    Type Description
    Color

    TempNormal

    Declaration
    public Vector3 TempNormal
    Field Value
    Type Description
    Vector3

    TempPosition

    Declaration
    public Vector3 TempPosition
    Field Value
    Type Description
    Vector3

    TempTangent

    Declaration
    public Vector4 TempTangent
    Field Value
    Type Description
    Vector4

    TempUV1

    Declaration
    public Vector2 TempUV1
    Field Value
    Type Description
    Vector2

    TempUV2

    Declaration
    public Vector2 TempUV2
    Field Value
    Type Description
    Vector2

    TempUV3

    Declaration
    public Vector2 TempUV3
    Field Value
    Type Description
    Vector2

    TempUV4

    Declaration
    public Vector2 TempUV4
    Field Value
    Type Description
    Vector2

    TempVertexIndex

    Declaration
    public int TempVertexIndex
    Field Value
    Type Description
    int

    Properties

    BlendShapeKeys

    Gets/Sets the Blend-Shape keys in this group.

    Declaration
    public List<IBlendShapeKey> BlendShapeKeys { get; set; }
    Property Value
    Type Description
    List<IBlendShapeKey>

    Colors

    Declaration
    public List<Color> Colors { get; set; }
    Property Value
    Type Description
    List<Color>

    GeometriesData

    Gets/Sets the Geometries in this group.

    Declaration
    public Dictionary<int, IGeometry> GeometriesData { get; }
    Property Value
    Type Description
    Dictionary<int, IGeometry>

    GeometryCapacity

    Declaration
    public int GeometryCapacity { get; set; }
    Property Value
    Type Description
    int

    HasColors

    Declaration
    public bool HasColors { get; set; }
    Property Value
    Type Description
    bool

    HasInvalidNormals

    Declaration
    public bool HasInvalidNormals { get; set; }
    Property Value
    Type Description
    bool

    HasNormals

    Declaration
    public bool HasNormals { get; set; }
    Property Value
    Type Description
    bool

    HasSkin

    Declaration
    public bool HasSkin { get; set; }
    Property Value
    Type Description
    bool

    HasTangents

    Declaration
    public bool HasTangents { get; set; }
    Property Value
    Type Description
    bool

    HasUv1

    Declaration
    public bool HasUv1 { get; set; }
    Property Value
    Type Description
    bool

    HasUv2

    Declaration
    public bool HasUv2 { get; set; }
    Property Value
    Type Description
    bool

    HasUv3

    Declaration
    public bool HasUv3 { get; set; }
    Property Value
    Type Description
    bool

    HasUv4

    Declaration
    public bool HasUv4 { get; set; }
    Property Value
    Type Description
    bool

    Mesh

    Declaration
    public Mesh Mesh { get; set; }
    Property Value
    Type Description
    Mesh

    Name

    Gets/Sets the Object name.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string

    Normals

    Declaration
    public List<Vector3> Normals { get; set; }
    Property Value
    Type Description
    List<Vector3>

    OriginalVertexIndices

    Declaration
    public List<int> OriginalVertexIndices { get; set; }
    Property Value
    Type Description
    List<int>

    Pivot

    Gets/Sets this Geometry Group local pivot position.

    Declaration
    public Vector3 Pivot { get; set; }
    Property Value
    Type Description
    Vector3

    Positions

    Declaration
    public List<Vector3> Positions { get; set; }
    Property Value
    Type Description
    List<Vector3>

    RawBoneWeights

    Gets/Sets the Bone-Weights from this group.

    Declaration
    public Dictionary<int, List<BoneWeight1>> RawBoneWeights { get; set; }
    Property Value
    Type Description
    Dictionary<int, List<BoneWeight1>>

    Tangents

    Declaration
    public List<Vector4> Tangents { get; set; }
    Property Value
    Type Description
    List<Vector4>

    UVs1

    Declaration
    public List<Vector2> UVs1 { get; set; }
    Property Value
    Type Description
    List<Vector2>

    UVs2

    Declaration
    public List<Vector2> UVs2 { get; set; }
    Property Value
    Type Description
    List<Vector2>

    UVs3

    Declaration
    public List<Vector2> UVs3 { get; set; }
    Property Value
    Type Description
    List<Vector2>

    UVs4

    Declaration
    public List<Vector2> UVs4 { get; set; }
    Property Value
    Type Description
    List<Vector2>

    Used

    Gets/Sets the flag indicating whether this object used somewhere.

    Declaration
    public bool Used { get; set; }
    Property Value
    Type Description
    bool

    VerticesCapacity

    Declaration
    public int VerticesCapacity { get; set; }
    Property Value
    Type Description
    int

    VerticesDataCount

    Declaration
    public int VerticesDataCount { get; }
    Property Value
    Type Description
    int

    Methods

    AddBoneWeight(int, BoneWeight1)

    Adds a new Bone Weight to this group.

    Declaration
    public void AddBoneWeight(int vertexIndex, BoneWeight1 boneWeight1)
    Parameters
    Type Name Description
    int vertexIndex

    The original Vertex index.

    BoneWeight1 boneWeight1

    The Bone Weight data.

    AddVertex(AssetLoaderContext, int, Vector3, Vector3, Vector4, Color, Vector2, Vector2, Vector2, Vector2, BoneWeight)

    Adds or gets an existing Vertex to/from this Geometry Group.

    Declaration
    public int AddVertex(AssetLoaderContext assetLoaderContext, int vertexIndex, Vector3 position, Vector3 normal, Vector4 tangent, Color color, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4, BoneWeight boneWeight)
    Parameters
    Type Name Description
    AssetLoaderContext assetLoaderContext
    int vertexIndex
    Vector3 position
    Vector3 normal
    Vector4 tangent
    Color color
    Vector2 uv1
    Vector2 uv2
    Vector2 uv3
    Vector2 uv4
    BoneWeight boneWeight
    Returns
    Type Description
    int

    Create(bool, bool, bool, bool, bool, bool, bool, bool, bool)

    Declaration
    public static CommonGeometryGroup Create(bool hasNormal, bool hasTangent, bool hasColor, bool hasUV0, bool hasUV1, bool hasUV2, bool hasUV3, bool hasSkin, bool useHalfPrecision = false)
    Parameters
    Type Name Description
    bool hasNormal
    bool hasTangent
    bool hasColor
    bool hasUV0
    bool hasUV1
    bool hasUV2
    bool hasUV3
    bool hasSkin
    bool useHalfPrecision
    Returns
    Type Description
    CommonGeometryGroup

    GenerateMesh(AssetLoaderContext, GameObject, IModel)

    Generates the final Unity Mesh.

    Declaration
    public IEnumerable GenerateMesh(AssetLoaderContext assetLoaderContext, GameObject meshGameObject, IModel meshModel)
    Parameters
    Type Name Description
    AssetLoaderContext assetLoaderContext

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

    GameObject meshGameObject

    The GameObject the Mesh belongs to.

    IModel meshModel

    The geometry model.

    Returns
    Type Description
    IEnumerable

    GetCenter()

    Declaration
    public Vector3 GetCenter()
    Returns
    Type Description
    Vector3

    GetGeometry<TGeometry>(AssetLoaderContext, int, bool, bool)

    Gets a new or existing Geometry from this group.

    Declaration
    public virtual TGeometry GetGeometry<TGeometry>(AssetLoaderContext assetLoaderContext, int materialIndex, bool isQuad, bool hasBlendShapes) where TGeometry : class, IGeometry, new()
    Parameters
    Type Name Description
    AssetLoaderContext assetLoaderContext

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

    int materialIndex

    The Geometry Material index.

    bool isQuad

    Does the Geometry contains quad data?

    bool hasBlendShapes

    Does the geometry uses blend-shapes?

    Returns
    Type Description
    TGeometry

    The new or existing Geometry.

    Type Parameters
    Name Description
    TGeometry

    GetHalfPrecision()

    Declaration
    public bool GetHalfPrecision()
    Returns
    Type Description
    bool

    SetHalfPrecision(bool)

    Declaration
    public void SetHalfPrecision(bool value)
    Parameters
    Type Name Description
    bool value

    Setup(AssetLoaderContext, int, int)

    Configures this Geometry Group.

    Declaration
    public virtual void Setup(AssetLoaderContext assetLoaderContext, int verticesCapacity, int geometriesCapacity)
    Parameters
    Type Name Description
    AssetLoaderContext assetLoaderContext

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

    int verticesCapacity

    The maximum number of Vertices in this group.

    int geometriesCapacity

    The maximum number of Geometries in this group.

    TransferToBlendShape(IGeometryGroup, IBlendShapeKey, IList<int>)

    Declaration
    public void TransferToBlendShape(IGeometryGroup baseGeometryGroup, IBlendShapeKey blendShapeKey, IList<int> originalVertexIndices)
    Parameters
    Type Name Description
    IGeometryGroup baseGeometryGroup
    IBlendShapeKey blendShapeKey
    IList<int> originalVertexIndices

    Implements

    IGeometryGroup
    IObject

    Extension Methods

    IObjectExtensions.TryToDispose<T>(object)
    In this article
    Back to top Generated by DocFX