|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.geom.CoordinateUtils
public class CoordinateUtils
A utility class that can be used to modify coordinate values of an item of geometry.
The utility class may be used as either a single shared instance or as a normal class. Sometimes you have a lot of different code all wanting to do similar modifications simultaneously and so having a single static-only class with synchronised methods would be very bad for performance.
| Constructor Summary | |
|---|---|
CoordinateUtils()
Create a default instance of the utility class. |
|
| Method Summary | |
|---|---|
CoordinateUtils |
getSharedInstance()
Fetch the currently shared singleton instance. |
void |
translate(float[][] srcCoords,
int numCoords,
float[][] destCoords,
float x,
float y,
float z)
Translate the coordintes by the given amount in each direction and place them in the destination array. |
void |
translate(float[][] coords,
int numCoords,
float x,
float y,
float z)
Translate, in place, the coordintes by the given amount in each direction. |
void |
translate(float[] srcCoords,
int numCoords,
float[] destCoords,
float x,
float y,
float z)
Translate the coordintes by the given amount in each direction and place them in the destination array. |
void |
translate(float[] coords,
int numCoords,
float x,
float y,
float z)
Translate, in place, the coordintes by the given amount in each direction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CoordinateUtils()
| Method Detail |
|---|
public CoordinateUtils getSharedInstance()
public void translate(float[] coords,
int numCoords,
float x,
float y,
float z)
coords - The source coordinate array to copynumCoords - The number of valid coordinates in the arrayx - The amount to translate in the x axisy - The amount to translate in the y ayisz - The amount to translate in the z azis
public void translate(float[][] coords,
int numCoords,
float x,
float y,
float z)
coords - The source coordinate array to copynumCoords - The number of valid coordinates in the arrayx - The amount to translate in the x axisy - The amount to translate in the y ayisz - The amount to translate in the z azis
public void translate(float[] srcCoords,
int numCoords,
float[] destCoords,
float x,
float y,
float z)
srcCoords - The source coordinate array to copynumCoords - The number of valid coordinates in the arraydestCoords - The array to copy the values intox - The amount to translate in the x axisy - The amount to translate in the y ayisz - The amount to translate in the z azis
public void translate(float[][] srcCoords,
int numCoords,
float[][] destCoords,
float x,
float y,
float z)
srcCoords - The source coordinate array to copynumCoords - The number of valid coordinates in the arraydestCoords - The array to copy the values intox - The amount to translate in the x axisy - The amount to translate in the y ayisz - The amount to translate in the z azis
|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||