Kigs Framework  Doc version 0.8
Open source multi purpose Rapid Application Development framework
Public Member Functions | Protected Member Functions | List of all members
OpenGLCameraOrtho Class Reference

#include <OpenGLCameraOrtho.h>

Inheritance diagram for OpenGLCameraOrtho:
Camera Node3D SceneNode CoreModifiable GenericRefCountedBaseClass

Public Member Functions

void InitCullingObject (CullingObject *obj) override
 initialize the culling on an object More...
 
void getRay (const kfloat &ScreenX, const kfloat &ScreenY, Point3D &RayOrigin, Vector3D &RayDirection) override
 get the ray from a pixel More...
 
- Public Member Functions inherited from Camera
bool SetActive (TravState *state)
 return true if camera was activated else do not render camera More...
 
void Release (TravState *state)
 release the camera
 
void SetViewport (kfloat vpminx, kfloat vpminy, kfloat vpsx, kfloat vpsy)
 set the viewport More...
 
void SetPosition (kfloat x, kfloat y, kfloat z)
 set the position of the camera More...
 
void GetPosition (kfloat &x, kfloat &y, kfloat &z)
 get the position of the camera More...
 
void SetViewVector (kfloat x, kfloat y, kfloat z)
 set the view factor More...
 
void GetViewVector (kfloat &x, kfloat &y, kfloat &z)
 get the view factor More...
 
void SetUpVector (kfloat x, kfloat y, kfloat z)
 set the position of the up vector More...
 
void GetUpVector (kfloat &x, kfloat &y, kfloat &z)
 get the up vector More...
 
void GetNodeBoundingBox (Point3D &pmin, Point3D &pmax) const override
 special case for camera has we want it to be init even if have no bounding box

 
void SetNearAndFar (kfloat znear, kfloat zfar)
 set the zNear and zFar values More...
 
void SetClearColor (kfloat r, kfloat g, kfloat b, kfloat a=1.0f)
 set the clear color More...
 
bool IsActive ()
 check if the camera is active More...
 
bool AllVisible ()
 check if the camera is in All Visible mode More...
 
virtual bool Project (kfloat &, kfloat &, Point3D)
 project given point 3D using camera projection
 
RenderingScreengetRenderingScreen ()
 link to the rendering screen
 
- Public Member Functions inherited from Node3D
 DECLARE_DECORABLE_2_PARAMS (bool, Cull, Node3D, TravState *, unsigned int)
 
virtual void TravDraw (TravState *state)
 
virtual void TravCull (TravState *state)
 
bool addItem (const CMSP &item, ItemPosition pos=Last DECLARE_DEFAULT_LINK_NAME) override
 add item at first or last position
 
bool removeItem (const CMSP &item DECLARE_DEFAULT_LINK_NAME) override
 
void localMove (const v3f &move)
 move local node position ( pos = move + pos )
 
void globalMove (const v3f &move)
 move global node position ( gpos = gmove + gpos )
 
- Public Member Functions inherited from SceneNode
bool addItem (const CMSP &item, ItemPosition pos=Last DECLARE_DEFAULT_LINK_NAME) override
 add item at first or last position
 
- Public Member Functions inherited from CoreModifiable
void Init ()
 Modifiable managmenent.
 
void EmptyItemList ()
 remove all items (sons)
 
CMSP GetInstanceByPath (const std::string &path)
 return the instance corresponding to the given path in sons tree
 
std::string GetRuntimeID () const
 ID.
 
CoreModifiableAttributegetAttribute (KigsID labelid) const
 Attribute management.
 
u32 getNbArrayElements (KigsID attributeLabel) const
 return element count for an array type attribute
 
template<typename attribute_type , typename value_type >
attribute_type * AddDynamicAttribute (KigsID ID, const value_type &value)
 Dynamic attribute management.
 
const kigs::unordered_map< KigsID, ModifiableMethodStruct > * GetMethods ()
 Method management.
 
bool aggregateWith (CMSP &item, ItemPosition pos=Last)
 Aggregate management.
 
void flagAsNotificationCenterRegistered ()
 Flags.
 
void InitParametersFromList (const std::vector< CoreModifiableAttribute * > *params)
 Utility. More...
 
virtual bool removeItem (const CMSP &item)
 remove item (son)
 

Protected Member Functions

bool ProtectedSetActive (TravState *state) override
 enable the camera protection More...
 
void ProtectedRelease (TravState *state) override
 disable the camera protection
 
- Protected Member Functions inherited from Camera
void InitModifiable () override
 initialize modifiable More...
 
void ProtectedDestroy () override
 Destroy method decrement refcounter and delete instance if no more used. More...
 
virtual ~Camera ()
 destructor
 
void RecomputeMatrix ()
 recompute matrix
 
virtual void UninitModifiable () override
 called when InitModifiable has failled : reset read/write flag on all init params More...
 
- Protected Member Functions inherited from Node3D
void removeUser (CoreModifiable *user) override
 remove user (parent)
 
void addUser (CoreModifiable *user) override
 add the given parent to list
 
void InitModifiable () override
 default modifiable init : set all initparams to readonly and set initflag to true More...
 
void PreDrawDrawable (TravState *state)
 call predraw for drawable sons of this node return true if at least one drawable son was found More...
 
void DrawDrawable (TravState *state)
 call draw for drawable sons of this node More...
 
void PostDrawDrawable (TravState *state)
 call postdraw for drawable sons of this node More...
 
void RecomputeGlobalToLocal ()
 
void RecomputeGlobalBoundingBox ()
 
virtual void RecomputeBoundingBox ()
 
- Protected Member Functions inherited from CoreModifiable
void UpdateAggregates (const Timer &timer, void *addParam)
 Internals.
 
void Export (std::vector< CoreModifiable * > &savedList, XMLNode *currentNode, bool recursive, ExportSettings *settings)
 Export. More...
 
CoreModifiableAttributeGenericCreateDynamicAttribute (CoreModifiable::ATTRIBUTE_TYPE type, KigsID ID)
 create and add dynamic attribute except arrays
 

Additional Inherited Members

- Static Public Member Functions inherited from CoreModifiable
static std::vector< CMSP > GetRootInstances (const KigsID &cid, bool exactTypeOnly=false)
 static method : return the set of all root instances of the given type
 
static void Append (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (const std::string &filename, CoreModifiable *toexport, bool recursive=false, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static XMLNodeExportToXMLNode (CoreModifiable *toexport, XML *owner_xml_file, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML Node. if recursive flag is set to true, export also all sons tree More...
 
static std::string ExportToXMLString (CoreModifiable *toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static CMSP Import (const std::string &filename, bool noInit=false, bool keepImportFileName=false, ImportState *state=nullptr, const std::string &override_name="")
 return an new CoreModifiable instance using the description found in XML file given by name
 
static CMSP GetInstanceByGlobalPath (const std::string &path)
 static method : return the instance corresponding to the given path, and given search start
 
static void debugPrintfFullTree (int maxindent=3)
 Editor. More...
 
- Static Protected Member Functions inherited from CoreModifiable
template<typename StringType >
static CMSP Import (XMLNodeTemplate< StringType > *currentNode, CoreModifiable *currentModifiable, ImportState &importState)
 recusrive method to add sons and attributes found in the XML file
 
- Protected Attributes inherited from Camera
maFloat mViewportMinX
 coordinate on x axis of the min point of the viewport
 
maFloat mViewportMinY
 coordinate on y axis of the min point of the viewport
 
maFloat mViewportSizeX
 width of the viewport
 
maFloat mViewportSizeY
 height of the viewport
 
maFloat mNearPlane
 zNear value
 
maFloat mFarPlane
 zFar value
 
maVect3DF mPosition
 position of the camera
 
maVect3DF mUpVector
 up vector of the camera
 
maVect3DF mViewVector
 direction of the camera
 
maVect4DF mClearColor
 clear color of the camera
 
maReference mRenderingScreen
 reference on the rendering screen
 
maFloat mVerticalFOV
 vertical FOV of the camera
 
maFloat mAspectRatio
 aspect ration of the camera
 
maBool mClearZBuffer
 should clear zBuffer
 
maBool mClearColorBuffer
 should clear color buffer
 
maBool mClearStencilBuffer
 should clear stencil buffer
 
maBool mCameraIsEnabled
 Disable or Enable camera.
 
maUInt mPriority
 Camera priority.
 
maFloat mBrightness
 Camera brightness, change rendering screen brightness.
 
maBool mAllVisible
 Camera all visible(no cull)
 
bool mIsActive
 TRUE when the camera is active.
 
- Protected Attributes inherited from Node3D
unsigned int mIsVisible
 valid after scene TravCull : mIsVisible store current frame index if object is visible
 
unsigned short mFirstVisibleNodeIndex
 first visible Node in ModuleSceneGraph::mVisiblesNodeList
 
unsigned short mVisibleNodeCount
 number of visible node
 
Matrix3x4 mTransform
 Local transformation matrix (father => this local coordinate system)
 
Matrix3x4 mLocalToGlobal
 Local to global transformation matrix (Local coordinate system => global "world" coordinate system)
 
Matrix3x4 mGlobalToLocal
 Global to local transformation matrix (Global "world" coordinate system => local coordinate system)
 
BBox mLocalBBox
 AABounding box in local coordinate system.
 
BBox mBBox
 AABounding box in father coordinate system.
 
BBox mGlobalBBox
 AABounding box in global "world" coordinate system.
 

Detailed Description

OpenGL implementation of Orthographic Camera.

Attributes

Key : Size

Inherited Attributes

Inherited Methods

Member Function Documentation

◆ getRay()

void OpenGLCameraOrtho::getRay ( const kfloat &  ScreenX,
const kfloat &  ScreenY,
Point3D &  RayOrigin,
Vector3D &  RayDirection 
)
overridevirtual

get the ray from a pixel

Parameters
ScreenX: position in x axis of the pixel
ScreenY: position in y axis of the pixel
RayOrigin: origin of the ray (in/out param)
RayDirection: direction of the ray (in/out param)

Reimplemented from Camera.

◆ InitCullingObject()

void OpenGLCameraOrtho::InitCullingObject ( CullingObject mObj)
overridevirtual

initialize the culling on an object

Parameters
mObj: object to cull

Reimplemented from Camera.

◆ ProtectedSetActive()

bool OpenGLCameraOrtho::ProtectedSetActive ( TravState state)
overrideprotectedvirtual

enable the camera protection

Returns
true

Implements Camera.


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