Panda3D

physxForceFieldDesc.h

00001 // Filename: physxForceFieldDesc.h
00002 // Created by:  enn0x (06Nov09)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef PHYSXFORCEFIELDDESC_H
00016 #define PHYSXFORCEFIELDDESC_H
00017 
00018 #include "pandabase.h"
00019 #include "luse.h"
00020 
00021 #include "physxEnums.h"
00022 #include "physx_includes.h"
00023 
00024 class PhysxActor;
00025 class PhysxForceFieldShapeDesc;
00026 class PhysxForceFieldShapeGroup;
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 //       Class : PhysxForceFieldDesc
00030 // Description : Descriptor class for force fields.
00031 ////////////////////////////////////////////////////////////////////
00032 class EXPCL_PANDAPHYSX PhysxForceFieldDesc : public PhysxEnums {
00033 
00034 PUBLISHED:
00035   INLINE PhysxForceFieldDesc();
00036   INLINE ~PhysxForceFieldDesc();
00037 
00038   INLINE void set_to_default();
00039   INLINE bool is_valid() const;
00040 
00041   void set_name(const char *name);
00042   void set_pos(const LPoint3f &pos);
00043   void set_mat(const LMatrix4f &mat);
00044   void set_hpr(float h, float p, float r);
00045   void set_coordinates(PhysxForceFieldCoordinates coordinates);
00046   void set_actor(PhysxActor *actor);
00047 
00048   void set_kernel_constant(const LVector3f &constant);
00049   void set_kernel_position_target(const LPoint3f &target);
00050   void set_kernel_position_multiplier(const LMatrix3f &multiplier);
00051   void set_kernel_velocity_target(const LVector3f &target);
00052   void set_kernel_velocity_multiplier(const LMatrix3f &multiplier);
00053   void set_kernel_torus_radius(float radius);
00054   void set_kernel_falloff_linear(const LVector3f &falloff);
00055   void set_kernel_falloff_quadratic(const LVector3f &falloff);
00056   void set_kernel_noise(const LVector3f &noise);
00057 
00058   void add_include_group_shape(PhysxForceFieldShapeDesc &shapeDesc);
00059   void add_shape_group(PhysxForceFieldShapeGroup *group);
00060 
00061 public:
00062   void create_kernel(NxScene *scenePtr);
00063 
00064   NxForceFieldDesc _desc;
00065   NxForceFieldLinearKernelDesc _kernel;
00066 
00067 private:
00068   string _name;
00069 };
00070 
00071 #include "physxForceFieldDesc.I"
00072 
00073 #endif // PHYSXFORCEFIELDDESC_H
 All Classes Functions Variables Enumerations