Class InterpolatedVertex
Represents an IVertexData implementation whose attributes are stored locally, typically used to build interpolated vertex data (for example, during tessellation or geometry processing stages).
Implements
Namespace: TriLibCore.Geometries
Assembly: TriLibCore.Source.dll
Syntax
public class InterpolatedVertex : IVertexData
Constructors
InterpolatedVertex(Vector3)
Initializes a new instance of the InterpolatedVertex class using the given position.
Declaration
public InterpolatedVertex(Vector3 position)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The initial vertex position. |
Methods
CopySpanToNativeArray(ref NativeArray<byte>, int, int)
Copies a span of the vertex byte stream into the provided native array.
Declaration
public void CopySpanToNativeArray(ref NativeArray<byte> data, int spanStart, int spanEnd)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeArray<byte> | data | The destination byte array. |
| int | spanStart | The inclusive start offset of the span. |
| int | spanEnd | The exclusive end offset of the span. |
Exceptions
| Type | Condition |
|---|---|
| NotImplementedException | Thrown because this method is not implemented in this type. |
GetBoneWeight(IGeometryGroup)
Gets the vertex bone weights.
Declaration
public BoneWeight GetBoneWeight(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| BoneWeight | The bone weight value. |
GetColor(IGeometryGroup)
Gets the vertex color.
Declaration
public Color GetColor(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| Color | The vertex color. |
GetNormal(IGeometryGroup)
Gets the vertex normal.
Declaration
public Vector3 GetNormal(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| Vector3 | The vertex normal. |
GetPosition(IGeometryGroup)
Gets the vertex position.
Declaration
public Vector3 GetPosition(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| Vector3 | The vertex position. |
GetStreamSpans(IGeometryGroup, IList<Tuple<int, int>>)
Fills the provided list with byte spans describing the vertex data layout in a stream.
Declaration
public void GetStreamSpans(IGeometryGroup geometryGroup, IList<Tuple<int, int>> spans)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
| IList<Tuple<int, int>> | spans | The list to be filled with (start, end) span tuples. |
Exceptions
| Type | Condition |
|---|---|
| NotImplementedException | Thrown because this method is not implemented in this type. |
GetTangent(IGeometryGroup)
Gets the vertex tangent.
Declaration
public Vector4 GetTangent(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| Vector4 | The vertex tangent. |
GetUV1(IGeometryGroup)
Gets the UV0 (first UV channel) value.
Declaration
public Vector2 GetUV1(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| Vector2 | The UV value. |
GetUV2(IGeometryGroup)
Gets the UV1 (second UV channel) value.
Declaration
public Vector2 GetUV2(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| Vector2 | The UV value. |
GetUV3(IGeometryGroup)
Gets the UV2 (third UV channel) value.
Declaration
public Vector2 GetUV3(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| Vector2 | The UV value. |
GetUV4(IGeometryGroup)
Gets the UV3 (fourth UV channel) value.
Declaration
public Vector2 GetUV4(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| Vector2 | The UV value. |
GetUsesBoneWeight(IGeometryGroup)
Gets a value indicating whether this vertex data instance uses bone weights.
Declaration
public bool GetUsesBoneWeight(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| bool |
|
GetVertexIndex(IGeometryGroup)
Gets the vertex index associated with this vertex data instance.
Declaration
public int GetVertexIndex(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| int | The vertex index. |
HasSkin(IGeometryGroup)
Determines whether the specified geometry group contains skinning data relevant to this vertex.
Declaration
public bool HasSkin(IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
Returns
| Type | Description |
|---|---|
| bool | A value indicating whether skinning data is present. |
Exceptions
| Type | Condition |
|---|---|
| NotImplementedException | Thrown because this method is not implemented in this type. |
SetBoneWeight(BoneWeight, IGeometryGroup)
Sets the vertex bone weights.
Declaration
public void SetBoneWeight(BoneWeight value, IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| BoneWeight | value | The bone weight value. |
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
SetColor(Color, IGeometryGroup)
Sets the vertex color.
Declaration
public void SetColor(Color value, IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | value | The color value. |
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
SetNormal(Vector3, IGeometryGroup)
Sets the vertex normal.
Declaration
public void SetNormal(Vector3 value, IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | value | The normal value. |
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
SetPosition(Vector3, IGeometryGroup)
Sets the vertex position.
Declaration
public void SetPosition(Vector3 value, IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | value | The position value. |
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
SetTangent(Vector4, IGeometryGroup)
Sets the vertex tangent.
Declaration
public void SetTangent(Vector4 value, IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector4 | value | The tangent value. |
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
SetUV1(Vector2, IGeometryGroup)
Sets the UV0 (first UV channel) value.
Declaration
public void SetUV1(Vector2 value, IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | value | The UV value. |
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
SetUV2(Vector2, IGeometryGroup)
Sets the UV1 (second UV channel) value.
Declaration
public void SetUV2(Vector2 value, IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | value | The UV value. |
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
SetUV3(Vector2, IGeometryGroup)
Sets the UV2 (third UV channel) value.
Declaration
public void SetUV3(Vector2 value, IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | value | The UV value. |
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
SetUV4(Vector2, IGeometryGroup)
Sets the UV3 (fourth UV channel) value.
Declaration
public void SetUV4(Vector2 value, IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | value | The UV value. |
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |
SetVertexIndex(int, IGeometryGroup)
Sets the vertex index associated with this vertex data instance.
Declaration
public void SetVertexIndex(int value, IGeometryGroup geometryGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The vertex index. |
| IGeometryGroup | geometryGroup | The geometry group requesting the operation. |