PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: SNText2D.h * 00003 * 00004 * Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLSCENE_SCENENODE_TEXT2D_H__ 00024 #define __PLSCENE_SCENENODE_TEXT2D_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLScene/Scene/SceneNodes/SNText.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Namespace ] 00036 //[-------------------------------------------------------] 00037 namespace PLScene { 00038 00039 00040 //[-------------------------------------------------------] 00041 //[ Classes ] 00042 //[-------------------------------------------------------] 00043 /** 00044 * @brief 00045 * 2D text scene node 00046 * 00047 * @note 00048 * - Font scale = GetScale().x*GetScale().y*GetScale().z 00049 */ 00050 class SNText2D : public SNText { 00051 00052 00053 //[-------------------------------------------------------] 00054 //[ Public definitions ] 00055 //[-------------------------------------------------------] 00056 public: 00057 /** 00058 * @brief 00059 * Scene node flags (SceneNode flags extension) 00060 */ 00061 enum EFlags { 00062 No3DPosition = 1<<11 /**< The text is not placed within 3D. If this flag is set, the node position is in 'screen space' between 0.0 and 1.0. */ 00063 }; 00064 pl_enum(EFlags) 00065 pl_enum_base(SNText::EFlags) 00066 pl_enum_value(No3DPosition, "The text is not placed within 3D. If this flag is set, the node position is in 'screen space' between 0.0 and 1.0.") 00067 pl_enum_end 00068 00069 00070 //[-------------------------------------------------------] 00071 //[ RTTI interface ] 00072 //[-------------------------------------------------------] 00073 pl_class(PLS_RTTI_EXPORT, SNText2D, "PLScene", PLScene::SNText, "2D text scene node") 00074 // Attributes 00075 // Overwritten SceneNode attributes 00076 pl_attribute(Flags, pl_flag_type(EFlags), 0, ReadWrite, GetSet, "Flags", "") 00077 // Constructors 00078 pl_constructor_0(DefaultConstructor, "Default constructor", "") 00079 pl_class_end 00080 00081 00082 //[-------------------------------------------------------] 00083 //[ Public functions ] 00084 //[-------------------------------------------------------] 00085 public: 00086 /** 00087 * @brief 00088 * Default constructor 00089 */ 00090 PLS_API SNText2D(); 00091 00092 /** 00093 * @brief 00094 * Destructor 00095 */ 00096 PLS_API virtual ~SNText2D(); 00097 00098 00099 //[-------------------------------------------------------] 00100 //[ Public virtual SceneNode functions ] 00101 //[-------------------------------------------------------] 00102 public: 00103 PLS_API virtual void DrawPost(PLRenderer::Renderer &cRenderer, const VisNode *pVisNode) override; 00104 00105 00106 }; 00107 00108 00109 //[-------------------------------------------------------] 00110 //[ Namespace ] 00111 //[-------------------------------------------------------] 00112 } // PLScene 00113 00114 00115 #endif // __PLSCENE_SCENENODE_TEXT2D_H__
|