Panda3D
 All Classes Functions Variables Enumerations
physxControllersHit.I
1 // Filename: physxControllersHit.I
2 // Created by: enn0x (28Nov12)
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 ////////////////////////////////////////////////////////////////////
16 // Function: PhysxControllersHit::Constructor
17 // Access: Published
18 // Description:
19 ////////////////////////////////////////////////////////////////////
20 INLINE PhysxControllersHit::
21 PhysxControllersHit(const NxControllersHit &hit) :
22  _hit(hit) {
23 
24 }
25 
26 ////////////////////////////////////////////////////////////////////
27 // Function: PhysxControllersHit::get_controller
28 // Access: Published
29 // Description:
30 ////////////////////////////////////////////////////////////////////
31 INLINE PhysxController *PhysxControllersHit::
32 get_controller() const {
33 
34  NxController *controllerPtr = _hit.controller;
35  PhysxController *controller = controllerPtr ? (PhysxController *)controllerPtr : NULL;
36 
37  return controller;
38 }
39 
40 ////////////////////////////////////////////////////////////////////
41 // Function: PhysxControllersHit::get_other
42 // Access: Published
43 // Description:
44 ////////////////////////////////////////////////////////////////////
45 INLINE PhysxController *PhysxControllersHit::
46 get_other() const {
47 
48  NxController *otherPtr = _hit.other;
49  PhysxController *other = otherPtr ? (PhysxController *)otherPtr : NULL;
50 
51  return other;
52 }
53 
Abstract base class for character controllers.