Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SceneGridGround.hh
1 /*
2  This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4  Copyright (C) 2003, 2004 (see file CONTACTS for details)
5  Multimediale Systeme der Informationsverarbeitung
6  Institut fuer Informatik
7  Christian-Albrechts-Universitaet Kiel
8 
9 
10  BIAS is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation; either version 2.1 of the License, or
13  (at your option) any later version.
14 
15  BIAS is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with BIAS; if not, write to the Free Software
22  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 #ifndef __SCENEGRIDGROUND_HH_
26 #define __SCENEGRIDGROUND_HH_
27 
28 #include <bias_config.h>
29 
30 #include <GLviewer/Scenes/SceneBase.hh>
31 
32 namespace BIAS
33 {
34  /**
35  @class SceneGridGround
36  @brief Display a grid ground for orientation.
37  @author jordt
38  @ingroup g_glviewer
39  */
40  class BIASGLviewer_EXPORT SceneGridGround : public BIAS::SceneBase
41  {
42  public:
43 
44  /** @brief Create a square grid ground from position (from, from, z) to
45  position (to, to, z) at constant z value with given grid size,
46  i.e. grid ground is parallel to x/y plane by default. */
47  SceneGridGround(double from = -1000.0, double to = 1000.0,
48  double gridSize = 50.0, double z = 0.0);
49 
50  ~SceneGridGround();
51 
52  /** @brief Initialize the square ground. Only needed if changes are to be
53  applied to the parameters. */
54  void Resize(double from = -1000.0, double to = 1000.0, double gridSize = 50.0,
55  double z = 0.0);
56 
57  /** @brief Set the color of the grid ground. */
58  void SetColor(float r, float g, float b);
59 
60  /** @brief Specify if grid ground is parallel to x/y plane or x/z plane. */
61  void DrawInXYPlane(bool xyplane);
62 
63  /** @brief Implementation of the SceneBase Draw method. */
64  virtual void Draw();
65 
66  /** @brief Implementation of the SceneBase GetBoundingBox method. */
67  virtual void GetBoundingBox(BIAS::Vector3<double> &minVal,
68  BIAS::Vector3<double> &maxVal);
69 
70  protected:
71 
72  double from_;
73  double to_;
74  double gridSize_;
75  double z_;
76  float colorR_, colorG_, colorB_;
77  bool xyPlane_;
78 
81  };
82 
83 }
84 
85 #endif // __SCENEGRIDGROUND_HH_
Display a grid ground for orientation.
Base class for all scenes.
Definition: SceneBase.hh:68
BIAS::Vector3< double > boundingBoxMin_
BIAS::Vector3< double > boundingBoxMax_