src/shapes/ConvexPolyhedron.js:8
 A set of polygons describing a convex shape.
ConvexPolyhedronpoints
 faces
 
 Defined in
 src/shapes/ConvexPolyhedron.js:8
 
points
 Array
 
 
 An array of Vec3's
faces
 Array
 
 
 Array of integer arrays, describing which vertices that is included in each face.
calculateLocalInertiamass
 target
 Inherited from
 
 Shape
 
 but overwritten in
 src/shapes/ConvexPolyhedron.js:413
 
mass
 Number
 
 target
 Vec3 
 
 calculateWorldAABBpos
 quat
 min
 max
 
 Defined in
 src/shapes/ConvexPolyhedron.js:727
 
pos
 Vec3 
 
 quat
 Quaternion 
 
 min
 Vec3 
 
 max
 Vec3 
 
 clipAgainstHullposA
 quatA
 hullB
 posB
 quatB
 separatingNormal
 minDist
 maxDist
 result
 
 Defined in
 src/shapes/ConvexPolyhedron.js:181
 
posA
 Vec3 
 
 quatA
 Quaternion 
 
 hullB
 ConvexPolyhedron 
 
 posB
 Vec3 
 
 quatB
 Quaternion 
 
 separatingNormal
 Vec3 
 
 minDist
 Number
 Clamp distance
maxDist
 Number
 
 result
 Array
 The an array of contact point objects, see clipFaceAgainstHull
clipFaceAgainstHullseparatingNormal
 posA
 quatA
 worldVertsB1
 minDist
 maxDist
 Array
 
 Defined in
 src/shapes/ConvexPolyhedron.js:443
 
Clip a face against a hull.
separatingNormal
 Vec3 
 
 posA
 Vec3 
 
 quatA
 Quaternion 
 
 worldVertsB1
 Array
 An array of Vec3 with vertices in the world frame.
minDist
 Number
 Distance clamping
maxDist
 Number
 
 Array
 Object
 result Array to store resulting contact points in. Will be objects with properties: point, depth, normal. These are represented in world coordinates.
clipFaceAgainstPlaneinVertices
 outVertices
 planeNormal
 planeConstant
 
 Defined in
 src/shapes/ConvexPolyhedron.js:588
 
Clip a face in a hull against the back of a plane.
inVertices
 Array
 
 outVertices
 Array
 
 planeNormal
 Vec3 
 
 planeConstant
 Number
 The constant in the mathematical plane equation
computeNormals
 Defined in
 src/shapes/ConvexPolyhedron.js:116
 
Compute the normals of the faces. Will reuse existing Vec3 objects in the .faceNormals array if they exist.
computeWorldFaceNormalsquat
 
 Defined in
 src/shapes/ConvexPolyhedron.js:689
 
Updates .worldVertices and sets .worldVerticesNeedsUpdate to false.
quat
 Quaternion 
 
 findSeparatingAxishullB
 posA
 quatA
 posB
 quatB
 target
 
 Defined in
 src/shapes/ConvexPolyhedron.js:234
 
Find the separating axis between this hull and another
hullB
 ConvexPolyhedron 
 
 posA
 Vec3 
 
 quatA
 Quaternion 
 
 posB
 Vec3 
 
 quatB
 Quaternion 
 
 target
 Vec3 
 The target vector to save the axis in
Returns false if a separation is found, else true
getAveragePointLocaltarget
 
 Defined in
 src/shapes/ConvexPolyhedron.js:773
 
Get an average of all the vertices positions
target
 Vec3 
 
 getFaceNormali
 target
 
 Defined in
 src/shapes/ConvexPolyhedron.js:167
 
Compute the normal of a face from its vertices
i
 Number
 
 target
 Vec3 
 
 getFaceNormalva
 vb
 vc
 target
 
 Defined in
 src/shapes/ConvexPolyhedron.js:147
 
Get face normal given 3 vertices
getPlaneConstantOfFaceface_i
 
 Defined in
 src/shapes/ConvexPolyhedron.js:430
 
face_i
 Number
 Index of the face
pointIsInsidep
 
 Defined in
 src/shapes/ConvexPolyhedron.js:829
 
Checks whether p is inside the polyhedra. Must be in local coords. The point lies outside of the convex hull of the other points if and only if the direction of all the vectors from it to those other points are on less than one half of a sphere around it.
p
 Vec3 
 A point given in local coordinates
projecthull
 axis
 pos
 quat
 result
 
 Defined in
 src/shapes/ConvexPolyhedron.js:871
 
Get max and min dot product of a convex hull at position (pos,quat) projected onto an axis. Results are saved in the array maxmin.
hull
 ConvexPolyhedron 
 
 axis
 Vec3 
 
 pos
 Vec3 
 
 quat
 Quaternion 
 
 result
 Array
 result[0] and result[1] will be set to maximum and minimum, respectively.
testSepAxisaxis
 hullB
 posA
 quatA
 posB
 quatB
 
 Defined in
 src/shapes/ConvexPolyhedron.js:382
 
Test separating axis against two hulls. Both hulls are projected onto the axis and the overlap size is returned if there is one.
axis
 Vec3 
 
 hullB
 ConvexPolyhedron 
 
 posA
 Vec3 
 
 quatA
 Quaternion 
 
 posB
 Vec3 
 
 quatB
 Quaternion 
 
 The overlap depth, or FALSE if no penetration.
transformAllPointsoffset
 quat
 
 Defined in
 src/shapes/ConvexPolyhedron.js:790
 
Transform all local points. Will change the .vertices
offset
 Vec3 
 
 quat
 Quaternion 
 
 updateBoundingSphereRadiusInherited from
 
 Shape
 
 but overwritten in
 src/shapes/ConvexPolyhedron.js:709
 
volumeInherited from
 
 Shape
 
 but overwritten in
 src/shapes/ConvexPolyhedron.js:764
 
Get approximate convex volume
boundingSphereRadiusInherited from
 Shape:
 src/shapes/Shape.js:31
 
The local bounding sphere radius of this shape.
collisionResponseInherited from
 Shape:
 src/shapes/Shape.js:37
 
Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled.
faces
 Defined in
 src/shapes/ConvexPolyhedron.js:42
 
Array of integer arrays, indicating which vertices each face consists of
typeInherited from
 Shape:
 src/shapes/Shape.js:23
 
The type of this shape. Must be set to an int > 0 by subclasses.
uniqueAxes
 Defined in
 src/shapes/ConvexPolyhedron.js:67
 
If given, these locally defined, normalized axes are the only ones being checked when doing separating axis check.