Panda3D
 All Classes Functions Variables Enumerations
bulletGhostNode.I
00001 // Filename: bulletGhostNode.I
00002 // Created by:  enn0x (19Nov10)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: BulletGhostNode::Destructor
00018 //       Access: Published
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE BulletGhostNode::
00022 ~BulletGhostNode() {
00023 
00024   delete _ghost;
00025 }
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //     Function: BulletGhostNode::get_num_overlapping_nodes
00029 //       Access: Published
00030 //  Description:
00031 ////////////////////////////////////////////////////////////////////
00032 INLINE int BulletGhostNode::
00033 get_num_overlapping_nodes() const {
00034 
00035   return _ghost->getNumOverlappingObjects();
00036 }
00037 
00038 ////////////////////////////////////////////////////////////////////
00039 //     Function: BulletGhostNode::get_overlapping_node
00040 //       Access: Published
00041 //  Description:
00042 ////////////////////////////////////////////////////////////////////
00043 INLINE PandaNode *BulletGhostNode::
00044 get_overlapping_node(int idx) const {
00045 
00046   nassertr(idx >=0 && idx < _ghost->getNumOverlappingObjects(), NULL);
00047 
00048   btCollisionObject *object = _ghost->getOverlappingObject(idx);
00049   return (object) ? (PandaNode *)object->getUserPointer() : NULL;
00050 }
00051 
 All Classes Functions Variables Enumerations