HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
COP2_BoundsCache.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: COP2_BoundsCache.h
7  *
8  * COMMENTS:
9  * Small cache class for image bounds, to avoid unnessary calls to
10  * getContextData.
11  */
12 
13 #ifndef __COP2_BoundsCache_h__
14 #define __COP2_BoundsCache_h__
15 
16 #include "COP2_API.h"
17 
18 #include <UT/UT_LinkList.h>
19 #include <OP/OP_Version.h>
20 
21 class TIL_Plane;
22 class cop2_BoundsCacheEntry;
23 
25 {
26 public:
27  COP2_BoundsCache(int limit = 16);
28  ~COP2_BoundsCache() override;
29 
30  // returns false if the bound isn't found. Also clears any entries that
31  // have a OP_VERSION less than v.
32  bool getBound(const TIL_Plane *plane, int array_index,
33  float t, int xres, int yres, OP_VERSION v,
34  int &x1, int &y1, int &x2, int &y2);
35 
36  // Cache a bound.
37  void addBound(const TIL_Plane *plane, int array_index,
38  float t, int xres, int yres, OP_VERSION v,
39  int x1, int y1, int x2, int y2);
40 private:
41  int myLimit;
42 };
43 
44 #endif
uint64 OP_VERSION
Definition: OP_Version.h:6
const GLdouble * v
Definition: glcorearb.h:837
GLdouble GLdouble x2
Definition: glad.h:2349
GLdouble y1
Definition: glad.h:2349
GLdouble t
Definition: glad.h:2397
#define COP2_API
Definition: COP2_API.h:10
GLdouble GLdouble GLdouble y2
Definition: glad.h:2349