Table of Contents

Class ModifierMixShapes

public class ModifierMixShapes : CGModule, IOnRequestProcessing, IPathProvider
Inheritance
Object
Component
Behaviour
MonoBehaviour
DTVersionedMonoBehaviour
ModifierMixShapes
Implements
Inherited Members

Fields

InShapeA

[HideInInspector]
[InputSlotInfo(typeof(CGShape), Name = "Shape A")]
public CGModuleInputSlot InShapeA

Field Value

CGModuleInputSlot

InShapeB

[HideInInspector]
[InputSlotInfo(typeof(CGShape), Name = "Shape B")]
public CGModuleInputSlot InShapeB

Field Value

CGModuleInputSlot

OutShape

[HideInInspector]
[OutputSlotInfo(typeof(CGShape))]
public CGModuleOutputSlot OutShape

Field Value

CGModuleOutputSlot

Properties

Mix

Defines how the result is interpolated. Values between -1 for Shape A and 1 for Shape B

public float Mix { get; set; }

Property Value

float

PathIsClosed

public bool PathIsClosed { get; }

Property Value

bool

Methods

InterpolateShape(CGShape, CGShape, CGShape, float, List<string>, bool)

Returns the mixed shape

public static void InterpolateShape(CGShape resultShape, CGShape shapeA, CGShape shapeB, float mix, List<string> warningsContainer, bool ignoreWarnings = false)

Parameters

resultShape CGShape

A shape which will be filled with the data of the mixed shape

shapeA CGShape

One of the two interpolated shapes

shapeB CGShape

One of the two interpolated shapes

mix float

A value between -1 and 1. -1 will select shape A. 1 will select shape B

warningsContainer List<string>

Is filled with warnings raised by the mixing logic

ignoreWarnings bool

If true, warningsContainer will not be filled with warnings

MixShapes(CGShape, CGShape, float, List<string>, bool)

Returns the mixed shape

[CanBeNull]
public static CGShape MixShapes(CGShape shapeA, CGShape shapeB, float mix, List<string> warningsContainer, bool ignoreWarnings = false)

Parameters

shapeA CGShape
shapeB CGShape
mix float

A value between -1 and 1. -1 will select the shape with the most points. 1 will select the other

warningsContainer List<string>

Is filled with warnings raised by the mixing logic

ignoreWarnings bool

If true, warningsContainer will not be filled with warnings

Returns

CGShape

The mixed shape

OnSlotDataRequest(CGModuleInputSlot, CGModuleOutputSlot, params CGDataRequestParameter[])

public CGData[] OnSlotDataRequest(CGModuleInputSlot requestedBy, CGModuleOutputSlot requestedSlot, params CGDataRequestParameter[] requests)

Parameters

requestedBy CGModuleInputSlot
requestedSlot CGModuleOutputSlot
requests CGDataRequestParameter[]

Returns

CGData[]