Curvy  8.3.0
CGShape Class Reference
+ Inheritance diagram for CGShape:
+ Collaboration diagram for CGShape:

Detailed Description

Rasterized Shape Data (Polyline)

Public Attributes

bool Closed
 Whether the base spline is closed or not More...
 
float Length
 Length in world units More...
 
List< SamplePointsMaterialGroupMaterialGroups
 Groups/Patches More...
 
bool Seamless
 Whether the Shape/Path is seamless, i.e. Closed==true and the whole length is covered More...
 
bool SourceIsManaged
 Whether the source is managed or not More...
 
- Public Attributes inherited from CGData
string Name
 

Properties

override int Count [get]
 Gets the number of sample points More...
 
SubArray< float > CustomValues [get, set]
 Arbitrary mapped value to each point, usually U coordinate More...
 
List< DuplicateSamplePointDuplicatePoints [get, set]
 The list of the shape's DuplicatePoints More...
 
float[] F [get, set]
 The relative distance of each point. A relative distance is a value between 0 and 1 representing how far the point is in a shape. A value of 0 means the start of the shape, and a value of 1 means the end of it. It is defined as (the point's distance from the shape's start) / (the total length of the shape) This is unrelated to the notion of

See also
CurvySplineSegment.TF

or F of a spline. Unfortunately, it is abusively called F in big parts of the the Curvy Generator related code, sorry for the confusion. More...

 
float[] Map [get, set]
 Arbitrary mapped value to each point, usually U coordinate More...
 
Vector3[] Normal [get, set]
 Normals of the path's points, in the path's local space More...
 
SubArray< Vector3 > Normals [get, set]
 Normals of the path's points, in the path's local space More...
 
Vector3[] Position [get, set]
 Positions of the path's points, in the path's local space More...
 
SubArray< Vector3 > Positions [get, set]
 Positions of the path's points, in the path's local space More...
 
SubArray< float > RelativeDistances [get, set]
 The relative distance of each point. A relative distance is a value between 0 and 1 representing how far the point is in a shape. A value of 0 means the start of the shape, and a value of 1 means the end of it. It is defined as (the point's distance from the shape's start) / (the total length of the shape) This is unrelated to the notion of

See also
CurvySplineSegment.TF

or F of a spline. Unfortunately, it is abusively called F in big parts of the the Curvy Generator related code, sorry for the confusion. More...

 
float[] SourceF [get, set]
 The relative distance of each point relative to the source shape. A relative distance is a value between 0 and 1 representing how far the point is in a shape. A value of 0 means the start of the shape, and a value of 1 means the end of it. It is defined as (the point's distance from the shape's start) / (the total length of the shape) Contrary to

See also
RelativeDistances, CurvySplineSegment.TF

which is computed based on the actual shape, SourceRelativeDistances is computed based on the source shape. For example, if a Shape A is defined as the second quarter of a Shape B, A's first point will have a relative distance of 0, but a source relative distance of 0.25. A's last point will have a relative distance of 1, but a source relative distance of 0.5 This is unrelated to the notion of or F of a spline. Unfortunately, it is abusively called F in big parts of the the Curvy Generator related code, sorry for the confusion. More...

 
SubArray< float > SourceRelativeDistances [get, set]
 The relative distance of each point relative to the source shape. A relative distance is a value between 0 and 1 representing how far the point is in a shape. A value of 0 means the start of the shape, and a value of 1 means the end of it. It is defined as (the point's distance from the shape's start) / (the total length of the shape) Contrary to

See also
RelativeDistances, CurvySplineSegment.TF

which is computed based on the actual shape, SourceRelativeDistances is computed based on the source shape. For example, if a Shape A is defined as the second quarter of a Shape B, A's first point will have a relative distance of 0, but a source relative distance of 0.25. A's last point will have a relative distance of 1, but a source relative distance of 0.5 This is unrelated to the notion of or F of a spline. Unfortunately, it is abusively called F in big parts of the the Curvy Generator related code, sorry for the confusion. More...

 
- Properties inherited from CGData
virtual int Count [get]
 

Public Member Functions

 CGShape ()
 
 CGShape (CGShape source)
 
override T Clone< T > ()
 
void Copy (CGShape source)
 
float DistanceToF (float distance)
 Converts absolute (World Units) to relative (F) distance More...
 
float FToDistance (float f)
 Converts relative (F) to absolute distance (World Units) More...
 
int GetFIndex (float f, out float frag)
 Gets the index of a certain F More...
 
void Interpolate (float f, out Vector3 position, out Vector3 up)
 Interpolates Position and Normal by F More...
 
Vector3 InterpolatePosition (float f)
 Interpolates Position by F More...
 
Vector3 InterpolateUp (float f)
 Interpolates Normal by F More...
 
void Move (ref float f, ref int direction, float speed, CurvyClamping clamping)
 
void MoveBy (ref float f, ref int direction, float speedDist, CurvyClamping clamping)
 
virtual void Recalculate ()
 Recalculate Length and RelativeDistances (by measuring a polyline built from all Position points) More...
 
void RecalculateNormals (List< int > softEdges)
 
void RecalculateNormals ([NotNull] CurvySpline spline)
 Recalculate the shape's Normals based on the spline the shape was rasterized from More...
 
void RecalculateNormals ()
 Recalculate the shape's Normals based on shape's rasterized Positions More...
 
- Public Member Functions inherited from CGData
void Dispose ()
 Disposes an instance that is no more used, allowing it to free its resources immediately. Dispose is called automatically when an instance is Finalized More...
 

Static Public Member Functions

static void Copy (CGShape dest, CGShape source)
 
- Static Public Member Functions inherited from CGData
static implicit operator bool (CGData a)
 

Protected Member Functions

override bool Dispose (bool disposing)
 
- Protected Member Functions inherited from CGData
int getGenericFIndex (SubArray< float > FMapArray, float fValue, out float frag)
 Searches FMapArray and returns the index that covers the fValue as well as the percentage between index and index+1 More...
 

Constructor & Destructor Documentation

CGShape ( )
CGShape ( CGShape  source)

Member Function Documentation

override T Clone< T > ( )
virtual

Reimplemented from CGData.

Reimplemented in CGVolume, and CGPath.

static void Copy ( CGShape  dest,
CGShape  source 
)
static
void Copy ( CGShape  source)
override bool Dispose ( bool  disposing)
protectedvirtual

Reimplemented from CGData.

Reimplemented in CGVolume, and CGPath.

float DistanceToF ( float  distance)

Converts absolute (World Units) to relative (F) distance

Parameters
distancedistance in world units
Returns
Relative distance (0..1)
float FToDistance ( float  f)

Converts relative (F) to absolute distance (World Units)

Parameters
frelative distance (0..1)
Returns
Distance in World Units
int GetFIndex ( float  f,
out float  frag 
)

Gets the index of a certain F

Parameters
fF (0..1)
fragfragment between the resulting and the next index (0..1)
Returns
the resulting index
void Interpolate ( float  f,
out Vector3  position,
out Vector3  up 
)

Interpolates Position and Normal by F

Parameters
f0..1
position
upa.k.a normal
Vector3 InterpolatePosition ( float  f)

Interpolates Position by F

Parameters
f0..1
Returns
the interpolated position
Vector3 InterpolateUp ( float  f)

Interpolates Normal by F

Parameters
f0..1
Returns
the interpolated normal
void Move ( ref float  f,
ref int  direction,
float  speed,
CurvyClamping  clamping 
)
void MoveBy ( ref float  f,
ref int  direction,
float  speedDist,
CurvyClamping  clamping 
)
virtual void Recalculate ( )
virtual

Recalculate Length and RelativeDistances (by measuring a polyline built from all Position points)

Call this after TRS'ing a shape

void RecalculateNormals ( List< int >  softEdges)
void RecalculateNormals ( [NotNull] CurvySpline  spline)

Recalculate the shape's Normals based on the spline the shape was rasterized from

void RecalculateNormals ( )

Recalculate the shape's Normals based on shape's rasterized Positions

Member Data Documentation

bool Closed

Whether the base spline is closed or not

float Length

Length in world units

List<SamplePointsMaterialGroup> MaterialGroups

Groups/Patches

bool Seamless

Whether the Shape/Path is seamless, i.e. Closed==true and the whole length is covered

bool SourceIsManaged

Whether the source is managed or not

This could be used to determine if values needs to be transformed into generator space or not

Property Documentation

override int Count
get

Gets the number of sample points

SubArray<float> CustomValues
getset

Arbitrary mapped value to each point, usually U coordinate

Setting a new SubArray<T> will ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>) the current SubArray<T> instance

List<DuplicateSamplePoint> DuplicatePoints
getset

The list of the shape's DuplicatePoints

float [] F
getset

The relative distance of each point. A relative distance is a value between 0 and 1 representing how far the point is in a shape. A value of 0 means the start of the shape, and a value of 1 means the end of it. It is defined as (the point's distance from the shape's start) / (the total length of the shape) This is unrelated to the notion of

See also
CurvySplineSegment.TF

or F of a spline. Unfortunately, it is abusively called F in big parts of the the Curvy Generator related code, sorry for the confusion.

This getter returns a copy of the actual array. For performance reasons, use the equivalent getter returning a SubArray<T> instance, which allows you to directly access and modify the underlying array

float [] Map
getset

Arbitrary mapped value to each point, usually U coordinate

This getter returns a copy of the actual array. For performance reasons, use the equivalent getter returning a SubArray<T> instance, which allows you to directly access and modify the underlying array

Vector3 [] Normal
getset

Normals of the path's points, in the path's local space

This getter returns a copy of the actual array. For performance reasons, use the equivalent getter returning a SubArray<T> instance, which allows you to directly access and modify the underlying array

SubArray<Vector3> Normals
getset

Normals of the path's points, in the path's local space

Setting a new SubArray<T> will ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>) the current SubArray<T> instance

Vector3 [] Position
getset

Positions of the path's points, in the path's local space

This getter returns a copy of the actual array. For performance reasons, use the equivalent getter returning a SubArray<T> instance, which allows you to directly access and modify the underlying array

SubArray<Vector3> Positions
getset

Positions of the path's points, in the path's local space

Setting a new SubArray<T> will ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>) the current SubArray<T> instance

SubArray<float> RelativeDistances
getset

The relative distance of each point. A relative distance is a value between 0 and 1 representing how far the point is in a shape. A value of 0 means the start of the shape, and a value of 1 means the end of it. It is defined as (the point's distance from the shape's start) / (the total length of the shape) This is unrelated to the notion of

See also
CurvySplineSegment.TF

or F of a spline. Unfortunately, it is abusively called F in big parts of the the Curvy Generator related code, sorry for the confusion.

Setting a new SubArray<T> will ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>) the current SubArray<T> instance

float [] SourceF
getset

The relative distance of each point relative to the source shape. A relative distance is a value between 0 and 1 representing how far the point is in a shape. A value of 0 means the start of the shape, and a value of 1 means the end of it. It is defined as (the point's distance from the shape's start) / (the total length of the shape) Contrary to

See also
RelativeDistances, CurvySplineSegment.TF

which is computed based on the actual shape, SourceRelativeDistances is computed based on the source shape. For example, if a Shape A is defined as the second quarter of a Shape B, A's first point will have a relative distance of 0, but a source relative distance of 0.25. A's last point will have a relative distance of 1, but a source relative distance of 0.5 This is unrelated to the notion of or F of a spline. Unfortunately, it is abusively called F in big parts of the the Curvy Generator related code, sorry for the confusion.

This getter returns a copy of the actual array. For performance reasons, use the equivalent getter returning a SubArray<T> instance, which allows you to directly access and modify the underlying array

SubArray<float> SourceRelativeDistances
getset

The relative distance of each point relative to the source shape. A relative distance is a value between 0 and 1 representing how far the point is in a shape. A value of 0 means the start of the shape, and a value of 1 means the end of it. It is defined as (the point's distance from the shape's start) / (the total length of the shape) Contrary to

See also
RelativeDistances, CurvySplineSegment.TF

which is computed based on the actual shape, SourceRelativeDistances is computed based on the source shape. For example, if a Shape A is defined as the second quarter of a Shape B, A's first point will have a relative distance of 0, but a source relative distance of 0.25. A's last point will have a relative distance of 1, but a source relative distance of 0.5 This is unrelated to the notion of or F of a spline. Unfortunately, it is abusively called F in big parts of the the Curvy Generator related code, sorry for the confusion.

Setting a new SubArray<T> will ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>) the current SubArray<T> instance


The documentation for this class was generated from the following file: