Package: graphene

CStruct graphene:point3d-t

Details

The graphene:point3d-t structure is a data structure capable of describing a point with three coordinates.
(cffi:defcstruct point3d-t
  (x :float)
  (y :float)
  (z :float))  
Access the coordinates with the graphene:point3d-x, graphene:point3d-y and graphene:point3d-z functions. Use the graphene:with-point3d and graphene:with-point3ds macros to allocate a new graphene:point3d-t instance and initialize the point with values.

Example

Allocate and initalize a point with values.
(graphene:with-point3d (p 1.0 1/2 5)
  (list (graphene:point3d-x p)
        (graphene:point3d-y p)
        (graphene:point3d-z p)))
=> (1.0 0.5 5.0)    
 

Slot Access Functions

See also

2023-12-3