File: Subdivide.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-- 702 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 <vector>

#include <glm/gtc/type_ptr.hpp>

namespace glGrib
{

class Subdivide
{
public:

  Subdivide () {}

  void init (const std::vector<float> &, 
             const std::vector<unsigned int> &,
             int, int,
             int, int);
 
  void subdivide (float);

  void append (std::vector<float> &, std::vector<unsigned int> &, int, int);

  int getPtsLength () const
  {
    return xyz1.size () - xyz1_size;
  }

  int getTriLength () const
  {
    return ind1.size () - ind1_size;
  }

private:
  int indt1, indt2;
  int indp1, indp2;
  int indr1, indr2;
  std::vector<glm::vec3> xyz1;
  std::vector<unsigned int> ind1;
  int ind1_size;
  int xyz1_size;
  
};


}