Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

gfx/EnhancedShapeDrawable

Go to the documentation of this file.
00001 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2003 Robert Osfield 
00002  *
00003  * This library is open source and may be redistributed and/or modified under  
00004  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
00005  * (at your option) any later version.  The full license is in LICENSE file
00006  * included with this distribution, and on the openscenegraph.org website.
00007  * 
00008  * This library is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
00011  * OpenSceneGraph Public License for more details.
00012 */
00013 
00014 #ifndef GFX_SHAPEDRAWABLE
00015 #define GFX_SHAPEDRAWABLE 
00016 
00017 #include <osg/ShapeDrawable>
00018 #include <osg/Vec2>
00019 #include <osg/Vec3>
00020 #include <osg/Vec4>
00021 #include <osg/Array>
00022 #include <osg/PrimitiveSet>
00023 
00024 namespace gfx {
00025 
00026 class EnhancedShapeDrawable : public osg::ShapeDrawable
00027 {
00028     public:
00029 
00030         EnhancedShapeDrawable();
00031 
00032         EnhancedShapeDrawable(osg::Shape* shape,osg::TessellationHints* hints=0);
00033 
00034         /** Copy constructor using CopyOp to manage deep vs shallow copy.*/
00035         EnhancedShapeDrawable(const EnhancedShapeDrawable& pg,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
00036             
00037         virtual Object* cloneType() const { return new osg::ShapeDrawable(); }
00038         virtual Object* clone(const osg::CopyOp& copyop) const { return new EnhancedShapeDrawable(*this,copyop); }        
00039         virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const EnhancedShapeDrawable*>(obj)!=NULL; }
00040         virtual const char* libraryName() const { return "gfx"; }
00041         virtual const char* className() const { return "EnhancedShapeDrawable"; }
00042 
00043     protected:
00044 
00045         EnhancedShapeDrawable& operator = (const EnhancedShapeDrawable&) { return *this;}
00046 
00047         virtual ~EnhancedShapeDrawable();
00048        
00049         virtual bool computeBound() const;
00050         
00051 };
00052 
00053 
00054 }
00055 
00056 #endif

Generated on Thu Jul 29 15:56:18 2004 for OpenSim by doxygen 1.3.6