36 namespace HDK_Sample {
 
   41     std::cerr << 
"Usage: " << program << 
" dsmfile\n";
 
   42     std::cerr << 
"Prints out information about a deep camera/shadow image\n";
 
   46 template <
typename FTYPE> 
static void 
   47 printTuple(
const FTYPE *pixel, 
int vsize)
 
   51     for (i = 1; i < vsize; i++)
 
   64     if (!pixel.open(x, y))
 
   66         printf(
"\tUnable to open pixel [%d,%d]!\n", x, y);
 
   71     depth = pixel.getDepth();
 
   72     printf(
"Pixel[%d,%d][%d]\n", x, y, depth);
 
   82             printTuple<float>(pixel.getData(*chp, 0), chp->
getTupleSize());
 
   84             for (d = 1; d < 
depth; d++)
 
   87                 printTuple<float>(pixel.getData(*chp, d), chp->
getTupleSize());
 
  102         wbuf.
strcpy(
"DSM Options: ");
 
  103         opt->appendPyDictionary(wbuf);
 
  109 using namespace HDK_Sample;
 
  117     if (!fp.
open(argv[1]))
 
  125     printf(
"%s[%d,%d] (%d channels)\n",
 
  129     printPixel(fp, 0, 0);
 
  130     printPixel(fp, xres>>1, 0);
 
  131     printPixel(fp, xres-1,  0);
 
  132     printPixel(fp, 0, yres>>1);
 
  133     printPixel(fp, xres>>1, yres>>1);
 
  134     printPixel(fp, xres-1,  yres>>1);
 
  135     printPixel(fp, 0, yres-1);
 
  136     printPixel(fp, xres>>1, yres-1);
 
  137     printPixel(fp, xres-1,  yres-1);
 
void resolution(int &xres, int &yres) const 
Get the resolution of the deep shadow map. 
 
Thread-safe convenience class to make reading DSM pixels easy. 
 
auto printf(const S &fmt, const T &...args) -> int
 
Single channel of a Houdini DSM image. 
 
SYS_FORCE_INLINE const char * buffer() const 
 
SYS_FORCE_INLINE void strcpy(const char *src)
 
Class to read or write deep shadow/camera images. 
 
const IMG_DeepShadowChannel * getChannel(int i) const 
Get a channel definition. 
 
UT_SharedPtr< UT_Options > getTextureOptions() const 
 
static SYS_FUNC_NORETURN void exit(UT_ExitCode exit_code=EXIT_OK)
Calls exit(), which implicitly leads to our callbacks being called. 
 
const char * getName() const 
 
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr. 
 
int theMain(int argc, char *argv[])
 
bool open(const char *name)
Open a deep shadow map for reading. 
 
GLint GLint GLsizei GLsizei GLsizei depth
 
int getChannelCount() const 
Get the number of channels in the DSM. 
 
GLsizeiptr const void GLenum usage
 
GLbitfield GLuint program