![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cCamera.h>
Public Member Functions | |
cCameraParams () | |
DECLARE_HEAP_ALIGNED_ALLOC (cCameraParams) | |
const cMatrix4x4f & | get_ProjMatrix () const |
const cMatrix4x4f & | get_ViewMatrix () const |
const cMatrix4x4f & | get_InvViewMatrix () const |
const cMatrix4x4f & | get_View0Matrix () const |
const cMatrix4x4f & | get_InvView0Matrix () const |
const cMatrix4x4f & | get_ViewProjMatrix () const |
bool | ClampProjectPos (cVector2f &posScreen) const |
bool | GetProjectPos (cVector2f &posScreen, const cVector3f &posTop) const |
GINTERSECT_TYPE | CheckBSphere (const cSpheref &sphere) const |
GINTERSECT_TYPE | CheckBSphere (const cVector3f &vCenter, float fRadius) const |
GINTERSECT_TYPE | CheckBSphereTrans (const cVector3f &vCenter, float fRadius) const |
void | UpdateMatrix () |
Update all camera params. More... | |
![]() | |
cCameraParamsBase () | |
const cVector3f & | get_Eye () const noexcept |
const cVector3f & | get_Ang () const noexcept |
Public Attributes | |
cRectI | m_ProjRect |
Cache projection dimension. More... | |
cVector3f | m_vAxisCam [AXIS_Trans] |
Derived params. must be recalculated when the camera moves. More... | |
![]() | |
cVector3f | m_vEye |
Location point POV eye of the camera. RADIANf_t. More... | |
cVector3f | m_vAng |
Euler Angle of the first person camera ray from the m_vEye. (RADIANf_t) Pitch, Bank, Heading. More... | |
METERSf_t | m_fFar |
Far plane distance from eye. More... | |
METERSf_t | m_fNear |
Near plane distance from eye. More... | |
Static Public Attributes | |
static const cVector3f | k_vLocalSide = cVector3f(1, 0, 0) |
AXIS_X for calculation of m_vAxisCam. More... | |
static const cVector3f | k_vLocalUp = cVector3f(0, 1, 0) |
AXIS_Y. More... | |
static const cVector3f | k_vLocalAhead = cVector3f(0, 0, 1) |
AXIS_Z. More... | |
Protected Member Functions | |
void | UpdateDerived () |
Protected Attributes | |
cMatrix4x4f | m_mProj |
Projection based on m_ProjRect. More... | |
cMatrix4x4f | m_mView |
Field of view. More... | |
cMatrix4x4f | m_mInvView |
Invert m_mView. More... | |
cMatrix4x4f | m_mView0 |
m_mView with put_Translation(0,0,0) More... | |
cMatrix4x4f | m_mInvView0 |
Invert m_mView0. More... | |
cMatrix4x4f | m_mViewProj |
Resultant m_mView * m_mProj. More... | |
cHexahedron | m_FrustumWindow |
Recalculate when window changes size. i.e m_mProj changes. More... | |
cCameraParamsBase + derived params. Allow basic position and calculations to be copied to another camera. All camera have these params.
Gray3D::cCameraParams::cCameraParams | ( | ) |
|
inline |
Is Sphere in frustum?
|
inline |
Is Sphere in frustum?
|
inline |
Takes sphere vCenter in m_mView WORLD coordinates
bool Gray3D::cCameraParams::ClampProjectPos | ( | cVector2f & | posScreen | ) | const |
Clamp the x,y value to the screen rectangle. ClampPtInRect()
Gray3D::cCameraParams::DECLARE_HEAP_ALIGNED_ALLOC | ( | cCameraParams | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the 3d position in the cameras projection 2d coordinates.
|
protected |
update stuff derived from m_mInvView0, m_mView and m_mProj
void Gray3D::cCameraParams::UpdateMatrix | ( | ) |
Update all camera params.
Given cCameraParamsBase m_vEye and m_vAng. Update my matrixes.
AXIS_X for calculation of m_vAxisCam.
|
protected |
Recalculate when window changes size. i.e m_mProj changes.
|
protected |
Invert m_mView.
|
protected |
Invert m_mView0.
|
protected |
Projection based on m_ProjRect.
|
protected |
Field of view.
|
protected |
m_mView with put_Translation(0,0,0)
|
protected |
Resultant m_mView * m_mProj.
cRectI Gray3D::cCameraParams::m_ProjRect |
Cache projection dimension.
In pixels of the camera view output.
cVector3f Gray3D::cCameraParams::m_vAxisCam[AXIS_Trans] |
Derived params. must be recalculated when the camera moves.
X, Y, Z transformed axis (Camera local)