Panda3D
 All Classes Functions Variables Enumerations
bulletGhostNode.I
1 // Filename: bulletGhostNode.I
2 // Created by: enn0x (19Nov10)
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 ////////////////////////////////////////////////////////////////////
17 // Function: BulletGhostNode::Destructor
18 // Access: Published
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE BulletGhostNode::
22 ~BulletGhostNode() {
23 
24  delete _ghost;
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: BulletGhostNode::get_num_overlapping_nodes
29 // Access: Published
30 // Description:
31 ////////////////////////////////////////////////////////////////////
32 INLINE int BulletGhostNode::
33 get_num_overlapping_nodes() const {
34 
35  return _ghost->getNumOverlappingObjects();
36 }
37 
38 ////////////////////////////////////////////////////////////////////
39 // Function: BulletGhostNode::get_overlapping_node
40 // Access: Published
41 // Description:
42 ////////////////////////////////////////////////////////////////////
43 INLINE PandaNode *BulletGhostNode::
44 get_overlapping_node(int idx) const {
45 
46  nassertr(idx >=0 && idx < _ghost->getNumOverlappingObjects(), NULL);
47 
48  btCollisionObject *object = _ghost->getOverlappingObject(idx);
49  return (object) ? (PandaNode *)object->getUserPointer() : NULL;
50 }
51 
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72