HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TIL_TileList.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: TIL_TileList.h (Tile Image Library, C++)
7  *
8  * COMMENTS:
9  * A simple list of tiles used for passed tile vectors around during a
10  * cook.
11  */
12 #ifndef TIL_TILELIST_H
13 #define TIL_TILELIST_H
14 
15 #include "TIL_API.h"
16 
17 class TIL_Plane;
18 class TIL_Region;
19 class TIL_Tile;
20 
22 {
23 public:
24  static TIL_TileList *allocList();
25  static void freeList(TIL_TileList *&list);
26 
27  void init(const TIL_Plane *, int array_index,
28  int x1, int y1, int image_index);
29  void reset();
30 
31  // Tile lists do not delete their tiles or their plane.
32 
33  void setSize(int x,int y);
34 
35  TIL_TileList & operator=(const TIL_TileList &);
36 
37  int contains(int x,int y) const;
38 
39  // returns a region representing the same data as this tilelist. Does NOT
40  // make a copy of the data -- it's referenced. Use TIL_Region::freeRegion()
41  // to free this Region when done.
42  TIL_Region *getRegionFromTiles(bool uncooked_only = false);
43 
44  bool assignConstant(TIL_Region *region,
45  bool black = false);
46  void clearToBlack(bool markconstant = true);
47 
48  bool isEmpty() const
49  { return myItems[0] == 0 && myItems[1] == 0 &&
50  myItems[2] == 0 && myItems[3] == 0; }
51 
52 
53  void setDeferredKey(void *key) { myDeferKey = key; }
54  void *getDeferredKey() { return myDeferKey; }
55 public:
56  // list items & iterators.
58 
59  // Cook information (parent plane, region covered by the tile)
60  union {
63  };
64  short myArrayIndex;
66  char myScanEven;
67  char myScanStep;
69 
70  float myScanScale;
71  float myScanOffset;
72 
73  // # of the image in the sequence.
75 
76  // all of the following information can be found in the plane & tiles of
77  // the list, but it's duplicated here since it's commonly accessed.
79  int myX1, myY1, myX2, myY2;
80  unsigned int myBlack, myWhite;
81 
82  // information for the proxy manager.
83  char myTileWrite[PLANE_MAX_VECTOR_SIZE];
84 
85 private:
86  // use the allocators (allocList, freeList) to create/destroy tilelists.
87  TIL_TileList();
88  ~TIL_TileList();
89 
90  // GPU deferred read key.
91  void *myDeferKey;
92 };
93 
94 #endif
unsigned int myWhite
Definition: TIL_TileList.h:80
TIL_Interlace
Definition: TIL_Defines.h:74
TIL_Interlace myInterlace
Definition: TIL_TileList.h:68
GLint y
Definition: glcorearb.h:102
void * getDeferredKey()
Definition: TIL_TileList.h:54
const TIL_Plane * myPlane
Definition: TIL_TileList.h:61
short myArrayIndex
Definition: TIL_TileList.h:64
float myScanScale
Definition: TIL_TileList.h:70
int64 exint
Definition: SYS_Types.h:109
#define PLANE_MAX_VECTOR_SIZE
Definition: TIL_Defines.h:156
char myUsePoints
Definition: TIL_TileList.h:65
bool isEmpty() const
Definition: TIL_TileList.h:48
TIL_TileList * myNext
Definition: TIL_TileList.h:62
GLint GLenum GLint x
Definition: glcorearb.h:408
void setDeferredKey(void *key)
Definition: TIL_TileList.h:53
#define TIL_API
Definition: TIL_API.h:10
float myScanOffset
Definition: TIL_TileList.h:71