![]() |
Kochol Game Engine
0.1.0
|
#include <TPCamera.h>
Public Member Functions | |
TPCamera (SceneManager *pSnMan, float distance, float theta, float phi, const math::Vector &target, const math::Vector &up) | |
Constructor. | |
TPCamera (SceneManager *pSnMan, const math::Vector &position, const math::Vector &target, const math::Vector &up) | |
Constructor. | |
void | PreRender (float elapsedTime=0.0f) |
The jobs before rendering like culling and calculate position. | |
void | Render () |
Render the objects. | |
void | PostRender () |
The jobs after rendering. | |
void | Draw (bool WithMaterial, bool WithTransform, bool bPosition, bool bNormalTexcoord, bool bTangentBinormal) |
void | Fallow (const sn::SceneNode *node) |
void | SetPosition (const math::Vector &position) |
Camera's position. | |
void | SetUpDir (const math::Vector &up) |
World's up. | |
void | SetTarget (const math::Vector &target) |
Sphere's center. | |
void | SetDistance (float distance) |
Sphere's radius. | |
void | SetTheta (float theta) |
Polar angle in radians. | |
void | SetThetaD (float theta) |
Polar angle in degrees. | |
void | SetPhi (float phi) |
Azimuth angle in radians. | |
void | SetPhiD (float phi) |
Azimuth angle in degrees. | |
void | SetFov (float fov) |
Field of view in radians. | |
void | SetFovD (float fov) |
Field of view in degrees. | |
void | SetNearValue (float nearZ) |
Z-value of the near view-plane. | |
void | SetFarValue (float farZ) |
Z-value of the far view-plane. | |
void | SetProjectionMatrix (const math::Matrix &projection) |
void | SetDelay (float delay) |
void | OnResize () |
void | RotateVer (float angle) |
void | RotateVerD (float angle) |
void | RotateHor (float angle) |
void | RotateHorD (float angle) |
void | Zoom (float scale) |
void | Shake (float magnitude, float duration) |
const math::Matrix & | GetViewMatrix () const |
Returns the view matrix. | |
const math::Matrix & | GetProjectionMatrix () const |
Returns the projection matrix. | |
float | GetFov () const |
float | GetFovD () const |
float | GetNearValue () const |
float | GetFarValue () const |
const math::Vector & | GetPosition () const |
Returns the node position. | |
const math::Vector & | GetUpDir () const |
const math::Vector & | GetTarget () const |
math::Vector | GetRightDir () const |
math::Vector | GetDirection () const |
float | GetDistance () const |
float | GetTheta () const |
float | GetThetaD () const |
float | GetPhi () const |
float | GetPhiD () const |
float | GetDelay () const |
bool | IsChanged () const |
const math::Frustum * | GetFrustum () const |
Returns the view frustum. | |
int | GetViewportWidth () const |
int | GetViewportHeight () const |
NodeType | GetType () const |
Returns the node type. | |
![]() | |
SceneNode () | |
Constructor. | |
virtual | ~SceneNode () |
Destructor. | |
virtual void | AddChild (SceneNode *child) |
Adds a node as child. | |
virtual bool | AddEffect (efx::EffectType p, efx::Effect **ppOut) |
virtual void | SetSceneManager (SceneManager *smgr) |
Sets the scene manager and renderer pointer. | |
virtual void | SetRotation (const math::Vector &v) |
Set the rotation of the scenenode. | |
virtual void | SetScale (const math::Vector &v) |
Set the scale of the scenenode. | |
virtual void | SetAutomaticCulling (bool isTrue) |
Set Cutting Enable or Disable. | |
virtual void | SetVisible (bool isVisible) |
Set Visible Enable or Disable. | |
virtual bool | GetVisible () |
Get Visible. | |
virtual bool | IsVisibleInFrame () |
Is it visible in this frame? | |
virtual const math::Vector & | GetRotation () const |
Returns the node rotation. | |
virtual const math::Vector & | GetScale () const |
Returns the node scale. | |
virtual math::Matrix * | GetAbsoluteMatrix () const |
Get the absolute matrix. | |
virtual math::Matrix * | GetFinalMatrix () |
Get the final matrix. | |
virtual u32 | GetMaterialCount () |
Get the count of materials this node has. | |
virtual gfx::Material * | GetMaterial (u32 Index) |
virtual math::Sphere * | GetBoundingBox () |
Returns the node bounding box. | |
virtual math::AABB * | GetAxisAlignedBoundingBox () |
Returns the node Axis aligned bounding box. | |
virtual void | RemoveChild (SceneNode *child) |
virtual void | RemoveChildren () |
Removes all children of this node. | |
virtual const SceneNode * | GetParent () |
Returns the node parent. | |
virtual void | SetParent (SceneNode *parent) |
Sets the node parent. | |
virtual void | SetName (const char *name) |
Sets the node name. | |
virtual core::String * | GetName () |
Gets the node name. | |
virtual void | SetID (int ID) |
Sets the node ID. | |
virtual int | GetID () |
Gets the node ID. | |
void | EnableShadow (bool enable) |
bool | HasShadow () const |
virtual void | UpdateFinalMat () |
Update final matrix. | |
![]() | |
KgeUnknown () | |
Constructor. | |
virtual | ~KgeUnknown () |
Destructor. | |
virtual void | AddRef () |
Add a reference to the object. | |
virtual void | DecRef () |
Decrease a reference from the object. if its reference count get 0 then the object will destroy. | |
u32 | GetRefCount () |
Return resource reference count. | |
const char * | GetDebugText () |
returns the instance debug text. |
Private Member Functions | |
TPCamera (const TPCamera &other) | |
Copy constructor. | |
TPCamera & | operator= (const TPCamera &other) |
Assignment operator. | |
void | ComputeProjectionMatrix () |
void | ComputeViewMatrix () |
Private Attributes | |
math::Vector | m_center |
float | m_radius |
float | m_inclination |
float | m_azimuth |
const float | m_minTheta |
const float | m_maxTheta |
math::Vector | m_position |
math::Vector | m_up |
math::Matrix | m_view |
math::Matrix | m_projection |
float | m_fov |
float | m_nearZ |
float | m_farZ |
math::Frustum | m_frustum |
int | m_vpWidth |
int | m_vpHeight |
bool | m_update |
bool | m_lerp |
bool | m_projChanged |
bool | m_viewChanged |
math::Vector | m_target0 |
math::Vector | m_target1 |
float | m_delay |
float | m_elapsed |
const sn::SceneNode * | m_fallowing |
float | m_shakeMagnitude |
float | m_shakeDuration |
float | m_shakeTime |
float | m_shaking |
math::Vector | m_tempEye |
math::Vector | m_tempTarget |
Additional Inherited Members | |
![]() | |
virtual bool | HasThisEffect (efx::EffectType p) |
![]() | |
core::String | m_sName |
int | m_iID |
SceneManager * | m_pSnMan |
gfx::Renderer * | m_pRenderer |
bool | m_bVis |
bool | m_bAutoCulling |
bool | m_bVisFrame |
SceneNode * | m_pParent |
std::vector< SceneNode * > | m_vChilds |
std::vector< int > | m_vEffectType |
std::vector< efx::Effect * > | m_vEffect |
math::Matrix * | m_pAbsMat |
math::Matrix * | m_pFinalMat |
math::Vector | m_Position |
math::Vector | m_Rotation |
math::Vector | m_Scale |
math::Sphere * | m_pBB |
math::AABB * | m_pAABB |
NodeType | m_eNodeType |
bool | m_hasShadow |
Definition at line 22 of file TPCamera.h.
|
private |
Copy constructor.
kge::sn::TPCamera::TPCamera | ( | SceneManager * | pSnMan, |
float | distance, | ||
float | theta, | ||
float | phi, | ||
const math::Vector & | target, | ||
const math::Vector & | up | ||
) |
Constructor.
kge::sn::TPCamera::TPCamera | ( | SceneManager * | pSnMan, |
const math::Vector & | position, | ||
const math::Vector & | target, | ||
const math::Vector & | up | ||
) |
Constructor.
|
private |
|
private |
|
virtual |
Draw the node with/without its Materials and Transforms.
WithMaterial | Draw it with its own materials or not? |
WithMaterial | Draw it with its own Transformations or not? |
Implements kge::sn::SceneNode.
|
inline |
Definition at line 50 of file TPCamera.h.
|
inline |
Definition at line 170 of file TPCamera.h.
math::Vector kge::sn::TPCamera::GetDirection | ( | ) | const |
|
inline |
Definition at line 155 of file TPCamera.h.
|
inline |
Definition at line 137 of file TPCamera.h.
|
inline |
Definition at line 128 of file TPCamera.h.
float kge::sn::TPCamera::GetFovD | ( | ) | const |
|
inline |
Returns the view frustum.
Definition at line 176 of file TPCamera.h.
|
inline |
Definition at line 134 of file TPCamera.h.
|
inline |
Definition at line 164 of file TPCamera.h.
References kge::math::PiOver2.
float kge::sn::TPCamera::GetPhiD | ( | ) | const |
|
inlinevirtual |
Returns the node position.
Reimplemented from kge::sn::SceneNode.
Definition at line 140 of file TPCamera.h.
|
inline |
Returns the projection matrix.
Definition at line 125 of file TPCamera.h.
math::Vector kge::sn::TPCamera::GetRightDir | ( | ) | const |
|
inline |
Definition at line 146 of file TPCamera.h.
|
inline |
Definition at line 158 of file TPCamera.h.
float kge::sn::TPCamera::GetThetaD | ( | ) | const |
|
inlinevirtual |
Returns the node type.
Reimplemented from kge::sn::SceneNode.
Definition at line 185 of file TPCamera.h.
References kge::sn::ENT_Camera.
|
inline |
Definition at line 143 of file TPCamera.h.
|
inline |
Returns the view matrix.
Definition at line 122 of file TPCamera.h.
|
inline |
Definition at line 182 of file TPCamera.h.
|
inline |
Definition at line 179 of file TPCamera.h.
|
inline |
Definition at line 173 of file TPCamera.h.
void kge::sn::TPCamera::OnResize | ( | ) |
|
virtual |
The jobs after rendering.
Implements kge::sn::SceneNode.
|
virtual |
The jobs before rendering like culling and calculate position.
Implements kge::sn::SceneNode.
|
virtual |
Render the objects.
Implements kge::sn::SceneNode.
void kge::sn::TPCamera::RotateHor | ( | float | angle | ) |
void kge::sn::TPCamera::RotateHorD | ( | float | angle | ) |
void kge::sn::TPCamera::RotateVer | ( | float | angle | ) |
void kge::sn::TPCamera::RotateVerD | ( | float | angle | ) |
|
inline |
Definition at line 92 of file TPCamera.h.
void kge::sn::TPCamera::SetDistance | ( | float | distance | ) |
Sphere's radius.
void kge::sn::TPCamera::SetFarValue | ( | float | farZ | ) |
Z-value of the far view-plane.
void kge::sn::TPCamera::SetFov | ( | float | fov | ) |
Field of view in radians.
void kge::sn::TPCamera::SetFovD | ( | float | fov | ) |
Field of view in degrees.
void kge::sn::TPCamera::SetNearValue | ( | float | nearZ | ) |
Z-value of the near view-plane.
void kge::sn::TPCamera::SetPhi | ( | float | phi | ) |
Azimuth angle in radians.
void kge::sn::TPCamera::SetPhiD | ( | float | phi | ) |
Azimuth angle in degrees.
|
virtual |
Camera's position.
Reimplemented from kge::sn::SceneNode.
|
inline |
Definition at line 89 of file TPCamera.h.
void kge::sn::TPCamera::SetTarget | ( | const math::Vector & | target | ) |
Sphere's center.
void kge::sn::TPCamera::SetTheta | ( | float | theta | ) |
Polar angle in radians.
void kge::sn::TPCamera::SetThetaD | ( | float | theta | ) |
Polar angle in degrees.
void kge::sn::TPCamera::SetUpDir | ( | const math::Vector & | up | ) |
World's up.
void kge::sn::TPCamera::Shake | ( | float | magnitude, |
float | duration | ||
) |
void kge::sn::TPCamera::Zoom | ( | float | scale | ) |
|
private |
Definition at line 199 of file TPCamera.h.
|
private |
Definition at line 196 of file TPCamera.h.
|
private |
Definition at line 223 of file TPCamera.h.
|
private |
Definition at line 224 of file TPCamera.h.
|
private |
Definition at line 225 of file TPCamera.h.
|
private |
Definition at line 211 of file TPCamera.h.
|
private |
Definition at line 209 of file TPCamera.h.
|
private |
Definition at line 212 of file TPCamera.h.
|
private |
Definition at line 198 of file TPCamera.h.
|
private |
Definition at line 218 of file TPCamera.h.
|
private |
Definition at line 201 of file TPCamera.h.
|
private |
Definition at line 200 of file TPCamera.h.
|
private |
Definition at line 210 of file TPCamera.h.
|
private |
Definition at line 205 of file TPCamera.h.
|
private |
Definition at line 219 of file TPCamera.h.
|
private |
Definition at line 208 of file TPCamera.h.
|
private |
Definition at line 197 of file TPCamera.h.
|
private |
Definition at line 229 of file TPCamera.h.
|
private |
Definition at line 228 of file TPCamera.h.
|
private |
Definition at line 230 of file TPCamera.h.
|
private |
Definition at line 231 of file TPCamera.h.
|
private |
Definition at line 221 of file TPCamera.h.
|
private |
Definition at line 222 of file TPCamera.h.
|
private |
Definition at line 232 of file TPCamera.h.
|
private |
Definition at line 233 of file TPCamera.h.
|
private |
Definition at line 206 of file TPCamera.h.
|
private |
Definition at line 217 of file TPCamera.h.
|
private |
Definition at line 207 of file TPCamera.h.
|
private |
Definition at line 220 of file TPCamera.h.
|
private |
Definition at line 214 of file TPCamera.h.
|
private |
Definition at line 213 of file TPCamera.h.