#ifndef _IntelRayCaster_H__ #define _IntelRayCaster_H__ #include "RayCaster.h" #include namespace GtpVisibilityPreprocessor { class Intersectable; class VssRay; class KdTree; class Ray; class SimpleRayContainer; class AxisAlignedBox3; class Vector3; struct VssRayContainer; class Preprocessor; struct SimpleRay; /** This class provides an interface for ray casting. */ class IntelRayCaster: public RayCaster { public: /** Default constructor initialising e.g., KD tree and BSP tree. */ IntelRayCaster(const Preprocessor &preprocessor, const std::string externKdTree); virtual ~IntelRayCaster(); int Type() const { return INTEL_RAYCASTER; } // Using packet of 4 rays supposing that these are coherent // We give a box to which each ray is clipped to before the // ray shooting is computed ! virtual void CastRaysPacket4(const Vector3 &minBox, const Vector3 &maxBox, const Vector3 origin4[], const Vector3 direction4[], int result4[], float dist4[]); virtual int CastRay(const SimpleRay &simpleRay, VssRayContainer &vssRays, const AxisAlignedBox3 &box, const bool castDoubleRay, const bool pruneInvalidRays = true); virtual void CastRays16( SimpleRayContainer &rays, VssRayContainer &vssRays, const AxisAlignedBox3 &sbox, const bool castDoubleRay, const bool pruneInvalidRays = true); virtual void CastRays16( SimpleRayContainer &rays, const int offset, VssRayContainer &vssRays, const AxisAlignedBox3 &sbox, const bool castDoubleRay, const bool pruneInvalidRays = true); void CastSimpleForwardRays( SimpleRayContainer &rays, const AxisAlignedBox3 &sbox ); virtual void CastRays( SimpleRayContainer &rays, VssRayContainer &vssRays, const AxisAlignedBox3 &sbox, const bool castDoubleRay, const bool pruneInvalidRays = true); protected: bool InitRayCast(const std::string externKdTree); }; } #endif