GLG Toolkit, JavaScript Library  Version 4.6
GlgPoint Class Reference

Defines an XYZ point in 3D space or an RGB color. More...

Detailed Description

Defines an XYZ point in 3D space or an RGB color.

New GlgPoint instances can be created using the CreateGlgPoint method.

Public Attributes

double x
 X or R value. More...
 
double y
 Y or G value. More...
 
double z
 Z or B value. More...
 

Public Member Functions

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

Static Public Member Functions

static GlgPoint CopyGlgPoint (GlgPoint point)
 Copy constructor. More...
 
static GlgPoint CreateGlgPoint (double x, double y, double z)
 Constructor. More...
 
static GlgPoint CreateGlgPointFromPoint (GlgPoint point)
 Copy constructor. More...
 
static void ReleaseToCache (GlgPoint obj)
 Returns the object to the internal cache for reuse. More...
 

Member Data Documentation

◆ x

double x

X or R value.

◆ y

double y

Y or G value.

◆ z

double z

Z or B value.

Member Function Documentation

◆ CopyFrom()

void CopyFrom ( GlgPoint  point)

Copies values from another GlgPoint to this point.

Parameters
pointA point to copy values from.

◆ CopyGlgPoint()

static GlgPoint CopyGlgPoint ( GlgPoint  point)
static

Copy constructor.

Copies an instance of a GlgPoint.

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

Parameters
pointA point to copy values from. If the parameter is null (or not supplied), a new GlgPoint object will not be created and null will be returned.
Returns
A new instance of GlgPoint, or null if no point to copy was supplied.

◆ CreateGlgPoint()

static GlgPoint CreateGlgPoint ( double  x,
double  y,
double  z 
)
static

Constructor.

Creates an instance of GlgPoint.

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

Parameters
xX value
yY value
zZ value
Returns
A new instance of GlgPoint.

◆ CreateGlgPointFromPoint()

static GlgPoint CreateGlgPointFromPoint ( GlgPoint  point)
static

Copy constructor.

Copies an instance of a GlgPoint.

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

Parameters
pointAn optional point to copy values from. If this parameter is not supplied or null, the new point's values will be set to 0.
Returns
A new instance of GlgPoint.

◆ Equals()

boolean Equals ( GlgPoint  point)

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

Parameters
pointThe GlgPoint to compare with.
Returns
true if the point passed as the method parameter has the same x, y and z coordinates as the point the method is invoked on.

◆ ReleaseToCache()

static void ReleaseToCache ( GlgPoint  obj)
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
objThe object to release.