source: branches/VUT/0.2/GtpVisibilityPreprocessor/src/Intersectable.h @ 176

Revision 176, 772 bytes checked in by bittner, 19 years ago (diff)

cosine sampling bug fixed

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 };
16 
17  Intersectable():mailbox(0) {}
18 
19  void Mail() { mailbox = mailID; }
20  static void NewMail() { mailID++; }
21  bool Mailed() const { return mailbox == mailID; }
22 
23  virtual AxisAlignedBox3 GetBox() = 0;
24 
25  virtual int CastRay(Ray &ray) = 0;
26 
27  virtual bool IsConvex() = 0;
28  virtual bool IsWatertight() = 0;
29  virtual float IntersectionComplexity() = 0;
30 
31  virtual int Type() const = 0;
32
33  virtual void GetRandomSurfacePoint(Vector3 &point, Vector3 &normal) = 0;
34
35};
36
37
38#endif
Note: See TracBrowser for help on using the repository browser.