Initialize libbullet git in 2.0_beta.
[platform/upstream/libbullet.git] / Extras / PhysicsEffects / include / physics_effects / base_level / collision / pfx_ray.h
1 /*\r
2 Physics Effects Copyright(C) 2010 Sony Computer Entertainment Inc.\r
3 All rights reserved.\r
4 \r
5 Physics Effects is open software; you can redistribute it and/or\r
6 modify it under the terms of the BSD License.\r
7 \r
8 Physics Effects is distributed in the hope that it will be useful,\r
9 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r
11 See the BSD License for more details.\r
12 \r
13 A copy of the BSD License is distributed with\r
14 Physics Effects under the filename: physics_effects_license.txt\r
15 */\r
16 \r
17 #ifndef _SCE_PFX_RAY_H\r
18 #define _SCE_PFX_RAY_H\r
19 \r
20 #include "../base/pfx_common.h"\r
21 #include "pfx_sub_data.h"\r
22 \r
23 namespace sce {\r
24 namespace PhysicsEffects {\r
25 \r
26 #define SCE_PFX_RAY_FACET_MODE_FRONT_ONLY     0\r
27 #define SCE_PFX_RAY_FACET_MODE_BACK_ONLY      1\r
28 #define SCE_PFX_RAY_FACET_MODE_FRONT_AND_BACK 2\r
29 \r
30 struct SCE_PFX_ALIGNED(16) PfxRayInput\r
31 {\r
32         PfxVector3 m_startPosition;\r
33         PfxVector3 m_direction;\r
34         PfxUInt32 m_contactFilterSelf;\r
35         PfxUInt32 m_contactFilterTarget;\r
36         PfxUInt8  m_facetMode;\r
37         SCE_PFX_PADDING(1,7)\r
38 \r
39         void reset()\r
40         {\r
41                 m_contactFilterSelf = m_contactFilterTarget = 0xffffffff;\r
42                 m_facetMode = SCE_PFX_RAY_FACET_MODE_FRONT_ONLY;\r
43         }\r
44 };\r
45 \r
46 struct SCE_PFX_ALIGNED(16) PfxRayOutput\r
47 {\r
48         PfxVector3 m_contactPoint;\r
49         PfxVector3 m_contactNormal;\r
50         PfxFloat   m_variable;\r
51         PfxUInt16  m_objectId;\r
52         PfxUInt8   m_shapeId;\r
53         PfxBool    m_contactFlag : 1;\r
54         PfxSubData m_subData;\r
55 };\r
56 } //namespace PhysicsEffects\r
57 } //namespace sce\r
58 \r
59 #endif // _SCE_PFX_RAY_H\r