Reference Source
public interface | source

Entity

Direct Implemented:

An abstract 3D scene element that can be individually shown, hidden, selected, highlighted, xrayed, culled, picked, clipped and bounded.

Entity provides an abstract interface through which different concrete types of scene element can be accessed and manipulated uniformly.

Entities Representing Models

Entities Representing Objects

Updating Batches of Objects

Scene provides the following methods for updating batches of object-Entities using their Entity#ids:

Member Summary

Public Members
public get abstract

World-space 3D axis-aligned bounding box (AABB) of this Entity.

public set abstract

Sets if this Entity casts shadows.

public get abstract

Gets if this Entity casts shadows.

public get abstract

Gets if this Entity is clippable.

public set abstract

Sets if this Entity is clippable.

public set abstract

Sets if this Entity is included in boundary calculations.

public get abstract

Gets if this Entity is included in boundary calculations.

public get abstract

Gets the Entity's RGB colorize color, multiplies by the Entity's rendered fragment colors.

public set abstract

Sets the Entity's RGB colorize color, multiplies by the Entity's rendered fragment colors.

public get abstract

Gets if this Entity is culled.

public set abstract

Sets if this Entity is culled.

public set abstract

Sets if this Entity's edges are enhanced.

public get abstract

Gets if this Entity's edges are enhanced.

public get abstract

Gets if this Entity is highlighted.

public set abstract

Sets if this Entity is highlighted.

public get abstract

Component ID, unique within the Scene.

public get

Returns true to indicate that this is an Entity.

public get abstract

Returns true if this Entity represents a model.

public get abstract

Returns true if this Entity represents an object.

public get abstract

Gets the Entity's opacity factor.

This is a factor in range [0..1] which multiplies by the rendered fragment alphas.

public set abstract

Sets the Entity's opacity factor, multiplies by the Entity's rendered fragment alphas.

public get

Returns the parent Entity, if any.

public set abstract

Sets if this Entity is pickable.

public get abstract

Gets if this Entity is pickable.

public set abstract

Sets if to this Entity can have shadows cast upon it

public get abstract

Gets if this Entity can have shadows cast upon it

public get abstract

Gets if this Entity is selected.

public set abstract

Sets if this Entity is selected.

public get abstract

Gets if this Entity is visible.

public set abstract

Sets if this Entity is visible.

public set abstract

Sets if this Entity is xrayed.

public get abstract

Gets if this Entity is xrayed.

Method Summary

Public Methods
public

Destroys this Entity.

Public Members

public get abstract aabb: Number[] source

World-space 3D axis-aligned bounding box (AABB) of this Entity.

Represented by a six-element Float32Array containing the min/max extents of the axis-aligned volume, ie. [xmin, ymin,zmin,xmax,ymax, zmax].

public set abstract castsShadow: Boolean source

Sets if this Entity casts shadows.

public get abstract castsShadow: Boolean source

Gets if this Entity casts shadows.

public get abstract clippable: Boolean source

Gets if this Entity is clippable.

Clipping is done by the SectionPlanes in Scene#sectionPlanes.

public set abstract clippable: Boolean source

Sets if this Entity is clippable.

Clipping is done by the SectionPlanes in Scene#sectionPlanes.

public set abstract collidable: Boolean source

Sets if this Entity is included in boundary calculations.

public get abstract collidable: Boolean source

Gets if this Entity is included in boundary calculations.

public get abstract colorize: Number[] source

Gets the Entity's RGB colorize color, multiplies by the Entity's rendered fragment colors.

Each element of the color is in range [0..1].

public set abstract colorize: Number[] source

Sets the Entity's RGB colorize color, multiplies by the Entity's rendered fragment colors.

Each element of the color is in range [0..1].

public get abstract culled: Boolean source

Gets if this Entity is culled.

Only rendered when Entity#visible is true and Entity#culled is false.

public set abstract culled: Boolean source

Sets if this Entity is culled.

Only rendered when Entity#visible is true and Entity#culled is false.

public set abstract edges: Boolean source

Sets if this Entity's edges are enhanced.

public get abstract edges: Boolean source

Gets if this Entity's edges are enhanced.

public get abstract highlighted: Boolean source

Gets if this Entity is highlighted.

When Entity#isObject and Entity#highlighted are both true the Entity will be registered by Entity#id in Scene#highlightedObjects.

public set abstract highlighted: Boolean source

Sets if this Entity is highlighted.

When Entity#isObject and Entity#highlighted are both true the Entity will be registered by Entity#id in Scene#highlightedObjects.

public get abstract id: Number | String source

Component ID, unique within the Scene.

public get isEntity: Boolean: boolean source

Returns true to indicate that this is an Entity.

Return:

Boolean

public get abstract isModel: Boolean source

Returns true if this Entity represents a model.

When this is true, the Entity will be registered by Entity#id in Scene#models and may also have a corresponding MetaModel.

public get abstract isObject: Boolean source

Returns true if this Entity represents an object.

When this is true, the Entity will be registered by Entity#id in Scene#objects and may also have a corresponding MetaObject.

public get abstract opacity: Number source

Gets the Entity's opacity factor.

This is a factor in range [0..1] which multiplies by the rendered fragment alphas.

public set abstract opacity: Number source

Sets the Entity's opacity factor, multiplies by the Entity's rendered fragment alphas.

This is a factor in range [0..1].

public get parent source

Returns the parent Entity, if any.

public set abstract pickable: Boolean source

Sets if this Entity is pickable.

Picking is done via calls to Scene#pick.

public get abstract pickable: Boolean source

Gets if this Entity is pickable.

Picking is done via calls to Scene#pick.

public set abstract receivesShadow: Boolean source

Sets if to this Entity can have shadows cast upon it

public get abstract receivesShadow: Boolean source

Gets if this Entity can have shadows cast upon it

public get abstract selected: Boolean source

Gets if this Entity is selected.

When Entity#isObject and Entity#selected are both `true the Entity will be registered by Entity#id in Scene#selectedObjects.

public set abstract selected: Boolean source

Sets if this Entity is selected.

When Entity#isObject and Entity#selected are both `true the Entity will be registered by Entity#id in Scene#selectedObjects.

public get abstract visible: Boolean source

Gets if this Entity is visible.

Only rendered when Entity#visible is true and Entity#culled is false.

When Entity#isObject and Entity#visible are both true the Entity will be registered by Entity#id in Scene#visibleObjects.

public set abstract visible: Boolean source

Sets if this Entity is visible.

Only rendered when Entity#visible is true and Entity#culled is false.

When Entity#isObject and Entity#visible are both true the Entity will be registered by Entity#id in Scene#visibleObjects.

public set abstract xrayed: Boolean source

Sets if this Entity is xrayed.

When Entity#isObject and Entity#xrayed are both `true the Entity will be registered by Entity#id in Scene#xrayedObjects.

public get abstract xrayed: Boolean source

Gets if this Entity is xrayed.

When Entity#isObject and Entity#xrayed are both `true the Entity will be registered by Entity#id in Scene#xrayedObjects.

Public Methods

public destroy() source

Destroys this Entity.