|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectframs_client_3d.Creature
Framstick creature body class.
Field Summary | |
private java.lang.String |
genotype
|
private int |
group
|
private int |
index
|
private int[][] |
joints
|
private int |
jointsCount
|
private java.lang.String |
name
|
private float[][] |
parts
|
private int |
partsCount
|
Constructor Summary | |
Creature(java.lang.String name,
java.lang.String genotype,
int partsCount,
int jointsCount,
int group,
int index)
Class constructor. |
Method Summary | |
void |
addJoint(int p1,
int p2)
Add joint to the creature body. |
void |
addPart(float x,
float y,
float z)
Add part to the creature body. |
java.lang.String |
getGenotype()
|
int |
getGroup()
|
int |
getIndex()
|
int[][] |
getJoints()
|
float[][] |
getParts()
|
float |
jointLength(int index)
Calculates the length of vector between two joint points. |
float[] |
jointRotation(int index)
Calculates the angle and the rotation axis between a joint and the base vector. |
float[] |
jointTranslation(int index)
Gets translation vector to the middle point of a joint. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String name
private java.lang.String genotype
private int partsCount
private int jointsCount
private int[][] joints
private float[][] parts
private int group
private int index
Constructor Detail |
public Creature(java.lang.String name, java.lang.String genotype, int partsCount, int jointsCount, int group, int index)
name
- partsCount
- number of partsjointsCount
- number of jointsgroup
- creature groupindex
- position in a groupMethod Detail |
public void addJoint(int p1, int p2)
p1
- p2
- public void addPart(float x, float y, float z)
x
- y
- z
- public java.lang.String toString()
public java.lang.String getGenotype()
public int[][] getJoints()
public float[][] getParts()
public int getGroup()
public int getIndex()
public float[] jointTranslation(int index)
index
- index of joint in a joints array
public float jointLength(int index)
index
- index of joint in a joints array
public float[] jointRotation(int index)
index
- index of joint in a joints array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |