
NO_TITLE
Gnome::Graphene::N-Frustum
Description
A 3D volume delimited by 2D clip planes.
The contents of the Gnome::Graphene::N-Frustum are private, and should not be modified directly.
Class initialization
new
:native-object
Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object :$native-object! )
alloc
Allocates a new Gnome::Graphene::N-Frustum structure.
The contents of the returned structure are undefined.
method alloc ( --> Gnome::Graphene::Frustum \)
Methods
contains-point
Checks whether a point is inside the volume defined by the given Gnome::Graphene::N-Frustum.
method contains-point ( N-Object $point --> gboolean )
$point; a graphene_point3d_t
Return value; true if the point is inside the frustum.
equal
Checks whether the two given Gnome::Graphene::N-Frustum are equal.
method equal ( N-Object $b --> gboolean )
$b; a Gnome::Graphene::N-Frustum
Return value; true if the given frustums are equal.
free
Frees the resources allocated by .alloc()
.
method free ( )
get-planes
Retrieves the planes that define the given Gnome::Graphene::N-Frustum.
method get-planes ( N-Object $planes )
$planes; return location for an array of 6 Gnome::Graphene::N-Plane
init
Initializes the given Gnome::Graphene::N-Frustum using the provided clipping planes.
method init ( N-Object $p0, N-Object $p1, N-Object $p2, N-Object $p3, N-Object $p4, N-Object $p5 --> N-Object )
$p0; a clipping plane
$p1; a clipping plane
$p2; a clipping plane
$p3; a clipping plane
$p4; a clipping plane
$p5; a clipping plane
Return value; the initialized frustum.
init-from-frustum
Initializes the given Gnome::Graphene::N-Frustum using the clipping planes of another Gnome::Graphene::N-Frustum.
method init-from-frustum ( N-Object $src --> N-Object )
$src; a Gnome::Graphene::N-Frustum
Return value; the initialized frustum.
init-from-matrix
Initializes a Gnome::Graphene::N-Frustum using the given $matrix
.
method init-from-matrix ( N-Object $matrix --> N-Object )
$matrix; a Gnome::Graphene::N-Matrix
Return value; the initialized frustum.
intersects-box
Checks whether the given $box
intersects a plane of a Gnome::Graphene::N-Frustum.
method intersects-box ( N-Object $box --> gboolean )
$box; a Gnome::Graphene::N-Box
Return value; true if the box intersects the frustum.
intersects-sphere
Checks whether the given $sphere
intersects a plane of a Gnome::Graphene::N-Frustum.
method intersects-sphere ( N-Object $sphere --> gboolean )
$sphere; a Gnome::Graphene::N-Sphere
Return value; true if the sphere intersects the frustum.