12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #ifndef CAMERA3D_H
- #define CAMERA3D_H
- #include "client/math/Vector3D.h"
- #include "client/math/Matrix3D.h"
- #include "client/math/Plane3D.h"
- class Camera3D
- {
- public:
- Camera3D();
- virtual ~Camera3D();
-
- bool isInFrustum(float x, float y, float z, float x2, float y2, float z2) const;
-
- void addToOldLengthAngle(float f);
-
- void storePosition();
- void setPosition(float x, float y, float z, float length, float width);
-
- const Vector3D& getFlatFront() const;
- const Vector3D& getFlatBack() const;
- const Vector3D& getFlatRight() const;
- const Vector3D& getFlatLeft() const;
- const Vector3D& getFlatUp() const;
- const Vector3D& getFlatDown() const;
-
- void update(float lag);
- const float* getViewMatrix();
- private:
- Vector3D oldCamera;
- Vector3D camera;
- float oldLengthAngle;
- float lengthAngle;
- float oldWidthAngle;
- float widthAngle;
-
- Vector3D front;
- Vector3D back;
- Vector3D right;
- Vector3D left;
- Vector3D up;
- Vector3D down;
-
- Vector3D flatFront;
- Vector3D flatBack;
- Vector3D flatRight;
- Vector3D flatLeft;
- Vector3D flatUp;
- Vector3D flatDown;
-
- Matrix3D view;
-
- Plane3D frustumPlanes[6];
- };
- #endif
|