CameraExtensions.

WorldToClip(CameraComponent, Vector3, Vector3) Method

Summary

Converts the world position to clip space coordinates relative to camera.
Namespace
StrideToolkit.Engine
Containing Type
CameraExtensions

Syntax

public static void WorldToClip(this CameraComponent cameraComponent, ref Vector3 position, out Vector3 result)

Remarks

This method does not update the CameraComponent.ViewMatrix or CameraComponent.ProjectionMatrix before performing the transformation. If the CameraComponent or it's containing Entity TransformComponenthas been modified since the last frame you may need to call the CameraComponent.Update() method first.

Parameters

Name Type Description
cameraComponent CameraComponent
position Vector3
result Vector3 The position in clip space.

Return Value

Type Description
void