|
| | VrCamera (Entities::Scene *owningScene, std::shared_ptr< Entities::SceneNode > sceneNode, Rendering::Headset *headset) |
| | Constructs a VR camera backed by a headset and scene node.
|
| | ~VrCamera () override=default |
| | Destroys the VR camera component.
|
| void | tick (double deltaTime) override |
| | Called every frame if ticking is enabled.
|
| glm::mat4 | getEyeViewMatrix (size_t eyeIndex) const override |
| | Gets the view matrix for a specific eye. Base returns getViewMatrix() for both (mono).
|
| glm::mat4 | getEyeProjectionMatrix (size_t eyeIndex) const override |
| | Gets the projection matrix for a specific eye. Base returns getProjectionMatrix() for both (mono).
|
| Rendering::Headset * | getHeadset () const |
| | Gets the headset used by this VR camera.
|
| | Camera (Entities::Scene *owningScene, std::shared_ptr< Entities::SceneNode > sceneNode, float fov=60.0f, float nearPlane=0.01f, float farPlane=1000.0f) |
| | Constructs a camera component with default parameters.
|
| | ~Camera () override=default |
| | Destroys the camera component.
|
| void | beginPlay () override |
| | Called when the component is added to the scene or the game starts.
|
| void | endPlay () override |
| | Called when the component is removed or the game ends.
|
| bool | drawImGui () override |
| | Draws component-specific ImGui inspector controls.
|
| void | setActive (bool active) |
| | Sets this camera as the active camera for rendering.
|
| bool | isActive () const |
| | Checks if this camera is currently the active camera.
|
| virtual glm::mat4 | getViewMatrix () const |
| | Gets the view matrix computed from the camera's world transform.
|
| virtual glm::mat4 | getProjectionMatrix () const |
| | Gets the projection matrix based on FOV, aspect ratio, and clipping planes.
|
| glm::mat4 | getViewProjectionMatrix () const |
| | Gets the combined view-projection matrix.
|
| void | setFov (float fov) |
| | Sets the vertical field of view.
|
| float | getFov () const |
| | Gets the vertical field of view.
|
| void | setAspectRatio (float aspectRatio) |
| | Sets the aspect ratio (width / height)
|
| float | getAspectRatio () const |
| | Gets the aspect ratio.
|
| void | setNearPlane (float nearPlane) |
| | Sets the near clipping plane distance.
|
| float | getNearPlane () const |
| | Gets the near clipping plane distance.
|
| void | setFarPlane (float farPlane) |
| | Sets the far clipping plane distance.
|
| float | getFarPlane () const |
| | Gets the far clipping plane distance.
|
| glm::vec3 | getWorldPosition () const |
| | Gets the camera's world position from its scene node.
|
| glm::vec3 | getForwardVector () const |
| | Gets the forward direction vector of the camera.
|
| glm::vec3 | getRightVector () const |
| | Gets the right direction vector of the camera.
|
| glm::vec3 | getUpVector () const |
| | Gets the up direction vector of the camera.
|
| std::shared_ptr< Entities::SceneNode > | getSceneNode () const |
| | Gets the scene node associated with this camera.
|
| | Logic (Entities::Scene *owningScene) |
| | Constructs a logic component owned by a scene.
|
| | Logic (const Entities::SpawnContext &context) |
| | Constructs a logic component from spawn context data.
|
| virtual | ~Logic ()=default |
| | Destroys the logic component.
|
| virtual std::string | getComponentName () const |
| | Gets the component type name for debugging/UI.
|
| virtual bool | drawImGuiName () |
| | Used to alter the name of the entity in the outliner.
|
| bool | hasBegunPlay () const |
| | Checks whether beginPlay() has been called without a matching endPlay().
|
| bool | canTick () const |
| | Checks if the component is currently set to tick.
|
| void | setCanTick (bool enable) |
| | Enables or disables ticking for this component.
|
| Entities::Entity * | getOwningEntity () const |
| | Gets the entity this component belongs to.
|
Camera component driven by VR headset tracking.
Each frame, reads headset orientation from OpenXR and writes it to the SceneNode. Provides per-eye view and projection matrices that incorporate IPD offsets from the headset.
Locomotion (player world position) is handled externally — typically by VrMovementComponent writing to the same actor's SceneNode.
Definition at line 21 of file VrCameraComponent.h.