assimpUtil.h
1 /*********************************************************************
2 * Rice University Software Distribution License
3 *
4 * Copyright (c) 2010, Rice University
5 * All Rights Reserved.
6 *
7 * For a full description see the file named LICENSE.
8 *
9 *********************************************************************/
10 
11 /* Author: Ioan Sucan */
12 
13 #ifndef OMPLAPP_GEOMETRY_DETAIL_ASSIMP_UTIL_
14 #define OMPLAPP_GEOMETRY_DETAIL_ASSIMP_UTIL_
15 
16 #ifdef _WIN32
17 #include <windows.h>
18 #endif
19 
20 #include "omplapp/config.h"
21 #if OMPL_HAS_ASSIMP3
22 #include <assimp/scene.h>
23 #include <assimp/cimport.h>
24 #include <assimp/postprocess.h>
25 #else
26 #include <assimp/assimp.hpp>
27 #include <assimp/assimp.h>
28 #include <assimp/aiScene.h>
29 #include <assimp/aiPostProcess.h>
30 #endif
31 #include <ompl/base/spaces/RealVectorBounds.h>
32 #include <vector>
33 
34 namespace ompl
35 {
36  namespace app
37  {
38 
40 
41  namespace scene
42  {
43 
44  void inferBounds(base::RealVectorBounds &bounds, const std::vector<aiVector3D> &vertices, double multiply = 1.1, double add = 0.0);
45  void extractTriangles(const aiScene *scene, std::vector<aiVector3D> &triangles);
46  void extractVertices(const aiScene *scene, std::vector<aiVector3D> &vertices);
47  double shortestEdge(const aiScene *scene);
48  void sceneCenter(const aiScene *scene, aiVector3D &center);
49  }
51  }
52 }
53 #endif
Main namespace. Contains everything in this library.
Definition: AppBase.h:21