igor::iCameraComponent Class Reference

#include <iCameraComponent.h>

Inherits igor::iEntityComponent.

Public Member Functions

 iCameraComponent ()
 
void setViewportRelative (const iaRectangled &rect)
 
const iaRectangledgetViewport () const
 
void setPerspective (float64 viewAngel)
 
void setOrthogonal (float32 left, float32 right, float32 bottom, float32 top)
 
float64 getFieldOfView () const
 
void setClipPlanes (float32 nearPlain, float32 farPlain)
 
float64 getNearPlane () const
 
float64 getFarPlane () const
 
void setClearColorActive (bool active)
 
bool isClearColorActive () const
 
void setClearColor (const iaColor4f &color)
 
void setClearColor (float32 r, float32 g, float32 b, float32 a)
 
const iaColor4fgetClearColor () const
 
void setClearDepthActive (bool active)
 
bool isClearDepthActive () const
 
void setClearDepth (float32 depth)
 
float32 getClearDepth () const
 
iProjectionType getProjectionType () const
 
float64 getLeftOrtho () const
 
float64 getRightOrtho () const
 
float64 getTopOrtho () const
 
float64 getBottomOrtho () const
 
std::vector< iaStringgetInfo () const override
 
- Public Member Functions inherited from igor::iEntityComponent
 iEntityComponent ()
 
virtual ~iEntityComponent ()=default
 
const iEntityComponentIDgetID () const
 
iEntityComponentState getState () const
 
virtual std::vector< iaStringgetInfo () const
 
IGOR_INLINE void setDirty ()
 
uint16 getVersion () const
 

Static Public Member Functions

static iEntityComponentcreateInstance ()
 
static const iaStringgetTypeName ()
 

Additional Inherited Members

- Protected Member Functions inherited from igor::iEntityComponent
virtual bool onLoad (iEntityPtr entity, bool &asyncLoad)
 
virtual void onActivate (iEntityPtr entity)
 
virtual void onDeactivate (iEntityPtr entity)
 
virtual void onUnLoad (iEntityPtr entity)
 
virtual iEntityComponentPtr getCopy ()=0
 
iEntityPtr getEntity () const
 

Detailed Description

camera component

Constructor & Destructor Documentation

◆ iCameraComponent()

igor::iCameraComponent::iCameraComponent ( )

ctor

Member Function Documentation

◆ createInstance()

iEntityComponent * igor::iCameraComponent::createInstance ( )
static

creates instance of this component type

◆ getBottomOrtho()

float64 igor::iCameraComponent::getBottomOrtho ( ) const
Returns
bottom edge of orthogonal projection

◆ getClearColor()

const iaColor4f & igor::iCameraComponent::getClearColor ( ) const
Returns
current clear color

◆ getClearDepth()

float32 igor::iCameraComponent::getClearDepth ( ) const
Returns
clear depth Value

◆ getFarPlane()

float64 igor::iCameraComponent::getFarPlane ( ) const
Returns
far clipping plane

◆ getFieldOfView()

float64 igor::iCameraComponent::getFieldOfView ( ) const
Returns
field of view

◆ getInfo()

std::vector< iaString > igor::iCameraComponent::getInfo ( ) const
overridevirtual
Returns
a set of info strings

Reimplemented from igor::iEntityComponent.

◆ getLeftOrtho()

float64 igor::iCameraComponent::getLeftOrtho ( ) const
Returns
left edge of orthogonal projection

◆ getNearPlane()

float64 igor::iCameraComponent::getNearPlane ( ) const
Returns
near clipping plane

◆ getProjectionType()

iProjectionType igor::iCameraComponent::getProjectionType ( ) const
Returns
projection type

◆ getRightOrtho()

float64 igor::iCameraComponent::getRightOrtho ( ) const
Returns
right edge of orthogonal projection

◆ getTopOrtho()

float64 igor::iCameraComponent::getTopOrtho ( ) const
Returns
top edge of orthogonal projection

◆ getTypeName()

const iaString & igor::iCameraComponent::getTypeName ( )
static
Returns
type name of component

◆ getViewport()

const iaRectangled & igor::iCameraComponent::getViewport ( ) const
Returns
viewport in pixels

◆ isClearColorActive()

bool igor::iCameraComponent::isClearColorActive ( ) const
Returns
true if color buffer will be cleared before render

◆ isClearDepthActive()

bool igor::iCameraComponent::isClearDepthActive ( ) const
Returns
true if clear depth is active

◆ setClearColor() [1/2]

void igor::iCameraComponent::setClearColor ( const iaColor4f color)

specifies the the color the color buffer will be cleared with

Parameters
colorthe clear color

◆ setClearColor() [2/2]

void igor::iCameraComponent::setClearColor ( float32  r,
float32  g,
float32  b,
float32  a 
)

specifies the the color the color buffer will be cleared with

Parameters
rred channel of clear color
ggreen channel of clear color
bblue channel of clear color
aalpha channel of clear color

◆ setClearColorActive()

void igor::iCameraComponent::setClearColorActive ( bool  active)

sets the clear color bit.

Parameters
activetrue: color buffer will be cleared every frame; false: it will not

◆ setClearDepth()

void igor::iCameraComponent::setClearDepth ( float32  depth)

sets the clear depth value

Parameters
depththe clear depth value

◆ setClearDepthActive()

void igor::iCameraComponent::setClearDepthActive ( bool  active)

sets the clear buffer bit.

Parameters
activetrue: depth buffer will be cleared every frame; false: it will not

◆ setClipPlanes()

void igor::iCameraComponent::setClipPlanes ( float32  nearPlain,
float32  farPlain 
)

defines the near and far clipping planes

Parameters
nearPlainnear clipping plane
farPlainfar clipping plane

◆ setOrthogonal()

void igor::iCameraComponent::setOrthogonal ( float32  left,
float32  right,
float32  bottom,
float32  top 
)

activates othogonal projection mode

Parameters
leftleft value of orthogonal projection
rightright value of orthogonal projection
bottombottom value of orthogonal projection
toptop value of orthogonal projection

◆ setPerspective()

void igor::iCameraComponent::setPerspective ( float64  viewAngel)

activates perspective mode and sets the view_angle

Parameters
viewAngelvalues in degrees 0 < viewAngel < 180

◆ setViewportRelative()

void igor::iCameraComponent::setViewportRelative ( const iaRectangled rect)

sets the view port within a window.

values have to be from 0.0 to 1.0 and represent a resolution independent unit.

Parameters
rectrectangle with view port boundings using relative values 0.0 - 1.0

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