CollisionPolygon

from panda3d.core import CollisionPolygon
class CollisionPolygon

Bases:

Bases: CollisionPlane

Inheritance diagram

Inheritance diagram of CollisionPolygon

__init__(a: LVecBase3, b: LVecBase3, c: LVecBase3)
__init__(a: LVecBase3, b: LVecBase3, c: LVecBase3, d: LVecBase3)
property concave bool

Returns true if the CollisionPolygon appears to be concave, or false if it is safely convex.

static get_class_type() TypeHandle
get_num_points() int

Returns the number of vertices of the CollisionPolygon.

get_point(n: int) LPoint3

Returns the nth vertex of the CollisionPolygon, expressed in 3-D space.

get_points() list
is_concave() bool

Returns true if the CollisionPolygon appears to be concave, or false if it is safely convex.

is_valid() bool

Returns true if the CollisionPolygon is valid (that is, it has at least three vertices), or false otherwise.

property points Sequence[LPoint3]

Returns the nth vertex of the CollisionPolygon, expressed in 3-D space.

setup_points(points: object)
property valid bool

Returns true if the CollisionPolygon is valid (that is, it has at least three vertices), or false otherwise.

static verify_points(a: LPoint3, b: LPoint3, c: LPoint3) bool

Verifies that the indicated set of points will define a valid CollisionPolygon: that is, at least three non-collinear points, with no points repeated.

static verify_points(a: LPoint3, b: LPoint3, c: LPoint3, d: LPoint3) bool

Verifies that the indicated set of points will define a valid CollisionPolygon: that is, at least three non-collinear points, with no points repeated.

static verify_points(points: object) bool