v0.2.1
Fast, portable C library for geometry input/output
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules
stl_occ_meshvs.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** gmio
3 ** Copyright Fougue (24 Jun. 2016)
4 ** contact@fougue.pro
5 **
6 ** This software is a reusable library whose purpose is to provide complete
7 ** I/O support for various CAD file formats (eg. STL)
8 **
9 ** This software is governed by the CeCILL-B license under French law and
10 ** abiding by the rules of distribution of free software. You can use,
11 ** modify and/ or redistribute the software under the terms of the CeCILL-B
12 ** license as circulated by CEA, CNRS and INRIA at the following URL
13 ** "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html".
14 ****************************************************************************/
15 
32 #ifndef __cplusplus
33 # error C++ compiler required
34 #endif
35 
36 #ifndef GMIO_SUPPORT_STL_OCC_MESHVS_H
37 #define GMIO_SUPPORT_STL_OCC_MESHVS_H
38 
39 #include "support_global.h"
40 #include "../gmio_stl/stl_mesh.h"
41 
42 #include <vector>
43 
44 #include <MeshVS_DataSource.hxx>
45 #include <TColStd_Array1OfReal.hxx>
46 
61 {
63  explicit gmio_stl_mesh_occmeshvs(const MeshVS_DataSource* ds);
64  explicit gmio_stl_mesh_occmeshvs(const Handle_MeshVS_DataSource& hnd);
65 
66  inline const MeshVS_DataSource* data_src() const { return m_data_src; }
67 
68 private:
69  static void get_triangle(
70  const void* cookie, uint32_t tri_id, gmio_stl_triangle* tri);
71 
72  void init_C_members();
73  void init_cache();
74 
75  const MeshVS_DataSource* m_data_src;
76  std::vector<int> m_vec_element_key;
77  mutable TColStd_Array1OfReal m_element_coords;
78 };
79 
80 #endif /* GMIO_SUPPORT_STL_OCC_MESHVS_H */
81 
Provides access to all the triangles of OpenCascade's MeshVS_DataSource.
Definition: stl_occ_meshvs.h:60
Provides an interface for accessing the underlying(hidden) user mesh.
Definition: stl_mesh.h:30
const void * cookie
Opaque pointer on the user mesh, passed as first argument to hook functions.
Definition: stl_mesh.h:34
STL mesh triangle.
Definition: stl_triangle.h:30
Global declarations for the support module.
const MeshVS_DataSource * data_src() const
Definition: stl_occ_meshvs.h:66
Fougue © 2016