Rumba C++ SDK
BVH3.h
Go to the documentation of this file.
1 /*
2 
3  *
4  ***
5  *****
6  ********************* Mercenaries Engineering SARL
7  ***************** Copyright (C) 2018
8  *************
9  ********* http://www.mercenaries-engineering.com
10  ***********
11  **** ****
12  ** **
13 
14 */
15 #pragma once
16 
17 #include "Value.h"
18 
19  namespace maquina
20  {
22  class MAQUINA_EXPORT BVH3 : public Value
23  {
24  public:
25 
26  BVH3();
27 
29 
30  BVH3(const Value &v);
31 
33  BVH3(
34  const gsl::span<const Imath::V3f> &points,
35  int obj_per_leaf=4
36  );
37 
39  BVH3(
40  const gsl::span<const Imath::Box3f> &boxes,
41  int obj_per_leaf=4
42  );
43 
45 
48  void select(
49  const Imath::V3f &position, // The position from where the selection is done
50  float max_distance, // The maximum distance selection
51  std::vector<uint32_t> &result // The selected object indices. The vector is not cleared. New indices are pushed at the end.
52  ) const;
53 
55  BVH3(std::shared_ptr<Impl> impl) { _impl=impl; }
56  };
57  }
Definition: ImathFrame.h:42
A bounding volume hierarchy to quickly select 3d shapes.
Definition: BVH3.h:22
MAQUINA_EXPORT void select(const std::vector< Node > &nodes, SelectionMode mode=SelectionMode::Replace)
Update the active selection with a list of nodes according to the selection mode. ...
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
#define MAQUINA_EXPORT
Definition: Export.h:31
Base class of all Rumba values.
Definition: Value.h:34