Panda3D
 All Classes Functions Variables Enumerations
bulletClosestHitSweepResult.h
1 // Filename: bulletClosestHitSweepResult.h
2 // Created by: enn0x (01Dec10)
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 __BULLET_CLOSEST_HIT_SWEEP_RESULT_H__
16 #define __BULLET_CLOSEST_HIT_SWEEP_RESULT_H__
17 
18 #include "pandabase.h"
19 
20 #include "bullet_includes.h"
21 #include "bullet_utils.h"
22 
23 #include "luse.h"
24 #include "pandaNode.h"
25 #include "collideMask.h"
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : BulletClosestHitSweepResult
29 // Description :
30 ////////////////////////////////////////////////////////////////////
31 struct EXPCL_PANDABULLET BulletClosestHitSweepResult : public btCollisionWorld::ClosestConvexResultCallback {
32 
33 PUBLISHED:
34  INLINE static BulletClosestHitSweepResult empty();
35 
36  LPoint3 get_from_pos() const;
37  LPoint3 get_to_pos() const;
38 
39  bool has_hit() const;
40 
41  const PandaNode *get_node() const;
42  LPoint3 get_hit_pos() const;
43  LVector3 get_hit_normal() const;
44  PN_stdfloat get_hit_fraction() const;
45 
46 public:
47  virtual bool needsCollision(btBroadphaseProxy* proxy0) const;
48 
49 private:
50  BulletClosestHitSweepResult(const btVector3 &from_pos, const btVector3 &to_pos, const CollideMask &mask);
51 
52  CollideMask _mask;
53 
54  friend class BulletWorld;
55 };
56 
57 #include "bulletClosestHitSweepResult.I"
58 
59 #endif // __BULLET_CLOSEST_HIT_SWEEP_RESULT_H__
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
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