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

panda/src/physics/angularVectorForce.h

Go to the documentation of this file.
00001 // Filename: angularVectorForce.h
00002 // Created by:  charles (09Aug00)
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 ANGULARVECTORFORCE_H
00020 #define ANGULARVECTORFORCE_H
00021 
00022 #include "angularForce.h"
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : AngularVectorForce
00026 // Description : a simple directed torque force, the angular
00027 //               equivalent of simple vector force.
00028 ////////////////////////////////////////////////////////////////////
00029 class EXPCL_PANDAPHYSICS AngularVectorForce : public AngularForce {
00030 private:
00031   LVector3f _fvec;
00032 
00033   virtual AngularForce *make_copy(void) const;
00034   virtual LVector3f get_child_vector(const PhysicsObject *po);
00035 
00036 PUBLISHED:
00037   AngularVectorForce(const LVector3f& vec);
00038   AngularVectorForce(float x = 0.0f, float y = 0.0f, float z = 0.0f);
00039   AngularVectorForce(const AngularVectorForce &copy);
00040   virtual ~AngularVectorForce(void);
00041 
00042   INLINE void set_vector(const LVector3f& v);
00043   INLINE void set_vector(float x, float y, float z);
00044   INLINE LVector3f get_local_vector(void) const;
00045 
00046 public:
00047   static TypeHandle get_class_type(void) {
00048     return _type_handle;
00049   }
00050   static void init_type(void) {
00051     AngularForce::init_type();
00052     register_type(_type_handle, "AngularVectorForce",
00053                   AngularForce::get_class_type());
00054   }
00055   virtual TypeHandle get_type(void) const {
00056     return get_class_type();
00057   }
00058   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00059 
00060 private:
00061   static TypeHandle _type_handle;
00062 };
00063 
00064 #include "angularVectorForce.I"
00065 
00066 #endif // ANGULARVECTORFORCE_H

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