NAP
Public Member Functions | Public Attributes | List of all members
OrthoCameraProperties Struct Reference

#include <orthocameracomponent.h>

Public Member Functions

float getWidth () const
 
float getHeight () const
 
float getRatio () const
 
void adjust (float ratio)
 

Public Attributes

EOrthoCameraMode mMode = EOrthoCameraMode::PixelSpace
 Property: 'Mode' defaults to pixel space. More...
 
float mNearClippingPlane = 1.0f
 Property: 'NearClippingPlane' camera near clipping plane. More...
 
float mFarClippingPlane = 1000.0f
 Property: 'FarClippingPlane' camera far clipping plane. More...
 
float mLeftPlane = 0.0f
 Property: 'LeftPlane' used when mode is CorrectAspectRatio or Custom. More...
 
float mRightPlane = 100.0f
 Property: 'RightPlane' used when mode is CorrectAspectRatio or Custom. More...
 
float mTopPlane = 100.0f
 Property: 'TopPlane' used when mode is CorrectAspectRatio or Custom. More...
 
float mBottomPlane = 0.0f
 Property: 'TopPlane' used when mode is CorrectAspectRatio or Custom. More...
 
math::Rect mClipRect = { {0.0f, 0.0f}, {1.0f, 1.0f} }
 Property: 'ClipRect' normalized rectangle used to clip/crop the camera view. More...
 

Description

Orthographic camera properties

Collaboration diagram for OrthoCameraProperties:
[legend]

Member Function Documentation

◆ adjust()

void adjust ( float  ratio)

Adjusts height to match the given ratio. Note that the ratio is only used when 'Mode' is set to 'Custom'.

Parameters
ratiothe ratio to adjust to, height over width

◆ getHeight()

float getHeight ( ) const

Computes the height of the orthographic projection plane. Note that the height is only used when 'Mode' is set to 'Custom'. The height is negative when flipped.

Returns
projection plane height

◆ getRatio()

float getRatio ( ) const

Returns camera ratio, height over width. Note that the ratio is only used when 'Mode' is set to 'Custom'.

Returns
camera ratio, height over width

◆ getWidth()

float getWidth ( ) const

Computes the width of the orthographic projection plane. Note that the width is only used when 'Mode' is set to 'CorrectAspectRatio' or 'Custom'. The width is negative when flipped.

Returns
projection plane width

Member Data Documentation

◆ mBottomPlane

float mBottomPlane = 0.0f

Property: 'TopPlane' used when mode is CorrectAspectRatio or Custom.

◆ mClipRect

math::Rect mClipRect = { {0.0f, 0.0f}, {1.0f, 1.0f} }

Property: 'ClipRect' normalized rectangle used to clip/crop the camera view.

◆ mFarClippingPlane

float mFarClippingPlane = 1000.0f

Property: 'FarClippingPlane' camera far clipping plane.

◆ mLeftPlane

float mLeftPlane = 0.0f

Property: 'LeftPlane' used when mode is CorrectAspectRatio or Custom.

◆ mMode

Property: 'Mode' defaults to pixel space.

◆ mNearClippingPlane

float mNearClippingPlane = 1.0f

Property: 'NearClippingPlane' camera near clipping plane.

◆ mRightPlane

float mRightPlane = 100.0f

Property: 'RightPlane' used when mode is CorrectAspectRatio or Custom.

◆ mTopPlane

float mTopPlane = 100.0f

Property: 'TopPlane' used when mode is CorrectAspectRatio or Custom.