123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- #pragma once
- #include "ISceneNode.h"
- #include "IEventReceiver.h"
- namespace irr
- {
- namespace scene
- {
- struct SViewFrustum;
- class ICameraSceneNode : public ISceneNode, public IEventReceiver
- {
- public:
-
- ICameraSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id,
- const core::vector3df &position = core::vector3df(0, 0, 0),
- const core::vector3df &rotation = core::vector3df(0, 0, 0),
- const core::vector3df &scale = core::vector3df(1.0f, 1.0f, 1.0f)) :
- ISceneNode(parent, mgr, id, position, rotation, scale),
- IsOrthogonal(false) {}
-
-
- virtual void setProjectionMatrix(const core::matrix4 &projection, bool isOrthogonal = false) = 0;
-
-
- virtual const core::matrix4 &getProjectionMatrix() const = 0;
-
-
- virtual const core::matrix4 &getViewMatrix() const = 0;
-
-
- virtual void setViewMatrixAffector(const core::matrix4 &affector) = 0;
-
-
- virtual const core::matrix4 &getViewMatrixAffector() const = 0;
-
-
- bool OnEvent(const SEvent &event) override = 0;
-
-
- virtual void setTarget(const core::vector3df &pos) = 0;
-
-
- void setRotation(const core::vector3df &rotation) override = 0;
-
-
- virtual const core::vector3df &getTarget() const = 0;
-
-
- virtual void setUpVector(const core::vector3df &pos) = 0;
-
-
- virtual const core::vector3df &getUpVector() const = 0;
-
-
- virtual f32 getNearValue() const = 0;
-
-
- virtual f32 getFarValue() const = 0;
-
-
- virtual f32 getAspectRatio() const = 0;
-
-
- virtual f32 getFOV() const = 0;
-
-
- virtual void setNearValue(f32 zn) = 0;
-
-
- virtual void setFarValue(f32 zf) = 0;
-
-
- virtual void setAspectRatio(f32 aspect) = 0;
-
-
- virtual void setFOV(f32 fovy) = 0;
-
-
- virtual const SViewFrustum *getViewFrustum() const = 0;
-
-
- virtual void setInputReceiverEnabled(bool enabled) = 0;
-
- virtual bool isInputReceiverEnabled() const = 0;
-
- virtual bool isOrthogonal() const
- {
- return IsOrthogonal;
- }
-
-
- virtual void bindTargetAndRotation(bool bound) = 0;
-
- virtual void updateMatrices() = 0;
-
-
- virtual bool getTargetAndRotationBinding(void) const = 0;
- protected:
- void cloneMembers(const ICameraSceneNode *toCopyFrom)
- {
- IsOrthogonal = toCopyFrom->IsOrthogonal;
- }
- bool IsOrthogonal;
- };
- }
- }
|