arViewer.h
Go to the documentation of this file.
00001 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*-
00002 /*
00003  * 
00004  * This file is part of ARToolKit.
00005  * 
00006  * ARToolKit is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  * 
00011  * ARToolKit is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with ARToolKit; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  * 
00020  */
00021 
00022 #ifndef AR_VRMLINT_H
00023 #define AR_VRMLINT_H
00024 
00025 #include <iostream>
00026 #include <fstream>
00027 #include <boost/algorithm/string/predicate.hpp>
00028 #include <boost/utility.hpp>
00029 #include <openvrml/browser.h>
00030 #include <openvrml/gl/viewer.h>
00031 #include <openvrml/bounding_volume.h>
00032 #ifdef _WIN32
00033 #  include <windows.h>
00034 #endif
00035 
00036 class arVrmlBrowser : public openvrml::browser {
00037 public:
00038         arVrmlBrowser();
00039         
00040 private:
00041         virtual std::auto_ptr<openvrml::resource_istream>
00042         do_get_resource(const std::string & uri);
00043 };
00044 
00045 class arVrmlViewer : public openvrml::gl::viewer {
00046 
00047 public:
00048   arVrmlViewer();
00049   ~arVrmlViewer() throw ();
00050 
00051     char             filename[512];
00052     double           translation[3];
00053     double           rotation[4];
00054     double           scale[3];
00055     bool             internal_light;
00056 
00057     void timerUpdate();
00058     void redraw();
00059     void setInternalLight( bool f );
00060 
00061 protected:
00062     virtual void post_redraw();
00063     virtual void set_cursor(openvrml::gl::viewer::cursor_style c);
00064     virtual void swap_buffers();
00065     virtual void set_timer(double);
00066 
00067 
00068    virtual void set_viewpoint(const openvrml::vec3f & position,
00069                                        const openvrml::rotation & orientation,
00070                                        float fieldOfView,
00071                                        float avatarSize,
00072                                        float visibilityLimit);
00073 
00074    virtual viewer::object_t insert_background(const std::vector<float> & groundAngle,
00075                                                                                           const std::vector<openvrml::color> & groundColor,
00076                                                                                           const std::vector<float> & skyAngle,
00077                                                                                           const std::vector<openvrml::color> & skyColor,
00078                                                                                           const openvrml::image & front,
00079                                                                                           const openvrml::image & back,
00080                                                                                           const openvrml::image & left,
00081                                                                                           const openvrml::image & right,
00082                                                                                           const openvrml::image & top,
00083                                                                                           const openvrml::image & bottom);
00084                 
00085     virtual viewer::object_t insert_dir_light(float ambientIntensity,
00086                                               float intensity,
00087                                               const openvrml::color & color,
00088                                               const openvrml::vec3f & direction);
00089 
00090     virtual viewer::object_t insert_point_light(float ambientIntensity,
00091                                                 const openvrml::vec3f & attenuation,
00092                                                 const openvrml::color & color,
00093                                                 float intensity,
00094                                                 const openvrml::vec3f & location,
00095                                                 float radius);
00096 
00097     virtual viewer::object_t insert_spot_light(float ambientIntensity,
00098                                                const openvrml::vec3f & attenuation,
00099                                                float beamWidth,
00100                                                const openvrml::color & color,
00101                                                float cutOffAngle,
00102                                                const openvrml::vec3f & direction,
00103                                                float intensity,
00104                                                const openvrml::vec3f & location,
00105                                                float radius);
00106     virtual openvrml::bounding_volume::intersection
00107       intersect_view_volume(const openvrml::bounding_volume & bvolume) const;
00108 };
00109 
00110 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


ar_recog
Author(s): Graylin Trevor Jay and Christopher Crick
autogenerated on Fri Jan 25 2013 12:14:59