GLG Toolkit, JavaScript Library  Version 4.1
 All Classes Namespaces Functions Variables Enumerations Enumerator
GlgCube Class Reference

Detailed Description

Defines a rectangular parallelepiped in 3D space (usually an object's bounding box) by its two diagonal points. The faces of the parallelepiped are parallel to the coordinate planes. New GlgCube instances can be created using the CreateGlgCube method.

Public Member Functions

void CopyFrom (GlgCube cube)
 
boolean Equals (GlgCube cube)
 

Static Public Member Functions

static GlgCube CopyGlgCube (GlgCube cube)
 
static GlgCube CreateGlgCube (GlgPoint point1, GlgPoint point2)
 

Public Attributes

GlgPoint p1
 
GlgPoint p2
 

Member Function Documentation

void CopyFrom ( GlgCube  cube)

Copies values from the supplied cube to this cube.

Parameters
cubeA cube to copy values from.
static GlgCube CopyGlgCube ( GlgCube  cube)
static

Copy constructor, copies an instance of GlgCube. The static method is invoked on the GLG Toolkit handle obtaned via a "new GlgToolkit()" call at the application start-up.

Parameters
cubeA cube instance to copy. If this parameter is null (or not supplied), a new GlgCube object will not be created and null will be returned.
Returns
A new instance of GlgCube, or null if no cube to copy was supplied.
static GlgCube CreateGlgCube ( GlgPoint  point1,
GlgPoint  point2 
)
static

Constructor. Creates an instance of GlgCube. The static method is invoked on the GLG Toolkit handle obtaned via a "new GlgToolkit()" call at the application start-up.

Parameters
point1GlgPoint to use as the first cube point, on null.
point2GlgPoint to use as the second cube point, on null.
Returns
A new instance of GlgCube.
boolean Equals ( GlgCube  cube)

Checks if two cubes are equal.

Parameters
cubeA cube to compare this cube with.
Returns
true if the cube parameter describes the same area as this cube.

Member Data Documentation

The point with the lowest coordinate values.

The point with the highest coordinate values.