ParticlePrimitive

A ParticlePrimitive is a set of vertices to render as points.

Constructor

new L3D.ParticlePrimitive()

Extends

Properties

Does the primitive have vertices? If not, it uses all of the points of the geometry.

Overrides:
materialIndex number

The index of the mateiral to use when the object has multiple materials.

The number of vertices used by the primitive.

Methods

addPoints(geom, count)

Add points to this primitive.

Parameters
geom Geometry
count number

clone(startIndex)

Duplicate the primitive.

Parameters
startIndex number

getBoundingBox(geom, box)

Overrides:

Compute and return the bounding box of the primitive.

Parameters
geom Geometry
box BoundingBox

getPoint(geom, index, out)

Overrides:

Return a point of the primitive.

Parameters
geom Geometry
index number
out Vector3

getVertex(index)

Returns a vertex (point index) of the primitive.

Parameters
index number

rayIntersect(geom, ray, rayHit) → bool

Overrides:

Test for a ray intersection with this geometry.

Parameters
geom Geometry

The geometry that owns the primitive

ray Ray

The ray to test against

rayHit RayHitInfo

Storage for the results of the intersection

Returns
bool

Whether or not there was an intersection found.

removeVertices(start, count)

Called after points have been removed from the geometry, in order for the primitive to adjust it's vertex lists.

Parameters
start number
count number

setPoint(geom, index, p)

Overrides:

Set a point of the primitive.

Parameters
geom Geometry
index number
p Vector3

setVertex(index, v)

Set a vertex (point index) of the primitive.

Parameters
index number
v number

transformBy(geom, t)

Overrides:

If the primitive requires any additional transformation beyond just transforming the points, the transformation can be applied here.

Parameters
geom Geometry
t Matrix4