Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/physics/linearCylinderVortexForce.h

Go to the documentation of this file.
00001 // Filename: linearCylinderVortexForce.h
00002 // Created by:  charles (24Jul00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef LINEARCYLINDERVORTEXFORCE_H
00020 #define LINEARCYLINDERVORTEXFORCE_H
00021 
00022 #include "linearForce.h"
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : LinearCylinderVortexForce
00026 // Description : Defines a cylinder inside of which all forces are
00027 //               tangential to the theta of the particle wrt the
00028 //               z-axis in local coord. space.  This happens by
00029 //               assigning the force a node by which the cylinder is
00030 //               transformed.  Be warned- this will suck anything
00031 //               that it can reach directly into orbit and will NOT
00032 //               let go.
00033 ////////////////////////////////////////////////////////////////////
00034 class EXPCL_PANDAPHYSICS LinearCylinderVortexForce : public LinearForce {
00035 private:
00036   float _radius;
00037   float _length;
00038   float _coef;
00039 
00040   virtual LinearForce *make_copy(void);
00041   virtual LVector3f get_child_vector(const PhysicsObject *po);
00042 
00043 PUBLISHED:
00044   LinearCylinderVortexForce(float radius = 1.0f,
00045                       float length = 0.0f,
00046                       float coef = 1.0f,
00047                       float a = 1.0f,
00048                       bool md = false);
00049   LinearCylinderVortexForce(const LinearCylinderVortexForce &copy);
00050   virtual ~LinearCylinderVortexForce(void);
00051 
00052   INLINE void set_coef(float coef);
00053   INLINE float get_coef(void) const;
00054 
00055   INLINE void set_radius(float radius);
00056   INLINE float get_radius(void) const;
00057 
00058   INLINE void set_length(float length);
00059   INLINE float get_length(void) const;
00060 
00061 public:
00062   static TypeHandle get_class_type(void) {
00063     return _type_handle;
00064   }
00065   static void init_type(void) {
00066     LinearForce::init_type();
00067     register_type(_type_handle, "LinearCylinderVortexForce",
00068                   LinearForce::get_class_type());
00069   }
00070   virtual TypeHandle get_type(void) const {
00071     return get_class_type();
00072   }
00073   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00074 
00075 private:
00076   static TypeHandle _type_handle;
00077 };
00078 
00079 #include "linearCylinderVortexForce.I"
00080 
00081 #endif // LINEARCYLINDERVORTEXFORCE_H

Generated on Fri May 2 00:42:53 2003 for Panda by doxygen1.3