source: pacpussensors/trunk/Vislab/lib3dv/eigen/demos/opengl/icosphere.h@ 137

Last change on this file since 137 was 136, checked in by ldecherf, 8 years ago

Doc

File size: 869 bytes
Line 
1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
5//
6// This Source Code Form is subject to the terms of the Mozilla
7// Public License v. 2.0. If a copy of the MPL was not distributed
8// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
10#ifndef EIGEN_ICOSPHERE_H
11#define EIGEN_ICOSPHERE_H
12
13#include <Eigen/Core>
14#include <vector>
15
16class IcoSphere
17{
18 public:
19 IcoSphere(unsigned int levels=1);
20 const std::vector<Eigen::Vector3f>& vertices() const { return mVertices; }
21 const std::vector<int>& indices(int level) const;
22 void draw(int level);
23 protected:
24 void _subdivide();
25 std::vector<Eigen::Vector3f> mVertices;
26 std::vector<std::vector<int>*> mIndices;
27 std::vector<int> mListIds;
28};
29
30#endif // EIGEN_ICOSPHERE_H
Note: See TracBrowser for help on using the repository browser.