Panda3D
 All Classes Functions Variables Enumerations
vertexDataBlock.h
00001 // Filename: vertexDataBlock.h
00002 // Created by:  drose (04Jun07)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef VERTEXDATABLOCK_H
00016 #define VERTEXDATABLOCK_H
00017 
00018 #include "pandabase.h"
00019 #include "simpleAllocator.h"
00020 #include "referenceCount.h"
00021 
00022 class VertexDataPage;
00023 class VertexDataBlock;
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : VertexDataBlock
00027 // Description : A block of bytes that stores the actual raw vertex
00028 //               data referenced by a GeomVertexArrayData object.
00029 ////////////////////////////////////////////////////////////////////
00030 class EXPCL_PANDA_GOBJ VertexDataBlock : public SimpleAllocatorBlock, public ReferenceCount {
00031 protected:
00032   INLINE VertexDataBlock(VertexDataPage *page,
00033                          size_t start, size_t size);
00034 
00035 PUBLISHED:
00036   INLINE VertexDataPage *get_page() const;
00037   INLINE VertexDataBlock *get_next_block() const;
00038 
00039 public:
00040   INLINE unsigned char *get_pointer(bool force) const;
00041 
00042   friend class VertexDataPage;
00043 };
00044 
00045 #include "vertexDataBlock.I"
00046 
00047 #endif
 All Classes Functions Variables Enumerations