ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
CameraBase Class Referenceabstract

Base class for managing camera properties and transformations. More...

#include <CameraBase.h>

Inheritance diagram for CameraBase:
Collaboration diagram for CameraBase:

Public Member Functions

 CameraBase ()
 Default constructor.
 
virtual Vector2D GetCameraMinCoordinate ()=0
 Retrieves the minimum coordinate of the camera in 2D space.
 
virtual Vector2D GetCameraMaxCoordinate ()=0
 Retrieves the maximum coordinate of the camera in 2D space.
 
virtual Vector2D GetCameraCenterCoordinate ()=0
 Retrieves the center coordinate of the camera in 2D space.
 
virtual Vector3D GetCameraTransformMin ()=0
 Retrieves the minimum transform of the camera in 3D space.
 
virtual Vector3D GetCameraTransformMax ()=0
 Retrieves the maximum transform of the camera in 3D space.
 
virtual Vector3D GetCameraTransformCenter ()=0
 Retrieves the center transform of the camera in 3D space.
 
virtual IPixelGroupGetPixelGroup ()=0
 Retrieves the associated pixel group.
 
CameraLayoutGetCameraLayout ()
 Retrieves the camera's layout.
 
TransformGetTransform ()
 Retrieves the camera's transformation data.
 
bool Is2D ()
 Checks if the camera operates in 2D mode.
 
void Set2D (bool is2D)
 Sets the camera's 2D mode.
 
void SetLookOffset (Quaternion lookOffset)
 Sets the camera's look offset.
 
Quaternion GetLookOffset ()
 Retrieves the camera's look offset.
 

Protected Attributes

Transformtransform
 Pointer to the camera's transformation data.
 
CameraLayoutcameraLayout
 Pointer to the camera's layout information.
 
Quaternion lookOffset
 Look offset for the camera's orientation.
 
bool is2D = false
 Flag indicating whether the camera operates in 2D mode.
 

Detailed Description

Base class for managing camera properties and transformations.

The CameraBase class provides an abstract interface for camera operations, including retrieving camera bounds and transformations, and managing associated pixel groups.

Definition at line 26 of file CameraBase.h.

Constructor & Destructor Documentation

◆ CameraBase()

Default constructor.

Definition at line 3 of file CameraBase.cpp.

Member Function Documentation

◆ GetCameraCenterCoordinate()

virtual Vector2D GetCameraCenterCoordinate ( )
pure virtual

Retrieves the center coordinate of the camera in 2D space.

Returns
The center coordinate as a Vector2D.

Implemented in Camera< pixelCount >, Camera< 2048 >, Camera< 27 >, Camera< 306 >, Camera< 36 >, Camera< 571 >, Camera< 88 >, and Camera< 89 >.

◆ GetCameraLayout()

CameraLayout * GetCameraLayout ( )

Retrieves the camera's layout.

Returns
Pointer to the CameraLayout.

Definition at line 5 of file CameraBase.cpp.

References cameraLayout.

Referenced by Rasterizer::Rasterize().

◆ GetCameraMaxCoordinate()

virtual Vector2D GetCameraMaxCoordinate ( )
pure virtual

Retrieves the maximum coordinate of the camera in 2D space.

Returns
The maximum coordinate as a Vector2D.

Implemented in Camera< pixelCount >, Camera< 2048 >, Camera< 27 >, Camera< 306 >, Camera< 36 >, Camera< 571 >, Camera< 88 >, and Camera< 89 >.

Referenced by Rasterizer::Rasterize().

◆ GetCameraMinCoordinate()

virtual Vector2D GetCameraMinCoordinate ( )
pure virtual

Retrieves the minimum coordinate of the camera in 2D space.

Returns
The minimum coordinate as a Vector2D.

Implemented in Camera< pixelCount >, Camera< 2048 >, Camera< 27 >, Camera< 306 >, Camera< 36 >, Camera< 571 >, Camera< 88 >, and Camera< 89 >.

Referenced by Rasterizer::Rasterize().

◆ GetCameraTransformCenter()

virtual Vector3D GetCameraTransformCenter ( )
pure virtual

Retrieves the center transform of the camera in 3D space.

Returns
The center transform as a Vector3D.

Implemented in Camera< pixelCount >, Camera< 2048 >, Camera< 27 >, Camera< 306 >, Camera< 36 >, Camera< 571 >, Camera< 88 >, and Camera< 89 >.

◆ GetCameraTransformMax()

virtual Vector3D GetCameraTransformMax ( )
pure virtual

Retrieves the maximum transform of the camera in 3D space.

Returns
The maximum transform as a Vector3D.

Implemented in Camera< pixelCount >, Camera< 2048 >, Camera< 27 >, Camera< 306 >, Camera< 36 >, Camera< 571 >, Camera< 88 >, and Camera< 89 >.

◆ GetCameraTransformMin()

virtual Vector3D GetCameraTransformMin ( )
pure virtual

Retrieves the minimum transform of the camera in 3D space.

Returns
The minimum transform as a Vector3D.

Implemented in Camera< pixelCount >, Camera< 2048 >, Camera< 27 >, Camera< 306 >, Camera< 36 >, Camera< 571 >, Camera< 88 >, and Camera< 89 >.

◆ GetLookOffset()

Quaternion GetLookOffset ( )

Retrieves the camera's look offset.

Returns
The look offset as a Quaternion.

Definition at line 25 of file CameraBase.cpp.

References lookOffset.

Referenced by Rasterizer::Rasterize().

◆ GetPixelGroup()

◆ GetTransform()

Transform * GetTransform ( )

Retrieves the camera's transformation data.

Returns
Pointer to the Transform object.

Definition at line 9 of file CameraBase.cpp.

References transform.

Referenced by Rasterizer::Rasterize().

◆ Is2D()

bool Is2D ( )

Checks if the camera operates in 2D mode.

Returns
True if the camera is in 2D mode, otherwise false.

Definition at line 13 of file CameraBase.cpp.

References is2D.

Referenced by Rasterizer::Rasterize().

◆ Set2D()

void Set2D ( bool  is2D)

Sets the camera's 2D mode.

Parameters
is2DTrue to enable 2D mode, otherwise false.

Definition at line 17 of file CameraBase.cpp.

References is2D.

◆ SetLookOffset()

void SetLookOffset ( Quaternion  lookOffset)

Sets the camera's look offset.

Parameters
lookOffsetThe new look offset as a Quaternion.

Definition at line 21 of file CameraBase.cpp.

References lookOffset.

Member Data Documentation

◆ cameraLayout

CameraLayout* cameraLayout
protected

Pointer to the camera's layout information.

Definition at line 29 of file CameraBase.h.

Referenced by GetCameraLayout().

◆ is2D

bool is2D = false
protected

Flag indicating whether the camera operates in 2D mode.

Definition at line 31 of file CameraBase.h.

Referenced by Is2D(), and Set2D().

◆ lookOffset

Quaternion lookOffset
protected

Look offset for the camera's orientation.

Definition at line 30 of file CameraBase.h.

Referenced by GetLookOffset(), and SetLookOffset().

◆ transform

Transform* transform
protected

Pointer to the camera's transformation data.

Definition at line 28 of file CameraBase.h.

Referenced by GetTransform().


The documentation for this class was generated from the following files: