Package jsim.collision
Class SphereCollider
java.lang.Object
jsim.collision.ColliderShape
jsim.collision.SphereCollider
Sphere shape centred at the body's local origin.
-
Nested Class Summary
Nested classes/interfaces inherited from class jsim.collision.ColliderShape
ColliderShape.Type -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSphereCollider(double radius) Creates a sphere collider with the given radius. -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeAABB(edu.wpi.first.math.geometry.Pose3d pose, double[] out) Compute the world-space AABB of this shape given the body's pose.getType()The shape type of this collider.
-
Field Details
-
radius
public final double radiusRadius of the sphere in metres.
-
-
Constructor Details
-
SphereCollider
public SphereCollider(double radius) Creates a sphere collider with the given radius.- Parameters:
radius- the sphere radius in metres; must be positive
-
-
Method Details
-
getType
Description copied from class:ColliderShapeThe shape type of this collider.- Specified by:
getTypein classColliderShape- Returns:
- this shape's type tag
-
computeAABB
public void computeAABB(edu.wpi.first.math.geometry.Pose3d pose, double[] out) Description copied from class:ColliderShapeCompute the world-space AABB of this shape given the body's pose.- Specified by:
computeAABBin classColliderShape- Parameters:
pose- world-space pose of the body (position in metres, orientation as quaternion)out- receives [minX, minY, minZ, maxX, maxY, maxZ] in metres
-