Coppercube API Documentation
Class MetaTriangleSelector
Interface for making multiple triangle selectors work as one big selector.
Extends
TriangleSelector.
Class Overview
MetaTriangleSelector()
Interface for making multiple triangle selectors work as one big selector.
This is nothing more than a collection of one or more triangle selectors providing together the interface of one triangle selector.
In this way, collision tests can be done with different triangle soups in one pass.
See MeshTriangleSelector for an implementation of a triangle selector for meshes.
Method Attributes | Method Name and Description |
---|---|
addSelector(t)
Adds a triangle selector to the collection of triangle selectors.
|
|
clear()
Removes all triangle selectors from the collection of triangle selectors.
|
|
getAllTriangles(transform, outArray)
Returns all triangles for the scene node associated with this selector
|
|
getTrianglesInBox(box, transform, outArray)
Returns all triangles inside a bounding box, for the scene node associated with this selector.
|
- Methods borrowed from class TriangleSelector:
- getCollisionPointWithLine
Method Detail
addSelector(t)
Adds a triangle selector to the collection of triangle selectors.
- Parameters:
- t
- {TriangleSelector} a TriangleSelector to add
clear()
Removes all triangle selectors from the collection of triangle selectors.
getAllTriangles(transform, outArray)
Returns all triangles for the scene node associated with this selector
- Parameters:
- transform
- {Matrix4} a transformation matrix which transforms all triangles before returning them
- outArray
- {Array} output array of the triangles
- Returns:
- the new TriangleSelector
getTrianglesInBox(box, transform, outArray)
Returns all triangles inside a bounding box, for the scene node associated with this selector. This method will
return at least the triangles that intersect the box, but may return other triangles as well.
- Parameters:
- box
- {Box3d}
- transform
- {Matrix4} a transformation matrix which transforms all triangles before returning them
- outArray
- {Array} output array of the triangles
- Returns:
- the new TriangleSelector