Panda3D
physxForceFieldDesc.h
1 // Filename: physxForceFieldDesc.h
2 // Created by: enn0x (06Nov09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXFORCEFIELDDESC_H
16 #define PHYSXFORCEFIELDDESC_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "physxEnums.h"
22 #include "physx_includes.h"
23 
24 class PhysxActor;
27 
28 ////////////////////////////////////////////////////////////////////
29 // Class : PhysxForceFieldDesc
30 // Description : Descriptor class for force fields.
31 ////////////////////////////////////////////////////////////////////
32 class EXPCL_PANDAPHYSX PhysxForceFieldDesc : public PhysxEnums {
33 
34 PUBLISHED:
35  INLINE PhysxForceFieldDesc();
36  INLINE ~PhysxForceFieldDesc();
37 
38  INLINE void set_to_default();
39  INLINE bool is_valid() const;
40 
41  void set_name(const char *name);
42  void set_pos(const LPoint3f &pos);
43  void set_mat(const LMatrix4f &mat);
44  void set_hpr(float h, float p, float r);
45  void set_coordinates(PhysxForceFieldCoordinates coordinates);
46  void set_actor(PhysxActor *actor);
47 
48  void set_kernel_constant(const LVector3f &constant);
49  void set_kernel_position_target(const LPoint3f &target);
50  void set_kernel_position_multiplier(const LMatrix3f &multiplier);
51  void set_kernel_velocity_target(const LVector3f &target);
52  void set_kernel_velocity_multiplier(const LMatrix3f &multiplier);
53  void set_kernel_torus_radius(float radius);
54  void set_kernel_falloff_linear(const LVector3f &falloff);
55  void set_kernel_falloff_quadratic(const LVector3f &falloff);
56  void set_kernel_noise(const LVector3f &noise);
57 
58  void add_include_group_shape(PhysxForceFieldShapeDesc &shapeDesc);
59  void add_shape_group(PhysxForceFieldShapeGroup *group);
60 
61 public:
62  void create_kernel(NxScene *scenePtr);
63 
64  NxForceFieldDesc _desc;
65  NxForceFieldLinearKernelDesc _kernel;
66 
67 private:
68  string _name;
69 };
70 
71 #include "physxForceFieldDesc.I"
72 
73 #endif // PHYSXFORCEFIELDDESC_H
Abstract base class for descriptors for force field shapes descriptors.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
Descriptor class for force fields.
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:357
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:451
Actors are the main simulation objects.
Definition: physxActor.h:48
This is a 3-by-3 transform matrix.
Definition: lmatrix.h:110