Panda3D
Loading...
Searching...
No Matches
physxBounds3.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 physxBounds3.h
10 * @author enn0x
11 * @date 2009-10-31
12 */
13
14#ifndef PHYSXBOUNDS3_H
15#define PHYSXBOUNDS3_H
16
17#include "pandabase.h"
18#include "luse.h"
19
20#include "config_physx.h"
21#include "physx_includes.h"
22
23/**
24 * Represention of a axis aligned bounding box. The box is stored as minimum
25 * and maximum extent corners. Alternate representation would be center and
26 * dimensions. May be empty or nonempty. If not empty, min <= max has to
27 * hold.
28 */
29class EXPCL_PANDAPHYSX PhysxBounds3 {
30
31PUBLISHED:
32 INLINE PhysxBounds3();
33 INLINE ~PhysxBounds3();
34
35 void bounds_of_obb(const LMatrix3f &orientation, const LPoint3f &translation, const LVector3f &half_dims);
36 void combine(const PhysxBounds3 &b2);
37 bool contain(const LPoint3f &p) const;
38 void fatten(float distance);
39 void include(const LPoint3f &v);
40 bool intersects(const PhysxBounds3 &b) const;
41 bool intersects2d(const PhysxBounds3 &b, unsigned axis_to_ignore) const;
42 bool is_empty() const;
43 void scale(float scale);
44 void set(const LPoint3f &min, const LPoint3f &max);
45 void set_center_extents(const LPoint3f &center, const LVector3f &extents);
46 void set_empty();
47 void set_infinite();
48 void transform(const LMatrix3f &orientation, const LPoint3f &translation);
49
50 LPoint3f get_max() const;
51 LPoint3f get_min() const;
52 LPoint3f get_center() const;
53 LVector3f get_dimensions() const;
54
55 void set_max(LPoint3f value);
56 void set_min(LPoint3f value);
57
58public:
59 NxBounds3 _bounds;
60};
61
62#include "physxBounds3.I"
63
64#endif // PHYSBOUNDS3_H
Represention of a axis aligned bounding box.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.