File: Grid.h

package info (click to toggle)
glgrib 1.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,861,496 kB
  • sloc: cpp: 20,811; ansic: 6,530; perl: 2,902; sh: 513; makefile: 147; python: 58; sql: 18
file content (47 lines) | stat: -rw-r--r-- 841 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once

#include "glGrib/Object.h"
#include "glGrib/Options.h"
#include "glGrib/String.h"

namespace glGrib
{

class Grid : public Object3D
{
public:
  Grid () : VAID (this) {}
  void setup (const OptionsGrid &);
  void render (const View &, const OptionsLight &) const override;
  void reSize (const View &) override {}
  const OptionsGrid & getOptions () const { return d.opts; }
  
  void setColorOptions (const OptionColor & o)
  {
    d.opts.color = o;
  }
  void setScaleOptions (float s)
  {
    d.opts.scale = s;
  }
  float getScale () const override { return d.opts.scale; }

  void setupVertexAttributes () const 
  {
  }

private:
  const bool & getVisibleRef () const override
  {
    return d.opts.visible.on;
  }
  struct
  {
    String3D<1,0> labels;
    OptionsGrid opts;
  } d;
  OpenGLVertexArray<Grid> VAID;
};


}