Panda3D

Loading...
Searching...
No Matches
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
27PUBLISHED:
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
PhysxSphere::set_center
void set_center(LPoint3f value)
Sets the center of the sphere.
Definition physxSphere.cxx:83
PhysxSphere::get_center
LPoint3f get_center() const
Returns the center of the sphere.
Definition physxSphere.cxx:74
PhysxSphere::contains
bool contains(const LPoint3f &p) const
Tests if a point is contained within the sphere.
Definition physxSphere.cxx:30
PhysxSphere::set_radius
void set_radius(float value)
Sets the sphere's radius.
Definition physxSphere.cxx:103
PhysxSphere::is_valid
bool is_valid() const
Returns TRUE if this sphere is valid.
Definition physxSphere.cxx:21
PhysxSphere::get_radius
float get_radius() const
Returns the sphere's radius.
Definition physxSphere.cxx:94
PhysxSphere::intersect
bool intersect(const PhysxSphere &sphere) const
Tests if the sphere intersects another sphere.
Definition physxSphere.cxx:65
config_physx.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxSphere.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.