- Declared in: RT.Modeling.Pt
Declaration
public double[] GetCameraMatrix(
Pt lookingAt,
Pt? up = null
)
Summary
Returns a 3×3 matrix that describes a linear transform that will rotate objects in accordance with the
orientation of the camera. This can be passed to
Pt.ProjectOntoCamera(Pt, double[]) to project 3D
objects into a 2D representation.
Parameters
Pt | lookingAt |
A point in 3D space that the camera is looking at, assuming the current point is the camera position. Note
this is not a vector. If all you have is a vector, add the current point (the camera position) to it first. |
Pt? | up |
An optional vector specifying the “up” direction of the camera. If omitted, it is assumed to be the y-axis. |
Returns
A matrix representing only the rotation. The translation necessary to place the camera is performed by
Pt.ProjectOntoCamera(Pt, double[]).