~ubuntu-branches/debian/jessie/stellarium/jessie

« back to all changes in this revision

Viewing changes to src/spheric_mirror_projector.h

Tags: upstream-0.9.0
Import upstream version 0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Stellarium
3
 
 * Copyright (C) 2002 Fabien Chereau
4
 
 * Author 2006 Johannes Gajdosik
5
 
 *
6
 
 * This program is free software; you can redistribute it and/or
7
 
 * modify it under the terms of the GNU General Public License
8
 
 * as published by the Free Software Foundation; either version 2
9
 
 * of the License, or (at your option) any later version.
10
 
 *
11
 
 * This program is distributed in the hope that it will be useful,
12
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 * GNU General Public License for more details.
15
 
 *
16
 
 * You should have received a copy of the GNU General Public License
17
 
 * along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
 
 */
20
 
 
21
 
#ifndef _SPHERIC_MIRROR_PROJECTOR_H_
22
 
#define _SPHERIC_MIRROR_PROJECTOR_H_
23
 
 
24
 
#include "custom_projector.h"
25
 
#include "spheric_mirror_calculator.h"
26
 
 
27
 
class SphericMirrorProjector : public CustomProjector {
28
 
public:
29
 
  SphericMirrorProjector(const Vec4i &viewport,double _fov);
30
 
private:
31
 
  PROJECTOR_TYPE getType(void) const {return SPHERIC_MIRROR_PROJECTOR;}
32
 
  void setViewport(int x, int y, int w, int h);
33
 
  bool project_custom(const Vec3d &v, Vec3d &win, const Mat4d &mat) const;
34
 
  void unproject(double x, double y, const Mat4d& m, Vec3d& v) const;
35
 
  bool needGlFrontFaceCW(void) const
36
 
    {return !CustomProjector::needGlFrontFaceCW();}
37
 
private:
38
 
  SphericMirrorCalculator calc;
39
 
};
40
 
 
41
 
 
42
 
#endif