ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
Camera< pixelCount > Class Template Reference

Manages camera behavior and pixel groups. More...

#include <Camera.h>

Inheritance diagram for Camera< pixelCount >:
Collaboration diagram for Camera< pixelCount >:

Public Member Functions

 Camera (Transform *transform, PixelGroup< pixelCount > *pixelGroup)
 Constructs a Camera with a transform and pixel group.
 
 Camera (Transform *transform, CameraLayout *cameraLayout, PixelGroup< pixelCount > *pixelGroup)
 Constructs a Camera with a transform, camera layout, and pixel group.
 
PixelGroup< pixelCount > * GetPixelGroup () override
 Retrieves the associated PixelGroup.
 
Vector2D GetCameraMinCoordinate () override
 Retrieves the minimum coordinate of the camera.
 
Vector2D GetCameraMaxCoordinate () override
 Retrieves the maximum coordinate of the camera.
 
Vector2D GetCameraCenterCoordinate () override
 Retrieves the center coordinate of the camera.
 
Vector3D GetCameraTransformMin () override
 Retrieves the minimum transform of the camera.
 
Vector3D GetCameraTransformMax () override
 Retrieves the maximum transform of the camera.
 
Vector3D GetCameraTransformCenter () override
 Retrieves the center transform of the camera.
 
- Public Member Functions inherited from CameraBase
 CameraBase ()
 Default constructor.
 
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.
 

Private Attributes

PixelGroup< pixelCount > * pixelGroup
 Pointer to the associated PixelGroup instance.
 
Vector2D maxC
 Cached maximum coordinate of the camera.
 
Vector2D minC
 Cached minimum coordinate of the camera.
 
bool calculatedMax = false
 Indicates if the maximum coordinate has been calculated.
 
bool calculatedMin = false
 Indicates if the minimum coordinate has been calculated.
 

Additional Inherited Members

- Protected Attributes inherited from CameraBase
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

template<size_t pixelCount>
class Camera< pixelCount >

Manages camera behavior and pixel groups.

The Camera class extends CameraBase and incorporates pixel group handling, allowing for advanced camera operations, including retrieving pixel data and coordinate transformations.

Template Parameters
pixelCountThe total number of pixels managed by the camera.

Definition at line 27 of file Camera.h.

Constructor & Destructor Documentation

◆ Camera() [1/2]

template<size_t pixelCount>
Camera ( Transform transform,
PixelGroup< pixelCount > *  pixelGroup 
)

Constructs a Camera with a transform and pixel group.

Parameters
transformPointer to the Transform associated with the camera.
pixelGroupPointer to the PixelGroup associated with the camera.

◆ Camera() [2/2]

template<size_t pixelCount>
Camera ( Transform transform,
CameraLayout cameraLayout,
PixelGroup< pixelCount > *  pixelGroup 
)

Constructs a Camera with a transform, camera layout, and pixel group.

Parameters
transformPointer to the Transform associated with the camera.
cameraLayoutPointer to the CameraLayout for the camera.
pixelGroupPointer to the PixelGroup associated with the camera.

Member Function Documentation

◆ GetCameraCenterCoordinate()

template<size_t pixelCount>
Vector2D GetCameraCenterCoordinate ( )
overridevirtual

Retrieves the center coordinate of the camera.

Returns
The center coordinate as a Vector2D.

Implements CameraBase.

◆ GetCameraMaxCoordinate()

template<size_t pixelCount>
Vector2D GetCameraMaxCoordinate ( )
overridevirtual

Retrieves the maximum coordinate of the camera.

Returns
The maximum coordinate as a Vector2D.

Implements CameraBase.

◆ GetCameraMinCoordinate()

template<size_t pixelCount>
Vector2D GetCameraMinCoordinate ( )
overridevirtual

Retrieves the minimum coordinate of the camera.

Returns
The minimum coordinate as a Vector2D.

Implements CameraBase.

◆ GetCameraTransformCenter()

template<size_t pixelCount>
Vector3D GetCameraTransformCenter ( )
overridevirtual

Retrieves the center transform of the camera.

Returns
The center transform as a Vector3D.

Implements CameraBase.

◆ GetCameraTransformMax()

template<size_t pixelCount>
Vector3D GetCameraTransformMax ( )
overridevirtual

Retrieves the maximum transform of the camera.

Returns
The maximum transform as a Vector3D.

Implements CameraBase.

◆ GetCameraTransformMin()

template<size_t pixelCount>
Vector3D GetCameraTransformMin ( )
overridevirtual

Retrieves the minimum transform of the camera.

Returns
The minimum transform as a Vector3D.

Implements CameraBase.

◆ GetPixelGroup()

template<size_t pixelCount>
PixelGroup< pixelCount > * GetPixelGroup ( )
overridevirtual

Retrieves the associated PixelGroup.

Returns
Pointer to the PixelGroup.

Implements CameraBase.

Member Data Documentation

◆ calculatedMax

template<size_t pixelCount>
bool calculatedMax = false
private

Indicates if the maximum coordinate has been calculated.

Definition at line 32 of file Camera.h.

◆ calculatedMin

template<size_t pixelCount>
bool calculatedMin = false
private

Indicates if the minimum coordinate has been calculated.

Definition at line 33 of file Camera.h.

◆ maxC

template<size_t pixelCount>
Vector2D maxC
private

Cached maximum coordinate of the camera.

Definition at line 30 of file Camera.h.

◆ minC

template<size_t pixelCount>
Vector2D minC
private

Cached minimum coordinate of the camera.

Definition at line 31 of file Camera.h.

◆ pixelGroup

template<size_t pixelCount>
PixelGroup<pixelCount>* pixelGroup
private

Pointer to the associated PixelGroup instance.

Definition at line 29 of file Camera.h.


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