org.ogre4j
Class Animation

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.Animation
All Implemented Interfaces:
IAllocatedObject<IAnimationAllocPolicy>, IAnimation, IAnimationAllocatedObject, INativeObject

public class Animation
extends NativeObject
implements IAnimation


Nested Class Summary
static class Animation.InterpolationMode
           
protected static class Animation.KeyFrameTimeList
           
static class Animation.NodeTrackIterator
           
static class Animation.NodeTrackList
           
static class Animation.NumericTrackIterator
           
static class Animation.NumericTrackList
           
static class Animation.RotationInterpolationMode
           
static class Animation.TrackHandleList
           
static class Animation.VertexTrackIterator
           
static class Animation.VertexTrackList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IAnimation
IAnimation.IKeyFrameTimeList, IAnimation.INodeTrackIterator, IAnimation.INodeTrackList, IAnimation.INumericTrackIterator, IAnimation.INumericTrackList, IAnimation.ITrackHandleList, IAnimation.IVertexTrackIterator, IAnimation.IVertexTrackList
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Animation(InstancePointer p)
          This constructor is public for internal useage only!
protected Animation(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Animation(java.lang.String name, float length)
          You should not use this constructor directly, use the parent object such as instead.
  Animation(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _collectIdentityNodeTracks(IAnimation.ITrackHandleList tracks)
          Internal method for collecting identity node tracks.
 void _destroyNodeTracks(IAnimation.ITrackHandleList tracks)
          Internal method for destroy given node tracks.
 IAnimation.INodeTrackList _getNodeTrackList()
           
 IAnimation.INumericTrackList _getNumericTrackList()
           
 void _getTimeIndex(ITimeIndex returnValue, float timePos)
          Internal method used to convert time position to time index object.
 IAnimation.IVertexTrackList _getVertexTrackList()
           
 void _keyFrameListChanged()
          Internal method used to tell the animation that keyframe list has been changed, which may cause it to rebuild some internal data
 void apply(float timePos, float weight, float scale)
          Applies an animation given a specific time point and weight.
 void apply(IEntity entity, float timePos, float weight, boolean software, boolean hardware)
          Applies all vertex tracks given a specific time point and weight to a given entity.
 void apply(ISkeleton skeleton, float timePos, float weight, float scale)
          Applies all node tracks given a specific time point and weight to a given skeleton.
 void apply(ISkeleton skeleton, float timePos, float weight, IAnimationState.IBoneBlendMask blendMask, float scale)
          Applies all node tracks given a specific time point and weight to a given skeleton.
 IAnimation clone(java.lang.String newName)
          Clone this animation.
 INodeAnimationTrack createNodeTrack(int handle)
          Creates a for animating a .
 INodeAnimationTrack createNodeTrack(int handle, INode node)
          Creates a new automatically associated with a .
 INumericAnimationTrack createNumericTrack(int handle)
          Creates a for animating any numeric value.
 INumericAnimationTrack createNumericTrack(int handle, IAnimableValuePtr anim)
          Creates a and associates it with an animable.
 IVertexAnimationTrack createVertexTrack(int handle, IVertexData data, VertexAnimationType animType)
          Creates a and associates it with .
 IVertexAnimationTrack createVertexTrack(int handle, VertexAnimationType animType)
          Creates a for animating vertex position data.
 void delete()
          Deletes the corresponding C++ object.
 void destroyAllNodeTracks()
          Removes and destroys all tracks making up this animation.
 void destroyAllNumericTracks()
          Removes and destroys all tracks making up this animation.
 void destroyAllTracks()
          Removes and destroys all tracks making up this animation.
 void destroyAllVertexTracks()
          Removes and destroys all tracks making up this animation.
 void destroyNodeTrack(int handle)
          Destroys the node track with the given handle.
 void destroyNumericTrack(int handle)
          Destroys the numeric track with the given handle.
 void destroyVertexTrack(int handle)
          Destroys the Vertex track with the given handle.
 void finalize()
           
static Animation.InterpolationMode getDefaultInterpolationMode()
          Gets the default interpolation mode for all animations.
static Animation.RotationInterpolationMode getDefaultRotationInterpolationMode()
          Gets the default rotation interpolation mode for all animations.
 Animation.InterpolationMode getInterpolationMode()
          Gets the current interpolation mode of this animation.
 float getLength()
          Gets the total length of the animation.
 java.lang.String getName()
          Gets the name of this animation.
 INodeAnimationTrack getNodeTrack(int handle)
          Gets a node track by it's handle.
 void getNodeTrackIterator(IAnimation.INodeTrackIterator returnValue)
           
 INumericAnimationTrack getNumericTrack(int handle)
          Gets a numeric track by it's handle.
 void getNumericTrackIterator(IAnimation.INumericTrackIterator returnValue)
           
 int getNumNodeTracks()
          Gets the number of objects contained in this animation.
 int getNumNumericTracks()
          Gets the number of objects contained in this animation.
 int getNumVertexTracks()
          Gets the number of objects contained in this animation.
 Animation.RotationInterpolationMode getRotationInterpolationMode()
          Gets the current rotation interpolation mode of this animation.
 IVertexAnimationTrack getVertexTrack(int handle)
          Gets a Vertex track by it's handle.
 void getVertexTrackIterator(IAnimation.IVertexTrackIterator returnValue)
           
 boolean hasNodeTrack(int handle)
          Does a track exist with the given handle?
 boolean hasNumericTrack(int handle)
          Does a track exist with the given handle?
 boolean hasVertexTrack(int handle)
          Does a track exist with the given handle?
 void optimise(boolean discardIdentityNodeTracks)
          Optimise an animation by removing unnecessary tracks and keyframes.
static void setDefaultInterpolationMode(Animation.InterpolationMode im)
          Sets the default animation interpolation mode.
static void setDefaultRotationInterpolationMode(Animation.RotationInterpolationMode im)
          Sets the default rotation interpolation mode.
 void setInterpolationMode(Animation.InterpolationMode im)
          Tells the animation how to interpolate between keyframes.
 void setLength(float len)
          Sets the length of the animation.
 void setRotationInterpolationMode(Animation.RotationInterpolationMode im)
          Tells the animation how to interpolate rotations.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

Animation

public Animation(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


Animation

protected Animation(InstancePointer p,
                    boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


Animation

public Animation(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Animation

public Animation(java.lang.String name,
                 float length)
You should not use this constructor directly, use the parent object such as instead.

Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

getName

public java.lang.String getName()
Gets the name of this animation.

Specified by:
getName in interface IAnimation

getLength

public float getLength()
Gets the total length of the animation.

Specified by:
getLength in interface IAnimation

setLength

public void setLength(float len)
Sets the length of the animation.

Specified by:
setLength in interface IAnimation

createNodeTrack

public INodeAnimationTrack createNodeTrack(int handle)
Creates a for animating a .

Specified by:
createNodeTrack in interface IAnimation

createNumericTrack

public INumericAnimationTrack createNumericTrack(int handle)
Creates a for animating any numeric value.

Specified by:
createNumericTrack in interface IAnimation

createVertexTrack

public IVertexAnimationTrack createVertexTrack(int handle,
                                               VertexAnimationType animType)
Creates a for animating vertex position data.

Specified by:
createVertexTrack in interface IAnimation

createNodeTrack

public INodeAnimationTrack createNodeTrack(int handle,
                                           INode node)
Creates a new automatically associated with a .

Specified by:
createNodeTrack in interface IAnimation

createNumericTrack

public INumericAnimationTrack createNumericTrack(int handle,
                                                 IAnimableValuePtr anim)
Creates a and associates it with an animable.

Specified by:
createNumericTrack in interface IAnimation

createVertexTrack

public IVertexAnimationTrack createVertexTrack(int handle,
                                               IVertexData data,
                                               VertexAnimationType animType)
Creates a and associates it with .

Specified by:
createVertexTrack in interface IAnimation

getNumNodeTracks

public int getNumNodeTracks()
Gets the number of objects contained in this animation.

Specified by:
getNumNodeTracks in interface IAnimation

getNodeTrack

public INodeAnimationTrack getNodeTrack(int handle)
Gets a node track by it's handle.

Specified by:
getNodeTrack in interface IAnimation

hasNodeTrack

public boolean hasNodeTrack(int handle)
Does a track exist with the given handle?

Specified by:
hasNodeTrack in interface IAnimation

getNumNumericTracks

public int getNumNumericTracks()
Gets the number of objects contained in this animation.

Specified by:
getNumNumericTracks in interface IAnimation

getNumericTrack

public INumericAnimationTrack getNumericTrack(int handle)
Gets a numeric track by it's handle.

Specified by:
getNumericTrack in interface IAnimation

hasNumericTrack

public boolean hasNumericTrack(int handle)
Does a track exist with the given handle?

Specified by:
hasNumericTrack in interface IAnimation

getNumVertexTracks

public int getNumVertexTracks()
Gets the number of objects contained in this animation.

Specified by:
getNumVertexTracks in interface IAnimation

getVertexTrack

public IVertexAnimationTrack getVertexTrack(int handle)
Gets a Vertex track by it's handle.

Specified by:
getVertexTrack in interface IAnimation

hasVertexTrack

public boolean hasVertexTrack(int handle)
Does a track exist with the given handle?

Specified by:
hasVertexTrack in interface IAnimation

destroyNodeTrack

public void destroyNodeTrack(int handle)
Destroys the node track with the given handle.

Specified by:
destroyNodeTrack in interface IAnimation

destroyNumericTrack

public void destroyNumericTrack(int handle)
Destroys the numeric track with the given handle.

Specified by:
destroyNumericTrack in interface IAnimation

destroyVertexTrack

public void destroyVertexTrack(int handle)
Destroys the Vertex track with the given handle.

Specified by:
destroyVertexTrack in interface IAnimation

destroyAllTracks

public void destroyAllTracks()
Removes and destroys all tracks making up this animation.

Specified by:
destroyAllTracks in interface IAnimation

destroyAllNodeTracks

public void destroyAllNodeTracks()
Removes and destroys all tracks making up this animation.

Specified by:
destroyAllNodeTracks in interface IAnimation

destroyAllNumericTracks

public void destroyAllNumericTracks()
Removes and destroys all tracks making up this animation.

Specified by:
destroyAllNumericTracks in interface IAnimation

destroyAllVertexTracks

public void destroyAllVertexTracks()
Removes and destroys all tracks making up this animation.

Specified by:
destroyAllVertexTracks in interface IAnimation

apply

public void apply(float timePos,
                  float weight,
                  float scale)
Applies an animation given a specific time point and weight.

Specified by:
apply in interface IAnimation

apply

public void apply(ISkeleton skeleton,
                  float timePos,
                  float weight,
                  float scale)
Applies all node tracks given a specific time point and weight to a given skeleton.

Specified by:
apply in interface IAnimation

apply

public void apply(ISkeleton skeleton,
                  float timePos,
                  float weight,
                  IAnimationState.IBoneBlendMask blendMask,
                  float scale)
Applies all node tracks given a specific time point and weight to a given skeleton.

Specified by:
apply in interface IAnimation

apply

public void apply(IEntity entity,
                  float timePos,
                  float weight,
                  boolean software,
                  boolean hardware)
Applies all vertex tracks given a specific time point and weight to a given entity.

Specified by:
apply in interface IAnimation

setInterpolationMode

public void setInterpolationMode(Animation.InterpolationMode im)
Tells the animation how to interpolate between keyframes.

Specified by:
setInterpolationMode in interface IAnimation

getInterpolationMode

public Animation.InterpolationMode getInterpolationMode()
Gets the current interpolation mode of this animation.

Specified by:
getInterpolationMode in interface IAnimation

setRotationInterpolationMode

public void setRotationInterpolationMode(Animation.RotationInterpolationMode im)
Tells the animation how to interpolate rotations.

Specified by:
setRotationInterpolationMode in interface IAnimation

getRotationInterpolationMode

public Animation.RotationInterpolationMode getRotationInterpolationMode()
Gets the current rotation interpolation mode of this animation.

Specified by:
getRotationInterpolationMode in interface IAnimation

_getNodeTrackList

public IAnimation.INodeTrackList _getNodeTrackList()
Specified by:
_getNodeTrackList in interface IAnimation

getNodeTrackIterator

public void getNodeTrackIterator(IAnimation.INodeTrackIterator returnValue)
Specified by:
getNodeTrackIterator in interface IAnimation

_getNumericTrackList

public IAnimation.INumericTrackList _getNumericTrackList()
Specified by:
_getNumericTrackList in interface IAnimation

getNumericTrackIterator

public void getNumericTrackIterator(IAnimation.INumericTrackIterator returnValue)
Specified by:
getNumericTrackIterator in interface IAnimation

_getVertexTrackList

public IAnimation.IVertexTrackList _getVertexTrackList()
Specified by:
_getVertexTrackList in interface IAnimation

getVertexTrackIterator

public void getVertexTrackIterator(IAnimation.IVertexTrackIterator returnValue)
Specified by:
getVertexTrackIterator in interface IAnimation

optimise

public void optimise(boolean discardIdentityNodeTracks)
Optimise an animation by removing unnecessary tracks and keyframes.

Specified by:
optimise in interface IAnimation

_collectIdentityNodeTracks

public void _collectIdentityNodeTracks(IAnimation.ITrackHandleList tracks)
Internal method for collecting identity node tracks.

Specified by:
_collectIdentityNodeTracks in interface IAnimation

_destroyNodeTracks

public void _destroyNodeTracks(IAnimation.ITrackHandleList tracks)
Internal method for destroy given node tracks.

Specified by:
_destroyNodeTracks in interface IAnimation

clone

public IAnimation clone(java.lang.String newName)
Clone this animation.

Specified by:
clone in interface IAnimation

_keyFrameListChanged

public void _keyFrameListChanged()
Internal method used to tell the animation that keyframe list has been changed, which may cause it to rebuild some internal data

Specified by:
_keyFrameListChanged in interface IAnimation

_getTimeIndex

public void _getTimeIndex(ITimeIndex returnValue,
                          float timePos)
Internal method used to convert time position to time index object.

Specified by:
_getTimeIndex in interface IAnimation

setDefaultInterpolationMode

public static void setDefaultInterpolationMode(Animation.InterpolationMode im)
Sets the default animation interpolation mode.


getDefaultInterpolationMode

public static Animation.InterpolationMode getDefaultInterpolationMode()
Gets the default interpolation mode for all animations.


setDefaultRotationInterpolationMode

public static void setDefaultRotationInterpolationMode(Animation.RotationInterpolationMode im)
Sets the default rotation interpolation mode.


getDefaultRotationInterpolationMode

public static Animation.RotationInterpolationMode getDefaultRotationInterpolationMode()
Gets the default rotation interpolation mode for all animations.



Copyright © 2007 netAllied GmbH. All Rights Reserved.