TAPs 0.7.7.3
TAPsParticleVertex.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsParticleVertex.hpp
00003 ******************************************************************************/
00009 /******************************************************************************
00010 SUKITTI PUNAK   (11/08/2004)
00011 UPDATE          (08/06/2010)
00012 ******************************************************************************/
00013 #ifndef TAPs_PARTICLE_VERTEX_HPP
00014 #define TAPs_PARTICLE_VERTEX_HPP
00015 
00016 #include "TAPsParticleBase.hpp"
00017 #include "../GeometricDataStructure/TAPsVertex.hpp"
00018 
00019 BEGIN_NAMESPACE_TAPs
00020 //=============================================================================
00021 template <typename T>
00022 class ParticleVertex : public /*virtual*/ ParticleBase<T> {
00023 //=============================================================================
00024     //-------------------------------------------------------------------------
00025     // Friend Function
00026     friend std::ostream & operator<< ( std::ostream &output, ParticleVertex<T> const &P )
00027     {
00028         return output << P.StrInfo();
00029     }
00030 //-----------------------------------------------------------------------------
00031 private:
00032     // Data Members     ========================================================
00033     Vector3<T> &    m_rcNormal;     // reference to normal vector of vertex
00034     Vector3<T> &    m_rcPosit;      // reference to position vector of vertex
00035     //-------------------------------------------------------------------------
00036 public:
00037     // Member Functions     ====================================================
00038 
00040     ParticleVertex ( 
00041         Vertex<T>  const &  vertex,
00042         bool                fixed = false );
00043 
00045     ParticleVertex ( 
00046         T                   mass, 
00047         Vector3<T> const &  vPosition, 
00048         Vector3<T> const &  vNormal, 
00049         Vector3<T> const &  vVelocity, 
00050         Vector3<T> const &  vAcceleration, 
00051         Vector3<T> const &  vForce, 
00052         bool                fixed = false );
00053 
00055     ParticleVertex ( 
00056         T                   mass, 
00057         Vertex<T>  &        vertex,
00058         Vector3<T> const &  vVelocity, 
00059         Vector3<T> const &  vAcceleration, 
00060         Vector3<T> const &  vForce, 
00061         bool                fixed = false );
00062 
00064     ~ParticleVertex ();
00065 
00067     virtual std::string StrInfo () const;
00068 
00069     //-------------------------------------------------------------------------
00070     // Get/Set Functions
00071 
00072     // Virtual Functions:
00073     // Overrided from ParticleBase<T>
00074     inline virtual Vector3<T> const & RefToNormal () const;
00075     inline virtual Vector3<T>       & RefToNormal ();
00076     inline virtual Vector3<T> const & GetNormal () const;
00077     inline virtual void SetNormal ( Vector3<T> const & );
00078     inline virtual void SetNormal ( T x, T y, T z );
00079     inline virtual Vector3<T> const & RefToPosition () const;
00080     inline virtual Vector3<T>       & RefToPosition ();
00081     inline virtual Vector3<T> const & GetPosition () const;
00082     inline virtual void SetPosition ( Vector3<T> const & );
00083     inline virtual void SetPosition ( T x, T y, T z );
00084 
00085     //-------------------------------------------------------------------------
00086 private:
00087     // Prohibited Functions ====================================================
00088     // Since a ParticleVertex refers to two vertices, therefore
00089     // Copy Constructor and Assignment Operator are prohibited.
00090     ParticleVertex<T> const & operator= ( ParticleVertex<T> const &S ); // assignment operator
00091     //-------------------------------------------------------------------------
00092 }; // END CLASS ParticleVertex
00093 //=============================================================================
00094 END_NAMESPACE_TAPs
00095 //-----------------------------------------------------------------------------
00096 // Include definition if TAPs_USE_EXPORT is not defined
00097 //#if !defined( TAPs_USE_EXPORT )
00098     #include "TAPsParticleVertex.cpp"
00099 //#endif
00100 //-----------------------------------------------------------------------------
00101 #endif
00102 //345678901234567890123456789012345678901234567890123456789012345678901234567890
00103 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines