root/OpenSceneGraph/trunk/include/osgUtil/ReversePrimitiveFunctor @ 13041

Revision 13041, 2.1 kB (checked in by robert, 3 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGUTIL_REVERSEPRIMITIVEFUNCTOR
15#define OSGUTIL_REVERSEPRIMITIVEFUNCTOR 1
16
17#include <osg/PrimitiveSet>
18#include <osg/Notify>
19#include <osgUtil/Export>
20
21namespace osgUtil {
22
23
24class OSGUTIL_EXPORT ReversePrimitiveFunctor : public osg::PrimitiveIndexFunctor
25{
26    public:
27
28        virtual ~ReversePrimitiveFunctor() {}
29
30        osg::PrimitiveSet * getReversedPrimitiveSet() { return _reversedPrimitiveSet.get(); }
31
32        virtual void setVertexArray(unsigned int , const osg::Vec2* ) {}
33        virtual void setVertexArray(unsigned int , const osg::Vec3* ) {}
34        virtual void setVertexArray(unsigned int , const osg::Vec4* ) {}
35        virtual void setVertexArray(unsigned int , const osg::Vec2d* ) {}
36        virtual void setVertexArray(unsigned int , const osg::Vec3d* ) {}
37        virtual void setVertexArray(unsigned int , const osg::Vec4d* ) {}
38
39        virtual void drawArrays(GLenum mode,GLint first,GLsizei count);
40        virtual void drawElements(GLenum mode,GLsizei count, const GLubyte* indices);
41        virtual void drawElements(GLenum mode,GLsizei count, const GLushort* indices);
42        virtual void drawElements(GLenum mode,GLsizei count, const GLuint* indices);
43
44
45        /// Mimics the OpenGL \c glBegin() function.
46        virtual void begin(GLenum mode);
47        virtual void vertex(unsigned int /*pos*/);
48        virtual void end();
49
50
51        osg::ref_ptr<osg::PrimitiveSet> _reversedPrimitiveSet;
52
53    private:
54
55        bool _running;
56};
57
58} // end osgUtil namespace
59
60#endif // ** OSGUTIL_REVERSEFACEVISITOR ** //
Note: See TracBrowser for help on using the browser.