#ifndef _SamplingPreprocessor_H__ #define _SamplingPreprocessor_H__ #include using namespace std; #include "Preprocessor.h" #include "VssRay.h" namespace GtpVisibilityPreprocessor { class Exporter; /** Sampling based visibility preprocessing. The implementation is based on heuristical sampling of view space */ class SamplingPreprocessor : public Preprocessor { public: SamplingPreprocessor(); ~SamplingPreprocessor(); virtual bool ComputeVisibility(); protected: /** Sets up ray for sampling. */ void SetupRay(Ray &ray, const Vector3 &point, const Vector3 &direction, const int type, const Ray::Intersection &source); /** Verify if the exact visibility for this object was established. */ void VerifyVisibility(Intersectable *object); protected: int mPass; ObjectContainer mObjects; RayContainer mSampleRays; VssRayContainer mVssSampleRays; }; } #endif