ZCamera
Constructors
Creates a ZCamera object with a default lens and default lookAt and up vectors.
Initializes a ZCamera with the provided lookAt point, Up vector, and lens to be used.
Constructs a new ZCamera object with the given lookAt point and up vector. This constructor initializes the transform of the camera with the provided lookAt vector and up vector. It also sets the lens of the camera to the default perspective lens.
Properties
A boolean indicating whether the object has been initialized. This is set to true after the first call to initialize.
Represents the lens used in the camera object.
Represents the projection matrix used by the camera lens.
An instance of ZTransform representing the object's position, rotation, and scale in the 3D space.
The viewMatrix property represents the transformation matrix that defines the view of an object in a 3D space.
The viewProjectionMatrix represents the matrix that combines the view matrix and the projection matrix. It is a derived value, calculated by multiplying the projectionMatrix and viewMatrix. The resulting matrix transforms positions from world space to clip space.
Functions
Initializes the object and its children, preparing them for rendering. This function should be called before the object is rendered for the first time. It sets the object's state to initialized and recursively initializes all child objects.
Adjusts the object's orientation so that it "looks at" a specified point in space.
Adjusts the object's orientation so that it "looks at" a specified point in space, with a specified up direction. This changes the object's rotation to face the point, while aligning its up direction with the specified up vector.
Event handler for the viewport resizing. This method should not be called by the user