GLG Toolkit, JavaScript Library  Version 4.6
GlgCube Class Reference

Defines a rectangular parallelepiped in 3D space (usually an object's bounding box) by its two diagonal points. More...

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 Attributes

GlgPoint p1
 The point with the lowest coordinate values. More...
 
GlgPoint p2
 The point with the highest coordinate values. More...
 

Public Member Functions

void CopyFrom (GlgCube cube)
 Copies values from the supplied cube to this cube. More...
 
boolean Equals (GlgCube cube)
 Performs equality comparison between the cube passed as the method parameter and the cube the method is invoked on. More...
 

Static Public Member Functions

static GlgCube CopyGlgCube (GlgCube cube)
 Copy constructor, copies an instance of GlgCube. More...
 
static GlgCube CreateGlgCube (GlgPoint point1, GlgPoint point2)
 Constructor. More...
 
static void ReleaseToCache (GlgCube object)
 Returns the object to the internal cache for reuse. More...
 

Member Data Documentation

◆ p1

The point with the lowest coordinate values.

◆ p2

The point with the highest coordinate values.

Member Function Documentation

◆ CopyFrom()

void CopyFrom ( GlgCube  cube)

Copies values from the supplied cube to this cube.

Parameters
cubeA GlgCube object to copy the values from.

◆ CopyGlgCube()

static GlgCube CopyGlgCube ( GlgCube  cube)
static

Copy constructor, copies an instance of GlgCube.

The static method is invoked on the GLG Toolkit handle obtained via a 'new GlgToolkit()' call at the application start-up.

Parameters
cubeA The GlgCube 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 object to copy was supplied.

◆ CreateGlgCube()

static GlgCube CreateGlgCube ( GlgPoint  point1,
GlgPoint  point2 
)
static

Constructor.

Creates an instance of GlgCube.

The static method is invoked on the GLG Toolkit handle obtained 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.

◆ Equals()

boolean Equals ( GlgCube  cube)

Performs equality comparison between the cube passed as the method parameter and the cube the method is invoked on.

Parameters
cubeThe GlgCube object to compare with.
Returns
true if the cube parameter describes the same area as the cube the method is invoked on.

◆ ReleaseToCache()

static void ReleaseToCache ( GlgCube  object)
static

Returns the object to the internal cache for reuse.

The object should not be accessed after it is released to the cache.

Only objects obtained with a call to GLG API method should be released to the cache.

The static method is invoked on the GLG Toolkit handle obtained via a 'new GlgToolkit()' call at the application start-up.

Parameters
objectThe object to release.