|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.dev.joode.geom.Geom
net.java.dev.joode.geom.Rectangle
public class Rectangle
A 2D geometry primative of a rectangle. The rectangle can be placed within the X-Y plane. The height of the shape in the Z dir is assumed to be infinite. The rectangle is compatible with 3D spaces. Currently incomplete, this does not handle anything to do with collisions or living in a space, jsut a placeholder currently
| Field Summary | |
|---|---|
float |
halfheight
|
float |
halfwidth
|
static float[] |
u1
|
static float[] |
u2
|
| Fields inherited from class net.java.dev.joode.geom.Geom |
|---|
aabb, AABB_MAX_X, AABB_MAX_Y, AABB_MAX_Z, AABB_MIN_X, AABB_MIN_Y, AABB_MIN_Z, body, category_bits, collide_bits, dBoxClass, dCapsuleClass, dCircle, dConvex, dCylinderClass, dFirstSpaceClass, dFirstUserClass, dGeomNumClasses, dGeomTransformClass, dHashSpaceClass, dLastSpaceClass, dLastUserClass, dMaxUserClasses, dOctTreeSpaceClass, dPlaneClass, dQuadTreeSpaceClass, dRayClass, dRectangle, dSimpleSpaceClass, dSphereClass, dTriMeshClass, GEOM_AABB_BAD, GEOM_DIRTY, GEOM_ENABLED, GEOM_PLACEABLE, gflags, lpos, parent_space, pos, R, RAY_BACKFACECULL, RAY_CLOSEST_HIT, RAY_FIRSTCONTACT, tmpq, type |
| Constructor Summary | |
|---|---|
Rectangle(Space parent,
float width,
float height)
|
|
| Method Summary | |
|---|---|
Rectangle |
cloneState(ClonedReferences util)
deep clones the state object, any references to other SimState objects should be cloned and assigned to the clone via the ClonedReferences util object. |
void |
computeAABB()
compute the AABB for this object and put it in aabb. |
float |
getHeight()
|
void |
getVetex(int vertex,
float[] coordPassback)
vertices numbered clockwise vertex 0 is the top left (posative height, negative width) vertex 1 is the top right (posative height, posative width) vertex 2 is the bottom right (negative height, posative width) vertex 3 is the bottom left (negative height, negative width) returns the absolute x, y coords of that vertex in the passback. |
void |
getVetex(int vertex,
Vector2 coordPassback)
vertices numbered clockwise vertex 0 is the top left (posative height, negative width) vertex 1 is the top right (posative height, posative width) vertex 2 is the bottom right (negative height, posative width) vertex 3 is the bottom left (negative height, negative width) returns the absolute x, y coords of that vertex in the passback. |
float |
getWidth()
|
float |
pointDepth(float x,
float y,
float z)
returns the penetration depth (smallest possible) can be negative, indicating the smallest distance to the point |
void |
setHeight(float height)
|
void |
setWidth(float width)
|
| Methods inherited from class net.java.dev.joode.geom.Geom |
|---|
AABBTest, clonePartialGeom, destroy, getAABB, getUserData, isEnabled, recomputeAABB, setBody, setPosition, setQuaternion, setQuaternion, setRotation, setUserData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float halfwidth
public float halfheight
public static float[] u1
public static float[] u2
| Constructor Detail |
|---|
public Rectangle(Space parent,
float width,
float height)
| Method Detail |
|---|
public void computeAABB()
Geom
computeAABB in class Geom
public void getVetex(int vertex,
float[] coordPassback)
vertex - coordPassback -
public void getVetex(int vertex,
Vector2 coordPassback)
vertex - coordPassback - public float getWidth()
public void setWidth(float width)
public float getHeight()
public void setHeight(float height)
public float pointDepth(float x,
float y,
float z)
x - y - z -
public Rectangle cloneState(ClonedReferences util)
SimStatedeep clones the state object, any references to other SimState objects should be cloned and assigned to the clone via the ClonedReferences util object. The util object ensures that multiple clones of the same object are not performed during a clone operation.
util - instanciate a new one if top level cloning
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||