TAPs 0.7.7.3
TAPsOpenGLModel.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 OpenGLModel.hpp
00003 
00004 A Base (Abstract) OpenGL Model
00005 
00006 SUKITTI PUNAK   (11/02/2004)
00007 UPDATE          (03/15/2006)
00008 ******************************************************************************/
00009 #ifndef TAPs_OPENGL_MODEL_HPP
00010 #define TAPs_OPENGL_MODEL_HPP
00011 
00012 #include "../OpenGLModel/TAPsModel.hpp"
00013 #include "../OpenGL/TAPsOpenGLUsefulObjs.hpp"
00014 #include "../OpenGL/TAPsOpenGLSupport.hpp"
00015 //#include "../Support/TAPsColDetSupport.hpp"
00016 
00017 BEGIN_NAMESPACE_TAPs__OpenGL
00018 //=============================================================================
00019 template <typename T>
00020 class OpenGLModel : public /*virtual*/ Model<T>, 
00021                     public /*virtual*/ OpenGLSupport {
00022 //                  public /*virtual*/ ColDetSupport<T> {
00023 //-----------------------------------------------------------------------------
00024 // Member Functions ------------------------------------------------------------
00025 public:
00026     //-------------------------------------------------------------------------
00028     friend std::ostream & operator<< ( std::ostream &output, OpenGLModel<T> const &obj )
00029     {
00030         output << obj.StrInfo();
00031         return output;
00032     }
00033     //-------------------------------------------------------------------------
00035     virtual std::string StrInfo () const;
00036     //-------------------------------------------------------------------------
00037     // default constructor
00038     OpenGLModel ();
00039     //-------------------------------------------------------------------------
00040     // destructor
00041     virtual ~OpenGLModel ();
00042     //-------------------------------------------------------------------------
00043     // Display By OpenGL
00044     virtual void Draw ( OpenGL::Enum::DrawMode DM = OpenGL::Enum::POLYGON ) { DisplayGL( DM ); }
00045     virtual void DisplayGL ( OpenGL::Enum::DrawMode = OpenGL::Enum::POLYGON );
00046     //-------------------------------------------------------------------------
00047     // Bounding Volume
00048     virtual void DrawBoundingAABB ();
00049     virtual void DrawBoundingEllipsoid ();
00050     virtual void DrawBoundingSphere ();
00051     //-------------------------------------------------------------------------
00052     // Get/Set Fn(s)
00053     // A derived model class should overwrite this fn in order to set display 
00054     // vertex normals status
00055     virtual inline void ToggleDisplayVertexNormals () {};
00056     virtual void DrawVertexNormals () {};
00057 };
00058 //=============================================================================
00059 END_NAMESPACE_TAPs__OpenGL
00060 //-----------------------------------------------------------------------------
00061 // Include definition if TAPs_USE_EXPORT is not defined
00062 //#if !defined( TAPs_USE_EXPORT )
00063     #include "TAPsOpenGLModel.cpp"
00064 //#endif
00065 //-----------------------------------------------------------------------------
00066 #endif
00067 //345678901234567890123456789012345678901234567890123456789012345678901234567890
00068 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines