from panda3d.core import LPlaned
class LPlaned

Bases: LVecBase4d

An abstract mathematical description of a plane. A plane is defined by the equation Ax + By + Cz + D = 0.

Inheritance diagram

Inheritance diagram of LPlaned

__imul__(mat: LMatrix4d)LPlaned

Creates a default plane. This plane happens to intersect the origin, perpendicular to the Z axis. It’s not clear how useful a default plane is.

__init__(param0: LPlaned)
__init__(a: LPoint3d, b: LPoint3d, c: LPoint3d)

Constructs a plane given three counter-clockwise points, as seen from the front of the plane (that is, viewed from the end of the normal vector, looking down).

__init__(copy: LVecBase4d)
__init__(normal: LVector3d, point: LPoint3d)

Constructs a plane given a surface normal vector and a point within the plane.

__init__(a: float, b: float, c: float, d: float)

Constructs a plane given the four terms of the plane equation.

__mul__(mat: LMatrix3d)LPlaned
__mul__(mat: LMatrix4d)LPlaned
distToPlane(point: LPoint3d)float

Returns the straight-line shortest distance from the point to the plane. The returned value is positive if the point is in front of the plane (on the side with the normal), or negative in the point is behind the plane (on the opposite side from the normal). It’s zero if the point is exactly in the plane.


Convenience method that flips the plane in-place. This is done by simply flipping the normal vector.


Returns the surface normal of the plane.


Returns an arbitrary point in the plane. This can be used along with the normal returned by getNormal() to reconstruct the plane.


This computes a transform matrix that reflects the universe to the other side of the plane, as in a mirror.

intersectsLine(intersection_point: LPoint3d, p1: LPoint3d, p2: LPoint3d)bool

Returns true if the plane intersects the infinite line passing through points p1 and p2, false if the line is parallel. The points p1 and p2 are used only to define the Euclidean line; they have no other bearing on the intersection test. If true, sets intersection_point to the point of intersection.

intersectsPlane(from: LPoint3d, delta: LVector3d, other: LPlaned)bool

Returns true if the two planes intersect, false if they do not. If they do intersect, then from and delta are filled in with the parametric representation of the line of intersection: that is, from is a point on that line, and delta is a vector showing the direction of the line.


Normalizes the plane in place. Returns true if the plane was normalized, false if the plane had a zero-length normal vector.


Normalizes the plane and returns the normalized plane as a copy. If the plane’s normal was a zero-length vector, the same plane is returned.

output(out: ostream)None
project(point: LPoint3d)LPoint3d

Returns the point within the plane nearest to the indicated point in space.

write(out: ostream, indent_level: int)None
xform(mat: LMatrix4d)None

Transforms the plane by the indicated matrix.