source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/vrippack-0.31/src/march/ChunkAllocator.h @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 1.1 KB
Line 
1/*
2
3Brian Curless
4
5Computer Graphics Laboratory
6Stanford University
7
8---------------------------------------------------------------------
9
10Copyright (1997) The Board of Trustees of the Leland Stanford Junior
11University. Except for commercial resale, lease, license or other
12commercial transactions, permission is hereby given to use, copy,
13modify this software for academic purposes only.  No part of this
14software or any derivatives thereof may be used in the production of
15computer models for resale or for use in a commercial
16product. STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND
17CONCERNING THIS SOFTWARE.  No support is implied or provided.
18
19*/
20
21
22#ifndef _CHUNK_ALLOCATOR_
23#define _CHUNK_ALLOCATOR_
24
25#include "defines.h"
26#include "ChunkLink.h"
27
28class ChunkAllocator {
29
30  public:
31
32    int chunkSize;
33    ChunkLink *chunkList;
34    ChunkLink *currentChunk;
35    uchar *currentAddr;
36    int countInChunk;
37
38    ChunkAllocator();
39    ChunkAllocator(int chunkSize);
40    ~ChunkAllocator();
41
42    uchar *alloc(int num);
43    void reset();
44    void newChunkIfNeeded(int num);
45    uchar *nextElem(int size);
46};
47
48#endif
49
Note: See TracBrowser for help on using the repository browser.