Graphene.Frustum¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
planes |
r |
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Graphene.Frustum¶
A 3D volume delimited by 2D clip planes.
The contents of the
graphene_frustum_tare private, and should not be modified directly.New in version 1.2.
- classmethod alloc()¶
- Returns:
the newly allocated
Graphene.Frustumstructure. UseGraphene.Frustum.free() to free the resources allocated by this function.- Return type:
Allocates a new
Graphene.Frustumstructure.The contents of the returned structure are undefined.
New in version 1.2.
- contains_point(point)¶
- Parameters:
point (
Graphene.Point3D) – aGraphene.Point3D- Returns:
trueif the point is inside the frustum- Return type:
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) – aGraphene.Frustum- Returns:
trueif the given frustums are equal- Return type:
Checks whether the two given
Graphene.Frustumare 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:
p0 (
Graphene.Plane) – a clipping planep1 (
Graphene.Plane) – a clipping planep2 (
Graphene.Plane) – a clipping planep3 (
Graphene.Plane) – a clipping planep4 (
Graphene.Plane) – a clipping planep5 (
Graphene.Plane) – a clipping plane
- Returns:
the initialized frustum
- Return type:
Initializes the given
Graphene.Frustumusing the provided clipping planes.New in version 1.2.
- init_from_frustum(src)¶
- Parameters:
src (
Graphene.Frustum) – aGraphene.Frustum- Returns:
the initialized frustum
- Return type:
Initializes the given
Graphene.Frustumusing the clipping planes of anotherGraphene.Frustum.New in version 1.2.
- init_from_matrix(matrix)¶
- Parameters:
matrix (
Graphene.Matrix) – aGraphene.Matrix- Returns:
the initialized frustum
- Return type:
Initializes a
Graphene.Frustumusing the given matrix.New in version 1.2.
- intersects_box(box)¶
- Parameters:
box (
Graphene.Box) – aGraphene.Box- Returns:
trueif the box intersects the frustum- Return type:
Checks whether the given box intersects a plane of a
Graphene.Frustum.New in version 1.2.
- intersects_sphere(sphere)¶
- Parameters:
sphere (
Graphene.Sphere) – aGraphene.Sphere- Returns:
trueif the sphere intersects the frustum- Return type:
Checks whether the given sphere intersects a plane of a
Graphene.Frustum.New in version 1.2.