Interface IGeometry
Represents a TriLib Geometry. There may be many Geometries per Geometry Group.
Namespace: TriLibCore.Interfaces
Assembly: TriLibCore.dll
Syntax
public interface IGeometry
Properties
GeometryGroup
Gets/Sets the StreamGeometryGroup parent to this Geometry.
Declaration
CommonGeometryGroup GeometryGroup { get; set; }
Property Value
Type | Description |
---|---|
CommonGeometryGroup |
Index
Gets/Sets the Geometry index inside the Geometry Group.
Declaration
int Index { get; set; }
Property Value
Type | Description |
---|---|
int |
IsQuad
Defines if this Geometry contains Quad data.
Declaration
bool IsQuad { get; set; }
Property Value
Type | Description |
---|---|
bool |
MaterialIndex
Gets/Sets the Material used by the Geometry index.
Declaration
int MaterialIndex { get; set; }
Property Value
Type | Description |
---|---|
int |
OriginalIndex
Gets/Sets the original Geometry index inside the Geometry Group (Sometimes the Geometry is duplicated and this field is used to keep its original index).
Declaration
int OriginalIndex { get; set; }
Property Value
Type | Description |
---|---|
int |
VertexDataIndices
Gets/Sets the indices to the VertexData elements.
Declaration
List<int> VertexDataIndices { get; set; }
Property Value
Type | Description |
---|---|
List<int> |
Methods
AddVertex(AssetLoaderContext, int, Vector3, Vector3, Vector4, Color, Vector2, Vector2, Vector2, Vector2, BoneWeight)
Adds a new VertexData to this Geometry.
Declaration
void 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 |
Setup(CommonGeometryGroup, int, bool, bool, bool)
Declaration
void Setup(CommonGeometryGroup geometryGroup, int materialIndex, bool isQuad, bool hasBlendShapes, bool isPointCloud)
Parameters
Type | Name | Description |
---|---|---|
CommonGeometryGroup | geometryGroup | |
int | materialIndex | |
bool | isQuad | |
bool | hasBlendShapes | |
bool | isPointCloud |