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 float with the coordinate of the near clipping plane, of 0.0 for the default near clipping plane
zfar -- a number coerced to a float with the coordinate of the far clipping plane, of 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

2023-12-3