Package: graphene

Macro graphene:with-frustum

Lambda List

graphene:with-frustum ((var &rest args) &body body)

Syntax

(graphene:with-frustum (frustum) body) => result
(graphene:with-frustum (frustum frustum1) body) => result
(graphene:with-frustum (frustum (matrix graphene:matrix-t)) body) => result
(graphene:with-frustum (frustum plane0 ... plane5) body) => result

Arguments

frustum -- a graphene:frustum-t instance to create and initialize
frustum1 -- a graphene:frustum-t instance to use for initialization
matrix -- a graphene:matrix-t instance to use for initialization
plane0 ... plane5 -- six graphene:plane-t instances to use for initialization

Details

The graphene:with-frustum macro allocates a new graphene:frustum-t instance, initializes the frustum with the given values and executes the body that uses the frustum. After execution of the body the allocated memory for the frustum is released.

When no argument is given the components of the frustum are undefined. The initialization with another frustum uses the graphene:frustum-init-from-frustum function. If the first value has the graphene:matrix-t type the graphene:frustum-init-from-matrix function is used for initialization with the matrix. The initialization from six planes is done with the graphene:frustum-init function.

Note

The memory is allocated with the graphene:frustum-alloc function and released with the graphene:frustum-free function.
 

See also

2024-12-26