Plane class

A plane, facing in the Z direction. The plane has its surface at z=0 and everything below z=0 is assumed to be solid plane. To make the plane face in some other direction than z, you must put it inside a Body and rotate that body. See the demos. @example const planeShape = new CANNON.Plane() const planeBody = new CANNON.Body({ mass: 0, shape: planeShape }) planeBody.quaternion.setFromEuler(-Math.PI / 2, 0, 0) // make it face up world.addBody(planeBody)

Inheritance

Constructors

Plane([double width = double.infinity, double height = double.infinity])

Properties

body Body?
The body to which the shape is added to.
getter/setter pairinherited
boundingSphereRadius double
The local bounding sphere radius of this shape.
getter/setter pairinherited
collisionFilterGroup int
getter/setter pairinherited
collisionFilterMask int
getter/setter pairinherited
collisionResponse bool
Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
height double
final
id int
Identifier of the Shape.
getter/setter pairinherited
material Material?
Optional material of the shape that regulates contact properties.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type ShapeType
The type of this shape. Must be set to an int > 0 by subclasses.
getter/setter pairinherited
width double
final
worldNormal Vec3
getter/setter pair
worldNormalNeedsUpdate bool
getter/setter pair

Methods

calculateLocalInertia(double mass, [Vec3? target]) Vec3
Calculates the inertia in the local frame for this shape. @see http://en.wikipedia.org/wiki/List_of_moments_of_inertia
override
calculateWorldAABB(Vec3 pos, Quaternion quat, Vec3 min, Vec3 max) → void
@todo use abstract for these kind of methods
override
computeWorldNormal(Quaternion quat) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateBoundingSphereRadius() → void
Computes the bounding sphere radius. The result is stored in the property .boundingSphereRadius
override
volume() double
Get the volume of this shape
override

Operators

operator ==(Object other) bool
The equality operator.
inherited