Package: graphene

Macro graphene:with-sphere

Lambda List

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

Syntax

(graphene:with-sphere (sphere) body) => result
(graphene:with-sphere (sphere sphere1) body) => result
(graphene:with-sphere (sphere center radius) body) => result

Arguments

sphere -- a graphene:sphere-t instance to create and initialize
sphere1 -- a graphene:sphere-t instance to use for initialization
center -- a graphene:point3d-t instance to use for initialization
radius -- a float with the radius of the sphere

Details

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

When no argument is given the components of the sphere are initialized to zero. The initialization from another sphere is done with the graphene:sphere-init-from-sphere function. The initialization with a center and a radius uses the graphene:sphere-init function.

Note

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

See also

2024-1-20