All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RayCasterResult.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "VectorMath.h"
6 #include "CollisionGroup.h"
7 
8 #include <string>
9 
10 namespace Eegeo
11 {
12  namespace Collision
13  {
15  {
17  : intersectionPointEcef(dv3::Zero())
18  , meshOriginEcef(dv3::Zero())
19  , triangleVertex0(v3::Zero())
20  , triangleVertex1(v3::Zero())
21  , triangleVertex2(v3::Zero())
22  , triangleNormal(v3::Zero())
23  , intersectionParam(0.0)
24  , collisionGroup(CollisionGroup::Default)
25  , collisionMaterialIndex(0)
26  , pCollisionBvh(NULL)
27  , intersects(false)
28  , environmentFlatteningScale(1)
29  {}
30 
31  dv3 intersectionPointEcef;
32  dv3 meshOriginEcef;
33  v3 triangleVertex0;
34  v3 triangleVertex1;
35  v3 triangleVertex2;
36  v3 triangleNormal;
37  double intersectionParam;
38  CollisionGroup::Type collisionGroup;
39  int collisionMaterialIndex;
40  const CollisionBvh* pCollisionBvh;
41  bool intersects;
42  double environmentFlatteningScale;
43 
44  bool operator <(const RayCasterResult& b) const
45  {
46  return intersectionParam < b.intersectionParam;
47  }
48  };
49  }
50 }