public abstract class ConstraintDefinition
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.Long> |
alteredOmas
Stores the OMA addresses of all features whose transform had been altered beside the constraint owner.
|
protected BlenderContext |
blenderContext
The blender context.
|
protected ConstraintHelper |
constraintHelper |
protected java.lang.String |
constraintName
The name of the constraint.
|
protected int |
flag
Constraints flag.
|
protected java.lang.Long |
ownerOMA
The constraint's owner OMA.
|
protected boolean |
trackToBeChanged
The variable that determines if the constraint will alter the track in any way.
|
Constructor and Description |
---|
ConstraintDefinition(Structure constraintData,
java.lang.Long ownerOMA,
BlenderContext blenderContext)
Loads a constraint definition based on the constraint definition
structure.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyOwnerTransform(Transform ownerTransform,
ConstraintHelper.Space ownerSpace)
The method applies the given transformation to the owner.
|
abstract void |
bake(ConstraintHelper.Space ownerSpace,
ConstraintHelper.Space targetSpace,
Transform targetTransform,
float influence)
Bakes the constraint for the current feature (bone or spatial) position.
|
java.util.Set<java.lang.Long> |
getAlteredOmas() |
abstract java.lang.String |
getConstraintTypeName() |
protected java.lang.Object |
getOwner()
This method is here because we have no guarantee that the owner is loaded
when constraint is being created.
|
protected Transform |
getOwnerTransform(ConstraintHelper.Space ownerSpace)
The method gets the owner's transformation.
|
boolean |
isImplemented() |
abstract boolean |
isTargetRequired() |
boolean |
isTrackToBeChanged() |
void |
setConstraintName(java.lang.String constraintName) |
java.lang.String |
toString() |
protected ConstraintHelper constraintHelper
protected int flag
protected BlenderContext blenderContext
protected java.lang.Long ownerOMA
protected java.util.Set<java.lang.Long> alteredOmas
protected boolean trackToBeChanged
protected java.lang.String constraintName
public ConstraintDefinition(Structure constraintData, java.lang.Long ownerOMA, BlenderContext blenderContext)
constraintData
- the constraint definition structureownerOMA
- the constraint's owner OMAblenderContext
- the blender contextpublic void setConstraintName(java.lang.String constraintName)
public boolean isTrackToBeChanged()
public abstract boolean isTargetRequired()
protected java.lang.Object getOwner()
protected Transform getOwnerTransform(ConstraintHelper.Space ownerSpace)
ownerSpace
- the space in which the computed transformation is givenprotected void applyOwnerTransform(Transform ownerTransform, ConstraintHelper.Space ownerSpace)
ownerTransform
- the transformation to apply to the ownerownerSpace
- the space that defines which owner's transformation (ie. global, local, etc. will be set)public boolean isImplemented()
public java.util.Set<java.lang.Long> getAlteredOmas()
public abstract java.lang.String getConstraintTypeName()
public abstract void bake(ConstraintHelper.Space ownerSpace, ConstraintHelper.Space targetSpace, Transform targetTransform, float influence)
ownerSpace
- the space where owner transform will be evaluated intargetSpace
- the space where target transform will be evaluated intargetTransform
- the target transform used by some of the constraintsinfluence
- the influence of the constraint from range [0; 1]public java.lang.String toString()
toString
in class java.lang.Object