Panda3D

Loading...
Searching...
No Matches
bulletClosestHitSweepResult.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file bulletClosestHitSweepResult.h
10 * @author enn0x
11 * @date 2010-12-01
12 */
13
14#ifndef __BULLET_CLOSEST_HIT_SWEEP_RESULT_H__
15#define __BULLET_CLOSEST_HIT_SWEEP_RESULT_H__
16
17#include "pandabase.h"
18
19#include "bullet_includes.h"
20#include "bullet_utils.h"
21
22#include "luse.h"
23#include "pandaNode.h"
24#include "collideMask.h"
25
26/**
27 *
28 */
29 struct EXPCL_PANDABULLET BulletClosestHitSweepResult : public btCollisionWorld::ClosestConvexResultCallback {
30
31PUBLISHED:
32 INLINE static BulletClosestHitSweepResult empty();
33
34 LPoint3 get_from_pos() const;
35 LPoint3 get_to_pos() const;
36
37 bool has_hit() const;
38
39 PandaNode *get_node() const;
40 LPoint3 get_hit_pos() const;
41 LVector3 get_hit_normal() const;
42 PN_stdfloat get_hit_fraction() const;
43
44 MAKE_PROPERTY(from_pos, get_from_pos);
45 MAKE_PROPERTY(to_pos, get_to_pos);
46 MAKE_PROPERTY(node, get_node);
47 MAKE_PROPERTY(hit_pos, get_hit_pos);
48 MAKE_PROPERTY(hit_normal, get_hit_normal);
49 MAKE_PROPERTY(hit_fraction, get_hit_fraction);
50
51 public:
52 virtual bool needsCollision(btBroadphaseProxy* proxy0) const;
53
54 private:
55 BulletClosestHitSweepResult(const btVector3 &from_pos, const btVector3 &to_pos, const CollideMask &mask);
56
57 CollideMask _mask;
58
59 friend class BulletWorld;
60};
61
62#include "bulletClosestHitSweepResult.I"
63
64#endif // __BULLET_CLOSEST_HIT_SWEEP_RESULT_H__
bulletClosestHitSweepResult.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bullet_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bullet_utils.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PandaNode
A basic node of the scene graph or data graph.
Definition pandaNode.h:65
collideMask.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandaNode.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
BulletClosestHitSweepResult::empty
static BulletClosestHitSweepResult empty()
Named constructor intended to be used for asserts with have to return a concrete value.
Definition bulletClosestHitSweepResult.I:19
BulletClosestHitSweepResult::needsCollision
virtual bool needsCollision(btBroadphaseProxy *proxy0) const
Override default implementation.
Definition bulletClosestHitSweepResult.cxx:29