TAPs 0.7.7.3
TAPsModelArticulatedBody.cpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsModelArticulatedBody.cpp
00003 ******************************************************************************/
00007 /******************************************************************************
00008 SUKITTI PUNAK   (03/25/2010)
00009 UPDATE          (05/01/2010)
00010 ******************************************************************************/
00011 #include "TAPsModelArticulatedBody.hpp"
00012 // Using Inclusion Model (i.e. definitions are included in declarations)
00013 //                       (this name.cpp is included in name.hpp)
00014 // Each friend is defined directly inside its declaration.
00015 
00016 BEGIN_NAMESPACE_TAPs
00017 //=============================================================================
00018 // Constructors
00019 //-----------------------------------------------------------------------------
00020 template <typename T>
00021 ModelArticulatedBody<T>::ModelArticulatedBody ()
00022 {}
00023 //-----------------------------------------------------------------------------
00024 template <typename T>
00025 ModelArticulatedBody<T>::ModelArticulatedBody ( std::string articulatedBodyFile )
00026 {}
00027 //-----------------------------------------------------------------------------
00028 //template <typename T>
00029 //ModelArticulatedBody<T>::ModelArticulatedBody ( ModelArticulatedBody<T> const &orig )
00030 //  : 
00031 //{}
00032 //-----------------------------------------------------------------------------
00033 template <typename T>
00034 ModelArticulatedBody<T>::~ModelArticulatedBody ()
00035 {}  
00036 //-----------------------------------------------------------------------------
00037 template <typename T>
00038 std::string ModelArticulatedBody<T>::StrInfo () const
00039 {
00040     std::ostringstream ss;
00041     ss << "ModelArticulatedBody<" << typeid(T).name() << ">";
00042     return ss.str();
00043 }
00044 //-----------------------------------------------------------------------------
00045 
00046 
00047 //=============================================================================
00048 // OpenGL
00049 #if defined(__gl_h_) || defined(__GL_H__)
00050 //-----------------------------------------------------------------------------
00052 template <typename T>
00053 void ModelArticulatedBody<T>::Draw () const
00054 {
00055     for ( unsigned int i = 0; i < m_ListRigidBodies.size(); ++i ) {
00056         glPushMatrix();
00057         glTranslatef( m_ListRigidBodies[i].GetOriginPoint()[0], m_ListRigidBodies[i].GetOriginPoint()[1], m_ListRigidBodies[i].GetOriginPoint()[2] );
00058         m_ListRigidBodies[i].GetOrientation().TransformByOpenGLForDrawing();
00059         m_ListRigidBodies[i].Draw();
00060         glPopMatrix();
00061     }
00062 }
00063 //-----------------------------------------------------------------------------
00064 #endif  // OpenGL
00065 //=============================================================================
00066 
00067 
00068 //=============================================================================
00069 END_NAMESPACE_TAPs
00070 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00071 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines