GLG Toolkit, Java Class Library  Version 4.5

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.

Public Member Functions

 GlgCube ()
 Default contructor. More...
 
 GlgCube (GlgCube cube)
 Copy constructor. More...
 
void CopyFrom (GlgCube cube)
 Copies values from the supplied cube to this cube. More...
 

Static Public Member Functions

static GlgCube GetFromCache ()
 Returns an object from an internal cache, or creates a new object if the cache is empty. More...
 
static void ReleaseToCache (GlgCube object)
 Returns the object to the internal cache for reuse. More...
 

Public Attributes

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

Member Data Documentation

◆ p1

The point with the lowest coordinate values.

◆ p2

The point with the highest coordinate values.

Constructor & Destructor Documentation

◆ GlgCube() [1/2]

GlgCube ( )

Default contructor.

◆ GlgCube() [2/2]

GlgCube ( GlgCube  cube)

Copy constructor.

Parameters
cubeGlgCube object to copy.

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.

◆ GetFromCache()

static GlgCube GetFromCache ( )
static

Returns an object from an internal cache, or creates a new object if the cache is empty.

Returns
GlgCube object instance.

◆ 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. Releasing to the cache objects created with new would result in consuming resources due to the growth of the cache size.

Parameters
objectThe object to release.