Frustum

Added in version 1.2.

class Frustum(*args, **kwargs)

A 3D volume delimited by 2D clip planes.

The contents of the graphene_frustum_t are private, and should not be modified directly.

Constructors

class Frustum
classmethod alloc() Frustum

Allocates a new Frustum structure.

The contents of the returned structure are undefined.

Added in version 1.2.

Methods

class Frustum
contains_point(point: Point3D) bool

Checks whether a point is inside the volume defined by the given Frustum.

Added in version 1.2.

Parameters:

point – a Point3D

equal(b: Frustum) bool

Checks whether the two given Frustum are equal.

Added in version 1.6.

Parameters:

b – a Frustum

free() None

Frees the resources allocated by alloc().

Added in version 1.2.

get_planes() list[Plane]

Retrieves the planes that define the given Frustum.

Added in version 1.2.

init(p0: Plane, p1: Plane, p2: Plane, p3: Plane, p4: Plane, p5: Plane) Frustum

Initializes the given Frustum using the provided clipping planes.

Added in version 1.2.

Parameters:
  • p0 – a clipping plane

  • p1 – a clipping plane

  • p2 – a clipping plane

  • p3 – a clipping plane

  • p4 – a clipping plane

  • p5 – a clipping plane

init_from_frustum(src: Frustum) Frustum

Initializes the given Frustum using the clipping planes of another Frustum.

Added in version 1.2.

Parameters:

src – a Frustum

init_from_matrix(matrix: Matrix) Frustum

Initializes a Frustum using the given matrix.

Added in version 1.2.

Parameters:

matrix – a Matrix

intersects_box(box: Box) bool

Checks whether the given box intersects a plane of a Frustum.

Added in version 1.2.

Parameters:

box – a Box

intersects_sphere(sphere: Sphere) bool

Checks whether the given sphere intersects a plane of a Frustum.

Added in version 1.2.

Parameters:

sphere – a Sphere

Fields

class Frustum
planes