Panda3D
Loading...
Searching...
No Matches
physxShapeDesc.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 physxShapeDesc.h
10 * @author enn0x
11 * @date 2009-09-08
12 */
13
14#ifndef PHYSXSHAPEDESC_H
15#define PHYSXSHAPEDESC_H
16
17#include "pandabase.h"
18#include "luse.h"
19
20#include "physxEnums.h"
21#include "physx_includes.h"
22
23class PhysxMaterial;
24
25/**
26 * Abstract base class for shape descriptors. Descriptors for all the
27 * different shape types are derived from this class.
28 */
29class EXPCL_PANDAPHYSX PhysxShapeDesc : public PhysxEnums, public ReferenceCount {
30
31PUBLISHED:
32 virtual void set_to_default() = 0;
33 virtual bool is_valid() const = 0;
34
35 void set_name(const char *name);
36 void set_trigger(bool value);
37 void set_local_pos(const LPoint3f &pos);
38 void set_local_mat(const LMatrix4f &mat);
39 void set_local_hpr(float h, float p, float r);
40 void set_skin_width(float skinWidth);
41 void set_shape_flag(const PhysxShapeFlag flag, bool value);
42 void set_mass(float mass);
43 void set_density(float density);
44 void set_group(unsigned short group);
45 void set_material(const PhysxMaterial &material);
46 void set_material_index(unsigned short index);
47
48 const char *get_name() const;
49 LPoint3f get_local_pos() const;
50 LMatrix4f get_local_mat() const;
51 float get_skin_width() const;
52 bool get_shape_flag(const PhysxShapeFlag flag) const;
53 float get_mass() const;
54 float get_density() const;
55 unsigned short get_group() const;
56 unsigned short get_material_index() const;
57
58public:
59 virtual NxShapeDesc *ptr() const = 0;
60
61private:
62 std::string _name;
63
64protected:
65 INLINE PhysxShapeDesc();
66 INLINE ~PhysxShapeDesc();
67};
68
69#include "physxShapeDesc.I"
70
71#endif // PHYSXSHAPEDESC_H
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition physxEnums.h:355
A class for describing a shape's surface properties.
Abstract base class for shape descriptors.
A base class for all things that want to be reference-counted.
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.