|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodesimian.xyz.XYZ
public class XYZ
XYZ contains constants relevant to 3d objects,
and should be used only in P(1) (not P(0)) of a 3d object,
like this: some3DObject.P(1).setD(XSPEED,0.2).
MOST TEXT BELOW NEEDS TO BE REWRITTEN. IT WAS WRITTEN FOR AN INSTANCE OBJECT3D, NOT XYZ CLASS.
A 3d object, with a list of other objects in P(0) and a list of numbers in P(1).
Those objects are objects (of any Java type) this Object3d is made of (recursive),
or objects this Object3d interacts with, or some of both.
Those numbers are the properties of this Object3d,
like x y z position and speed and radius of a bounding-sphere.
It is not necessary to extend Object3d.
A CS is an object3d if: 2 < cs.countP() && Object3d.LASTINDEX < cs.P(1).countP()
To be compatible with NETWORKS and NODES (above), 3d objects are defined this way:
some3dObject.P(0) returns the 3d objects that this 3d object is made of.
some3dObject.P(1) returns the numbers that describe this 3d object.
For example, obj.P(1).P(0) could be x position, obj.P(1).P(2) is z position,
obj.P(1).P(3-5) are x y and z SPEEDs.
obj.P(1).P(6) is the radius of a bounding sphere
of this 3d object, centered at the obj.P(1).P(0-2) position.
Other numbers could be for mass, rotation, etc.
Field Summary | |
---|---|
static int |
LASTINDEX
indexs above LASTINDEX may be used externally. |
static int |
RADIUS
some3DObject.P(1).P(RADIUS) is radius of a bounding-sphere of this 3d object, centered around X,Y,Z |
static int |
X
some3DObject.P(1).P(X) is X position of some3DObject |
static int |
XSPEED
some3DObject.P(1).P(XSPEED) is X speed of some3DObject |
static int |
Y
some3DObject.P(1).P(Y) is Z position of some3DObject |
static int |
YSPEED
some3DObject.P(1).P(XSPEED) is X speed of some3DObject |
static int |
Z
some3DObject.P(1).P(Z) is Z position of some3DObject |
static int |
ZSPEED
some3DObject.P(1).P(XSPEED) is X speed of some3DObject |
Constructor Summary | |
---|---|
XYZ()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int X
public static final int Y
public static final int Z
public static final int XSPEED
public static final int YSPEED
public static final int ZSPEED
public static final int RADIUS
public static final int LASTINDEX
Constructor Detail |
---|
public XYZ()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |