30 #ifndef LVR2_TYPES_ELEMENTPROXY 31 #define LVR2_TYPES_ELEMENTPROXY 35 #include <boost/optional.hpp> 144 template<
typename type,
size_t size>
149 for(
int i=0; i<size; i++){
156 template<
typename BaseVecT>
168 template<
typename BaseVecT>
180 template<
typename BaseVecT>
193 template<
typename BaseVecT>
201 throw std::range_error(
"Element Proxy: Width to small for BaseVec addition");
204 template<
typename BaseVecT>
212 throw std::range_error(
"Element Proxy: Width to small for BaseVec subtraction");
223 throw std::range_error(
"Element Proxy: Index larger than width");
232 throw std::range_error(
"Element Proxy: Index out of Bounds");
236 template<
typename BaseVecT>
237 operator BaseVecT()
const 243 throw std::range_error(
"Element Proxy: Width != 3 in BaseVecT conversion");
246 template <
typename type,
size_t size>
247 operator std::array<type, size>()
const 250 std::array<type, size> arr;
251 for(
int i=0; i<size; i++){
256 throw std::range_error(
"Element Proxy: array size differs from channel with in std::array conversion.");
259 operator std::array<VertexHandle, 3>()
const 266 throw std::range_error(
"Element Proxy: Width != 3 in std::array conversion.");
275 throw std::range_error(
"Element Proxy: Width != 1 in EdgeHandle conversion.");
284 throw std::range_error(
"Element Proxy: Width != 1 in FaceHandle conversion.");
293 throw std::range_error(
"Element Proxy: Width != 1 in content type conversion.");
304 #endif // LVR2_TYPES_ELEMENTPROXY
ElementProxy operator=(const BaseVecT &v)
Handle to access vertices of the mesh.
ElementProxy operator-=(const BaseVecT &v)
ElementProxy operator=(const T &v)
bool operator>(const ElementProxyPtr &rhs) const
BaseVecT operator+(const BaseVecT &v)
Handle to access edges of the mesh.
bool operator<=(const ElementProxyPtr &rhs) const
ElementProxyPtr operator++(int)
ElementProxy operator=(const std::array< type, size > &array)
ssize_t operator-(const ElementProxyPtr &p)
bool operator==(const ElementProxyPtr &rhs) const
bool operator>=(const ElementProxyPtr &rhs) const
ElementProxyPtr & operator+=(size_t i)
ElementProxyPtr & operator++()
ElementProxyPtr operator-=(size_t i)
bool operator!=(const ElementProxyPtr &rhs) const
ElementProxy< T > operator*()
ElementProxyPtr operator+(size_t i)
bool operator<(const ElementProxyPtr &rhs) const
ElementProxy(T *pos=nullptr, unsigned w=0)
ElementProxyPtr(T *ptr=nullptr, size_t w=0)
ElementProxyPtr operator+(const ElementProxyPtr &)=delete
ElementProxy< T > * operator->()=delete
This class emulates a Pointer behaviour for an ElementProxy if its & operator is used. The arithmetic is based on the width of an ElementProxy. It was necessary for the Octree. USE WITH CARE.
BaseVecT operator-(const BaseVecT &v)
const T & operator[](int i) const
Handle to access faces of the mesh.
ElementProxy operator+=(const BaseVecT &v)