GCubeSDK
©2026 FenixFox®Studios

PerspectiveCamera

PerspectiveCamera ⟵ CameraObject3D

Camera with perspective projection.
This camera creates a perspective projection with configurable field of view, aspect ratio, and near/far clipping planes. It's the most common camera type for 3D scenes.

Methods

PerspectiveCamera(f32 fov, f32 aspect, f32 near, f32 far)

Constructor with perspective parameters

fov Field of view in degrees 75.0f
aspect Aspect ratio (width/height) 1.333f
near Near clipping plane 0.1f
far Far clipping plane 1000.0f

virtual PerspectiveCamera* clone(bool recursive) const override

Creates a copy of this camera

recursive Whether to clone descendants as well true

virtual void copy(const Object3D& object, bool recursive) override

Copies properties from another object

object Source object to copy from
recursive Whether to copy descendants as well true

virtual void updateProjectionMatrix() override

Updates the projection matrix with current camera parameters

Properties

aspect f32 Aspect ratio (width/height)
far f32 Far clipping plane
fov f32 Field of view in degrees
near f32 Near clipping plane