ReversePrimitiveFunctor
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGUTIL_REVERSEPRIMITIVEFUNCTOR
#define OSGUTIL_REVERSEPRIMITIVEFUNCTOR 1
#include <osg/PrimitiveSet>
#include <osg/Notify>
#include <osgUtil/Export>
namespace osgUtil {
class OSGUTIL_EXPORT ReversePrimitiveFunctor : public osg::PrimitiveIndexFunctor
{
public:
virtual ~ReversePrimitiveFunctor() {}
osg::PrimitiveSet * getReversedPrimitiveSet() { return _reversedPrimitiveSet.get(); }
virtual void setVertexArray(unsigned int , const osg::Vec2* ) {}
virtual void setVertexArray(unsigned int , const osg::Vec3* ) {}
virtual void setVertexArray(unsigned int , const osg::Vec4* ) {}
virtual void setVertexArray(unsigned int , const osg::Vec2d* ) {}
virtual void setVertexArray(unsigned int , const osg::Vec3d* ) {}
virtual void setVertexArray(unsigned int , const osg::Vec4d* ) {}
virtual void drawArrays(GLenum mode,GLint first,GLsizei count);
virtual void drawElements(GLenum mode,GLsizei count, const GLubyte* indices);
virtual void drawElements(GLenum mode,GLsizei count, const GLushort* indices);
virtual void drawElements(GLenum mode,GLsizei count, const GLuint* indices);
virtual void begin(GLenum mode);
virtual void vertex(unsigned int /*pos*/);
virtual void end();
osg::ref_ptr<osg::PrimitiveSet> _reversedPrimitiveSet;
private:
bool _running;
};
} // end osgUtil namespace
#endif // ** OSGUTIL_REVERSEFACEVISITOR ** //
Notify
PrimitiveSet
osgUtil::ReversePrimitiveFunctor
Definition ReversePrimitiveFunctor:25
osgUtil::ReversePrimitiveFunctor::~ReversePrimitiveFunctor
virtual ~ReversePrimitiveFunctor()
Definition ReversePrimitiveFunctor:28
osgUtil::ReversePrimitiveFunctor::setVertexArray
virtual void setVertexArray(unsigned int, const osg::Vec3d *)
Definition ReversePrimitiveFunctor:36
osgUtil::ReversePrimitiveFunctor::begin
virtual void begin(GLenum mode)
Mimics the OpenGL glBegin() function.
osgUtil::ReversePrimitiveFunctor::setVertexArray
virtual void setVertexArray(unsigned int, const osg::Vec2 *)
Definition ReversePrimitiveFunctor:32
osgUtil::ReversePrimitiveFunctor::vertex
virtual void vertex(unsigned int)
osgUtil::ReversePrimitiveFunctor::setVertexArray
virtual void setVertexArray(unsigned int, const osg::Vec4d *)
Definition ReversePrimitiveFunctor:37
osgUtil::ReversePrimitiveFunctor::drawElements
virtual void drawElements(GLenum mode, GLsizei count, const GLubyte *indices)
osgUtil::ReversePrimitiveFunctor::drawElements
virtual void drawElements(GLenum mode, GLsizei count, const GLuint *indices)
osgUtil::ReversePrimitiveFunctor::setVertexArray
virtual void setVertexArray(unsigned int, const osg::Vec2d *)
Definition ReversePrimitiveFunctor:35
osgUtil::ReversePrimitiveFunctor::getReversedPrimitiveSet
osg::PrimitiveSet * getReversedPrimitiveSet()
Definition ReversePrimitiveFunctor:30
osgUtil::ReversePrimitiveFunctor::end
virtual void end()
osgUtil::ReversePrimitiveFunctor::drawElements
virtual void drawElements(GLenum mode, GLsizei count, const GLushort *indices)
osgUtil::ReversePrimitiveFunctor::setVertexArray
virtual void setVertexArray(unsigned int, const osg::Vec4 *)
Definition ReversePrimitiveFunctor:34
osgUtil::ReversePrimitiveFunctor::drawArrays
virtual void drawArrays(GLenum mode, GLint first, GLsizei count)
osgUtil::ReversePrimitiveFunctor::setVertexArray
virtual void setVertexArray(unsigned int, const osg::Vec3 *)
Definition ReversePrimitiveFunctor:33
osgUtil::ReversePrimitiveFunctor::_reversedPrimitiveSet
osg::ref_ptr< osg::PrimitiveSet > _reversedPrimitiveSet
Definition ReversePrimitiveFunctor:51
osg::PrimitiveIndexFunctor
Definition PrimitiveSet:103
osg::PrimitiveSet
Definition PrimitiveSet:125
osg::Vec2d
Definition Vec2d:29
osg::Vec3d
Definition Vec3d:30
osg::Vec4d
Definition Vec4d:29
osg::ref_ptr
Definition ref_ptr:32
osgUtil
Definition NodeVisitor:25
osg::Vec2
Vec2f Vec2
Definition Vec2:21
osg::Vec3
Vec3f Vec3
Definition Vec3:21
osg::Vec4
Vec4f Vec4
Definition Vec4:21
Export
OSGUTIL_EXPORT
#define OSGUTIL_EXPORT
Definition osgUtil/Export:40