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

Revision 308, 829 bytes checked in by mattausch, 19 years ago (diff)

bsp tree view cells sampling possible

RevLine 
[162]1#ifndef __INTERSECTABLE_H
2#define __INTERSECTABLE_H
3
[176]4#include "AxisAlignedBox3.h"
5#include "Pvs.h"
[162]6
[176]7
[162]8class Intersectable {
[176]9public:
10  static int mailID;
11  int mailbox;
12
13  KdPvs mKdPvs;
[162]14 
[308]15  enum { MESH_INSTANCE, TRANSFORMED_MESH_INSTANCE, SPHERE, VIEW_CELL };
[162]16 
[176]17  Intersectable():mailbox(0) {}
18 
19  void Mail() { mailbox = mailID; }
20  static void NewMail() { mailID++; }
21  bool Mailed() const { return mailbox == mailID; }
[245]22  int IncMail() { return ++mailbox - mailID; }
23
[176]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
[162]36};
37
38
39#endif
Note: See TracBrowser for help on using the repository browser.