PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: SNPoint.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_POINT_H__ 00024 #define __PLSCENE_SCENENODE_POINT_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 * Simple point scene node 00047 */ 00048 class SNPoint : 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 No3DPosition = 1<<10, /**< The point is not placed within 3D. If this flag is set, the node position is in 'screen space' between 0.0 and 1.0. */ 00061 NoDepthTest = 1<<11 /**< Do not perform a depth test */ 00062 }; 00063 pl_enum(EFlags) 00064 pl_enum_base(SceneNode::EFlags) 00065 pl_enum_value(No3DPosition, "The point is not placed within 3D. If this flag is set, the node position is in 'screen space' between 0.0 and 1.0.") 00066 pl_enum_value(NoDepthTest, "Do not perform a depth test") 00067 pl_enum_end 00068 00069 00070 //[-------------------------------------------------------] 00071 //[ RTTI interface ] 00072 //[-------------------------------------------------------] 00073 pl_class(PLS_RTTI_EXPORT, SNPoint, "PLScene", PLScene::SceneNode, "Simple point scene node") 00074 // Attributes 00075 pl_attribute(Size, float, 1.0f, ReadWrite, DirectValue, "Point size", "") 00076 pl_attribute(Color, PLGraphics::Color4, PLGraphics::Color4::White, ReadWrite, DirectValue, "Point color (r/g/b/a)", "") 00077 // Overwritten SceneNode attributes 00078 pl_attribute(Flags, pl_flag_type(EFlags), 0, ReadWrite, GetSet, "Flags", "") 00079 // Constructors 00080 pl_constructor_0(DefaultConstructor, "Default constructor", "") 00081 pl_class_end 00082 00083 00084 //[-------------------------------------------------------] 00085 //[ Public functions ] 00086 //[-------------------------------------------------------] 00087 public: 00088 /** 00089 * @brief 00090 * Default constructor 00091 */ 00092 PLS_API SNPoint(); 00093 00094 /** 00095 * @brief 00096 * Destructor 00097 */ 00098 PLS_API virtual ~SNPoint(); 00099 00100 00101 //[-------------------------------------------------------] 00102 //[ Public virtual SceneNode functions ] 00103 //[-------------------------------------------------------] 00104 public: 00105 PLS_API virtual void DrawSolid(PLRenderer::Renderer &cRenderer, const VisNode *pVisNode = nullptr) override; 00106 PLS_API virtual void DrawTransparent(PLRenderer::Renderer &cRenderer, const VisNode *pVisNode = nullptr) override; 00107 00108 00109 }; 00110 00111 00112 //[-------------------------------------------------------] 00113 //[ Namespace ] 00114 //[-------------------------------------------------------] 00115 } // PLScene 00116 00117 00118 #endif // __PLSCENE_SCENENODE_POINT_H__
|