LPlaned
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
- __init__(*args, **kwargs)
- distToPlane()
C++ Interface: dist_to_plane(LPlaned self, const LPoint3d point)
- /**
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.
*/
- dist_to_plane()
C++ Interface: dist_to_plane(LPlaned self, const LPoint3d point)
- /**
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.
*/
- flip()
C++ Interface: flip(const LPlaned self)
- /**
Convenience method that flips the plane in-place. This is done by simply
flipping the normal vector.
*/
- getNormal()
C++ Interface: get_normal(LPlaned self)
- /**
Returns the surface normal of the plane.
*/
- getPoint()
C++ Interface: get_point(LPlaned self)
- /**
Returns an arbitrary point in the plane. This can be used along with the
normal returned by get_normal() to reconstruct the plane.
*/
- getReflectionMat()
C++ Interface: get_reflection_mat(LPlaned self)
- /**
This computes a transform matrix that reflects the universe to the other
side of the plane, as in a mirror.
*/
- get_normal()
C++ Interface: get_normal(LPlaned self)
- /**
Returns the surface normal of the plane.
*/
- get_point()
C++ Interface: get_point(LPlaned self)
- /**
Returns an arbitrary point in the plane. This can be used along with the
normal returned by get_normal() to reconstruct the plane.
*/
- get_reflection_mat()
C++ Interface: get_reflection_mat(LPlaned self)
- /**
This computes a transform matrix that reflects the universe to the other
side of the plane, as in a mirror.
*/
- intersectsLine()
C++ Interface: intersects_line(LPlaned self, LPoint3d intersection_point, const LPoint3d p1, const LPoint3d p2)
- /**
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.
*/
- /**
This flavor of intersects_line() returns a bit more information about the
nature of the intersecting point. The line is defined via the parametric
equation from + t * delta for all real values of t.
If there is no intersection with the plane, the function returns false and
leaves t undefined. If there is an intersection with the plane, the
function returns true and sets t to the parametric value that defines the
point of intersection. That is, t == 0.0f implies that the intersection
occurred exactly at point from, and t == 1.0f implies at point from +
delta, with other values of t accordingly.
*/
- intersectsPlane()
C++ Interface: intersects_plane(LPlaned self, LPoint3d from, LVector3d delta, const LPlaned other)
- /**
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.
*/
- intersects_line()
C++ Interface: intersects_line(LPlaned self, LPoint3d intersection_point, const LPoint3d p1, const LPoint3d p2)
- /**
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.
*/
- /**
This flavor of intersects_line() returns a bit more information about the
nature of the intersecting point. The line is defined via the parametric
equation from + t * delta for all real values of t.
If there is no intersection with the plane, the function returns false and
leaves t undefined. If there is an intersection with the plane, the
function returns true and sets t to the parametric value that defines the
point of intersection. That is, t == 0.0f implies that the intersection
occurred exactly at point from, and t == 1.0f implies at point from +
delta, with other values of t accordingly.
*/
- intersects_plane()
C++ Interface: intersects_plane(LPlaned self, LPoint3d from, LVector3d delta, const LPlaned other)
- /**
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.
*/
- normalize()
C++ Interface: normalize(const LPlaned self)
- /**
Normalizes the plane in place. Returns true if the plane was normalized,
false if the plane had a zero-length normal vector.
*/
- normalized()
C++ Interface: normalized(LPlaned self)
- /**
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.
*/