Table of Contents

Class CGVolume

Volume Data (Path + Vertex, VertexNormal, Cross)

[CGDataInfo(0.08, 0.4, 0.75, 1)]
public class CGVolume : CGPath
Inheritance
CGVolume
Inherited Members

Constructors

CGVolume(CGPath, CGShape)

public CGVolume(CGPath path, CGShape crossShape)

Parameters

path CGPath
crossShape CGShape

CGVolume(CGVolume)

public CGVolume(CGVolume source)

Parameters

source CGVolume

CGVolume(int, CGShape)

public CGVolume(int samplePoints, CGShape crossShape)

Parameters

samplePoints int
crossShape CGShape

Fields

CrossClosed

Whether the Cross base spline is closed or not

public bool CrossClosed

Field Value

bool

CrossFShift

A shift of the CrossRelativeDistances value that is applied when using the interpolation methods on the volume, like InterpolateVolume(float, float, out Vector3, out Vector3, out Vector3)

public float CrossFShift

Field Value

float

CrossMaterialGroups

public SamplePointsMaterialGroupCollection CrossMaterialGroups

Field Value

SamplePointsMaterialGroupCollection

CrossSeamless

Whether the Cross shape covers the whole length of the base spline

public bool CrossSeamless

Field Value

bool

Properties

CrossCustomValues

The CustomValues of the CGShape used in the extrusion of this volume

public SubArray<float> CrossCustomValues { get; set; }

Property Value

SubArray<float>

Remarks

Setting a new SubArray<T> will Free(SubArray<T>) the current SubArray<T> instance

CrossRelativeDistances

The RelativeDistances of the CGShape used in the extrusion of this volume

public SubArray<float> CrossRelativeDistances { get; set; }

Property Value

SubArray<float>

Remarks

Setting a new SubArray<T> will Free(SubArray<T>) the current SubArray<T> instance

CrossSize

Gets the number of cross shape's sample points

public int CrossSize { get; }

Property Value

int

Scales

The 2D scale of the mesh at each sample point of the volume's path

public SubArray<Vector2> Scales { get; set; }

Property Value

SubArray<Vector2>

VertexCount

public int VertexCount { get; }

Property Value

int

VertexNormals

Notmals of the points, in the local space

public SubArray<Vector3> VertexNormals { get; set; }

Property Value

SubArray<Vector3>

Remarks

Setting a new SubArray<T> will Free(SubArray<T>) the current SubArray<T> instance

Vertices

Positions of the points, in the local space

public SubArray<Vector3> Vertices { get; set; }

Property Value

SubArray<Vector3>

Remarks

Setting a new SubArray<T> will Free(SubArray<T>) the current SubArray<T> instance

Methods

Clone<T>()

public override T Clone<T>() where T : CGData

Returns

T

Type Parameters

T

CrossDistanceToF(float, float, CurvyClamping)

public float CrossDistanceToF(float f, float distance, CurvyClamping crossClamping = CurvyClamping.Clamp)

Parameters

f float
distance float
crossClamping CurvyClamping

Returns

float

CrossFToDistance(float, float, CurvyClamping)

public float CrossFToDistance(float f, float crossF, CurvyClamping crossClamping = CurvyClamping.Clamp)

Parameters

f float
crossF float
crossClamping CurvyClamping

Returns

float

Dispose(bool)

protected override bool Dispose(bool disposing)

Parameters

disposing bool

Returns

bool

Get(CGVolume, CGPath, CGShape)

Returns a CGVolume made from the given CGPath and CGShape

[NotNull]
public static CGVolume Get(CGVolume data, CGPath path, CGShape crossShape)

Parameters

data CGVolume

If not null, the returned instance will be the one but with its fields updated. If null, a new instance will be created

path CGPath

The path used in the creation of the volume

crossShape CGShape

The shape used in the creation of the volume

Returns

CGVolume

GetCrossFIndex(float, out float)

public int GetCrossFIndex(float crossF, out float frag)

Parameters

crossF float
frag float

Returns

int

GetCrossLength(float)

public float GetCrossLength(float pathF)

Parameters

pathF float

Returns

float

GetSegmentIndex(int)

public int GetSegmentIndex(int segment)

Parameters

segment int

Returns

int

GetSegmentVertices(params int[])

Gets all vertices belonging to one or more extruded shape segments

public Vector3[] GetSegmentVertices(params int[] segmentIndices)

Parameters

segmentIndices int[]

indices of segments in question

Returns

Vector3[]

GetVertexIndex(float, float, out float, out float)

Get the index of the first vertex of the edge a certain F and CrossF is part of

public int GetVertexIndex(float pathF, float crossF, out float pathFrag, out float crossFrag)

Parameters

pathF float

position on the path (0..1)

crossF float

position on the cross (0..1)

pathFrag float

remainder between the segment and the next segment

crossFrag float

remainder between the returned vertex and the next vertex

Returns

int

a vertex index

GetVertexIndex(float, out float)

Get the index of the first vertex belonging to the segment a certain F is part of

public int GetVertexIndex(float pathF, out float pathFrag)

Parameters

pathF float

position on the path (0..1)

pathFrag float

remainder between the returned segment and the next segment

Returns

int

a vertex index

InterpolateVolume(float, float, out Vector3, out Vector3, out Vector3)

public void InterpolateVolume(float f, float crossF, out Vector3 pos, out Vector3 dir, out Vector3 up)

Parameters

f float
crossF float
pos Vector3
dir Vector3
up Vector3

InterpolateVolumeDirection(float, float)

public Vector3 InterpolateVolumeDirection(float f, float crossF)

Parameters

f float
crossF float

Returns

Vector3

InterpolateVolumePosition(float, float)

public Vector3 InterpolateVolumePosition(float f, float crossF)

Parameters

f float
crossF float

Returns

Vector3

InterpolateVolumeUp(float, float)

public Vector3 InterpolateVolumeUp(float f, float crossF)

Parameters

f float
crossF float

Returns

Vector3