104 bool is_point_double()
const override
106 return OMFormat::is_double(
typename Mesh::Point()[0]);
109 bool is_normal_double()
const override
116 return (mesh_.has_vertex_normals()
118 :
Vec3f(0.0f, 0.0f, 0.0f));
123 return (mesh_.has_vertex_normals()
125 :
Vec3d(0.0f, 0.0f, 0.0f));
130 return (mesh_.has_vertex_colors()
131 ? color_cast<Vec3uc>(mesh_.color(_vh))
137 return (mesh_.has_vertex_colors()
138 ? color_cast<Vec4uc>(mesh_.color(_vh))
144 return (mesh_.has_vertex_colors()
145 ? color_cast<Vec3ui>(mesh_.color(_vh))
151 return (mesh_.has_vertex_colors()
152 ? color_cast<Vec4ui>(mesh_.color(_vh))
158 return (mesh_.has_vertex_colors()
159 ? color_cast<Vec3f>(mesh_.color(_vh))
165 return (mesh_.has_vertex_colors()
166 ? color_cast<Vec4f>(mesh_.color(_vh))
167 :
Vec4f(0, 0, 0, 0));
172#if defined(OM_CC_GCC) && (OM_CC_VERSION<30000)
176 if (mesh_.has_vertex_texcoords2D())
178 return Vec2f(0.0f, 0.0f);
180 return (mesh_.has_vertex_texcoords2D()
182 :
Vec2f(0.0f, 0.0f));
188 return (mesh_.has_halfedge_texcoords2D()
190 :
Vec2f(0.0f, 0.0f));
195 if (mesh_.has_vertex_status())
196 return mesh_.status(_vh);
204 return (mesh_.has_edge_colors()
205 ? color_cast<Vec3uc>(mesh_.color(_eh))
211 return (mesh_.has_edge_colors()
212 ? color_cast<Vec4uc>(mesh_.color(_eh))
218 return (mesh_.has_edge_colors()
219 ? color_cast<Vec3ui>(mesh_.color(_eh))
225 return (mesh_.has_edge_colors()
226 ? color_cast<Vec4ui>(mesh_.color(_eh))
232 return (mesh_.has_vertex_colors()
233 ? color_cast<Vec3f>(mesh_.color(_eh))
239 return (mesh_.has_vertex_colors()
240 ? color_cast<Vec4f>(mesh_.color(_eh))
241 :
Vec4f(0, 0, 0, 0));
246 if (mesh_.has_edge_status())
247 return mesh_.status(_eh);
255 return mesh_.halfedge_handle(_vh).idx();
260 return mesh_.halfedge_handle(_fh).idx();
265 return mesh_.next_halfedge_handle(_heh).idx();
270 return mesh_.to_vertex_handle(_heh).idx();
275 return mesh_.face_handle(_heh).idx();
280 if (mesh_.has_halfedge_status())
281 return mesh_.status(_heh);
288 std::vector<VertexHandle>& _vhandles)
const override
290 unsigned int count(0);
292 for (
typename Mesh::CFVIter fv_it=mesh_.cfv_iter(_fh); fv_it.is_valid(); ++fv_it)
294 _vhandles.push_back(*fv_it);
300 unsigned int get_face_texcoords(std::vector<Vec2f>& _hehandles)
const override
302 unsigned int count(0);
316 for(fh_it = mesh_.cfh_iter(_fh); fh_it.is_valid();++fh_it)
318 if(mesh_.to_vertex_handle(*fh_it) == _vh)
326 return (mesh_.has_face_normals()
328 :
Vec3f(0.0f, 0.0f, 0.0f));
333 return (mesh_.has_face_normals()
335 :
Vec3d(0.0, 0.0, 0.0));
338 Vec3uc color(FaceHandle _fh)
const override
340 return (mesh_.has_face_colors()
341 ? color_cast<Vec3uc>(mesh_.color(_fh))
345 Vec4uc colorA(FaceHandle _fh)
const override
347 return (mesh_.has_face_colors()
348 ? color_cast<Vec4uc>(mesh_.color(_fh))
352 Vec3ui colori(FaceHandle _fh)
const override
354 return (mesh_.has_face_colors()
355 ? color_cast<Vec3ui>(mesh_.color(_fh))
359 Vec4ui colorAi(FaceHandle _fh)
const override
361 return (mesh_.has_face_colors()
362 ? color_cast<Vec4ui>(mesh_.color(_fh))
366 Vec3f colorf(FaceHandle _fh)
const override
368 return (mesh_.has_face_colors()
369 ? color_cast<Vec3f>(mesh_.color(_fh))
373 Vec4f colorAf(FaceHandle _fh)
const override
375 return (mesh_.has_face_colors()
376 ? color_cast<Vec4f>(mesh_.color(_fh))
377 :
Vec4f(0, 0, 0, 0));
382 if (mesh_.has_face_status())
383 return mesh_.status(_fh);
387 virtual const BaseKernel* kernel()
override {
return &mesh_; }
391 size_t n_vertices()
const override {
return mesh_.n_vertices(); }
392 size_t n_faces()
const override {
return mesh_.n_faces(); }
393 size_t n_edges()
const override {
return mesh_.n_edges(); }
397 bool is_triangle_mesh()
const override
398 {
return Mesh::is_triangles(); }
400 bool has_vertex_normals()
const override {
return mesh_.has_vertex_normals(); }
401 bool has_vertex_colors()
const override {
return mesh_.has_vertex_colors(); }
402 bool has_vertex_texcoords()
const override {
return mesh_.has_vertex_texcoords2D(); }
403 bool has_vertex_status()
const override {
return mesh_.has_vertex_status(); }
404 bool has_edge_colors()
const override {
return mesh_.has_edge_colors(); }
405 bool has_edge_status()
const override {
return mesh_.has_edge_status(); }
406 bool has_halfedge_status()
const override {
return mesh_.has_halfedge_status(); }
407 bool has_face_normals()
const override {
return mesh_.has_face_normals(); }
408 bool has_face_colors()
const override {
return mesh_.has_face_colors(); }
409 bool has_face_status()
const override {
return mesh_.has_face_status(); }
void vector_cast(const src_t &_src, dst_t &_dst, GenProg::Int2Type< n >)
Cast vector type to another vector type by copying the vector elements.
Definition vector_cast.hh:81