Interface IGeometryGroup
Represents a TriLib Geometry Group. A Geometry Group contains child Geometries.
Assembly: TriLibCore.dll
Syntax
public interface IGeometryGroup : IObject
Properties
BlendShapeKeys
Gets/Sets the Blend-Shape keys in this group.
Declaration
List<IBlendShapeKey> BlendShapeKeys { get; set; }
Property Value
Colors
Declaration
List<Color> Colors { get; set; }
Property Value
Type |
Description |
List<Color> |
|
GeometriesData
Gets/Sets the Geometries in this group.
Declaration
Dictionary<int, IGeometry> GeometriesData { get; }
Property Value
GeometryCapacity
Declaration
int GeometryCapacity { get; }
Property Value
HasColors
Declaration
bool HasColors { get; set; }
Property Value
HasInvalidNormals
Declaration
bool HasInvalidNormals { get; set; }
Property Value
HasNormals
Declaration
bool HasNormals { get; set; }
Property Value
HasSkin
Declaration
bool HasSkin { get; set; }
Property Value
HasTangents
Declaration
bool HasTangents { get; set; }
Property Value
HasUv1
Declaration
bool HasUv1 { get; set; }
Property Value
HasUv2
Declaration
bool HasUv2 { get; set; }
Property Value
HasUv3
Declaration
bool HasUv3 { get; set; }
Property Value
HasUv4
Declaration
bool HasUv4 { get; set; }
Property Value
Mesh
Declaration
Property Value
Normals
Declaration
List<Vector3> Normals { get; set; }
Property Value
Type |
Description |
List<Vector3> |
|
OriginalVertexIndices
Declaration
List<int> OriginalVertexIndices { get; set; }
Property Value
Pivot
Gets/Sets this Geometry Group local pivot position.
Declaration
Vector3 Pivot { get; set; }
Property Value
Positions
Declaration
List<Vector3> Positions { get; set; }
Property Value
Type |
Description |
List<Vector3> |
|
RawBoneWeights
Gets/Sets the Bone-Weights from this group.
Declaration
Dictionary<int, List<BoneWeight1>> RawBoneWeights { get; set; }
Property Value
Tangents
Declaration
List<Vector4> Tangents { get; set; }
Property Value
Type |
Description |
List<Vector4> |
|
UVs1
Declaration
List<Vector2> UVs1 { get; set; }
Property Value
Type |
Description |
List<Vector2> |
|
UVs2
Declaration
List<Vector2> UVs2 { get; set; }
Property Value
Type |
Description |
List<Vector2> |
|
UVs3
Declaration
List<Vector2> UVs3 { get; set; }
Property Value
Type |
Description |
List<Vector2> |
|
UVs4
Declaration
List<Vector2> UVs4 { get; set; }
Property Value
Type |
Description |
List<Vector2> |
|
VerticesCapacity
Declaration
int VerticesCapacity { get; }
Property Value
VerticesDataCount
Declaration
int VerticesDataCount { get; }
Property Value
Methods
AddBoneWeight(int, BoneWeight1)
Adds a new Bone Weight to this group.
Declaration
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
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
GenerateMesh(AssetLoaderContext, GameObject, IModel)
Generates the final Unity Mesh.
Declaration
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
GetCenter()
Declaration
Returns
GetGeometry<TGeometry>(AssetLoaderContext, int, bool, bool)
Gets a new or existing Geometry from this group.
Declaration
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
Returns
SetHalfPrecision(bool)
Declaration
void SetHalfPrecision(bool value)
Parameters
Type |
Name |
Description |
bool |
value |
|
Setup(AssetLoaderContext, int, int)
Configures this Geometry Group.
Declaration
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
void TransferToBlendShape(IGeometryGroup baseGeometryGroup, IBlendShapeKey blendShapeKey, IList<int> originalVertexIndices)
Parameters
Extension Methods