Class MorphTargetChannel


  • 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 Summary

      Fields 
      Modifier and Type Field Description
      static double DEFAULT_WEIGHT
      Default weight for morph target.
    • Method Summary

      Modifier and Type Method Description
      double get​(Geometry target)
      Gets the weight for specified geometry
      double getChannelWeight()
      Gets the deformer weight of this channel.
      java.util.List<Geometry> getTargets()
      Gets all targets associated with the channel.
      double getWeight​(Geometry target)
      Gets the weight for the specified target, if the target is not belongs to this channel, default value 0 is returned.
      java.util.List<java.lang.Double> getWeights()
      Gets the full weight values of target geometries.
      void set​(Geometry target, double value)
      Sets the weight for specified geometry
      void setChannelWeight​(double value)
      Sets the deformer weight of this channel.
      void setWeight​(Geometry target)
      Sets the weight for the specified target, default value is 1, range should between 0~1
      void setWeight​(Geometry target, double weight)
      Sets the weight for the specified target, default value is 1, range should between 0~1
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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<Geometry> getTargets()
        Gets all targets associated with the channel.
      • get

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

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

        public double getWeight​(Geometry 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​(Geometry 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​(Geometry target)
        Sets the weight for the specified target, default value is 1, range should between 0~1
        Parameters:
        target -