org.ogre4j
Class AnimationState

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

public class AnimationState
extends NativeObject
implements IAnimationState


Nested Class Summary
static class AnimationState.BoneBlendMask
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IAnimationState
IAnimationState.IBoneBlendMask
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  AnimationState(IAnimationStateSet parent, IAnimationState rhs)
           
  AnimationState(InstancePointer p)
          This constructor is public for internal useage only!
protected AnimationState(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  AnimationState(java.lang.String animName, IAnimationStateSet parent, float timePos, float length, float weight, boolean enabled)
           
  AnimationState(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _setBlendMask(IAnimationState.IBoneBlendMask blendMask)
           
 void _setBlendMaskData(FloatPointer blendMaskData)
           
 void addTime(float offset)
          Modifies the time position, adjusting for animation length
 void copyStateFrom(IAnimationState animState)
          Copies the states from another animation state, preserving the animation name (unlike operator=) but copying everything else.
 void createBlendMask(int blendMaskSizeHint, float initialWeight)
          In addition to assigning a single weight value to a skeletal animation, it may be desirable to assign animation weights per bone using a 'blend mask'.
 void delete()
          Deletes the corresponding C++ object.
 void destroyBlendMask()
           
 void finalize()
           
 java.lang.String getAnimationName()
           
 IAnimationState.IBoneBlendMask getBlendMask()
           
 float getBlendMaskEntry(int boneHandle)
           
 boolean getEnabled()
           
 float getLength()
           
 boolean getLoop()
           
 IAnimationStateSet getParent()
           
 float getTimePosition()
           
 float getWeight()
           
 boolean hasBlendMask()
           
 boolean hasEnded()
           
 boolean operatorEqual(IAnimationState rhs)
           
 boolean operatorNotEqual(IAnimationState rhs)
           
 void setBlendMaskEntry(int boneHandle, float weight)
           
 void setEnabled(boolean enabled)
           
 void setLength(float len)
           
 void setLoop(boolean loop)
          Sets whether or not an animation loops at the start and end of the animation if the time continues to be altered.
 void setTimePosition(float timePos)
           
 void setWeight(float weight)
           
 
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

AnimationState

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


AnimationState

protected AnimationState(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.


AnimationState

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

AnimationState

public AnimationState(java.lang.String animName,
                      IAnimationStateSet parent,
                      float timePos,
                      float length,
                      float weight,
                      boolean enabled)

AnimationState

public AnimationState(IAnimationStateSet parent,
                      IAnimationState rhs)
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

getAnimationName

public java.lang.String getAnimationName()
Specified by:
getAnimationName in interface IAnimationState

getTimePosition

public float getTimePosition()
Specified by:
getTimePosition in interface IAnimationState

setTimePosition

public void setTimePosition(float timePos)
Specified by:
setTimePosition in interface IAnimationState

getLength

public float getLength()
Specified by:
getLength in interface IAnimationState

setLength

public void setLength(float len)
Specified by:
setLength in interface IAnimationState

getWeight

public float getWeight()
Specified by:
getWeight in interface IAnimationState

setWeight

public void setWeight(float weight)
Specified by:
setWeight in interface IAnimationState

addTime

public void addTime(float offset)
Modifies the time position, adjusting for animation length

Specified by:
addTime in interface IAnimationState

hasEnded

public boolean hasEnded()
Specified by:
hasEnded in interface IAnimationState

getEnabled

public boolean getEnabled()
Specified by:
getEnabled in interface IAnimationState

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface IAnimationState

operatorEqual

public boolean operatorEqual(IAnimationState rhs)
Specified by:
operatorEqual in interface IAnimationState

operatorNotEqual

public boolean operatorNotEqual(IAnimationState rhs)
Specified by:
operatorNotEqual in interface IAnimationState

setLoop

public void setLoop(boolean loop)
Sets whether or not an animation loops at the start and end of the animation if the time continues to be altered.

Specified by:
setLoop in interface IAnimationState

getLoop

public boolean getLoop()
Specified by:
getLoop in interface IAnimationState

copyStateFrom

public void copyStateFrom(IAnimationState animState)
Copies the states from another animation state, preserving the animation name (unlike operator=) but copying everything else.

Specified by:
copyStateFrom in interface IAnimationState

getParent

public IAnimationStateSet getParent()
Specified by:
getParent in interface IAnimationState

createBlendMask

public void createBlendMask(int blendMaskSizeHint,
                            float initialWeight)
In addition to assigning a single weight value to a skeletal animation, it may be desirable to assign animation weights per bone using a 'blend mask'.

Specified by:
createBlendMask in interface IAnimationState

destroyBlendMask

public void destroyBlendMask()
Specified by:
destroyBlendMask in interface IAnimationState

_setBlendMaskData

public void _setBlendMaskData(FloatPointer blendMaskData)
Specified by:
_setBlendMaskData in interface IAnimationState

_setBlendMask

public void _setBlendMask(IAnimationState.IBoneBlendMask blendMask)
Specified by:
_setBlendMask in interface IAnimationState

getBlendMask

public IAnimationState.IBoneBlendMask getBlendMask()
Specified by:
getBlendMask in interface IAnimationState

hasBlendMask

public boolean hasBlendMask()
Specified by:
hasBlendMask in interface IAnimationState

setBlendMaskEntry

public void setBlendMaskEntry(int boneHandle,
                              float weight)
Specified by:
setBlendMaskEntry in interface IAnimationState

getBlendMaskEntry

public float getBlendMaskEntry(int boneHandle)
Specified by:
getBlendMaskEntry in interface IAnimationState


Copyright © 2007 netAllied GmbH. All Rights Reserved.