 |
OpenMesh
|
44 #ifndef OPENMESH_KERNEL_OSG_PROPERTYKERNEL_HH
45 #define OPENMESH_KENREL_OSG_PROPERTYKERNEL_HH
50 #include <OpenMesh/Core/Utils/Property.hh>
51 #include <OpenMesh/Core/Mesh/BaseKernel.hh>
53 #include <OpenMesh/Tools/Kernel_OSG/PropertyT.hh>
58 namespace Kernel_OSG {
67 template <
typename IsTriMesh >
92 template <
typename T >
96 template <
typename T >
100 template <
typename T >
104 template <
typename T >
125 template <
typename T >
127 {
return static_cast<typename _t2vp<T>::prop&
>(
_vprop( _ph ) ); }
129 template <
typename T >
131 {
return static_cast<const typename _t2vp<T>::prop&
>(
_vprop( _ph ) ); }
134 template <
typename T >
136 {
return static_cast<typename _t2vn<T>::prop&
>(
_vprop( _ph ) ); }
138 template <
typename T >
140 {
return static_cast<const typename _t2vn<T>::prop&
>(
_vprop( _ph ) ); }
143 template <
typename T >
145 {
return static_cast<typename _t2vc<T>::prop&
>(
_vprop( _ph ) ); }
147 template <
typename T >
149 {
return static_cast<const typename _t2vc<T>::prop&
>(
_vprop( _ph ) ); }
152 template <
typename T >
154 {
return static_cast<typename _t2vtc<T>::prop&
>(
_vprop( _ph ) ); }
156 template <
typename T >
157 const typename _t2vtc<T>::prop& vtexcoords(
VPropHandleT<T> _ph )
const
158 {
return static_cast<const typename _t2vtc<T>::prop&
>(
_vprop( _ph ) ); }
163 {
return static_cast<GeoPTypes&>(
_fprop(_ph) ); }
166 {
return static_cast<const GeoPTypes&>(
_fprop(_ph) ); }
170 {
return static_cast<GeoPLengths&>(
_fprop(_ph) ); }
173 {
return static_cast<const GeoPLengths&>(
_fprop(_ph) ); }
177 {
return static_cast<GeoIndices&>(
_fprop(_ph) ); }
180 {
return static_cast<const GeoIndices&>(
_fprop(_ph) ); }
185 template <
typename T>
187 {
return vpositions(_ph)[_vh.
idx()]; }
191 {
return vpositions(_ph)[_vh.
idx()]; }
194 template <
typename T>
196 {
return vnormals(_ph)[_vh.
idx()]; }
200 {
return vnormals(_ph)[_vh.
idx()]; }
203 template <
typename T>
205 {
return vcolors(_ph)[_vh.
idx()]; }
209 {
return vcolors(_ph)[_vh.
idx()]; }
212 template <
typename T>
214 {
return vtexcoords(_ph)[_vh.
idx()]; }
218 {
return vtexcoords(_ph)[_vh.
idx()]; }
223 FPTypesHandle::value_type&
225 {
return fptypes( _ph )[ _fh.
idx()]; }
227 const FPTypesHandle::value_type&
229 {
return fptypes( _ph )[ _fh.
idx()]; }
232 FPLengthsHandle::value_type&
234 {
return fplengths( _ph )[ _fh.
idx()]; }
236 const FPLengthsHandle::value_type&
238 {
return fplengths( _ph )[ _fh.
idx()]; }
241 FIndicesHandle::value_type&
243 {
return findices( _ph )[ _fh.
idx()]; }
245 const FIndicesHandle::value_type&
247 {
return findices( _ph )[ _fh.
idx()]; }
253 std::cout <<
"#V : " <<
n_vertices() << std::endl;
254 std::cout <<
"#E : " <<
n_edges() << std::endl;
255 std::cout <<
"#F : " <<
n_faces() << std::endl;
265 #endif // OPENMESH_KERNEL_OSG_PROPERTYKERNEL_HH defined
virtual size_t n_vertices() const
You should not use this function directly.
Definition: BaseKernel.hh:688
int idx() const
Get the underlying index of this handle.
Definition: Handles.hh:69
Property adaptor for OpenSG GeoProperties.
Definition: PropertyT.hh:87
size_t _add_vprop(BaseProperty *_bp)
You should not use this function directly.
Definition: BaseKernel.hh:654
virtual size_t n_edges() const
You should not use this function directly.
Definition: BaseKernel.hh:690
Helper class, extending functionaliy of OpenMesh::BaseKernel to OpenSG specific property adaptors.
Definition: PropertyKernel.hh:68
void property_stats() const
You should not use this function directly.
Definition: BaseKernel.cc:50
Handle for a face entity.
Definition: Handles.hh:141
BaseProperty & _vprop(size_t _idx)
You should not use this function directly.
Definition: BaseKernel.hh:637
Adaptor for osg::GeoIndicesUI32.
Definition: PropertyT.hh:288
Handle for a vertex entity.
Definition: Handles.hh:120
This class provides low-level property management like adding/removing properties and access to prope...
Definition: BaseKernel.hh:97
Definition: Property.hh:524
Definition: Property.hh:482
size_t _add_fprop(BaseProperty *_bp)
You should not use this function directly.
Definition: BaseKernel.hh:657
BaseProperty & _fprop(size_t _idx)
You should not use this function directly.
Definition: BaseKernel.hh:640
This file contains all code required to use Eigen3 vectors as Mesh vectors.
Definition: MeshItems.hh:59
virtual size_t n_faces() const
You should not use this function directly.
Definition: BaseKernel.hh:691
Project OpenMesh,
© Computer Graphics Group, RWTH Aachen.
Documentation generated using
doxygen
.