Ignore:
Timestamp:
05/24/06 10:47:49 (18 years ago)
Author:
gumbau
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshView.h

    r895 r980  
    22#ifndef GeoMeshView_h 
    33#define GeoMeshView_h 
     4#include "GL/glew.h" 
     5#ifdef _WIN32 
     6#include "GL/wglew.h" 
     7#endif 
    48 
    59#include        <fltk/events.h> 
     
    1115#include        <GeoVertexBuffer.h> 
    1216#include        <GeoMesh.h> 
    13 //#ifndef       GeoMeshViewUI_h 
    1417#include        <GeoMeshSaver.h> 
    1518#include        <GeoMeshViewUI.h> 
    1619 
    17 //#endif 
    1820namespace Geometry{ class LodTreeLibrary; } 
    1921 
     
    120122        void    smooth(){glShadeModel(GL_SMOOTH);}; 
    121123 
     124        //      Change Open GL context. 
     125#ifdef _WIN32 
     126        HDC hOldDC; 
     127        HGLRC hOldRC; 
     128#endif 
     129        void    saveContext() 
     130        { 
     131#ifdef _WIN32 
     132                hOldDC = wglGetCurrentDC(); 
     133                hOldRC = wglGetCurrentContext(); 
     134#endif 
     135        } 
     136        void    restoreContext() 
     137        { 
     138#ifdef _WIN32 
     139                wglMakeCurrent( hOldDC, hOldRC ); 
     140#endif 
     141        } 
     142 
    122143        //      Fits the object in the window view. 
    123144        void    fit() 
     
    142163 
    143164        //      Gets the bounding box. 
    144         Geometry::GeometryBounds        getBoundingBox(); 
     165        //Geometry::GeometryBounds      getBoundingBox(); 
    145166 
    146167        //      Store one random color to each strip. 
     
    151172 
    152173        //      JGA 
    153         //      Sets the colorsubmeshi variable 
    154         void    setColorSubmeshi(int submeshIndex); 
     174        //      Sets the submesh selected. 
     175        void    setSubMeshSelected(int submeshIndex); 
    155176 
    156177        //      Sets the leaves submesh index. 
    157         void    setLeavesSubmesh(int submeshIndex); 
     178        void    setLeavesSubMesh(int submeshIndex); 
    158179 
    159180        //      Gets the leaves submesh index. 
    160         int     getLeavesSubmesh(); 
     181        int     getLeavesSubMesh(); 
    161182 
    162183        //      Gets the triangle count of the current lod. 
     
    165186        //      Sets the lodstripslibrary object. 
    166187        void    setLodStripsLibrary(Geometry::LodStripsLibrary *lodstrips); 
     188 
    167189        //      Sets the lodtreeslibrary object. 
    168190        void    setLodTreesLibrary(Geometry::LodTreeLibrary *lodtrees); 
     
    191213 
    192214        // Stores the index of the mesh to paint of red color. 
    193         int             colorsubmeshi; 
     215        int             mSubMeshSelected; 
    194216 
    195217        //      Frames per second. 
     
    203225        float           zMed; 
    204226 
    205         int                     leavesSubmesh; 
     227        int                     leavesSubMesh; 
    206228         
    207229        //      Submesh count. 
     
    214236 
    215237        //      Paint the mesh object. 
    216         void    drawGeoMesh(int selectedMesh); 
    217         void    drawTriangleList(int submesh, bool selectedMesh); 
     238        void    drawGeoMesh(bool paintWire); 
     239        void    drawTriangleList(int submesh, bool selectedMesh, bool paintWire); 
    218240        void    drawTriangleStrip(int submesh); 
    219241        void    drawLodStrip(); 
Note: See TracChangeset for help on using the changeset viewer.