Constructor
new ND(n, settingsopt)
N-dimensional graphics.
Creates an N-dimensional graphic object,
checks for a collision between an n-dimensional plane and an n-dimensional graphics object and returns the (n-1)-dimensional intersection geometry if a collision was occurs.
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
n |
number | space dimension of the graphical object. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
settings |
object |
<optional> |
{} | The following settings are available
Properties
|
- Source:
- See:
Extends
- MyObject
Members
defaultColor
Gets default color of the 3D object, that added to scene.
geometry
returns geometry of N-dimensional object. See settings.object.geometry parameter of ND. key geometry - get or set a geometry of nD object. See See settings.object.geometry parameter of ND. key D3 - Projection of nD object to 3D space for visualization. D3.points - Points of projection. See .setFromPoints of THREE.BufferGeometry. D3.indices - Indices of points of projection. See .setIndex of THREE.BufferGeometry. D3.color - color of projection.
object
Gets and sets an object. See settings.object of the ND constructor parameter above.
object3D
Gets a 3D object that created from ND and added to scene.
object3Dopacity
Sets an opacity of the graphical object. Opacity is range from 0 is transparent to 1 is opacity. Default is 1.
vectorPlane
Gets N-dimensional vector of the plane that intersects nD object. See settings.vectorPlane of the ND constructor parameter above.
Methods
getPoint(i)
Parameters:
| Name | Type | Description |
|---|---|---|
i |
number | position id. |
Returns:
Vector of the i position of the settings.bufferGeometry.attributes.position
intersection(geometryIntersectionopt, iIntersectionsopt)
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
geometryIntersection |
geometryIntersection |
<optional> |
{ position: [], indices: [[]] } | Arrays of vertices and indexes of the result of the intersection of the panel and the nD object. See settings.object.geometry of ND constructor for details.
Properties
|
||||||||||||
iIntersections |
array |
<optional> |
Array of indices that have been added to geometryIntersection.indices |
Returns:
an array of intersection points of vectorPlane and geometry. See constructor for details.
positionOffset(position, positionId)
Position offset.
Parameters:
| Name | Type | Description |
|---|---|---|
position |
object | BufferGeometry position attribute of the graphical object. |
positionId |
number | Position identifier. |
Returns:
Offset of the position in the position attribute.