#ifndef SUBDIVISIONCANDIDATE_H #define SUBDIVISIONCANDIDATE_H #include "FlexibleHeap.h" using namespace std; namespace GtpVisibilityPreprocessor { /** Candidate for a view space / object space split. */ class SubdivisionCandidate: public Heapable { public: enum {OBJECT_SPACE, VIEW_SPACE}; /// the current split plane //AxisAlignedPlane mSplitPlane; /// split axis of this plane (0, 1, 2, or 3 if non-axis-aligned) int mSplitAxis; /// the number of misses of max cost ratio until this split int mMaxCostMisses; SubdivisionCandidate(): mRenderCostDecrease(0) {}; /*SubdivisionCandidate(const AxisAlignedPlane &plane): mSplitPlane(plane), mRenderCostDecrease(0) {}*/ virtual void EvalPriority() = 0; virtual int Type() const = 0; virtual bool GlobalTerminationCriteriaMet() const = 0; /** Set render cost decrease achieved through this split. */ void SetRenderCostDecrease(const float renderCostDecr) { mRenderCostDecrease = renderCostDecr; } float GetRenderCostDecrease() const { return mRenderCostDecrease; } protected: /// render cost decrease achieved through this split float mRenderCostDecrease; }; typedef FlexibleHeap SplitQueue; } // FLEXIBLEHEAP_H #endif