orx  1.14
Portable Game Engine
OrxCamera

Macros

#define orxCAMERA_KU32_FLAG_2D   0x00000001
 
#define orxCAMERA_KU32_FLAG_NONE   0x00000000
 
#define orxCAMERA_KU32_GROUP_ID_NUMBER   32
 
#define orxCAMERA_KU32_MASK_USER_ALL   0x000000FF
 

Typedefs

typedef struct __orxCAMERA_t orxCAMERA
 

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxCamera_AddGroupID (orxCAMERA *_pstCamera, orxSTRINGID _stGroupID, orxBOOL _bAddFirst)
 
orxDLLAPI orxCAMERA *orxFASTCALL orxCamera_Create (orxU32 _u32Flags)
 
orxDLLAPI orxCAMERA *orxFASTCALL orxCamera_CreateFromConfig (const orxSTRING _zConfigID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_Delete (orxCAMERA *_pstCamera)
 
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_EnableGroupIDSorting (orxCAMERA *_pstCamera, orxU32 _u32Index, orxBOOL _bEnable)
 
orxDLLAPI void orxFASTCALL orxCamera_Exit ()
 
orxDLLAPI orxCAMERA *orxFASTCALL orxCamera_Get (const orxSTRING _zName)
 
orxDLLAPI orxFRAME *orxFASTCALL orxCamera_GetFrame (const orxCAMERA *_pstCamera)
 
orxDLLAPI orxAABOX *orxFASTCALL orxCamera_GetFrustum (const orxCAMERA *_pstCamera, orxAABOX *_pstFrustum)
 
orxDLLAPI orxSTRINGID orxFASTCALL orxCamera_GetGroupID (const orxCAMERA *_pstCamera, orxU32 _u32Index)
 
orxDLLAPI orxU32 orxFASTCALL orxCamera_GetGroupIDCount (const orxCAMERA *_pstCamera)
 
orxDLLAPI const orxSTRING orxFASTCALL orxCamera_GetName (const orxCAMERA *_pstCamera)
 
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxCamera_GetParent (const orxCAMERA *_pstCamera)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxCamera_GetPosition (const orxCAMERA *_pstCamera, orxVECTOR *_pvPosition)
 
orxDLLAPI orxFLOAT orxFASTCALL orxCamera_GetRotation (const orxCAMERA *_pstCamera)
 
orxDLLAPI orxFLOAT orxFASTCALL orxCamera_GetZoom (const orxCAMERA *_pstCamera)
 
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_Init ()
 
orxDLLAPI orxBOOL orxFASTCALL orxCamera_IsGroupIDSortingEnabled (const orxCAMERA *_pstCamera, orxU32 _u32Index)
 
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_RemoveGroupID (orxCAMERA *_pstCamera, orxSTRINGID _stGroupID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_SetFrustum (orxCAMERA *_pstCamera, orxFLOAT _fWidth, orxFLOAT _fHeight, orxFLOAT _fNear, orxFLOAT _fFar)
 
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_SetParent (orxCAMERA *_pstCamera, void *_pParent)
 
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_SetPosition (orxCAMERA *_pstCamera, const orxVECTOR *_pvPosition)
 
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_SetRotation (orxCAMERA *_pstCamera, orxFLOAT _fRotation)
 
orxDLLAPI void orxFASTCALL orxCamera_Setup ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_SetZoom (orxCAMERA *_pstCamera, orxFLOAT _fZoom)
 

Detailed Description

Camera Module Allows to creates and handle cameras Camera are structures used to render graphic (2D/3D) objects They thus can be referenced by other structures

Macro Definition Documentation

#define orxCAMERA_KU32_FLAG_2D   0x00000001

2D flag

Definition at line 60 of file orxCamera.h.

#define orxCAMERA_KU32_FLAG_NONE   0x00000000

Anim flagsNo flags

Definition at line 58 of file orxCamera.h.

#define orxCAMERA_KU32_GROUP_ID_NUMBER   32

Misc

Definition at line 67 of file orxCamera.h.

#define orxCAMERA_KU32_MASK_USER_ALL   0x000000FF

User all mask

Definition at line 62 of file orxCamera.h.

Typedef Documentation

typedef struct __orxCAMERA_t orxCAMERA

Internal camera structure

Definition at line 72 of file orxCamera.h.

Function Documentation

orxDLLAPI orxSTATUS orxFASTCALL orxCamera_AddGroupID ( orxCAMERA _pstCamera,
orxSTRINGID  _stGroupID,
orxBOOL  _bAddFirst 
)

Adds a group ID to a camera

Parameters
[in]_pstCameraConcerned camera
[in]_stGroupIDID of the group to add
[in]_bAddFirstIf true this group will be used before any already added ones, otherwise it'll be used after all of them
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxCAMERA* orxFASTCALL orxCamera_Create ( orxU32  _u32Flags)

Creates a camera

Parameters
[in]_u32FlagsCamera flags (2D / ...)
Returns
Created orxCAMERA / orxNULL
orxDLLAPI orxCAMERA* orxFASTCALL orxCamera_CreateFromConfig ( const orxSTRING  _zConfigID)

Creates a camera from config

Parameters
[in]_zConfigIDConfig ID @ return orxCAMERA / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_Delete ( orxCAMERA _pstCamera)

Deletes a camera

Parameters
[in]_pstCameraCamera to delete
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_EnableGroupIDSorting ( orxCAMERA _pstCamera,
orxU32  _u32Index,
orxBOOL  _bEnable 
)

Enables/disables sorting for a group ID.

Parameters
[in]_pstCameraConcerned camera
[in]_u32IndexIndex of group ID to update
[in]_bEnableEnable / disable sorting
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxCamera_Exit ( )

Exits from the Camera module

orxDLLAPI orxCAMERA* orxFASTCALL orxCamera_Get ( const orxSTRING  _zName)

Gets camera given its name

Parameters
[in]_zNameCamera name
Returns
orxCAMERA / orxNULL
orxDLLAPI orxFRAME* orxFASTCALL orxCamera_GetFrame ( const orxCAMERA _pstCamera)

Gets camera frame

Parameters
[in]_pstCameraConcerned camera
Returns
orxFRAME
orxDLLAPI orxAABOX* orxFASTCALL orxCamera_GetFrustum ( const orxCAMERA _pstCamera,
orxAABOX _pstFrustum 
)

Gets camera frustum (3D box for 2D camera)

Parameters
[in]_pstCameraConcerned camera
[out]_pstFrustumFrustum box
Returns
Frustum orxAABOX
orxDLLAPI orxSTRINGID orxFASTCALL orxCamera_GetGroupID ( const orxCAMERA _pstCamera,
orxU32  _u32Index 
)

Gets the group ID of a camera at the given index

Parameters
[in]_pstCameraConcerned camera
[in]_u32IndexIndex of group ID
Returns
Group ID if index is valid, orxSTRINGID_UNDEFINED otherwise
orxDLLAPI orxU32 orxFASTCALL orxCamera_GetGroupIDCount ( const orxCAMERA _pstCamera)

Gets number of group IDs of camera

Parameters
[in]_pstCameraConcerned camera
Returns
Number of group IDs of this camera
orxDLLAPI const orxSTRING orxFASTCALL orxCamera_GetName ( const orxCAMERA _pstCamera)

Gets camera config name

Parameters
[in]_pstCameraConcerned camera
Returns
orxSTRING / orxSTRING_EMPTY
orxDLLAPI orxSTRUCTURE* orxFASTCALL orxCamera_GetParent ( const orxCAMERA _pstCamera)

Gets camera parent

Parameters
[in]_pstCameraConcerned camera
Returns
Parent (object, spawner, camera or frame) / orxNULL
orxDLLAPI orxVECTOR* orxFASTCALL orxCamera_GetPosition ( const orxCAMERA _pstCamera,
orxVECTOR _pvPosition 
)

Get camera position

Parameters
[in]_pstCameraConcerned camera
[out]_pvPositionCamera position
Returns
orxVECTOR
orxDLLAPI orxFLOAT orxFASTCALL orxCamera_GetRotation ( const orxCAMERA _pstCamera)

Get camera rotation

Parameters
[in]_pstCameraConcerned camera
Returns
Rotation value (radians)
orxDLLAPI orxFLOAT orxFASTCALL orxCamera_GetZoom ( const orxCAMERA _pstCamera)

Get camera zoom

Parameters
[in]_pstCameraConcerned camera
Returns
Zoom value
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_Init ( )

Inits the Camera module

orxDLLAPI orxBOOL orxFASTCALL orxCamera_IsGroupIDSortingEnabled ( const orxCAMERA _pstCamera,
orxU32  _u32Index 
)

Is sorting enabled for a group ID?

Parameters
[in]_pstCameraConcerned camera
[in]_u32IndexIndex of group ID to update
Returns
orxTRUE / orxFALSE
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_RemoveGroupID ( orxCAMERA _pstCamera,
orxSTRINGID  _stGroupID 
)

Removes a group ID from a camera

Parameters
[in]_pstCameraConcerned camera
[in]_stGroupIDID of the group to remove
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_SetFrustum ( orxCAMERA _pstCamera,
orxFLOAT  _fWidth,
orxFLOAT  _fHeight,
orxFLOAT  _fNear,
orxFLOAT  _fFar 
)

Sets camera frustum

Parameters
[in]_pstCameraConcerned camera
[in]_fWidthWidth of frustum
[in]_fHeightHeight of frustum
[in]_fNearNear distance of frustum
[in]_fFarFar distance of frustum
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_SetParent ( orxCAMERA _pstCamera,
void _pParent 
)

Sets camera parent

Parameters
[in]_pstCameraConcerned camera
[in]_pParentParent structure to set (object, spawner, camera or frame) / orxNULL
Returns
orsSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_SetPosition ( orxCAMERA _pstCamera,
const orxVECTOR _pvPosition 
)

Sets camera position

Parameters
[in]_pstCameraConcerned camera
[in]_pvPositionCamera position
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxCamera_SetRotation ( orxCAMERA _pstCamera,
orxFLOAT  _fRotation 
)

Sets camera rotation

Parameters
[in]_pstCameraConcerned camera
[in]_fRotationCamera rotation (radians)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxCamera_Setup ( )

Camera module setup

orxDLLAPI orxSTATUS orxFASTCALL orxCamera_SetZoom ( orxCAMERA _pstCamera,
orxFLOAT  _fZoom 
)

Sets camera zoom

Parameters
[in]_pstCameraConcerned camera
[in]_fZoomCamera zoom
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Generated for orx by doxygen 1.8.11