#include <ostream>
#include <iostream>
#include <stdio.h>
static void
{
std::cerr << "Usage: " << program << " sourcefile dstfile\n";
std::cerr << "The extension of the source/dest will be used to determine" << std::endl;
std::cerr << "how the conversion is done. Supported extensions are .voxel" << std::endl;
std::cerr << "and .bgeo" << std::endl;
}
bool
{
return false;
#if defined(HOUDINI_11)
int def = -1;
#else
#endif
{
int rx, ry, rz;
float tx, ty, tz, sx, sy, sz;
attrib.set(vol->getMapOffset(),
name);
xform.
scale(sx/2, sy/2, sz/2);
vol->setTransform(xform);
handle->size(rx, ry, rz);
return false;
for (
int z = 0;
z < rz;
z++)
{
for (
int y = 0;
y < ry;
y++)
{
for (
int x = 0;
x < rx;
x++)
{
handle->setValue(
x,
y,
z, v);
}
}
}
return false;
}
return true;
}
bool
{
}
bool
{
os << "VOXELS" << std::endl;
#if defined(HOUDINI_11)
FOR_ALL_PRIMITIVES(gdp, prim)
#else
#endif
{
#if defined(HOUDINI_11)
#else
#endif
{
if (attrib.isValid())
{
}
os << "VOLUME " << name << std::endl;
int resx, resy, resz;
vol->
getRes(resx, resy, resz);
os << resx << " " << resy << " " << resz << std::endl;
os << tmp.
x() <<
" " << tmp.
y() <<
" " << tmp.
z() << std::endl;
os << resx * (p1 - p2).
length() <<
" ";
os << resy * (p1 - p2).
length() <<
" ";
os << resz * (p1 - p2).
length() << std::endl;
os << "{" << std::endl;
for (
int z = 0;
z < resz;
z++)
{
for (
int y = 0;
y < resy;
y++)
{
os << " ";
for (
int x = 0;
x < resx;
x++)
{
os << (*handle)(
x,
y,
z) <<
" ";
}
os << std::endl;
}
}
os << "}" << std::endl;
os << std::endl;
}
}
return true;
}
bool
{
}
int
{
{
return 1;
}
{
#if defined(HOUDINI_11)
gdp.
save((
const char *) outputname, 0, 0);
#else
gdp.
save(outputname, NULL);
#endif
}
else
{
gdp.
load(inputname, NULL);
}
return 0;
}