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

OgreVertexIndexData.h

Go to the documentation of this file.
00001 /*
00002 -----------------------------------------------------------------------------
00003 This source file is part of OGRE
00004     (Object-oriented Graphics Rendering Engine)
00005 For the latest info, see http://www.ogre3d.org/
00006 
00007 Copyright (c) 2000-2005 The OGRE Team
00008 Also see acknowledgements in Readme.html
00009 
00010 This program is free software; you can redistribute it and/or modify it under
00011 the terms of the GNU Lesser General Public License as published by the Free Software
00012 Foundation; either version 2 of the License, or (at your option) any later
00013 version.
00014 
00015 This program is distributed in the hope that it will be useful, but WITHOUT
00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public License along with
00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
00022 http://www.gnu.org/copyleft/lesser.txt.
00023 -----------------------------------------------------------------------------
00024 */
00025 #ifndef __VertexIndexData_H__
00026 #define __VertexIndexData_H__
00027 
00028 #include "OgrePrerequisites.h"
00029 #include "OgreHardwareVertexBuffer.h"
00030 #include "OgreHardwareIndexBuffer.h"
00031 
00032 namespace Ogre {
00033     
00035     typedef std::vector<HardwareBuffer::Usage> BufferUsageList;
00036 
00037 
00039     class _OgreExport VertexData
00040     {
00041     private:
00043         VertexData(const VertexData& rhs); /* do nothing, should not use */
00045         VertexData& operator=(const VertexData& rhs); /* do not use */
00046     public:
00047         VertexData();
00048         ~VertexData();
00049 
00053         VertexDeclaration* vertexDeclaration;
00057         VertexBufferBinding* vertexBufferBinding;
00059         size_t vertexStart;
00061         size_t vertexCount;
00062 
00066         VertexData* clone(bool copyData = true) const;
00067 
00087         void prepareForShadowVolume(void);
00088 
00102         HardwareVertexBufferSharedPtr hardwareShadowVolWBuffer;
00103 
00104 
00121         void reorganiseBuffers(VertexDeclaration* newDeclaration, const BufferUsageList& bufferUsage);
00122 
00138         void reorganiseBuffers(VertexDeclaration* newDeclaration);
00139 
00140 
00141 
00142     };
00143 
00145     class _OgreExport IndexData 
00146     {
00147     protected:
00149         IndexData(const IndexData& rhs); /* do nothing, should not use */
00151         IndexData& operator=(const IndexData& rhs); /* do not use */
00152     public:
00153         IndexData();
00154         ~IndexData();
00156         HardwareIndexBufferSharedPtr indexBuffer;
00157 
00159         size_t indexStart;
00160 
00162         size_t indexCount;
00163 
00167         IndexData* clone(bool copyData = true) const;
00168     };
00169 
00170 
00171 }
00172 #endif
00173 

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 12:59:54 2006