j3d.org Code

org.j3d.geom.hanim
Class HAnimDisplacer

java.lang.Object
  extended by org.j3d.geom.hanim.HAnimObject
      extended by org.j3d.geom.hanim.HAnimDisplacer

public class HAnimDisplacer
extends HAnimObject

Representation of a H-Anim Displacer object.

The joint object is defined by 6.5 Displacer.

Internationalisation Resource Names

Version:
$Revision: 1.5 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.geom.hanim.HAnimObject
errorReporter, name
 
Constructor Summary
HAnimDisplacer()
          Construct a default instance of the displacer.
 
Method Summary
 void getCoordIndex(float[] val)
          Get the current value of the skinCoordIndex.
 void getDisplacements(float[] val)
          Get the current value of the skinDisplacements.
 float getWeight()
          Get the current value of the weight to be applied to the displacements.
 int numCoordIndex()
          Get the number of elements in the skinCoordIndex field, and by association skinCoordWeight (if any weights have been set).
 int numDisplacements()
          Get the number of elements in the skinDisplacements field, and by association skinCoordWeight (if any weights have been set).
 void setCoordIndex(int[] val, int numValid)
          Set a new value for the skinCoordIndex of this joint.
 void setDisplacements(float[] val, int numValid)
          Set a new value for the skinDisplacements of this joint.
 void setWeight(float val)
          Set a new value for the weight for the displacements.
 
Methods inherited from class org.j3d.geom.hanim.HAnimObject
getName, setErrorReporter, setName, updateMatrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HAnimDisplacer

public HAnimDisplacer()
Construct a default instance of the displacer.

Method Detail

getWeight

public float getWeight()
Get the current value of the weight to be applied to the displacements.

Returns:
A non-negative value

setWeight

public void setWeight(float val)
Set a new value for the weight for the displacements. If no weight value is to be used, then a value of 1 should be set (the default).

Parameters:
val - The new weight value to use

numDisplacements

public int numDisplacements()
Get the number of elements in the skinDisplacements field, and by association skinCoordWeight (if any weights have been set).

Returns:
The number of value kept in the skin coordinate index

getDisplacements

public void getDisplacements(float[] val)
Get the current value of the skinDisplacements. If no weights are set, the array is left unchanged.

Parameters:
val - An array of at least length of numCoord() to copy the values to

setDisplacements

public void setDisplacements(float[] val,
                             int numValid)
Set a new value for the skinDisplacements of this joint. If the array is null or not long enough an exception is generated. The array must be at least as long as the numValid field value.

Parameters:
val - The new skinDisplacements value to use
numValid - The number of valid values to read from the index list
Throws:
java.lang.IllegalArgumentException - The array is null or not long enough.

numCoordIndex

public int numCoordIndex()
Get the number of elements in the skinCoordIndex field, and by association skinCoordWeight (if any weights have been set).

Returns:
The number of value kept in the skin coordinate index

getCoordIndex

public void getCoordIndex(float[] val)
Get the current value of the skinCoordIndex. If no weights are set, the array is left unchanged.

Parameters:
val - An array of at least length of numCoord() to copy the values to

setCoordIndex

public void setCoordIndex(int[] val,
                          int numValid)
Set a new value for the skinCoordIndex of this joint. If the array is null or not long enough an exception is generated. The array must be at least as long as the numValid field value.

Parameters:
val - The new skinCoordIndex value to use
numValid - The number of valid values to read from the index list
Throws:
java.lang.IllegalArgumentException - The array is null or not long enough.

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org