Panda3D
physxSphere.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 physxSphere.h
10  * @author enn0x
11  * @date 2009-10-31
12  */
13 
14 #ifndef PHYSXSPHERE_H
15 #define PHYSXSPHERE_H
16 
17 #include "pandabase.h"
18 #include "luse.h"
19 
20 #include "config_physx.h"
21 
22 /**
23  * Represents a sphere defined by its center point and radius.
24  */
25 class EXPCL_PANDAPHYSX PhysxSphere {
26 
27 PUBLISHED:
28  INLINE PhysxSphere();
29  INLINE PhysxSphere(const PhysxSphere &sphere);
30  INLINE ~PhysxSphere();
31 
32  bool contains(const LPoint3f &p) const;
33  bool contains(const PhysxSphere &sphere) const;
34  bool contains(const LPoint3f &min, const LPoint3f &max) const;
35  bool intersect(const PhysxSphere &sphere) const;
36  bool is_valid() const;
37 
38  LPoint3f get_center() const;
39  float get_radius() const;
40 
41  void set_center(LPoint3f value);
42  void set_radius(float value);
43 
44 public:
45  NxSphere _sphere;
46 };
47 
48 #include "physxSphere.I"
49 
50 #endif // PHYSSPHERE_H
Represents a sphere defined by its center point and radius.
Definition: physxSphere.h:25
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.