Panda3D
physxRaycastHit.h
1 // Filename: physxRaycastHit.h
2 // Created by: enn0x (21Oct09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXRAYCASTHIT_H
16 #define PHYSXRAYCASTHIT_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "config_physx.h"
22 
23 class PhysxShape;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxRaycastHit
27 // Description : This structure captures results for a single
28 // raycast query. See PhysxScene for raycasting
29 // methods.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDAPHYSX PhysxRaycastHit {
32 
33 PUBLISHED:
34  INLINE PhysxRaycastHit(const NxRaycastHit hit);
35  INLINE ~PhysxRaycastHit();
36 
37  bool is_empty() const;
38 
39  PhysxShape *get_shape() const;
40  LPoint3f get_impact_pos() const;
41  LVector3f get_impact_normal() const;
42  float get_distance() const;
43 
44 private:
45  NxRaycastHit _hit;
46 };
47 
48 #include "physxRaycastHit.I"
49 
50 #endif // PHYSXRAYCASTHIT_H
Abstract base class for shapes.
Definition: physxShape.h:41
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
This structure captures results for a single raycast query.