Panda3D
Loading...
Searching...
No Matches
physxForceFieldShape.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 physxForceFieldShape.h
10 * @author enn0x
11 * @date 2009-11-15
12 */
13
14#ifndef PHYSXFORCEFIELDSHAPE_H
15#define PHYSXFORCEFIELDSHAPE_H
16
17#include "pandabase.h"
18#include "pointerTo.h"
19#include "luse.h"
20
21#include "physxObject.h"
22#include "physxEnums.h"
23#include "physx_includes.h"
24
25class PhysxForceField;
27
28/**
29 * Abstract base class for force field shapes.
30 */
31class EXPCL_PANDAPHYSX PhysxForceFieldShape : public PhysxObject, public PhysxEnums {
32
33PUBLISHED:
34 void release();
35
36 PhysxForceField *get_force_field() const;
37 PhysxForceFieldShapeGroup *get_shape_group() const;
38
39 void set_name(const char *name);
40 void set_mat(const LMatrix4f &mat);
41 void set_pos(const LPoint3f &pos);
42
43 const char *get_name() const;
44 LMatrix4f get_mat() const;
45 LPoint3f get_pos() const;
46
47 INLINE void ls() const;
48 INLINE void ls(std::ostream &out, int indent_level=0) const;
49
50public:
51 static PhysxForceFieldShape *factory(NxShapeType shapeType);
52
53 virtual NxForceFieldShape *ptr() const = 0;
54
55 virtual void link(NxForceFieldShape *shapePtr) = 0;
56 virtual void unlink() = 0;
57
58protected:
59 INLINE PhysxForceFieldShape();
60
61private:
62 std::string _name;
63
64public:
65 static TypeHandle get_class_type() {
66 return _type_handle;
67 }
68 static void init_type() {
69 PhysxObject::init_type();
70 register_type(_type_handle, "PhysxForceFieldShape",
71 PhysxObject::get_class_type());
72 }
73 virtual TypeHandle get_type() const {
74 return get_class_type();
75 }
76 virtual TypeHandle force_init_type() {
77 init_type();
78 return get_class_type();
79 }
80
81private:
82 static TypeHandle _type_handle;
83};
84
86
87#endif // PHYSXFORCEFIELDSHAPE_H
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition physxEnums.h:355
Abstract base class for force field shapes.
A force field effector.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...