Package: graphene

Function graphene:box-vertices

Lambda List

graphene:box-vertices (box vertices)

Arguments

box -- a graphene:box-t instance
vertices -- a list of eigth graphene:vec3-t instances

Return Value

The list of eight graphene:vec3-t instances with the vertices.

Details

Computes the vertices of the given box.

Example

(graphene:with-vec3s (v0 v1 v2 v3 v4 v5 v6 v7)
  (graphene:with-point3ds ((min 0 0 0) (max 1 1 1))
    (graphene:with-box (box min max)
      (mapcar #'vec3-to-float
              (box-vertices box (list v0 v1 v2 v3 v4 v5 v6 v7))))))
=> ((0.0 0.0 0.0) (0.0 0.0 1.0) (0.0 1.0 0.0) (0.0 1.0 1.0)
    (1.0 0.0 0.0) (1.0 0.0 1.0) (1.0 1.0 0.0) (1.0 1.0 1.0))    
 

See also

2024-11-12