| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /****************************************************************************** 00002 * VRS - The Virtual Rendering System 00003 * Copyright (C) 2000-2005 Computer Graphics Systems Group at the 00004 * Hasso-Plattner-Institute (HPI), Potsdam, Germany. 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation; either version 2.1 of the License, or (at 00009 * your option) any later version. This library is distributed in the hope 00010 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 00011 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. You should have received 00013 * a copy of the GNU Lesser+ General Public License along with this library; if 00014 * not, write to the FreeSoftware Foundation, Inc., 59 Temple Place, Suite 330, 00015 * Boston, MA, 02111-1307, USA. 00016 ******************************************************************************/ 00017 00018 // $Id: pointspritesgl.h 6014 2007-08-09 07:51:16Z Konstantin_Baumann $ 00019 // 00020 // $Log$ 00021 // Revision 1.1 2005/07/21 10:28:30 nienhaus 00022 // initial check-in 00023 // 00024 00025 #ifndef VRS_OPENGL_POINT_SPRITES_H_ 00026 #define VRS_OPENGL_POINT_SPRITES_H_ 00027 00028 #include <vrs/shape.h> 00029 #include <vrs/polygonset.h> 00030 00031 namespace VRS { 00032 00034 class VRS_CORE_API PointSpritesGL : public Shape { 00035 00036 public: 00037 PointSpritesGL(PolygonSet* points = NULL, double pointSize = 10, bool spriteCoordinates = true); 00039 00043 void setPointSet(PolygonSet* points); 00045 SO<PolygonSet> getPointSet() const; 00047 00048 void setPointSize(double size); 00050 double getPointSize() const; 00052 00053 void spriteTextureCoordinates(bool enable); 00055 bool spriteTextureCoordinates() const; 00057 00058 virtual Bounds boundingBox() const; 00060 00061 VRS_TYPEINFO(PointSpritesGL, Shape); 00062 VRS_SERIALIZABLE(PointSpritesGL); 00063 00064 private: 00065 SO<PolygonSet> pointSet_; 00066 double size_; 00067 bool texCoords_; 00068 }; 00069 00070 inline SO<PolygonSet> PointSpritesGL::getPointSet() const { return pointSet_; } 00071 00072 inline double PointSpritesGL::getPointSize() const { return size_; } 00073 inline void PointSpritesGL::setPointSize(double s) { 00074 if(s!=size_) { 00075 size_ = s; 00076 modified(); 00077 } 00078 } 00079 00080 inline void PointSpritesGL::spriteTextureCoordinates(bool s) { 00081 if(s!=texCoords_) { 00082 texCoords_ = s; 00083 00084 modified(); 00085 } 00086 } 00087 inline bool PointSpritesGL::spriteTextureCoordinates() const { return texCoords_; } 00088 00089 } // namespace VRS 00090 00091 #endif // VRS_OPENGL_POINT_SPRITES_H_