00001 /* -*- C++ -*- */ 00002 00003 /* COPYRIGHT 00004 * 00005 * This file is part of the Visual Effects Engine - VEE 00006 * 00007 * Read the "VEE-LICENSE" file for the license. 00008 * 00009 * Authors & Copyright: 00010 * 00011 * Tommi Ilmonen, Tuukka Heikura, Marko Myllymaa and 00012 * Janne Kontkanen 2001-2004 00013 * 00014 * Additional copyrights: Tekes 2003-2004 00015 * 00016 * firstname.lastname@hut.fi 00017 * 00018 */ 00019 00020 #ifndef VEE_TUBE_H 00021 #define VEE_TUBE_H 00022 00023 #include <vee_force_object.h> 00024 00025 class VEE_Tube : public VEE_ForceObject 00026 { 00027 public: 00028 VEE_Tube(); 00029 virtual ~VEE_Tube(); 00030 00031 virtual bool setValue(const char *, VEE_Value *); 00032 virtual VEE_Variable getVariable(const char *) const; 00033 virtual VEE_Object * clone() const; 00034 00035 void getForce(VEE_Vector3 *force, 00036 const VEE_Vector3 &velocity, 00037 const VEE_Vector3 &location); 00038 00039 void boundingBoxOfForce(VEE_BoundingBox *box); 00040 00041 static VEE_Object * factory(); 00042 00043 float height() const { return m_height; } 00044 float radius() const { return m_radius; } 00045 00046 const VEE_Matrix3 & rotation() { return m_rotation; } 00047 00048 protected: 00049 00050 float m_height; 00051 float m_radius; 00052 float m_effectRange; 00053 float m_magnitude; 00054 00055 VEE_Matrix3 m_rotation; 00056 VEE_Matrix3 m_rotationInv; 00057 }; 00058 00059 #endif