OpenMesh.Core.Utils.BaseProperty
- class
BaseProperty
;
- \class
BaseProperty
Property.d
Abstract class defining the basic interface of a dynamic property.
- static const uint
UnknownSize
;
- Indicates an error when a size is returned by a member.
- this(char[] _name = "<unknown>");
- \brief Default constructor.
In %OpenMesh all mesh data is stored in so-called properties.
We distinuish between standard properties, which can be defined at
compile time using the Attributes in the traits definition and
at runtime using the request property functions defined in one of
the kernels.
If the property should be stored along with the default properties
in the OM-format one must name the property and enable the persistant
flag with set_persistent().
\param name Optional textual name for the property.
- void
copy
(BaseProperty _other);
- Copy other's contents over contents of this
- void
copy_element
(int _i, BaseProperty _other, int _iother);
- Copy an element from another base property to this one
- abstract void
reserve
(uint _n);
- Reserve memory for n elements.
- abstract void
resize
(uint _n);
- Resize storage to hold n elements.
- abstract void
push_back
();
- Extend the number of elements by one.
- abstract void
swap
(uint _i0, uint _i1);
- Let two elements
swap
their storage place.
- abstract BaseProperty
dup
();
- Return a deep copy of self.
- char[]
name
();
- Return the
name
of the property
- bool
persistent
();
- Returns true if the
persistent
flag is enabled else false.
- abstract void
set_persistent
(bool _yn);
- Enable or disable persistency. Self must be a named property to enable
persistency.
- abstract uint
n_elements
();
- Number of elements in property
- abstract uint
element_size
();
- Size of one element in bytes or UnknownSize if not known.
- uint
size_of
();
- Return size of property in bytes
- uint
size_of
(uint _n_elem);
- Estimated size of property if it has n_elem elements.
The member returns UnknownSize if the size cannot be estimated.
- abstract uint
store
(OutputStream _ostr, bool _swap);
- Store self as one binary block
- abstract uint
restore
(InputStream _istr, bool _swap);
- Restore self from a binary block. Uses reserve() to set the
size of self before restoring.
- protected abstract void*
raw_element_ptr
(int _idx);
- Return raw pointer to a given element
|