49#ifndef OPENMESH_KERNEL_OSG_PROPERTYKERNEL_HH
50#define OPENMESH_KENREL_OSG_PROPERTYKERNEL_HH
55#include <OpenMesh/Core/Utils/Property.hh>
56#include <OpenMesh/Core/Mesh/BaseKernel.hh>
58#include <OpenMesh/Tools/Kernel_OSG/PropertyT.hh>
72template <
typename IsTriMesh >
85 typedef FP::GeoIndicesUI32<IsTriMesh> GeoIndices;
97 template <
typename T >
101 template <
typename T >
105 template <
typename T >
109 template <
typename T >
124 GeoIndices *bp =
new GeoIndices( fptypes(_pht), fplengths(_phl ) );
130 template <
typename T >
132 {
return static_cast<typename _t2vp<T>::prop&
>(
_vprop( _ph ) ); }
134 template <
typename T >
136 {
return static_cast<const typename _t2vp<T>::prop&
>(
_vprop( _ph ) ); }
139 template <
typename T >
141 {
return static_cast<typename _t2vn<T>::prop&
>(
_vprop( _ph ) ); }
143 template <
typename T >
145 {
return static_cast<const typename _t2vn<T>::prop&
>(
_vprop( _ph ) ); }
148 template <
typename T >
150 {
return static_cast<typename _t2vc<T>::prop&
>(
_vprop( _ph ) ); }
152 template <
typename T >
154 {
return static_cast<const typename _t2vc<T>::prop&
>(
_vprop( _ph ) ); }
157 template <
typename T >
159 {
return static_cast<typename _t2vtc<T>::prop&
>(
_vprop( _ph ) ); }
161 template <
typename T >
162 const typename _t2vtc<T>::prop& vtexcoords(
VPropHandleT<T> _ph )
const
163 {
return static_cast<const typename _t2vtc<T>::prop&
>(
_vprop( _ph ) ); }
182 {
return static_cast<GeoIndices&
>(
_fprop(_ph) ); }
185 {
return static_cast<const GeoIndices&
>(
_fprop(_ph) ); }
190 template <
typename T>
192 {
return vpositions(_ph)[_vh.
idx()]; }
196 {
return vpositions(_ph)[_vh.
idx()]; }
199 template <
typename T>
201 {
return vnormals(_ph)[_vh.
idx()]; }
205 {
return vnormals(_ph)[_vh.
idx()]; }
208 template <
typename T>
210 {
return vcolors(_ph)[_vh.
idx()]; }
214 {
return vcolors(_ph)[_vh.
idx()]; }
217 template <
typename T>
219 {
return vtexcoords(_ph)[_vh.
idx()]; }
223 {
return vtexcoords(_ph)[_vh.
idx()]; }
228 FPTypesHandle::value_type&
230 {
return fptypes( _ph )[ _fh.
idx()]; }
232 const FPTypesHandle::value_type&
234 {
return fptypes( _ph )[ _fh.
idx()]; }
237 FPLengthsHandle::value_type&
239 {
return fplengths( _ph )[ _fh.
idx()]; }
241 const FPLengthsHandle::value_type&
243 {
return fplengths( _ph )[ _fh.
idx()]; }
246 FIndicesHandle::value_type&
248 {
return findices( _ph )[ _fh.
idx()]; }
250 const FIndicesHandle::value_type&
252 {
return findices( _ph )[ _fh.
idx()]; }
258 std::cout <<
"#V : " <<
n_vertices() << std::endl;
259 std::cout <<
"#E : " <<
n_edges() << std::endl;
260 std::cout <<
"#F : " <<
n_faces() << std::endl;
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:64
This class provides low-level property management like adding/removing properties and access to prope...
Definition BaseKernel.hh:103
virtual size_t n_vertices() const
You should not use this function directly.
Definition BaseKernel.hh:681
BaseProperty & _vprop(size_t _idx)
You should not use this function directly.
Definition BaseKernel.hh:630
BaseProperty & _fprop(size_t _idx)
You should not use this function directly.
Definition BaseKernel.hh:633
size_t _add_vprop(BaseProperty *_bp)
You should not use this function directly.
Definition BaseKernel.hh:647
virtual size_t n_edges() const
You should not use this function directly.
Definition BaseKernel.hh:683
void property_stats() const
You should not use this function directly.
Definition BaseKernel.cc:55
virtual size_t n_faces() const
You should not use this function directly.
Definition BaseKernel.hh:684
size_t _add_fprop(BaseProperty *_bp)
You should not use this function directly.
Definition BaseKernel.hh:650
int idx() const
Get the underlying index of this handle.
Definition Handles.hh:74
Handle for a vertex entity.
Definition Handles.hh:126
Handle for a face entity.
Definition Handles.hh:147
Handle representing a vertex property.
Definition Property.hh:488
Handle representing a face property.
Definition Property.hh:530
Helper class, extending functionaliy of OpenMesh::BaseKernel to OpenSG specific property adaptors.
Definition PropertyKernel.hh:74
Property adaptor for OpenSG GeoProperties.
Definition PropertyT.hh:93