Class CommonGeometry
Represents a Geometry. There may be many Geometries per Geometry Group.
Implements
Inherited Members
Namespace: TriLibCore.Geometries
Assembly: TriLibCore.dll
Syntax
public class CommonGeometry : IGeometry
Constructors
CommonGeometry()
Declaration
public CommonGeometry()
Properties
GeometryGroup
Gets/Sets the StreamGeometryGroup parent to this Geometry.
Declaration
public CommonGeometryGroup GeometryGroup { get; set; }
Property Value
Type | Description |
---|---|
CommonGeometryGroup |
Index
Gets/Sets the Geometry index inside the Geometry Group.
Declaration
public int Index { get; set; }
Property Value
Type | Description |
---|---|
int |
IsQuad
Defines if this Geometry contains Quad data.
Declaration
public bool IsQuad { get; set; }
Property Value
Type | Description |
---|---|
bool |
MaterialIndex
Gets/Sets the Material used by the Geometry index.
Declaration
public 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
public int OriginalIndex { get; set; }
Property Value
Type | Description |
---|---|
int |
VertexDataIndices
Gets/Sets the indices to the VertexData elements.
Declaration
public 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
public 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
public 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 |