The X Toolkit API

X.displayable

/**
* Injective mix-in for all displayable objects.
*
* @constructor
*/
var d = new X.displayable();
/**
* The caption of this object.
*
* @type {?string}
* @protected
*/
d._caption = $_CAPTION;
/**
* The object color. By default, this is white.
*
* @type {!Array}
* @public
*/
d._color = $_COLOR;
/**
* The point colors of this object.
*
* @type {?X.triplets}
* @protected
*/
d._colors = $_COLORS;
/**
* This distance of this object to the viewer's eye.
*
* @type {number}
* @protected
*/
d._distance = $_DISTANCE;
/**
* The line width, only used in X.displayable.types.LINES mode.
*
* @type {number}
* @protected
*/
d._linewidth = $_LINEWIDTH;
/**
* The flag for the magic mode.
*
* @type {!boolean}
* @protected
*/
d._magicmode = $_MAGICMODE;
/**
* The normals of this object.
*
* @type {?X.triplets}
* @protected
*/
d._normals = $_NORMALS;
/**
* The opacity of this object.
*
* @type {number}
* @protected
*/
d._opacity = $_OPACITY;
/**
* An array reflecting the point or vertex indices.
*
* @type {!Array}
* @protected
*/
d._pointIndices = $_POINTINDICES;
/**
* The points of this object.
*
* @type {?X.triplets}
* @protected
*/
d._points = $_POINTS;
/**
* The point size, only used in X.displayable.types.POINTS mode.
*
* @type {number}
* @protected
*/
d._pointsize = $_POINTSIZE;
/**
* The texture of this object.
*
* @type {?X.texture}
* @protected
*/
d._texture = $_TEXTURE;
/**
* The mapping between object and texture coordinates.
*
* @type {?Array}
* @protected
*/
d._textureCoordinateMap = $_TEXTURECOORDINATEMAP;
/**
* The transform of this object.
*
* @type {!X.transform}
* @protected
*/
d._transform = $_TRANSFORM;
/**
* The rendering type of this object, default is
* {X.displayable.types.TRIANGLES}.
*
* @type {X.displayable.types}
* @protected
*/
d._type = $_TYPE;
/**
* The visibility of this object.
*
* @type {boolean}
* @public
*/
d._visible = $_VISIBLE;
/**
* Get the caption of this object.
*
* @return {?string} The caption of this object.
* @public
*/
var _caption = d.caption;
/**
* Set the caption for this object.
*
* @param {?string} caption The caption for this object.
* @public
*/
d.caption = $CAPTION;
/**
* Get the object color.
*
* @return {!Array} The object color.
*/
var _color = d.color;
/**
* Set the object color. This overrides any point colors.
*
* @param {!Array} color The object color as an array with length 3 and values
*          between 0..1.
* @throws {Error} An exception if the given color is invalid.
*/
d.color = $COLOR;
/**
* Get the point colors of this object.
*
* @return {!X.triplets} The point colors.
*/
var _colors = d.colors;
/**
* Set the colors of this object.
*
* @param {!X.triplets} colors The colors.
*/
d.colors = $COLORS;
/**
* Get the line width of this object. The line width is only used in
* X.displayable.types.LINES rendering mode.
*
* @return {!number} The line width.
*/
var _linewidth = d.linewidth;
/**
* Set the line width for this object. The line width is only used in
* X.displayable.types.LINES rendering mode.
*
* @param {!number} width The line width.
* @throws {Error} An exception if the given width is invalid.
*/
d.linewidth = $WIDTH;
/**
* Get the magic mode flag.
*
* @return {!boolean} The magic mode flag.
*/
var _magicmode = d.magicmode;
/**
* Set the magic mode flag.
*
* @param {!boolean} magicmode The magic mode flag.
*/
d.magicmode = $MAGICMODE;
/**
* Get the normals of this object.
*
* @return {!X.triplets} The normals.
*/
var _normals = d.normals;
/**
* Set the normals of this object.
*
* @param {!X.triplets} normals The normals.
*/
d.normals = $NORMALS;
/**
* Get the opacity of this object. If the object is fully opaque, this returns
* 1.
*
* @return {number} The opacity in the range 0..1.
*/
var _opacity = d.opacity;
/**
* Set the opacity of this object.
*
* @param {number} opacity The opacity value in the range 0..1.
*/
d.opacity = $OPACITY;
/**
* Get the points of this object.
*
* @return {!X.triplets} The points.
*/
var _points = d.points;
/**
* Set the points of this object.
*
* @param {!X.triplets} points The points.
*/
d.points = $POINTS;
/**
* Get the point size of this object. The point size is only used in
* X.displayable.types.POINTS rendering mode.
*
* @return {!number} The point size.
*/
var _pointsize = d.pointsize;
/**
* Set the point size for this object. The point size is only used in
* X.displayable.types.POINTS rendering mode.
*
* @param {!number} size The point size.
* @throws {Error} An exception if the given size is invalid.
*/
d.pointsize = $SIZE;
/**
* Get the texture of this object.
*
* @return {!X.texture} The texture.
*/
var _texture = d.texture;
/**
* Get the transform of this object.
*
* @return {!X.transform} The transform.
*/
var _transform = d.transform;
/**
* Get the render type of this object.
*
* @return {!string} The render type.
*/
var _type = d.type;
/**
* Set the render type of this object. Valid types are: TRIANGLES,
* TRIANGLE_STRIPS, LINES, POINTS, POLYGONS
*
* @param {!string} type The render type.
*/
d.type = $TYPE;
/**
* Get the visibility of this object.
*
* @return {boolean} TRUE if the object is visible, FALSE otherwise.
* @public
*/
var _visible = d.visible;
/**
* Set the visibility of this object.
*
* @param {boolean} visible The object's new visibility.
* @public
*/
d.visible = $VISIBLE;
/**
* Different render types for any displayable objects.
*
* @enum {string}
*/
X.displayable.types();


CONSTRUCTORS
X.displayable

PROPERTIES
_caption
_color
_colors
_distance
_linewidth
_magicmode
_normals
_opacity
_pointIndices
_points
_pointsize
_texture
_textureCoordinateMap
_transform
_type
_visible

GETTERS/SETTERS
caption
color
colors
linewidth
magicmode
normals
opacity
points
pointsize
texture
transform
type
visible

FUNCTIONS

STATIC
types



SOURCECODE