Rumba C++ SDK
BVHTriangle.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  {
21  class Mesh;
22 
25  {
26  public:
27 
28  BVHTriangle();
29 
31 
32  BVHTriangle(const Value &v);
33 
36  const Mesh& mesh
37  );
38 
40 
46  int intersect_closest(
47  const Imath::V3f& position,
48  const Imath::V3f& direction,
49  float tnear,
50  float& tfar,
51  Imath::V2f* st=nullptr
52  ) const;
53 
55 
61  int closest(
62  const Imath::V3f& position,
63  float& d,
64  Imath::V3f* closest_pos=nullptr,
65  Imath::V2f* st=nullptr
66  ) const;
67 
69  static const BVHTriangle default_value;
70 
72  BVHTriangle(std::shared_ptr<Impl> impl) { _impl=impl; }
73  };
74  }
Definition: ImathFrame.h:42
A mesh value.
Definition: Mesh.h:33
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
static const BVHTriangle default_value
The default value.
Definition: BVHTriangle.h:69
#define MAQUINA_EXPORT
Definition: Export.h:31
Definition: ImathVec.h:61
A bounding volume hierarchy to quickly intersect 3d triangles.
Definition: BVHTriangle.h:24
Base class of all Rumba values.
Definition: Value.h:34