Graphene.Frustum

Fields

Name

Type

Access

Description

planes

[Graphene.Plane]

r

Methods

class

alloc ()

contains_point (point)

equal (b)

free ()

get_planes ()

init (p0, p1, p2, p3, p4, p5)

init_from_frustum (src)

init_from_matrix (matrix)

intersects_box (box)

intersects_sphere (sphere)

Details

class Graphene.Frustum

A 3D volume delimited by 2D clip planes.

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

New in version 1.2.

classmethod alloc()
Returns:

the newly allocated Graphene.Frustum structure. Use Graphene.Frustum.free() to free the resources allocated by this function.

Return type:

Graphene.Frustum

Allocates a new Graphene.Frustum structure.

The contents of the returned structure are undefined.

New in version 1.2.

contains_point(point)
Parameters:

point (Graphene.Point3D) – a Graphene.Point3D

Returns:

true if the point is inside the frustum

Return type:

bool

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

New in version 1.2.

equal(b)
Parameters:

b (Graphene.Frustum) – a Graphene.Frustum

Returns:

true if the given frustums are equal

Return type:

bool

Checks whether the two given Graphene.Frustum are equal.

New in version 1.6.

free()

Frees the resources allocated by Graphene.Frustum.alloc().

New in version 1.2.

get_planes()
Returns:

return location for an array of 6 Graphene.Plane

Return type:

planes: [Graphene.Plane]

Retrieves the planes that define the given Graphene.Frustum.

New in version 1.2.

init(p0, p1, p2, p3, p4, p5)
Parameters:
Returns:

the initialized frustum

Return type:

Graphene.Frustum

Initializes the given Graphene.Frustum using the provided clipping planes.

New in version 1.2.

init_from_frustum(src)
Parameters:

src (Graphene.Frustum) – a Graphene.Frustum

Returns:

the initialized frustum

Return type:

Graphene.Frustum

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

New in version 1.2.

init_from_matrix(matrix)
Parameters:

matrix (Graphene.Matrix) – a Graphene.Matrix

Returns:

the initialized frustum

Return type:

Graphene.Frustum

Initializes a Graphene.Frustum using the given matrix.

New in version 1.2.

intersects_box(box)
Parameters:

box (Graphene.Box) – a Graphene.Box

Returns:

true if the box intersects the frustum

Return type:

bool

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

New in version 1.2.

intersects_sphere(sphere)
Parameters:

sphere (Graphene.Sphere) – a Graphene.Sphere

Returns:

true if the sphere intersects the frustum

Return type:

bool

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

New in version 1.2.