| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /********************************************************************** 00002 VRS - The Virtual Rendering System 00003 Copyright (C) 2001 Computer Graphics Systems Group at the 00004 Hasso-Plattner-Institute, Potsdam, Germany. 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 This library is distributed in the hope that it will be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 See the GNU Lesser General Public License for more details. 00013 You should have received a copy of the GNU Lesser+ General Public 00014 License along with this library; if not, write to the FreeSoftware 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA. 00016 **********************************************************************/ 00017 00018 00019 #ifndef __TEXTBILLBOARD_H__ 00020 #define __TEXTBILLBOARD_H__ 00021 00022 #include <vrs/transform.h> 00023 #include <vrs/camerainfo.h> 00024 00025 #include <vrs/text/vrs_textprerequisites.h> 00026 00028 namespace VRS 00029 { 00030 namespace TEXT 00031 { 00035 class VRS_CORE_API TextBillboard : public Transform 00036 { 00037 public: 00039 enum TextBillboardAxis { 00041 TBA_POINT = 0, 00043 TBA_X = 1, TBA_Y = 2, TBA_XY = 3, TBA_Z = 4, TBA_XZ = 5, TBA_YZ = 6, TBA_XYZ = 7 }; 00044 VRS_SERIALIZABLE_CLASS_ENUM(TextBillboardAxis); 00045 00047 TextBillboard( TextBillboardAxis axis = TextBillboard::TBA_POINT ); 00049 virtual ~TextBillboard(); 00050 00052 virtual const Matrix& matrix(Engine* engine = 0) const; 00053 00054 VRS_TYPEINFO( TextBillboard, Transform ); 00055 VRS_SERIALIZABLE( TextBillboard ); 00056 private: 00058 static Matrix buildScreenMatrix( SO<CameraInfo> camera, TextBillboardAxis ba ); 00059 00060 TextBillboardAxis m_BillboardAxis; 00061 mutable Matrix m_Matrix; 00062 }; 00063 } 00064 } 00065 00066 #endif