Camera.h
Go to the documentation of this file.
1 /* ========================================================================
2 * PROJECT: ARToolKitPlus
3 * ========================================================================
4 * This work is based on the original ARToolKit developed by
5 * Hirokazu Kato
6 * Mark Billinghurst
7 * HITLab, University of Washington, Seattle
8 * http://www.hitl.washington.edu/artoolkit/
9 *
10 * Copyright of the derived and new portions of this work
11 * (C) 2006 Graz University of Technology
12 *
13 * This framework is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This framework is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this framework; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 *
27 * For further information please contact
28 * Dieter Schmalstieg
29 * <schmalstieg@icg.tu-graz.ac.at>
30 * Graz University of Technology,
31 * Institut for Computer Graphics and Vision,
32 * Inffeldgasse 16a, 8010 Graz, Austria.
33 * ========================================================================
34 ** @author Thomas Pintaric
35 *
36 * $Id$
37 * @file
38 * ======================================================================== */
39 
40 
41 #ifndef __ARTOOLKIT_CAMERA_HEADERFILE__
42 #define __ARTOOLKIT_CAMERA_HEADERFILE__
43 
44 #include <ARToolKitPlus/config.h>
45 #include <ARToolKitPlus/param.h>
46 #include <ARToolKitPlus/Logger.h>
47 
48 namespace ARToolKitPlus {
49 
50 class Camera : public ARParam
51 {
52 public:
54  { fileName = NULL; }
55 
56  virtual ~Camera()
57  {
58  if (fileName != NULL) delete fileName;
59  }
60 
61  virtual void observ2Ideal(ARFloat ox, ARFloat oy, ARFloat *ix, ARFloat *iy) = 0;
62  virtual void ideal2Observ(ARFloat ix, ARFloat iy, ARFloat *ox, ARFloat *oy) = 0;
63  virtual bool loadFromFile(const char* filename) = 0;
64  virtual Camera* clone() = 0;
65  virtual bool changeFrameSize(const int frameWidth, const int frameHeight) = 0;
66  virtual void logSettings(Logger* p_log) = 0;
67 
68  char* getFileName() const { return fileName; }
69 
70 protected:
71  void setFileName(const char* filename)
72  {
73  if(fileName)
74  delete fileName;
75  fileName = new char[strlen(filename)+1];
76  strcpy(fileName, filename);
77  }
78 
79  char* fileName;
80 };
81 
82 } // namespace ARToolKitPlus
83 
84 #endif // __ARTOOLKIT_CAMERA_HEADERFILE__
filename
This file should only be compiled when using ARToolKitPlus as a DLL.
Definition: ar.h:60
virtual bool changeFrameSize(const int frameWidth, const int frameHeight)=0
void setFileName(const char *filename)
Definition: Camera.h:71
ARToolKit::Logger specifies the interface for a logging application.
Definition: Logger.h:61
#define NULL
Definition: PocketKnife.h:38
char * getFileName() const
Definition: Camera.h:68
virtual Camera * clone()=0
virtual void observ2Ideal(ARFloat ox, ARFloat oy, ARFloat *ix, ARFloat *iy)=0
virtual void ideal2Observ(ARFloat ix, ARFloat iy, ARFloat *ox, ARFloat *oy)=0
float ARFloat
Definition: config.h:60
virtual void logSettings(Logger *p_log)=0
virtual bool loadFromFile(const char *filename)=0
virtual ~Camera()
Definition: Camera.h:56


tuw_artoolkitplus
Author(s): Markus Bader
autogenerated on Sun Sep 4 2016 03:24:33