KrisLibrary  1.0.0
camera/clip.h
1 #ifndef CAMERA_CLIP_H
2 #define CAMERA_CLIP_H
3 
4 // INCLUSION: The object is completely inside the volume.
5 // (completely visible)
6 #define INCLUSION -1
7 // INTERSECT: The object intersects with one of more of the
8 // volume's planes. (partially visible)
9 #define INTERSECT 0
10 // EXCLUSION: The object is completely outside the volume.
11 // (invisible)
12 #define EXCLUSION 1
13 
14 #include <KrisLibrary/math3d/geometry3d.h>
15 #include <vector>
16 using namespace Math3D;
17 
18 //NOTE: the planes are defined so that normals point outward
20 {
21 public:
22  int PointOverlap(const Vector3& pt) const;
23  int AABBOverlap(const Vector3& bMin, const Vector3& bMax) const;
24  int LineOverlap(const Line3D& pt, Real& tmin, Real& tmax) const;
25 
26  void Transform(const Matrix4& m);
27  void SetTransform(const ConvexVolume&,const Matrix4& m);
28 
29  std::vector<Plane3D> planes;
30 };
31 
32 #endif
A 3D vector class.
Definition: math3d/primitives.h:136
Definition: camera/clip.h:19
A 4x4 matrix class.
Definition: math3d/primitives.h:626
Contains all the definitions in the Math3D package.
Definition: AnyGeometry.h:12
A 3D line class.
Definition: Line3D.h:18