Class CGVolume
- Namespace
- FluffyUnderware.Curvy.Generator
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
CGVolume(CGVolume)
public CGVolume(CGVolume source)
Parameters
sourceCGVolume
CGVolume(int, CGShape)
public CGVolume(int samplePoints, CGShape crossShape)
Parameters
Fields
CrossClosed
Whether the Cross base spline is closed or not
public bool CrossClosed
Field Value
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
CrossMaterialGroups
public SamplePointsMaterialGroupCollection CrossMaterialGroups
Field Value
CrossSeamless
Whether the Cross shape covers the whole length of the base spline
public bool CrossSeamless
Field Value
Properties
CrossCustomValues
The CustomValues of the CGShape used in the extrusion of this volume
public SubArray<float> CrossCustomValues { get; set; }
Property Value
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
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
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
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
ffloatdistancefloatcrossClampingCurvyClamping
Returns
CrossFToDistance(float, float, CurvyClamping)
public float CrossFToDistance(float f, float crossF, CurvyClamping crossClamping = CurvyClamping.Clamp)
Parameters
ffloatcrossFfloatcrossClampingCurvyClamping
Returns
Dispose(bool)
protected override bool Dispose(bool disposing)
Parameters
disposingbool
Returns
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
dataCGVolumeIf not null, the returned instance will be the one but with its fields updated. If null, a new instance will be created
pathCGPathThe path used in the creation of the volume
crossShapeCGShapeThe shape used in the creation of the volume
Returns
GetCrossFIndex(float, out float)
public int GetCrossFIndex(float crossF, out float frag)
Parameters
Returns
GetCrossLength(float)
public float GetCrossLength(float pathF)
Parameters
pathFfloat
Returns
GetSegmentIndex(int)
public int GetSegmentIndex(int segment)
Parameters
segmentint
Returns
GetSegmentVertices(params int[])
Gets all vertices belonging to one or more extruded shape segments
public Vector3[] GetSegmentVertices(params int[] segmentIndices)
Parameters
segmentIndicesint[]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
pathFfloatposition on the path (0..1)
crossFfloatposition on the cross (0..1)
pathFragfloatremainder between the segment and the next segment
crossFragfloatremainder 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
pathFfloatposition on the path (0..1)
pathFragfloatremainder 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
InterpolateVolumeDirection(float, float)
public Vector3 InterpolateVolumeDirection(float f, float crossF)
Parameters
Returns
- Vector3
InterpolateVolumePosition(float, float)
public Vector3 InterpolateVolumePosition(float f, float crossF)
Parameters
Returns
- Vector3
InterpolateVolumeUp(float, float)
public Vector3 InterpolateVolumeUp(float f, float crossF)
Parameters
Returns
- Vector3