v0.3.0
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 ** Copyright (c) 2016, Fougue Ltd. <http://www.fougue.pro>
3 ** All rights reserved.
4 **
5 ** Redistribution and use in source and binary forms, with or without
6 ** modification, are permitted provided that the following conditions
7 ** are met:
8 **
9 ** 1. Redistributions of source code must retain the above copyright
10 ** notice, this list of conditions and the following disclaimer.
11 **
12 ** 2. Redistributions in binary form must reproduce the above
13 ** copyright notice, this list of conditions and the following
14 ** disclaimer in the documentation and/or other materials provided
15 ** with the distribution.
16 **
17 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 ****************************************************************************/
29 
46 #ifndef __cplusplus
47 # error C++ compiler required
48 #endif
49 
50 #ifndef GMIO_SUPPORT_STL_OCC_MESHVS_H
51 #define GMIO_SUPPORT_STL_OCC_MESHVS_H
52 
53 #include "support_global.h"
54 #include "../gmio_stl/stl_mesh.h"
55 
56 #include <vector>
57 
58 #include <MeshVS_DataSource.hxx>
59 #include <TColStd_Array1OfReal.hxx>
60 
75 {
77  explicit gmio_stl_mesh_occmeshvs(const MeshVS_DataSource* ds);
78  explicit gmio_stl_mesh_occmeshvs(const Handle_MeshVS_DataSource& hnd);
79 
80  inline const MeshVS_DataSource* data_src() const { return m_data_src; }
81 
82 private:
83  static void get_triangle(
84  const void* cookie, uint32_t tri_id, gmio_stl_triangle* tri);
85 
86  void init_C_members();
87  void init_cache();
88 
89  const MeshVS_DataSource* m_data_src;
90  std::vector<int> m_vec_element_key;
91  mutable TColStd_Array1OfReal m_element_coords;
92 };
93 
94 #endif /* GMIO_SUPPORT_STL_OCC_MESHVS_H */
95 
Provides access to all the triangles of OpenCascade's MeshVS_DataSource.
Definition: stl_occ_meshvs.h:74
Provides an interface for accessing the underlying(hidden) user mesh.
Definition: stl_mesh.h:44
const void * cookie
Opaque pointer on the user mesh, passed as first argument to hook functions.
Definition: stl_mesh.h:48
STL mesh triangle.
Definition: stl_triangle.h:44
Global declarations for the support module.
const MeshVS_DataSource * data_src() const
Definition: stl_occ_meshvs.h:80
Fougue © 2016