GLG Toolkit, C# Class Library  Version 4.2
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.

Public Member Functions

void CopyFrom (GlgCube cube)
 GlgCube ()
 GlgCube (GlgCube cube)

Static Public Member Functions

static GlgCube GetFromCache ()
static void ReleaseToCache (GlgCube obj)

Public Attributes

GlgPoint p1
GlgPoint p2

Constructor & Destructor Documentation

◆ GlgCube() [1/2]

GlgCube ( )

Default contructor.

◆ GlgCube() [2/2]

GlgCube ( GlgCube  cube)

Copy constructor.

Member Function Documentation

◆ CopyFrom()

void CopyFrom ( GlgCube  cube)

Copies values from the supplied cube to this cube.

cubeA cube to copy values from.

◆ GetFromCache()

static GlgCube GetFromCache ( )

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

◆ ReleaseToCache()

static void ReleaseToCache ( GlgCube  obj)

Returns the object to the internal cache for reuse.

Only objects obtained with GetFromCache should be released to the cache. Releasing to cache objects created with new would result in consuming resources due to the groth of the cache size. The object should not be accessed after it is released to the cache.

Member Data Documentation

◆ p1

The point with the lowest coordinate values.

◆ p2

The point with the highest coordinate values.