Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

OpenMesh::BaseKernel Class Reference

This class provides the basic property management like adding/removing properties and access to properties. More...

#include <BaseKernel.hh>

Inheritance diagram for OpenMesh::BaseKernel:

OpenMesh::AttribKernelT< MeshItems > OpenMesh::Kernel_OSG::PropertyKernel< IsTriMesh > OpenMesh::Kernel_OSG::PropertyKernel< MeshItems::Face::IsTriangle > OpenMesh::Kernel_OSG::AttribKernelT< MeshItems > List of all members.

Public Member Functions

Add a property to a mesh item
template<class T> void add_property (VPropHandleT< T > &_ph, const std::string &_name="< vprop >")
 Adds a property.

template<class T> void add_property (HPropHandleT< T > &_ph, const std::string &_name="< hprop >")
 Adds a property.

template<class T> void add_property (EPropHandleT< T > &_ph, const std::string &_name="< eprop >")
 Adds a property.

template<class T> void add_property (FPropHandleT< T > &_ph, const std::string &_name="< fprop >")
 Adds a property.

template<class T> void add_property (MPropHandleT< T > &_ph, const std::string &_name="< mprop >")
 Adds a property.

Removing a property from a mesh tiem
template<typename T> void remove_property (VPropHandleT< T > &_ph)
 Remove a property.

template<typename T> void remove_property (HPropHandleT< T > &_ph)
 Remove a property.

template<typename T> void remove_property (EPropHandleT< T > &_ph)
 Remove a property.

template<typename T> void remove_property (FPropHandleT< T > &_ph)
 Remove a property.

template<typename T> void remove_property (MPropHandleT< T > &_ph)
 Remove a property.

Get property handle by name
template<class T> bool get_property_handle (VPropHandleT< T > &_ph, const std::string &_name) const
 Retrieves the handle to a named property by it's name.

template<class T> bool get_property_handle (HPropHandleT< T > &_ph, const std::string &_name) const
 Retrieves the handle to a named property by it's name.

template<class T> bool get_property_handle (EPropHandleT< T > &_ph, const std::string &_name) const
 Retrieves the handle to a named property by it's name.

template<class T> bool get_property_handle (FPropHandleT< T > &_ph, const std::string &_name) const
 Retrieves the handle to a named property by it's name.

template<class T> bool get_property_handle (MPropHandleT< T > &_ph, const std::string &_name) const
 Retrieves the handle to a named property by it's name.

Access a property
template<class T> PropertyT< T > & property (VPropHandleT< T > _ph)
 Access a property.

template<class T> const PropertyT< T > & property (VPropHandleT< T > _ph) const
 Access a property.

template<class T> PropertyT< T > & property (HPropHandleT< T > _ph)
 Access a property.

template<class T> const PropertyT< T > & property (HPropHandleT< T > _ph) const
 Access a property.

template<class T> PropertyT< T > & property (EPropHandleT< T > _ph)
 Access a property.

template<class T> const PropertyT< T > & property (EPropHandleT< T > _ph) const
 Access a property.

template<class T> PropertyT< T > & property (FPropHandleT< T > _ph)
 Access a property.

template<class T> const PropertyT< T > & property (FPropHandleT< T > _ph) const
 Access a property.

template<class T> PropertyT< T > & mproperty (MPropHandleT< T > _ph)
 Access a property.

template<class T> const PropertyT< T > & mproperty (MPropHandleT< T > _ph) const
 Access a property.

Access a property element using a handle to a mesh item
template<class T> VPropHandleT< T >::reference property (VPropHandleT< T > _ph, VertexHandle _vh)
 Return value of property for an item.

template<class T> VPropHandleT< T >::const_reference property (VPropHandleT< T > _ph, VertexHandle _vh) const
 Return value of property for an item.

template<class T> HPropHandleT< T >::reference property (HPropHandleT< T > _ph, HalfedgeHandle _hh)
 Return value of property for an item.

template<class T> HPropHandleT< T >::const_reference property (HPropHandleT< T > _ph, HalfedgeHandle _hh) const
 Return value of property for an item.

template<class T> EPropHandleT< T >::reference property (EPropHandleT< T > _ph, EdgeHandle _eh)
 Return value of property for an item.

template<class T> EPropHandleT< T >::const_reference property (EPropHandleT< T > _ph, EdgeHandle _eh) const
 Return value of property for an item.

template<class T> FPropHandleT< T >::reference property (FPropHandleT< T > _ph, FaceHandle _fh)
 Return value of property for an item.

template<class T> FPropHandleT< T >::const_reference property (FPropHandleT< T > _ph, FaceHandle _fh) const
 Return value of property for an item.

template<class T> MPropHandleT< T >::reference property (MPropHandleT< T > _ph)
 Return value of property for an item.

template<class T> MPropHandleT< T >::const_reference property (MPropHandleT< T > _ph) const
 Return value of property for an item.


Detailed Description

This class provides the basic property management like adding/removing properties and access to properties.

All operations provided by BaseKernel need at least a property handle (VPropHandleT, EPropHandleT, HPropHandleT, FPropHandleT, MPropHandleT). which keeps the data type of the property, too.

There are two types of properties:

  1. Standard properties - mesh data (e.g. vertex normal or face color)
  2. Custom properties - user defined data

The differentiation is only semantically, technically both are equally handled. Therefore the methods provided by the BaseKernel are applicable to both property types.

Attention:
Since the class PolyMeshT derives from a kernel, hence all public elements of BaseKernel are usable.


Member Function Documentation

template<class T>
void OpenMesh::BaseKernel::add_property MPropHandleT< T > &  _ph,
const std::string &  _name = "<mprop>"
[inline]
 

Adds a property.

Depending on the property handle type a vertex, (half-)edge, face or mesh property is added to the mesh. If the action fails the handle is invalid. On success the handle must be used to access the property data with property().

Parameters:
_ph A property handle defining the data type to bind to mesh. On success the handle is valid else invalid.
_name Optional name of property. Following restrictions apply to the name:
  1. Maximum length of name is 256 characters
  2. The prefixes matching "^[vhefm]:" are reserved for internal usage.
  3. The expression "^<.*>$" is reserved for internal usage.
Returns:
true on success else false.

template<class T>
void OpenMesh::BaseKernel::add_property FPropHandleT< T > &  _ph,
const std::string &  _name = "<fprop>"
[inline]
 

Adds a property.

Depending on the property handle type a vertex, (half-)edge, face or mesh property is added to the mesh. If the action fails the handle is invalid. On success the handle must be used to access the property data with property().

Parameters:
_ph A property handle defining the data type to bind to mesh. On success the handle is valid else invalid.
_name Optional name of property. Following restrictions apply to the name:
  1. Maximum length of name is 256 characters
  2. The prefixes matching "^[vhefm]:" are reserved for internal usage.
  3. The expression "^<.*>$" is reserved for internal usage.
Returns:
true on success else false.

template<class T>
void OpenMesh::BaseKernel::add_property EPropHandleT< T > &  _ph,
const std::string &  _name = "<eprop>"
[inline]
 

Adds a property.

Depending on the property handle type a vertex, (half-)edge, face or mesh property is added to the mesh. If the action fails the handle is invalid. On success the handle must be used to access the property data with property().

Parameters:
_ph A property handle defining the data type to bind to mesh. On success the handle is valid else invalid.
_name Optional name of property. Following restrictions apply to the name:
  1. Maximum length of name is 256 characters
  2. The prefixes matching "^[vhefm]:" are reserved for internal usage.
  3. The expression "^<.*>$" is reserved for internal usage.
Returns:
true on success else false.

template<class T>
void OpenMesh::BaseKernel::add_property HPropHandleT< T > &  _ph,
const std::string &  _name = "<hprop>"
[inline]
 

Adds a property.

Depending on the property handle type a vertex, (half-)edge, face or mesh property is added to the mesh. If the action fails the handle is invalid. On success the handle must be used to access the property data with property().

Parameters:
_ph A property handle defining the data type to bind to mesh. On success the handle is valid else invalid.
_name Optional name of property. Following restrictions apply to the name:
  1. Maximum length of name is 256 characters
  2. The prefixes matching "^[vhefm]:" are reserved for internal usage.
  3. The expression "^<.*>$" is reserved for internal usage.
Returns:
true on success else false.

template<class T>
void OpenMesh::BaseKernel::add_property VPropHandleT< T > &  _ph,
const std::string &  _name = "<vprop>"
[inline]
 

Adds a property.

Depending on the property handle type a vertex, (half-)edge, face or mesh property is added to the mesh. If the action fails the handle is invalid. On success the handle must be used to access the property data with property().

Parameters:
_ph A property handle defining the data type to bind to mesh. On success the handle is valid else invalid.
_name Optional name of property. Following restrictions apply to the name:
  1. Maximum length of name is 256 characters
  2. The prefixes matching "^[vhefm]:" are reserved for internal usage.
  3. The expression "^<.*>$" is reserved for internal usage.
Returns:
true on success else false.

template<class T>
bool OpenMesh::BaseKernel::get_property_handle MPropHandleT< T > &  _ph,
const std::string &  _name
const [inline]
 

Retrieves the handle to a named property by it's name.

Parameters:
_ph A property handle. On success the handle is valid else invalid.
_name Name of wanted property.
Returns:
true if such a named property is available, else false.

template<class T>
bool OpenMesh::BaseKernel::get_property_handle FPropHandleT< T > &  _ph,
const std::string &  _name
const [inline]
 

Retrieves the handle to a named property by it's name.

Parameters:
_ph A property handle. On success the handle is valid else invalid.
_name Name of wanted property.
Returns:
true if such a named property is available, else false.

template<class T>
bool OpenMesh::BaseKernel::get_property_handle EPropHandleT< T > &  _ph,
const std::string &  _name
const [inline]
 

Retrieves the handle to a named property by it's name.

Parameters:
_ph A property handle. On success the handle is valid else invalid.
_name Name of wanted property.
Returns:
true if such a named property is available, else false.

template<class T>
bool OpenMesh::BaseKernel::get_property_handle HPropHandleT< T > &  _ph,
const std::string &  _name
const [inline]
 

Retrieves the handle to a named property by it's name.

Parameters:
_ph A property handle. On success the handle is valid else invalid.
_name Name of wanted property.
Returns:
true if such a named property is available, else false.

template<class T>
bool OpenMesh::BaseKernel::get_property_handle VPropHandleT< T > &  _ph,
const std::string &  _name
const [inline]
 

Retrieves the handle to a named property by it's name.

Parameters:
_ph A property handle. On success the handle is valid else invalid.
_name Name of wanted property.
Returns:
true if such a named property is available, else false.

template<class T>
const PropertyT<T>& OpenMesh::BaseKernel::mproperty MPropHandleT< T >  _ph  )  const [inline]
 

Access a property.

This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!

Parameters:
_ph A valid (!) property handle.
Returns:
The wanted property if the handle is valid.

template<class T>
PropertyT<T>& OpenMesh::BaseKernel::mproperty MPropHandleT< T >  _ph  )  [inline]
 

Access a property.

This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!

Parameters:
_ph A valid (!) property handle.
Returns:
The wanted property if the handle is valid.

template<class T>
const PropertyT<T>& OpenMesh::BaseKernel::property FPropHandleT< T >  _ph  )  const [inline]
 

Access a property.

This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!

Parameters:
_ph A valid (!) property handle.
Returns:
The wanted property if the handle is valid.

template<class T>
PropertyT<T>& OpenMesh::BaseKernel::property FPropHandleT< T >  _ph  )  [inline]
 

Access a property.

This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!

Parameters:
_ph A valid (!) property handle.
Returns:
The wanted property if the handle is valid.

template<class T>
const PropertyT<T>& OpenMesh::BaseKernel::property EPropHandleT< T >  _ph  )  const [inline]
 

Access a property.

This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!

Parameters:
_ph A valid (!) property handle.
Returns:
The wanted property if the handle is valid.

template<class T>
PropertyT<T>& OpenMesh::BaseKernel::property EPropHandleT< T >  _ph  )  [inline]
 

Access a property.

This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!

Parameters:
_ph A valid (!) property handle.
Returns:
The wanted property if the handle is valid.

template<class T>
const PropertyT<T>& OpenMesh::BaseKernel::property HPropHandleT< T >  _ph  )  const [inline]
 

Access a property.

This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!

Parameters:
_ph A valid (!) property handle.
Returns:
The wanted property if the handle is valid.

template<class T>
PropertyT<T>& OpenMesh::BaseKernel::property HPropHandleT< T >  _ph  )  [inline]
 

Access a property.

This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!

Parameters:
_ph A valid (!) property handle.
Returns:
The wanted property if the handle is valid.

template<class T>
const PropertyT<T>& OpenMesh::BaseKernel::property VPropHandleT< T >  _ph  )  const [inline]
 

Access a property.

This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!

Parameters:
_ph A valid (!) property handle.
Returns:
The wanted property if the handle is valid.

template<class T>
PropertyT<T>& OpenMesh::BaseKernel::property VPropHandleT< T >  _ph  )  [inline]
 

Access a property.

This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!

Parameters:
_ph A valid (!) property handle.
Returns:
The wanted property if the handle is valid.

template<typename T>
void OpenMesh::BaseKernel::remove_property MPropHandleT< T > &  _ph  )  [inline]
 

Remove a property.

Removes the property represented by the handle from the apropriate mesh item.

Parameters:
_ph Property to be removed. The handle is invalid afterwords.

template<typename T>
void OpenMesh::BaseKernel::remove_property FPropHandleT< T > &  _ph  )  [inline]
 

Remove a property.

Removes the property represented by the handle from the apropriate mesh item.

Parameters:
_ph Property to be removed. The handle is invalid afterwords.

template<typename T>
void OpenMesh::BaseKernel::remove_property EPropHandleT< T > &  _ph  )  [inline]
 

Remove a property.

Removes the property represented by the handle from the apropriate mesh item.

Parameters:
_ph Property to be removed. The handle is invalid afterwords.

template<typename T>
void OpenMesh::BaseKernel::remove_property HPropHandleT< T > &  _ph  )  [inline]
 

Remove a property.

Removes the property represented by the handle from the apropriate mesh item.

Parameters:
_ph Property to be removed. The handle is invalid afterwords.

template<typename T>
void OpenMesh::BaseKernel::remove_property VPropHandleT< T > &  _ph  )  [inline]
 

Remove a property.

Removes the property represented by the handle from the apropriate mesh item.

Parameters:
_ph Property to be removed. The handle is invalid afterwords.


The documentation for this class was generated from the following files:
acg pic Project OpenMesh, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .