HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_CaptureLayerData.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: SOP Library (C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __SOP_CaptureLayerData_h__
13 #define __SOP_CaptureLayerData_h__
14 
15 #include "SOP_API.h"
16 #include <UT/UT_IntArray.h>
17 #include <UT/UT_FloatArray.h>
18 #include <UT/UT_ValArray.h>
19 #include <UT/UT_NTStreamUtil.h>
20 #include <ostream>
21 
22 class OP_SaveFlags;
23 
25 {
26 public:
30 
31  int getStencilSize() const;
32  void setStencilSize(int size);
33 
34  void clear();
35  float getStencilValue(int snum, int ptnum) const;
36  void setStencilValue(int snum, int ptnum, float value);
37  int getNumStencils() const;
38  void removeStencil(int snum);
39  bool hasStencil(int snum) const
40  {
41  return (snum >= 0 && snum < myStencils.size())
42  ? (myStencils(snum) != nullptr) : false;
43  }
44 
45  int save(std::ostream &os, const OP_SaveFlags &flags,
46  const char *name, const char *path_prefix);
47  int save(std::ostream &os, const OP_SaveFlags &flags,
48  const char *name, const char *path_prefix,
49  bool compress);
50  bool load(UT_IStream &is, const char *ext);
51 
52 private:
53  int myStencilSize;
54  UT_ValArray<float *> myStencils;
55 };
56 
57 #endif
GLbitfield flags
Definition: glcorearb.h:1596
bool hasStencil(int snum) const
GLuint const GLchar * name
Definition: glcorearb.h:786
GLsizeiptr size
Definition: glcorearb.h:664
#define SOP_API
Definition: SOP_API.h:10
Definition: core.h:1131