Back to class index
| Frustum::ProjectSyntaxfloat4 Frustum::Project(const float4 &point) const; [6 lines of code]Projects the given point onto the near plane of this frustum. The (x,y) component of the returned vector gives the normalized viewport coordinates of the point on the near plane. The z component gives the normalized depth of the point. If the point is inside the frustum, x and y are in the range [-1, 1] and z is in the range [0, 1]. If the point was behind the near plane, z will return a negative value. If the point lies exactly on the near plane, z==0 will be returned. If the point lies exactly on the far plane, z==1 will be returned, and if a z>1 is returned, the given point was outside the far plane of this Frustum. Parametersconst float4 &pointA point in world space to project onto the near plane of this frustum. Return ValueThe normalized 2D (x,y) coordinate of the given point projected onto the near plane of this Frustum. The z coordinate specifies the normalized (linear) depth of the projected point. |