Panda3D
physxForceFieldDesc.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 physxForceFieldDesc.h
10  * @author enn0x
11  * @date 2009-11-06
12  */
13 
14 #ifndef PHYSXFORCEFIELDDESC_H
15 #define PHYSXFORCEFIELDDESC_H
16 
17 #include "pandabase.h"
18 #include "luse.h"
19 
20 #include "physxEnums.h"
21 #include "physx_includes.h"
22 
23 class PhysxActor;
26 
27 /**
28  * Descriptor class for force fields.
29  */
30 class EXPCL_PANDAPHYSX PhysxForceFieldDesc : public PhysxEnums {
31 
32 PUBLISHED:
33  INLINE PhysxForceFieldDesc();
34  INLINE ~PhysxForceFieldDesc();
35 
36  INLINE void set_to_default();
37  INLINE bool is_valid() const;
38 
39  void set_name(const char *name);
40  void set_pos(const LPoint3f &pos);
41  void set_mat(const LMatrix4f &mat);
42  void set_hpr(float h, float p, float r);
43  void set_coordinates(PhysxForceFieldCoordinates coordinates);
44  void set_actor(PhysxActor *actor);
45 
46  void set_kernel_constant(const LVector3f &constant);
47  void set_kernel_position_target(const LPoint3f &target);
48  void set_kernel_position_multiplier(const LMatrix3f &multiplier);
49  void set_kernel_velocity_target(const LVector3f &target);
50  void set_kernel_velocity_multiplier(const LMatrix3f &multiplier);
51  void set_kernel_torus_radius(float radius);
52  void set_kernel_falloff_linear(const LVector3f &falloff);
53  void set_kernel_falloff_quadratic(const LVector3f &falloff);
54  void set_kernel_noise(const LVector3f &noise);
55 
56  void add_include_group_shape(PhysxForceFieldShapeDesc &shapeDesc);
57  void add_shape_group(PhysxForceFieldShapeGroup *group);
58 
59 public:
60  void create_kernel(NxScene *scenePtr);
61 
62  NxForceFieldDesc _desc;
63  NxForceFieldLinearKernelDesc _kernel;
64 
65 private:
66  std::string _name;
67 };
68 
69 #include "physxForceFieldDesc.I"
70 
71 #endif // PHYSXFORCEFIELDDESC_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Abstract base class for descriptors for force field shapes descriptors.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Descriptor class for force fields.
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:355
Actors are the main simulation objects.
Definition: physxActor.h:44
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.