The radius of the top of the Cylinder.
The radius of the bottom of the Cylinder.
The height of the Cylinder.
The number of segments to build the cylinder out of.
The body to which the shape is added to.
The local bounding sphere radius of this shape.
Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled.
faceNormals
Array of integer arrays, indicating which vertices each face consists of
The height of the Cylinder.
Identifier of the Shape.
Optional material of the shape that regulates contact properties.
The number of segments to build the cylinder out of.
The radius of the bottom of the Cylinder.
The radius of the top of the Cylinder.
The type of this shape. Must be set to an int > 0 by subclasses.
If given, these locally defined, normalized axes are the only ones being checked when doing separating axis check.
uniqueEdges
vertices
worldFaceNormals
worldFaceNormalsNeedsUpdate
worldVertices
worldVerticesNeedsUpdate
All the Shape types.
calculateLocalInertia
calculateWorldAABB
Clip a face against a hull.
An array of Vec3 with vertices in the world frame.
Distance clamping
Computes uniqueEdges
Compute the normals of the faces.
Will reuse existing Vec3 objects in the faceNormals
array if they exist.
Updates worldVertices
and sets worldVerticesNeedsUpdate
to false.
Updates .worldVertices
and sets .worldVerticesNeedsUpdate
to false.
Find the separating axis between this hull and another
The target vector to save the axis in
Returns false if a separation is found, else true
Compute the normal of a face from its vertices
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.
A point given in local coordinates
Test separating axis against two hulls. Both hulls are projected onto the axis and the overlap size is returned if there is one.
The overlap depth, or FALSE if no penetration.
Transform all local points. Will change the .vertices
updateBoundingSphereRadius
Get approximate convex volume
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.
result[0] and result[1] will be set to maximum and minimum, respectively.
Cylinder class.