com.jme3.scene.plugins.blender.constraints
Class Constraint

java.lang.Object
  extended by com.jme3.scene.plugins.blender.constraints.Constraint

public abstract class Constraint
extends java.lang.Object

The implementation of a constraint.


Nested Class Summary
static class Constraint.Space
          The space of target or owner transformation.
 
Field Summary
protected  BlenderContext blenderContext
          The blender context.
protected  Structure data
          The structure with constraint's data.
protected  Ipo ipo
          The ipo object defining influence.
protected  java.lang.String name
          The name of this constraint.
protected  com.jme3.scene.plugins.blender.constraints.Feature owner
          The constraint's owner.
protected  com.jme3.scene.plugins.blender.constraints.Feature target
          The constraint's target.
 
Constructor Summary
Constraint(Structure constraintStructure, java.lang.Long ownerOMA, Ipo influenceIpo, BlenderContext blenderContext)
          This constructor creates the constraint instance.
 
Method Summary
 void bake()
          This method bakes the required sontraints into its owner.
protected abstract  void bakeConstraint()
          Bake the animation's constraints into its owner.
protected  com.jme3.scene.plugins.blender.constraints.BlenderTrack getTrack(java.lang.Object owner, Skeleton skeleton, Animation animation)
          This method returns the bone traces for the bone that is affected by the given constraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name
The name of this constraint.


owner

protected final com.jme3.scene.plugins.blender.constraints.Feature owner
The constraint's owner.


target

protected final com.jme3.scene.plugins.blender.constraints.Feature target
The constraint's target.


data

protected final Structure data
The structure with constraint's data.


ipo

protected final Ipo ipo
The ipo object defining influence.


blenderContext

protected final BlenderContext blenderContext
The blender context.

Constructor Detail

Constraint

public Constraint(Structure constraintStructure,
                  java.lang.Long ownerOMA,
                  Ipo influenceIpo,
                  BlenderContext blenderContext)
           throws BlenderFileException
This constructor creates the constraint instance.

Parameters:
constraintStructure - the constraint's structure (bConstraint clss in blender 2.49).
ownerOMA - the old memory address of the constraint owner
influenceIpo - the ipo curve of the influence factor
blenderContext - the blender context
Throws:
BlenderFileException - this exception is thrown when the blender file is somehow corrupted
Method Detail

bake

public void bake()
This method bakes the required sontraints into its owner.


bakeConstraint

protected abstract void bakeConstraint()
Bake the animation's constraints into its owner.


getTrack

protected com.jme3.scene.plugins.blender.constraints.BlenderTrack getTrack(java.lang.Object owner,
                                                                           Skeleton skeleton,
                                                                           Animation animation)
This method returns the bone traces for the bone that is affected by the given constraint.

Parameters:
skeleton - the skeleton containing bones
boneAnimation - the bone animation that affects the skeleton
Returns:
the bone track for the bone that is being affected by the constraint