Constructor
new L3D.GeometryPrimitive()
Properties
The index of the mateiral to use when the object has multiple materials.
Methods
getBoundingBox(geom, box)
Compute and return the bounding box of the primitive.
geom |
Geometry | |
box |
BoundingBox |
getPoint(geom, index, out)
Return a point of the primitive.
geom |
Geometry | |
index |
number | |
out |
Vector3 |
rayIntersect(geom, ray, rayHit) → bool
Test for a ray intersection with this geometry.
geom |
Geometry | The geometry that owns the primitive |
ray |
Ray | The ray to test against |
rayHit |
RayHitInfo | Storage for the results of the intersection |
- bool
Whether or not there was an intersection found.
setPoint(geom, index, p)
Set a point of the primitive.
geom |
Geometry | |
index |
number | |
p |
Vector3 |
transformBy(geom, t)
If the primitive requires any additional transformation beyond just transforming the points, the transformation can be applied here.
geom |
Geometry | |
t |
Matrix4 |