00001 /* 00002 This file is part of the Virtual Object System of 00003 the Interreality project (http://interreality.org). 00004 00005 Copyright (C) 2003 Reed Hedges 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library; if not, write to the Free Software 00019 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 00021 Reed Hedges <reed@interreality.org> 00022 */ 00023 #ifndef _AVATAR3D_HH_ 00024 #define _AVATAR3D_HH_ 00025 00026 #include <stdexcept> 00027 #include <vos/corelibs/vos/vos.hh> 00028 #include <vos/metaobjects/misc/avatar.hh> 00029 00030 #if defined(_WIN32) && defined(_MSC_VER) 00031 # ifdef MISC_EXPORTS 00032 # define MISC_API __declspec(dllexport) 00033 # else 00034 # define MISC_API __declspec(dllimport) 00035 # endif 00036 #else 00037 # define MISC_API 00038 #endif 00039 00040 /** This class adds some 3D-specific properties to Avatar. 00041 * Use in combination with MISC::Object3D or one of it's subclasses 00042 * (e.g. <code>site->createMetaObject("your avatar", typeid(MISC::Object3D).name(), typeid(Avatar3D).name(), 0)</code>); 00043 */ 00044 00045 class MISC_API Avatar3D : public virtual Avatar 00046 { 00047 protected: 00048 Avatar3D(MetaObject* superobject); 00049 public: 00050 virtual ~Avatar3D(); 00051 static void registerExtenders(); 00052 static MetaObject* new_Avatar3D(MetaObject* super, const string& type); 00053 virtual const string getType(); 00054 void setPointerPosition(double x, double y, double z, PropertyAccessControl* ac = 0); 00055 /** @throw range_error if there aren't enough elements in the property */ 00056 void getPointerPosition(double& x, double& y, double& z); 00057 void setNullPointerPosition(PropertyAccessControl* ac = 0); 00058 }; 00059 00060 00061 00062 #endif