Package: graphene

Function graphene:point3d-normalize-viewport

Lambda List

graphene:point3d-normalize-viewport (p viewport znear zfar result)

Arguments

p -- a graphene:point3d-t instance
viewport -- a graphene:rect-t instance representing a viewport
znear -- a number coerced to a single float for the coordinate of the near clipping plane, or 0.0 for the default near clipping plane
zfar -- a number coerced to a single float for the coordinate of the far clipping plane, or 1.0 for the default far clipping plane
result -- a graphene:point3d-t instance for the nomalized point

Return Value

The graphene:point3d-t instance with the normalized point.

Details

Normalizes the coordinates of the point using the given viewport and clipping planes. The coordinates of the resulting point will be in the [-1.0, 1.0] range.
 

See also

2025-4-2