/*
Copyright (C) 1997, 1998, 1999, 2000 by Alex Pfaffe
(Digital Dawn Graphics Inc)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _ddgCamera_Class
#define _ddgCamera_Class
#include "struct/ddgcntxt.h"
#include "render/ddgscene.h"
class WEXP ddgCamera
{
float _kk;
ddgScene* _scene;
ddgContext *_ctx;
int _vp[4];
bool _ortho;
unsigned int _width,
_height;
public:
ddgCamera( ddgContext *ctx );
void scene( ddgScene* s ) { _scene = s; }
bool init(void);
void draw(void);
void update(void);
bool map(ddgVector3 vin, ddgVector3 *vout);
bool unmap(ddgVector3 vin, ddgVector3 *vout);
void ortho( unsigned int w, unsigned int h);
void viewport( int vp[4] ) { vp[0] = _vp[0]; vp[1] = _vp[1]; vp[2] = _vp[2]; vp[3] = _vp[3]; }
ddgContext *context(void) { return _ctx; }
};
#endif