GridNode.hh

00001 /*===========================================================================*\
00002  *                                                                           *
00003  *                              OpenFlipper                                  *
00004  *      Copyright (C) 2001-2009 by Computer Graphics Group, RWTH Aachen      *
00005  *                           www.openflipper.org                             *
00006  *                                                                           *
00007  *---------------------------------------------------------------------------*
00008  *  This file is part of OpenFlipper.                                        *
00009  *                                                                           *
00010  *  OpenFlipper is free software: you can redistribute it and/or modify      *
00011  *  it under the terms of the GNU Lesser General Public License as           *
00012  *  published by the Free Software Foundation, either version 3 of           *
00013  *  the License, or (at your option) any later version with the              *
00014  *  following exceptions:                                                    *
00015  *                                                                           *
00016  *  If other files instantiate templates or use macros                       *
00017  *  or inline functions from this file, or you compile this file and         *
00018  *  link it with other files to produce an executable, this file does        *
00019  *  not by itself cause the resulting executable to be covered by the        *
00020  *  GNU Lesser General Public License. This exception does not however       *
00021  *  invalidate any other reasons why the executable file might be            *
00022  *  covered by the GNU Lesser General Public License.                        *
00023  *                                                                           *
00024  *  OpenFlipper is distributed in the hope that it will be useful,           *
00025  *  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
00026  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
00027  *  GNU Lesser General Public License for more details.                      *
00028  *                                                                           *
00029  *  You should have received a copy of the GNU LesserGeneral Public          *
00030  *  License along with OpenFlipper. If not,                                  *
00031  *  see <http://www.gnu.org/licenses/>.                                      *
00032  *                                                                           *
00033 \*===========================================================================*/
00034 
00035 /*===========================================================================*\
00036  *                                                                           *
00037  *   $Revision: 6810 $                                                       *
00038  *   $Author: wilden $                                                      *
00039  *   $Date: 2009-08-07 12:58:52 +0200 (Fr, 07. Aug 2009) $                   *
00040  *                                                                           *
00041 \*===========================================================================*/
00042 
00043 
00044 
00045 
00046 //=============================================================================
00047 //
00048 //  CLASS GridNode
00049 //
00050 //=============================================================================
00051 
00052 
00053 #ifndef ACG_GRIDNODE_HH
00054 #define ACG_GRIDNODE_HH
00055 
00056 
00057 //== INCLUDES =================================================================
00058 
00059 
00060 #include "MaterialNode.hh"
00061 #include <vector>
00062 
00063 
00064 //== NAMESPACES ===============================================================
00065 
00066 
00067 namespace ACG {
00068 namespace SceneGraph {
00069 
00070 
00071 //== CLASS DEFINITION =========================================================
00072 
00073 
00074 
00081 class ACGDLLEXPORT GridNode : public MaterialNode
00082 {
00083 public:
00084 
00086   GridNode(BaseNode*  _parent=0,
00087              const std::string&  _name="<GridNode>" );
00088 
00090   ~GridNode() {}
00091 
00093   ACG_CLASSNAME(GridNode);
00095   unsigned int availableDrawModes() const;
00097   void boundingBox(Vec3f& _bbMin, Vec3f& _bbMax);
00099   void draw(GLState& _state, unsigned int _drawMode);
00101   void pick(GLState& _state, PickTarget _target);
00102 public:
00103 
00105   float gridSize();
00106 
00107   void gridSize(float _size);
00108 
00109 private:
00110 
00112   int horizontalLines_;
00113   int verticalLines_;
00114   int maxRefinement_;
00115 
00117   float gridSize_;
00118 
00120   Vec3f bb_min_;
00121   Vec3f bb_max_;
00122 
00124   Vec3f baseLineColor_;
00125   Vec3f midLineColor_;
00126 
00127   bool ok_;
00128 };
00129 
00130 
00131 //=============================================================================
00132 } // namespace SceneGraph
00133 } // namespace ACG
00134 //=============================================================================
00135 #endif // ACG_GRIDNODE_HH defined
00136 //=============================================================================
00137 

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .