Package: graphene

Macro graphene:with-triangle

Lambda List

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

Syntax

(graphene:with-triangle (triangle) body) => result
(graphene:with-triangle (triangle p1 p2 p3) body) => result
(graphene:with-triangle (triangle v1 v2 v3) body) => result

Arguments

triangle -- a graphene:triangle-t instance to create and initialize
p1 -- a graphene:point3d-t instance to use for initialization
p2 -- a graphene:point3d-t instance to use for initialization
p3 -- a graphene:point3d-t instance to use for initialization
v1 -- a graphene:vec3-t instance to use for initialization
v2 -- a graphene:vec3-t instance to use for initialization
v3 -- a graphene:vec3-t instance to use for initialization

Details

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

When no argument is given the components of the triangle are not definied. The initialization with three points uses the graphene:triangle-init-from-point3d function. If the first value has the graphene:vec3-t type the graphene:triangle-init-from-vec3 is used for initialization with threee vectors.

Note

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

See also

2024-1-20