PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: SNCoordinateAxis.h * 00003 * 00004 * Copyright (C) 2002-2011 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_COORDINATEAXIS_H__ 00024 #define __PLSCENE_SCENENODE_COORDINATEAXIS_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include <PLGraphics/Color/Color4.h> 00032 #include "PLScene/Scene/SceneNode.h" 00033 00034 00035 //[-------------------------------------------------------] 00036 //[ Namespace ] 00037 //[-------------------------------------------------------] 00038 namespace PLScene { 00039 00040 00041 //[-------------------------------------------------------] 00042 //[ Classes ] 00043 //[-------------------------------------------------------] 00044 /** 00045 * @brief 00046 * Abstract base scene node for coordinate axis visualization 00047 */ 00048 class SNCoordinateAxis : public SceneNode { 00049 00050 00051 //[-------------------------------------------------------] 00052 //[ Public definitions ] 00053 //[-------------------------------------------------------] 00054 public: 00055 /** 00056 * @brief 00057 * Scene node flags (SceneNode flags extension) 00058 */ 00059 enum EFlags { 00060 DepthTest = 1<<10, /**< Perform a depth test */ 00061 NoXText = 1<<11, /**< Do NOT draw the x-axis text */ 00062 NoYText = 1<<12, /**< Do NOT draw the y-axis text */ 00063 NoZText = 1<<13 /**< Do NOT draw the z-axis text */ 00064 }; 00065 pl_enum(EFlags) 00066 pl_enum_base(SceneNode::EFlags) 00067 pl_enum_value(DepthTest, "Perform a depth test") 00068 pl_enum_value(NoXText, "Do NOT draw the x-axis text") 00069 pl_enum_value(NoYText, "Do NOT draw the y-axis text") 00070 pl_enum_value(NoZText, "Do NOT draw the z-axis text") 00071 pl_enum_end 00072 00073 00074 //[-------------------------------------------------------] 00075 //[ RTTI interface ] 00076 //[-------------------------------------------------------] 00077 pl_class(PLS_RTTI_EXPORT, SNCoordinateAxis, "PLScene", PLScene::SceneNode, "Abstract base scene node for coordinate axis visualization") 00078 // Attributes 00079 pl_attribute(Width, float, 1.0f, ReadWrite, DirectValue, "Line width (if supported by the the used renderer API)", "Min='1.0'") 00080 pl_attribute(XColor, PLGraphics::Color4, PLGraphics::Color4(1.0f, 0.0f, 0.0f, 1.0f), ReadWrite, DirectValue, "Color of the x-axis", "") 00081 pl_attribute(YColor, PLGraphics::Color4, PLGraphics::Color4(0.0f, 1.0f, 0.0f, 1.0f), ReadWrite, DirectValue, "Color of the y-axis", "") 00082 pl_attribute(ZColor, PLGraphics::Color4, PLGraphics::Color4(0.0f, 0.0f, 1.0f, 1.0f), ReadWrite, DirectValue, "Color of the z-axis", "") 00083 // Overwritten SceneNode attributes 00084 pl_attribute(Flags, pl_flag_type(EFlags), 0, ReadWrite, GetSet, "Flags", "") 00085 pl_class_end 00086 00087 00088 //[-------------------------------------------------------] 00089 //[ Protected functions ] 00090 //[-------------------------------------------------------] 00091 protected: 00092 /** 00093 * @brief 00094 * Default Constructor 00095 */ 00096 PLS_API SNCoordinateAxis(); 00097 00098 /** 00099 * @brief 00100 * Destructor 00101 */ 00102 PLS_API virtual ~SNCoordinateAxis(); 00103 00104 00105 }; 00106 00107 00108 //[-------------------------------------------------------] 00109 //[ Namespace ] 00110 //[-------------------------------------------------------] 00111 } // PLScene 00112 00113 00114 #endif // __PLSCENE_SCENENODE_COORDINATEAXIS_H__
|