Content


NTL
Core
ICamera

ICamera


This interface describes basic camera in 3D space.

You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.

class ICamera : public virtual IReleasable
{
protected:
    bool m_bPositionChanged;
    bool m_bMatrixChanged;
    nitisa::ProjectionMode m_eProjectionMode;
    nitisa::RotateOrder m_eRotateOrder;
    Vec3f m_sPosition;
    Vec3f m_sRotation;
    RectF m_sViewport;
    float m_fFOV;
    float m_fAspect;
    Vec2f m_sPlanes;
    Quaternion m_sTargetDirection;
    Quaternion m_sUpDirection;
    Quaternion m_sRightDirection;
    Vec2f m_sPitchLimits;
    Vec2f m_sYawLimits;
    Vec2f m_sRollLimits;
public:
    bool const &PositionChanged;
    bool const &MatrixChanged;
    nitisa::ProjectionMode const &ProjectionMode;
    nitisa::RotateOrder const &RotateOrder;
    Vec3f const &Position;
    float const &X;
    float const &Y;
    float const &Z;
    Vec3f const &Rotation;
    float const &Pitch;
    float const &Yaw;
    float const &Roll;
    RectF const &Viewport;
    float const &FOV;
    float const &Aspect;
    Vec2f const &Planes;
    float const &NearPlane;
    float const &FarPlane;
    Vec3f const &TargetDirection;
    Vec3f const &UpDirection;
    Vec3f const &RightDirection;
    Vec2f const &PitchLimits;
    Vec2f const &YawLimits;
    Vec2f const &RollLimits;

    virtual const Mat4f &getProjectionMatrix() = 0;
    virtual const Mat4f &getViewMatrix() = 0;
    virtual const Mat4f &getMatrix() = 0;
    virtual bool hasPitchLimits() const = 0;
    virtual bool hasYawLimits() const = 0;
    virtual bool hasRollLimits() const = 0;

    virtual bool setProjectionMode(const nitisa::ProjectionMode value) = 0;
    virtual bool setRotateOrder(const nitisa::RotateOrder value) = 0;
    virtual bool setPosition(const Vec3f &value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setX(const float value, const bool add = false, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setY(const float value, const bool add = false, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setZ(const float value, const bool add = false, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setRotation(const Vec3f &value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setPitch(const float value, const bool add = false, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setYaw(const float value, const bool add = false, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setRoll(const float value, const bool add = false, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setViewport(const RectF &value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setFOV(const float value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setAspect(const float value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setPlanes(const Vec2f &value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setNearPlane(const float value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setFarPlane(const float value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setPitchLimits(const Vec2f &value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0; // X >= Y(usually 1, -1) means no limit
    virtual bool setYawLimits(const Vec2f &value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;
    virtual bool setRollLimits(const Vec2f &value, const float relative_tolerance = ntl::RelativeTolerance<float>) = 0;

    virtual void MoveForward(const float delta) = 0;
    virtual void MoveBackward(const float delta) = 0;
    virtual void MoveLeft(const float delta) = 0;
    virtual void MoveRight(const float delta) = 0;
    virtual void MoveUp(const float delta) = 0;
    virtual void MoveDown(const float delta) = 0;

    virtual void TurnUp(const float delta) = 0;
    virtual void TurnDown(const float delta) = 0;
    virtual void TurnLeft(const float delta) = 0;
    virtual void TurnRight(const float delta) = 0;
    virtual void TiltLeft(const float delta) = 0;
    virtual void TiltRight(const float delta) = 0;
};
Namespace: nitisa
Include: Nitisa/Interfaces/ICamera.h