The X Toolkit API

X.constructable

/**
* Injective mix-in for all constructable solids using the CSG library.
*
* @constructor
*/
var c = new X.constructable();
/**
* Convert a CSG object to this X.object.
*
* @param {!CSG} csg The CSG object.
* @throws {Error} An error if the given object is invalid.
*/
c.fromCSG($CSG);
/**
* Intersect an X.object or a CSG object with this X.object and return a new
* X.object.
*
* @param {!CSG|X.object} object The object to use for the intersect operation.
* @return {X.object} A new X.object.
* @throws {Error} An error if the given object is invalid.
* @suppress {missingProperties}
*/
var intersect = c.intersect($OBJECT);
/**
* Inverse this X.object and return a new X.object.
*
* @return {X.object} A new X.object.
* @suppress {missingProperties}
*/
var inverse = c.inverse();
/**
* Subtract an X.object or a CSG object from this X.object and return a new
* X.object.
*
* @param {!CSG|X.object} object The object to subtract.
* @return {X.object} A new X.object.
* @throws {Error} An error if the given object is invalid.
* @suppress {missingProperties}
*/
var subtract = c.subtract($OBJECT);
/**
* Convert this X.object to a CSG object.
*
* @return {!CSG} The created CSG object.
*/
var toCSG = c.toCSG();
/**
* Union this X.object with either another X.object or a CSG object and return a
* new X.object.
*
* @param {!CSG|X.object} object The other X.object or CSG object.
* @return {X.object} A new X.object.
* @throws {Error} An error if the given object is invalid.
* @suppress {missingProperties}
*/
var union = c.union($OBJECT);


CONSTRUCTORS
X.constructable

PROPERTIES

GETTERS/SETTERS

FUNCTIONS
fromCSG
intersect
inverse
subtract
toCSG
union

STATIC



SOURCECODE