00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GLUONGRAPHICS_FRUSTUM_H
00021 #define GLUONGRAPHICS_FRUSTUM_H
00022
00023 #include "gluon_graphics_export.h"
00024
00025 class QRectF;
00026 class QSizeF;
00027 class QMatrix4x4;
00028 class QVector3D;
00029
00030 namespace GluonGraphics
00031 {
00041 class GLUON_GRAPHICS_EXPORT Frustrum
00042 {
00043 public:
00049 Frustrum();
00050
00054 virtual ~Frustrum();
00055
00056 Frustrum( const Frustrum& other );
00057
00058 Frustrum& operator=( const Frustrum& other );
00059
00065 QMatrix4x4 projectionMatrix();
00066
00075 bool containsPoint( const QVector3D& point );
00076
00087 bool containsSphere( const QVector3D& point, float radius );
00088
00094 float nearPlane();
00095
00101 float farPlane();
00102
00110 QRectF viewPlane();
00111
00122 void setOrthographic( float left, float right, float bottom, float top, float near, float far );
00123
00136 void setOrthoAdjusted( const QSizeF& area, float aspect, float near, float far );
00137
00146 void setPerspective( float fov, float aspect, float near, float far );
00147
00153 void updateFrustrum( float aspect );
00154
00155 private:
00156 class FrustrumPrivate;
00157 FrustrumPrivate* const d;
00158 };
00159
00160 }
00161
00162 #endif // GLUONGRAPHICS_FRUSTUM_H