shout3d.core
Class TranslationDefChannel

java.lang.Object
  |
  +--shout3d.core.Node
        |
        +--shout3d.core.DeformationChannel
              |
              +--shout3d.core.TranslationDefChannel

public class TranslationDefChannel
extends DeformationChannel

A TranslationDefChannel A DeformationChannel that translates points based on a single translation and an array of weights. When invoked, deform method operates on the array of points given as follows: The modifiedCoordIndex specifies which points in the array are to be deformed. If modifiedCoordIndex is null or empty, then all points will be deformed. The translations field contains a single 3-vector to be applied to each point. The weights field contains either a single weight or a an array of weights. If there is a single weight, that weight is applied to all points. If there are multiple weights, then there must be one for each point to be deformed, otherwise the method will return without taking action. Each point to be deformed will be translated by an amount equal to the translation scaled by the value of the relevant weight for that point.


Field Summary
 IntArrayField modifiedCoordIndex
           
 FloatArrayField translation
           
 FloatArrayField weights
           
 
Constructor Summary
TranslationDefChannel()
           
 
Method Summary
 void deform(float[] points)
           
 
Methods inherited from class shout3d.core.Node
cleanUp, getDEFName, getField, getFieldByIndex, getFieldName, getNumFields, getTypeName, getViewer, isOfType, setDEFName, setViewer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

weights

public final FloatArrayField weights

modifiedCoordIndex

public final IntArrayField modifiedCoordIndex

translation

public final FloatArrayField translation
Constructor Detail

TranslationDefChannel

public TranslationDefChannel()
Method Detail

deform

public void deform(float[] points)
Overrides:
deform in class DeformationChannel