45 #ifndef _INCLUDED_Field3D_MIPBase_H_ 46 #define _INCLUDED_Field3D_MIPBase_H_ 69 template <
class Field_T>
76 typedef boost::shared_ptr<LazyLoadAction<Field_T> >
Ptr;
77 typedef std::vector<Ptr>
Vec;
86 virtual typename Field_T::Ptr
load()
const = 0;
114 template <
class Data_T>
122 typedef boost::intrusive_ptr<MIPBase>
Ptr;
147 virtual Data_T mipValue(
size_t level,
int i,
int j,
int k)
const = 0;
153 virtual bool levelLoaded(
const size_t level)
const = 0;
157 virtual void getVsMIPCoord(
const V3f &vsP,
const size_t level,
158 V3f &outVsP)
const = 0;
168 void setLowestLevel(
size_t level);
171 {
return m_lowestLevel; }
174 {
return m_numLevels; }
200 template <
typename Data_T>
202 : m_numLevels(1), m_lowestLevel(0)
209 template <
typename Data_T>
227 #endif // Include guard #define FIELD3D_NAMESPACE_HEADER_CLOSE
Contains typedefs for the commonly used types in Field3D.
Contains base class for reference counting with Mutex.
size_t numLevels() const
Number of MIP levels.
size_t lowestLevel() const
Lowest MIP level to use.
boost::intrusive_ptr< MIPBase > Ptr
size_t m_lowestLevel
The lowest MIP level to use. Defaults to 0, but can be set higher to prevent high resolution levels f...
static TemplatedFieldType< MIPBase< Data_T > > ms_classType
FIELD3D_CLASSTYPE_TEMPL_INSTANTIATION(MIPBase)
Used to return a string for the name of a templated field.
static const char * staticClassName()
boost::shared_ptr< LazyLoadAction< Field_T > > Ptr
size_t m_numLevels
Number of MIP levels. The default is 1.
Contains Field, WritableField and ResizableField classes.
DEFINE_FIELD_RTTI_ABSTRACT_CLASS
FIELD3D_API V3i mipResolution(const V3i &baseRes, const size_t level)
MIPBase< Data_T > class_type
virtual ~LazyLoadAction()
static const char * staticClassType()
void setLowestLevel(size_t level)
Sets the lowest MIP level to use. Defaults to zero, but can be set higher to prevent high resolution ...
virtual Field_T::Ptr load() const =0
Performs the loading of the pre-determined field and returns a pointer to it.
boost::intrusive_ptr< Field > Ptr
std::string name
Optional name of the field.