Package: graphene

Macro graphene:with-point3ds

Lambda List

graphene:with-point3ds (vars &body body)

Syntax

(graphene:with-point3ds (p1 p2 p3 ... pn) body) => result

Arguments

p1 ... pn -- the newly created graphene:point3d-t instances
body -- a body that uses the bindings p1 ... pn

Details

The graphene:with-point3ds macro creates new variable bindings and executes the body that use these bindings. The macro performs the bindings sequentially, like the let* macro.

Each point can be initialized with values using the syntax for the graphene:with-point3d macro. See also the graphene:with-point3d documentation.

Examples

(graphene:with-point3ds (p1 (p2 1.2 1.3 1.4) (p3 p2))
  (list (list (graphene:point3d-x p1)
              (graphene:point3d-y p1)
              (graphene:point3d-z p1))
        (list (graphene:point3d-x p2)
              (graphene:point3d-y p2)
              (graphene:point3d-z p2))
        (list (graphene:point3d-x p3)
              (graphene:point3d-y p3)
              (graphene:point3d-z p3))))
=> ((0.0 0.0 0.0) (1.2 1.3 1.4) (1.2 1.3 1.4))    
 

See also

2024-1-20