source: GTP/trunk/Lib/Vis/Preprocessing/src/HavranRayCaster.h @ 2582

Revision 2582, 2.2 KB checked in by bittner, 17 years ago (diff)

Havran Ray Caster compiles and links, but still does not work

Line 
1#ifndef _HavranRayCaster_H__
2#define _HavranRayCaster_H__
3
4#include "RayCaster.h"
5#include "Containers.h"
6#include <string>
7#include "havran/raypack.h"
8
9
10namespace GtpVisibilityPreprocessor {
11
12
13class Intersectable;
14class VssRay;
15class KdTree;
16class Ray;
17class RayPacket2x2;
18class SimpleRayContainer;
19class AxisAlignedBox3;
20class Vector3;
21struct VssRayContainer;
22class Preprocessor;
23struct SimpleRay;
24class CKTB;
25 
26
27/** This class provides an interface for ray casting.
28*/
29class HavranRayCaster: public RayCaster
30{
31public:
32  /** Default constructor initialising e.g., KD tree
33   */
34  HavranRayCaster(const Preprocessor &preprocessor);
35  virtual ~HavranRayCaster();
36
37  void Build(ObjectContainer &objlist);
38 
39  int Type() const { return HAVRAN_RAYCASTER; }
40
41  // Using packet of 4 rays supposing that these are coherent
42  // We give a box to which each ray is clipped to before the
43  // ray shooting is computed !
44  virtual void CastRaysPacket4(Vector3 &minBox,
45                               Vector3 &maxBox,
46                               Vector3 origin4[],
47                               Vector3 direction4[],
48                               int     result4[],
49                               float   dist4[]);
50 
51  virtual int CastRay(
52                      const SimpleRay &simpleRay,
53                      VssRayContainer &vssRays,
54                      const AxisAlignedBox3 &box,
55                      const bool castDoubleRay,
56                      const bool pruneInvalidRays = true
57                      );
58 
59  virtual void CastRays16(SimpleRayContainer &rays,
60                          VssRayContainer &vssRays,
61                          const AxisAlignedBox3 &sbox,
62                          const bool castDoubleRay,
63                          const bool pruneInvalidRays = true
64                          );
65
66  virtual void CastRays16(SimpleRayContainer &rays,
67                          int offset,
68                          VssRayContainer &vssRays,
69                          const AxisAlignedBox3 &sbox,
70                          const bool castDoubleRay,
71                          const bool pruneInvalidRays = true
72                          ); 
73  void
74  CastSimpleForwardRays(SimpleRayContainer &rays,
75                        const AxisAlignedBox3 &sbox
76                        );
77
78  virtual void CastRays(
79                        SimpleRayContainer &rays,
80                        VssRayContainer &vssRays,
81                        const AxisAlignedBox3 &sbox,
82                        const bool castDoubleRay,
83                        const bool pruneInvalidRays = true);
84protected:
85  CKTB *mKtbtree;
86  static RayPacket2x2 raypack;
87};
88
89
90} // namespace
91
92#endif
Note: See TracBrowser for help on using the repository browser.