56     virtual void writeMeta(
const char* key, 
const char* value);
 
   57     virtual void writeMeta(
const char* key, 
const int8_t* value, 
int count);
 
   58     virtual void writeMeta(
const char* key, 
const int16_t* value, 
int count);
 
   59     virtual void writeMeta(
const char* key, 
const int32_t* value, 
int count);
 
   60     virtual void writeMeta(
const char* key, 
const float* value, 
int count);
 
   61     virtual void writeMeta(
const char* key, 
const double* value, 
int count);
 
   85                    int nchannels, 
int alphachan, 
int nfaces,
 
   90     int writeBlock(FILE* fp, 
const void* data, 
int size);
 
   92     int readBlock(FILE* fp, 
void* data, 
int size);
 
  100                        FaceDataHeader& fdh);
 
  126                    int nchannels, 
int alphachan, 
int nfaces, 
bool genmipmaps);
 
  129     virtual bool writeFace(
int faceid, 
const FaceInfo& f, 
const void* data, 
int stride);
 
  165         std::vector<FaceDataHeader> 
fdh;  
 
  178                    int nchannels, 
int alphachan, 
int nfaces);
 
  181     virtual bool writeFace(
int faceid, 
const FaceInfo& f, 
const void* data, 
int stride);
 
Interface for writing data to a ptex file. 
void getError(Ptex::String &error)
bool storeFaceInfo(int faceid, FaceInfo &dest, const FaceInfo &src, int flags=0)
virtual ~PtexWriterBase()
virtual bool close(Ptex::String &error)
Close the file. 
virtual void release()
Release resources held by this pointer (pointer becomes invalid). 
void writeReduction(FILE *fp, const void *data, int stride, Res res)
std::vector< FaceDataHeader > fdh
PtexUtils::ReduceFn * _reduceFn
void writeFaceData(FILE *fp, const void *data, int stride, Res res, FaceDataHeader &fdh)
DataType
Type of data stored in texture file. 
void writeMetaData(FILE *fp)
bool ok(Ptex::String &error)
std::vector< uint32_t > _rfaceids
virtual void setBorderModes(Ptex::BorderMode uBorderMode, Ptex::BorderMode vBorderMode)
Set border modes. 
virtual bool writeConstantFace(int faceid, const FaceInfo &f, const void *data)
Write constant texture data for a face. 
void storeConstValue(int faceid, const void *data, int stride, Res res)
Pixel resolution of a given texture. 
std::vector< FaceInfo > _faceinfo
void generateReductions()
virtual bool close(Ptex::String &error)
Close the file. 
MetaDataType
Type of meta data entry. 
static const int MinReductionLog2
int writeMetaDataBlock(FILE *fp, MetaEntry &val)
BorderMode
How to handle mesh border when filtering. 
void setError(const std::string &error)
int writeZipBlock(FILE *fp, const void *data, int size, bool finish=true)
virtual bool writeConstantFace(int faceid, const FaceInfo &f, const void *data)
Write constant texture data for a face. 
Information about a face, as stored in the Ptex file header. 
int copyBlock(FILE *dst, FILE *src, FilePos pos, int size)
void ReduceFn(const void *src, int sstride, int ures, int vres, void *dst, int dstride, DataType dt, int nchannels)
PtexMainWriter(const char *path, PtexTexture *tex, Ptex::MeshType mt, Ptex::DataType dt, int nchannels, int alphachan, int nfaces, bool genmipmaps)
int writeBlock(FILE *fp, const void *data, int size)
virtual ~PtexMainWriter()
int readBlock(FILE *fp, void *data, int size)
virtual void addMetaData(const char *key, MetaDataType t, const void *value, int size)
virtual bool close(Ptex::String &error)
Close the file. 
MeshType
Type of base mesh for which the textures are defined. 
MetaDataType
Type of meta data entry. 
PtexWriterBase(const char *path, Ptex::MeshType mt, Ptex::DataType dt, int nchannels, int alphachan, int nfaces, bool compress)
std::vector< FilePos > _rpos
std::vector< FilePos > pos
virtual bool writeFace(int faceid, const FaceInfo &f, const void *data, int stride)
Write texture data for a face. 
std::vector< LevelRec > _levels
void flagConstantNeighorhoods()
virtual ~PtexIncrWriter()
Res calcTileRes(Res faceres)
Interface for reading data from a ptex file. 
std::vector< uint32_t > _faceids_r
int writeBlank(FILE *fp, int size)
Information about a face, as stored in the Ptex file header. 
std::vector< MetaEntry > _metadata
virtual void writeMeta(const char *key, const char *value)
Write a string as meta data. 
PtexIncrWriter(const char *path, FILE *fp, Ptex::MeshType mt, Ptex::DataType dt, int nchannels, int alphachan, int nfaces)
std::map< std::string, int > _metamap
void writeConstFaceBlock(FILE *fp, const void *data, FaceDataHeader &fdh)
virtual bool writeFace(int faceid, const FaceInfo &f, const void *data, int stride)
Write texture data for a face. 
void writeFaceBlock(FILE *fp, const void *data, int stride, Res res, FaceDataHeader &fdh)
std::vector< uint8_t > data
Public API classes for reading, writing, caching, and filtering Ptex files. 
virtual void addMetaData(const char *key, MetaDataType t, const void *value, int size)
std::vector< uint8_t > _constdata