Stellarium  1.2
Public Types | Public Member Functions | Data Fields
Frustum Class Reference

Public Types

enum  Corner {
  NBL = 0, NBR, NTR, NTL,
  FBL, FBR, FTR, FTL,
  CORNERCOUNT
}
 
enum  FrustumPlane {
  NEARP = 0, FARP, LEFT, RIGHT,
  BOTTOM, TOP, PLANECOUNT
}
 
enum  { OUTSIDE, INTERSECT, INSIDE }
 

Public Member Functions

void setCamInternals (float fov, float aspect, float zNear, float zFar)
 
void calcFrustum (const Vec3d &p, const Vec3d &l, const Vec3d &u)
 
const Vec3fgetCorner (const Corner corner) const
 
const PlanegetPlane (const FrustumPlane plane) const
 
int pointInFrustum (const Vec3f &p)
 
int boxInFrustum (const AABBox &bbox)
 
void drawFrustum () const
 
void saveDrawingCorners ()
 
void resetCorners ()
 

Data Fields

float fov
 
float aspect
 
float zNear
 
float zFar
 
Mat4d m
 
AABBox bbox
 
std::vector< Vec3fdrawCorners
 
AABBox drawBbox
 
std::vector< Vec3fcorners
 
std::vector< Plane * > planes