Field3D
|
#include <Field.h>
Public Types | |
typedef ResizableField< Data_T > | class_type |
typedef boost::intrusive_ptr < ResizableField > | Ptr |
Public Member Functions | |
void | copyFrom (typename Field< Data_T >::Ptr other) |
Copies the data from another Field, also resizes. | |
template<class Data_T2 > | |
void | copyFrom (typename Field< Data_T2 >::Ptr other) |
Copies the data from another Field of another template class, also resizes. | |
void | matchDefinition (FieldRes::Ptr fieldToMatch) |
Sets up this field so that resolution and mapping matches the other. | |
void | setSize (const V3i &size) |
Resizes the object. | |
void | setSize (const Box3i &extents) |
Resizes the object. | |
void | setSize (const Box3i &extents, const Box3i &dataWindow) |
Resizes the object. | |
void | setSize (const V3i &size, int padding) |
Resizes the object with padding. | |
Static Public Member Functions | |
static const char * | classType () |
static const char * | staticClassName () |
Public Attributes | |
DEFINE_FIELD_RTTI_ABSTRACT_CLASS | |
Protected Types | |
typedef WritableField< Data_T > | base |
Protected Member Functions | |
virtual void | sizeChanged () |
Subclasses should re-implement this if they need to perform memory allocations, etc. every time the size of the storage changes. | |
Static Protected Attributes | |
static TemplatedFieldType < ResizableField< Data_T > > | ms_classType |
This class adds the ability to resize the data storage object. Most Field subclasses will derive from this class. Only classes that cannot implement sizeChanged() in a reasonable manner should derive from Field or WritableField.
typedef boost::intrusive_ptr<ResizableField> ResizableField::Ptr |
Reimplemented from WritableField< Data_T >.
Reimplemented in SparseField, MACField, DenseField, and EmptyField.
typedef ResizableField<Data_T> ResizableField::class_type |
Reimplemented from WritableField< Data_T >.
Reimplemented in SparseField, DenseField, EmptyField, and MACField.
typedef WritableField<Data_T> ResizableField::base [protected] |
Reimplemented from WritableField< Data_T >.
Reimplemented in SparseField, MACField, EmptyField, and DenseField.
static const char* ResizableField::staticClassName | ( | ) | [inline, static] |
Reimplemented from WritableField< Data_T >.
Reimplemented in SparseField, DenseField, and MACField.
Definition at line 812 of file Field.h.
{ return "ResizableField"; }
static const char* ResizableField::classType | ( | ) | [inline, static] |
Reimplemented from WritableField< Data_T >.
Reimplemented in SparseField, DenseField, EmptyField, and MACField.
Definition at line 817 of file Field.h.
{ return ResizableField<Data_T>::ms_classType.name(); }
void ResizableField::setSize | ( | const V3i & | size | ) |
Resizes the object.
Referenced by DenseFieldIO::readData(), ResizableField< Data_T >::setSize(), ResizableField< Data_T >::copyFrom(), ResizableField< Data_T >::matchDefinition(), Field3DInputFile::readProxyLayer(), convertCellCenteredToMAC(), MACFieldIO::read(), and SparseFieldIO::read().
void ResizableField::setSize | ( | const Box3i & | extents | ) |
Resizes the object.
Resizes the object.
void ResizableField::setSize | ( | const V3i & | size, |
int | padding | ||
) |
Resizes the object with padding.
Copies the data from another Field, also resizes.
Copies the data from another Field of another template class, also resizes.
void ResizableField::matchDefinition | ( | FieldRes::Ptr | fieldToMatch | ) |
Sets up this field so that resolution and mapping matches the other.
virtual void ResizableField::sizeChanged | ( | ) | [inline, protected, virtual] |
Subclasses should re-implement this if they need to perform memory allocations, etc. every time the size of the storage changes.
Reimplemented in SparseField, MACField, and DenseField.
Definition at line 866 of file Field.h.
Referenced by ResizableField< Data_T >::setSize().
{ base::m_mapping->setExtents(base::m_extents); }
Reimplemented from WritableField< Data_T >.
TemplatedFieldType<ResizableField<Data_T> > ResizableField::ms_classType [static, protected] |
Reimplemented from WritableField< Data_T >.
Reimplemented in SparseField, MACField, and DenseField.