Class: IsotropicRegionSource

IsotropicRegionSource(center, nameopt, radiusopt, coloropt)

An Isotropic Region is defined in Phantomas as an empty spherical space.
IsotropicRegionSource is the basic Class for the representation of an Isotropic Region. Objects containing the geometries to be added to the scene are to be referred to IsotropicRegionSource for gathering any necessary information.

Constructor

new IsotropicRegionSource(center, nameopt, radiusopt, coloropt)

Parameters:
Name Type Attributes Default Description
center array Array containing the 3-D coordinates of the center point in which the Isotropic Region is located.
name string <optional>
Name of the isotropic region, if any.
radius number <optional>
1 Isotropic Region radius.
color number <optional>
Color in which the Isotropic Region should be displayed in. If not specified, to be picked randomly from colors.
Properties:
Name Type Description
observers array Objects to be notified when some change is applied
Source:

Methods

(static) addObserver(object)

Add object to this.observers property
Parameters:
Name Type Description
object object Object to be added to this.observers array.
Source:

(static) notify()

Runs .refresh() method to all objects present in this.observers property. Renders.
Source:

(static) setCenter(axis, value)

Changes the center of the Isotropic Region for a given new. Notifies observers.
Parameters:
Name Type Description
axis string Axis in which to apply the new value
value number New value to be applied
Source:

(static) setRadius(radius)

Changes the radius of the Isotropic Region for a given new. Notifies observers.
Parameters:
Name Type Description
radius number New value to be applied
Source: