Class MorphTargetChannel

  • All Implemented Interfaces:
    INamedObject

    public class MorphTargetChannel
    extends A3DObject
    A MorphTargetChannel is used by MorphTargetDeformer to organize the target geometries. Some file formats like FBX support multiple channels in parallel.
    • Field Detail

      • DEFAULT_WEIGHT

        public static final double DEFAULT_WEIGHT
        Default weight for morph target.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MorphTargetChannel

        public MorphTargetChannel​(java.lang.String name)
        Initializes a new instance of the MorphTargetChannel class.
        Parameters:
        name - Name.
      • MorphTargetChannel

        public MorphTargetChannel()
        Initializes a new instance of the MorphTargetChannel class.
    • Method Detail

      • getWeights

        public java.util.List<java.lang.Double> getWeights()
        Gets the full weight values of target geometries.
      • getChannelWeight

        public double getChannelWeight()
        Gets the deformer weight of this channel. The weight is between 0.0 and 1.0
      • setChannelWeight

        public void setChannelWeight​(double value)
        Sets the deformer weight of this channel. The weight is between 0.0 and 1.0
        Parameters:
        value - New value
      • getTargets

        public java.util.List<Shape> getTargets()
        Gets all targets associated with the channel.
      • get

        public double get​(Shape target)
        Gets the weight for specified geometry
        Parameters:
        target - Target geometry.
        Returns:
        Weight
      • set

        public void set​(Shape target,
                        double value)
        Sets the weight for specified geometry
        Parameters:
        target - Target geometry.
        value - New value
      • getWeight

        public double getWeight​(Shape target)
        Gets the weight for the specified target, if the target is not belongs to this channel, default value 0 is returned.
        Parameters:
        target -
      • setWeight

        public void setWeight​(Shape target,
                              double weight)
        Sets the weight for the specified target, default value is 1, range should between 0~1
        Parameters:
        target -
        weight -
      • setWeight

        public void setWeight​(Shape target)
        Sets the weight for the specified target, default value is 1, range should between 0~1
        Parameters:
        target -