AppleSCNMorpher - UBogun/Xojo-iosLib GitHub Wiki
Inherits from AppleObject
Memory leak check: not yet done.
Status: completed.
An SCNMorpher object deforms the surface of a node’s geometry, smoothly transitioning between a base geometry and one or more target geometries.
You control these transitions by associating an SCNMorpher object with a node using its morpher property. The morpher maintains an array of target geometries and a set of weights associated with each. When all weights are zero, the surface takes the form of the base geometry (from the node’s geometry property). When you use the setWeight:forTargetAtIndex: method to increase a weight to 1.0, the surface takes the form of the geometry at the corresponding index in the morpher’s targets array. If you use a variety of weight values for several targets, the surface takes a form that proportionally interpolates between the target geometries.
You can also animate weights implicitly or explicitly using keypath animations.
Constructor
Constructor(): Creates a morpher object.
Properties
CalculationMode As SCNMorpherCalculationMode: The interpolation formula for blending between target geometries.
SCNMorpherCalculationMode | Definition |
---|---|
Normalized | Target weights must be in the range between 0.0 and 1.0, and the contribution of the base geometry to the morphed surface is related to the sum of target weights. This is the default mode. |
Additive | Target weights may take on any value, and weighted contributions for each target are added to the base geometry. |
TargetCount As Integer (read-only): The number of added targets.
Targets As AppleArray of AppleSCNGeometry: The array of target geometries to morph between.
Methods
SetTargets (ParamArray Targets As AppleSCNGeometry): A Convenience method for setting the morpher targets.
GetWeight (Index As Integer) As Double: Returns the weight value for the specified target index.
SetWeight (Index As Integer, Value As Double): Sets the weight value for the specified target index.