org.mt4j.components.bounds
Interface IBoundingShape

All Known Implementing Classes:
BoundingSphere, BoundsArbitraryPlanarPolygon, BoundsZPlaneRectangle, OrientedBoundingBox

public interface IBoundingShape

The Interface IBoundingShape.

Author:
Christopher Ruff

Method Summary
 boolean containsPointLocal(Vector3D point)
          Checks if the bounding shape contains the point.
 Vector3D getCenterPointGlobal()
          Gets the center point world.
 Vector3D getCenterPointLocal()
          Gets the center point obj space.
 float getHeightXY(TransformSpace transformSpace)
          Get the height of the shape in the XY-Plane.
 Vector3D getHeightXYVectLocal()
          Gets the height xy vect obj space.
 Vector3D getIntersectionLocal(Ray ray)
          Gets the intersection point.
 Vector3D[] getVectorsGlobal()
          Gets the vectors world.
 Vector3D[] getVectorsLocal()
          Gets the vectors obj space.
 float getWidthXY(TransformSpace transformSpace)
          Get the width of the shape in the XY-Plane.
 Vector3D getWidthXYVectLocal()
          Gets the width xy vect obj space.
 boolean isContainedInFrustum(IFrustum frustum)
           
 void setGlobalBoundsChanged()
          Informs the bounding shape that the world bounds changed.
 

Method Detail

getIntersectionLocal

Vector3D getIntersectionLocal(Ray ray)
Gets the intersection point. The ray is assumed to be in local space.

Parameters:
ray - the ray
Returns:
the intersection point

containsPointLocal

boolean containsPointLocal(Vector3D point)
Checks if the bounding shape contains the point. The point is assumed to be in local space.

Parameters:
point - the point
Returns:
true, if successful

setGlobalBoundsChanged

void setGlobalBoundsChanged()
Informs the bounding shape that the world bounds changed. (i.e. when the corresponding shape was transformed)


getCenterPointGlobal

Vector3D getCenterPointGlobal()
Gets the center point world.

Returns:
the center point world

getCenterPointLocal

Vector3D getCenterPointLocal()
Gets the center point obj space.

Returns:
the center point obj space

getVectorsLocal

Vector3D[] getVectorsLocal()
Gets the vectors obj space.

Returns:
the vectors, the bounding shape is made of - in object space coordinates

getVectorsGlobal

Vector3D[] getVectorsGlobal()
Gets the vectors world.

Returns:
the vectors, the bounding shape is made of - in world space coordinates

getHeightXY

float getHeightXY(TransformSpace transformSpace)
Get the height of the shape in the XY-Plane. Uses the x and y coordinate values for calculation.

Parameters:
transformSpace - the space the width is calculated in, can be world space, parent relative- or object space
Returns:
the height xy the height

getWidthXY

float getWidthXY(TransformSpace transformSpace)
Get the width of the shape in the XY-Plane. Uses the x and y coordinate values for calculation.

Parameters:
transformSpace - the space the width is calculated in, can be world space, parent relative- or object space
Returns:
the width xy the width

getWidthXYVectLocal

Vector3D getWidthXYVectLocal()
Gets the width xy vect obj space.

Returns:
the width xy vect obj space the vector that has the length of the obj space width of the component

getHeightXYVectLocal

Vector3D getHeightXYVectLocal()
Gets the height xy vect obj space.

Returns:
the height xy vect obj space the vector that has the length of the obj space height of the component

isContainedInFrustum

boolean isContainedInFrustum(IFrustum frustum)