3
* Copyright (C) 2002 Fabien Chereau
4
* Author 2006 Johannes Gajdosik
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.
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.
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.
21
#ifndef _SPHERIC_MIRROR_PROJECTOR_H_
22
#define _SPHERIC_MIRROR_PROJECTOR_H_
24
#include "custom_projector.h"
25
#include "spheric_mirror_calculator.h"
27
class SphericMirrorProjector : public CustomProjector {
29
SphericMirrorProjector(const Vec4i &viewport,double _fov);
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();}
38
SphericMirrorCalculator calc;