Expand description
Constructors§
Source§new Camera(params?: ICameraData): Camera
new Camera(params?: ICameraData): Camera
Constructs a Camera instance with the specified parameters. If no parameters are provided, it uses the default camera parameters.
Properties§
Methods§
Source§getModelViewMatrix(): number[] | Float32Array<ArrayBufferLike>
getModelViewMatrix(): number[] | Float32Array<ArrayBufferLike>
Gets the model-view matrix for the camera.
Source§getProjectionMatrix(): number[] | Float32Array<ArrayBufferLike>
getProjectionMatrix(): number[] | Float32Array<ArrayBufferLike>
Gets the projection matrix for the camera.
Source§resetCamera(wUp: number[], wLookAt: number[], wEye: number[]): void
resetCamera(wUp: number[], wLookAt: number[], wEye: number[]): void
Resets the camera to the initial position and orientation.
Source§screenCoordToWorldDir(x: number, y: number): vec3
screenCoordToWorldDir(x: number, y: number): vec3
Converts screen coordinates to world direction vector.
Source§translate(dx: number, dy: number): void
translate(dx: number, dy: number): void
Translates the camera position by the specified delta values in the x and y directions. The translation is scaled by the current eye distance to maintain consistent movement speed.
Camera class for managing the view parameters and transformations in a 3D space. It provides methods to manipulate the camera position, orientation, and projection.