Class CurveMapping


  • public class CurveMapping
    extends A3DObject
    A CurveMapping is usually created on an object's property, some property types contains multiple component fields(like a Vector3 field), CurveMapping will generate channel for each component field and connects the field to one or more curve instance(s) through the channels.
    • Method Summary

      Modifier and Type Method Description
      boolean addChannel​(java.lang.String name, java.lang.Class<?> type, java.lang.Object value)
      Adds the specified channel property.
      boolean addChannel​(java.lang.String name, java.lang.Object value)
      Adds the specified channel property.
      void bindCurve​(java.lang.String channelName, Curve curve)
      Bind the curve to specified channel
      Curve createCurve​(java.lang.String curveName)
      Creates a new curve and connects it to the first channel of the curve mapping
      AnimationChannel get​(java.lang.String channelName)
      Gets channel by given name
      AnimationChannel getChannel​(java.lang.String channelName)
      Gets channel by given name
      int getChannelsCount()
      Gets the total number of property channels defined in this animation curve mapping.
      Curve getCurve​(java.lang.String channelName)
      Gets the first curve in specified channel
      java.util.List<Curve> getCurves​(java.lang.String channelName)
      Gets all curves in specified channel
      Property getProperty()
      Gets the property associated with the CurveMapping
      void resetChannels()
      Empties the property channels of this animation curve mapping.
      void setProperty​(Property value)
      Gets the property associated with the CurveMapping
      java.lang.String toString()
      Formats object to string
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CurveMapping

        public CurveMapping​(Scene scene,
                            Property prop)
        Initializes a new instance of the CurveMapping class.
        Parameters:
        scene - The scene that contains the animation.
        prop - Property.
    • Method Detail

      • getProperty

        public Property getProperty()
        Gets the property associated with the CurveMapping
      • setProperty

        public void setProperty​(Property value)
        Gets the property associated with the CurveMapping
        Parameters:
        value - New value
      • getCurve

        public Curve getCurve​(java.lang.String channelName)
        Gets the first curve in specified channel
        Parameters:
        channelName - The channel name to find
        Returns:
        First Curve with the channel name
      • getCurves

        public java.util.List<Curve> getCurves​(java.lang.String channelName)
        Gets all curves in specified channel
        Parameters:
        channelName - The channel name to find
        Returns:
        Curve list with the channel name
      • createCurve

        public Curve createCurve​(java.lang.String curveName)
        Creates a new curve and connects it to the first channel of the curve mapping
        Parameters:
        curveName - The new curve's name.
        Returns:
        The curve.
      • bindCurve

        public void bindCurve​(java.lang.String channelName,
                              Curve curve)
        Bind the curve to specified channel
        Parameters:
        channelName - Which channel the curve will be bound to
        curve - The curve data
      • getChannel

        public AnimationChannel getChannel​(java.lang.String channelName)
        Gets channel by given name
        Parameters:
        channelName - The channel name to find
        Returns:
        Channel with the name
      • get

        public AnimationChannel get​(java.lang.String channelName)
        Gets channel by given name
        Parameters:
        channelName - Channel name
        Returns:
        Animation channel
      • addChannel

        public boolean addChannel​(java.lang.String name,
                                  java.lang.Object value)
        Adds the specified channel property.
        Parameters:
        name - Name.
        value - Value.
        Returns:
        true, if channel was added, false otherwise.
      • addChannel

        public boolean addChannel​(java.lang.String name,
                                  java.lang.Class<?> type,
                                  java.lang.Object value)
        Adds the specified channel property.
        Parameters:
        name - Name.
        type - Type.
        value - Value.
        Returns:
        true, if channel was added, false otherwise.
      • resetChannels

        public void resetChannels()
        Empties the property channels of this animation curve mapping.
      • getChannelsCount

        public int getChannelsCount()
        Gets the total number of property channels defined in this animation curve mapping.
        Returns:
        The channels count.
      • toString

        public java.lang.String toString()
        Formats object to string
        Overrides:
        toString in class java.lang.Object
        Returns:
        Object string