source: trunk/VUT/GtpVisibilityPreprocessor/src/Intersectable.h @ 245

Revision 245, 828 bytes checked in by bittner, 19 years ago (diff)

Merged sources with ViewCellBsp?

Line 
1#ifndef __INTERSECTABLE_H
2#define __INTERSECTABLE_H
3
4#include "AxisAlignedBox3.h"
5#include "Pvs.h"
6
7
8class Intersectable {
9public:
10  static int mailID;
11  int mailbox;
12
13  KdPvs mKdPvs;
14 
15  enum { MESH_INSTANCE, TRANSFORMED_MESH_INSTANCE, SPHERE, VIEWCELL };
16 
17  Intersectable():mailbox(0) {}
18 
19  void Mail() { mailbox = mailID; }
20  static void NewMail() { mailID++; }
21  bool Mailed() const { return mailbox == mailID; }
22  int IncMail() { return ++mailbox - mailID; }
23
24  virtual AxisAlignedBox3 GetBox() = 0;
25 
26  virtual int CastRay(Ray &ray) = 0;
27 
28  virtual bool IsConvex() = 0;
29  virtual bool IsWatertight() = 0;
30  virtual float IntersectionComplexity() = 0;
31 
32  virtual int Type() const = 0;
33
34  virtual void GetRandomSurfacePoint(Vector3 &point, Vector3 &normal) = 0;
35
36};
37
38
39#endif
Note: See TracBrowser for help on using the repository browser.