TriLib 2.2.8
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
TriLibCore.Interfaces.IGeometryGroup< TVertexData > Interface Template Reference

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

Inheritance diagram for TriLibCore.Interfaces.IGeometryGroup< TVertexData >:
TriLibCore.Interfaces.IObject

Public Member Functions

Mesh GenerateMesh (AssetLoaderContext assetLoaderContext, Matrix4x4[] bindPoses=null, IList< int > materialIndices=null)
 Generates the final Unity Mesh.
 
void Setup (AssetLoaderContext assetLoaderContext, int verticesCapacity, int geometriesCapacity, int bonesCapacity)
 Configures this Geometry Group.
 
TGeometry GetGeometry< TGeometry > (AssetLoaderContext assetLoaderContext, int materialIndex, bool isQuad)
 Gets a new or existing Geometry from this group.
 
void AddBoneWeight (int vertexIndex, BoneWeight1 boneWeight1)
 Adds a new Bone Weight to this group.
 
void LimitBoneWeights (AssetLoaderContext assetLoaderContext)
 Limits the Bone Weights in this group to 4 Bones per Vertex.
 
void TransferToBlendShape (IGeometryGroup baseGeometryGroup, IBlendShapeKey blendShapeKey, IList< int > originalVertexIndices)
 
HashSet< VertexAttribute > GetVertexAttributes ()
 
void SetVertexAttributes (HashSet< VertexAttribute > vertexAttributes)
 
void Cleanup (AssetLoaderContext assetLoaderContext)
 
void InitialMeshSetup (AssetLoaderContext assetLoaderContext, IList< int > materialIndices)
 
void FinalMeshSetup (AssetLoaderContext assetLoaderContext, Matrix4x4[] bindPoses)
 
bool Is32Bits ()
 
bool GetHalfPrecision ()
 
void SetHalfPrecision (bool value)
 
Vector3 GetCenter ()
 
void AddGeometry (AssetLoaderContext assetLoaderContext, int materialIndex, int meshIndex, int indexCount, IntPtr indices, bool isQuad=false)
 
int AddVertex (AssetLoaderContext assetLoaderContext, int vertexIndex, TVertexData vertexData)
 Adds or gets an existing Vertex to/from this Geometry Group.
 

Properties

Dictionary< int, IGeometryGeometriesData [get]
 Gets/Sets the Geometries in this group.
 
List< IBlendShapeKeyBlendShapeKeys [get, set]
 Gets/Sets the Blend-Shape keys in this group.
 
Vector3 Pivot [get, set]
 Gets/Sets this Geometry Group local pivot position.
 
RawBoneWeights RawBoneWeights [get, set]
 Gets/Sets the Bone-Weights from this group.
 
BoneWeight[] ProcessedBoneWeights [get, set]
 Gets/Sets the processed (limited to 4 Bones per-Vertex) Bone Weights from this group.
 
bool HasNormals [get, set]
 
bool HasTangents [get, set]
 
bool HasColors [get, set]
 
bool HasUv1 [get, set]
 
bool HasUv2 [get, set]
 
bool HasUv3 [get, set]
 
bool HasUv4 [get, set]
 
bool HasBones [get, set]
 
bool HasInvalidNormals [get, set]
 
int VerticesDataCount [get]
 
int IndexCount [get]
 
Mesh Mesh [get, set]
 
CommonVerticesData VerticesData [get, set]
 
- Properties inherited from TriLibCore.Interfaces.IObject
string Name [get, set]
 Gets/Sets the Object name.
 
bool Used [get, set]
 Gets/Sets the flag indicating whether this object used somewhere.
 

Detailed Description

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

Template Parameters
TVertexDataThe type of VertexData this group has.
Type Constraints
TVertexData :struct 

Member Function Documentation

◆ AddBoneWeight()

void TriLibCore.Interfaces.IGeometryGroup< TVertexData >.AddBoneWeight ( int  vertexIndex,
BoneWeight1  boneWeight1 
)

Adds a new Bone Weight to this group.

Parameters
vertexIndexThe original Vertex index.
boneWeight1The Bone Weight data.

◆ AddVertex()

int TriLibCore.Interfaces.IGeometryGroup< TVertexData >.AddVertex ( AssetLoaderContext  assetLoaderContext,
int  vertexIndex,
TVertexData  vertexData 
)

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

Parameters
assetLoaderContextThe Asset Loader Context reference. Asset Loader Context contains the Model loading data.
vertexIndexThe original Vertex index.
vertexDataThe VertexData to add.
Returns
The VertexData index.

◆ GenerateMesh()

Mesh TriLibCore.Interfaces.IGeometryGroup< TVertexData >.GenerateMesh ( AssetLoaderContext  assetLoaderContext,
Matrix4x4[]  bindPoses = null,
IList< int >  materialIndices = null 
)

Generates the final Unity Mesh.

Parameters
assetLoaderContextThe Asset Loader Context reference. Asset Loader Context contains the Model loading data.
bindPosesThe Mesh skeleton Bones Bind Poses if existing.
materialIndicesThe material indices list, containing one material index per geometry.
Returns
The generated Unity Mesh.

◆ GetGeometry< TGeometry >()

TGeometry TriLibCore.Interfaces.IGeometryGroup< TVertexData >.GetGeometry< TGeometry > ( AssetLoaderContext  assetLoaderContext,
int  materialIndex,
bool  isQuad 
)

Gets a new or existing Geometry from this group.

Parameters
assetLoaderContextThe Asset Loader Context reference. Asset Loader Context contains the Model loading data.
materialIndexThe Geometry Material index.
isQuadDoes the Geometry contains quad data?
Returns
The new or existing Geometry.
Type Constraints
TGeometry :class 
TGeometry :IGeometry 
TGeometry :new() 

◆ LimitBoneWeights()

void TriLibCore.Interfaces.IGeometryGroup< TVertexData >.LimitBoneWeights ( AssetLoaderContext  assetLoaderContext)

Limits the Bone Weights in this group to 4 Bones per Vertex.

Parameters
assetLoaderContextThe Asset Loader Context reference. Asset Loader Context contains the Model loading data.

◆ Setup()

void TriLibCore.Interfaces.IGeometryGroup< TVertexData >.Setup ( AssetLoaderContext  assetLoaderContext,
int  verticesCapacity,
int  geometriesCapacity,
int  bonesCapacity 
)

Configures this Geometry Group.

Parameters
assetLoaderContextThe Asset Loader Context reference. Asset Loader Context contains the Model loading data.
verticesCapacityThe maximum number of Vertices in this group.
geometriesCapacityThe maximum number of Geometries in this group.
bonesCapacityThe maximum number of Bones in this group.