Ptex: PtexUtils.cpp File Reference

Ptex

Namespaces | Functions | Variables
PtexUtils.cpp File Reference
`#include "PtexPlatform.h"`
`#include <algorithm>`
`#include <vector>`
`#include <stdlib.h>`
`#include <string.h>`
`#include "PtexHalf.h"`
`#include "PtexUtils.h"`

Go to the source code of this file.

## Namespaces
| PtexUtils

## Functions
PTEX_NAMESPACE_BEGIN const char * | MeshTypeName (MeshType mt)
const char * | DataTypeName (DataType dt)
const char * | BorderModeName (BorderMode m)
const char * | EdgeFilterModeName (EdgeFilterMode m)
const char * | EdgeIdName (EdgeId eid)
const char * | MetaDataTypeName (MetaDataType mdt)
void | ConvertToFloat (float *dst, const void *src, DataType dt, int numChannels)
void | ConvertFromFloat (void *dst, const float *src, DataType dt, int numChannels)
bool | PtexUtils::isConstant (const void *data, int stride, int ures, int vres, int pixelSize)
void | PtexUtils::interleave (const void *src, int sstride, int uw, int vw, void *dst, int dstride, DataType dt, int nchan)
void | PtexUtils::deinterleave (const void *src, int sstride, int uw, int vw, void *dst, int dstride, DataType dt, int nchan)
void | PtexUtils::encodeDifference (void *data, int size, DataType dt)
void | PtexUtils::decodeDifference (void *data, int size, DataType dt)
void | PtexUtils::reduce (const void *src, int sstride, int uw, int vw, void *dst, int dstride, DataType dt, int nchan)
void | PtexUtils::reduceu (const void *src, int sstride, int uw, int vw, void *dst, int dstride, DataType dt, int nchan)
void | PtexUtils::reducev (const void *src, int sstride, int uw, int vw, void *dst, int dstride, DataType dt, int nchan)
void | PtexUtils::reduceTri (const void *src, int sstride, int w, int, void *dst, int dstride, DataType dt, int nchan)
void | PtexUtils::fill (const void *src, void *dst, int dstride, int ures, int vres, int pixelsize)
void | PtexUtils::copy (const void *src, int sstride, void *dst, int dstride, int vres, int rowlen)
void | PtexUtils::blend (const void *src, float weight, void *dst, bool flip, int rowlen, DataType dt, int nchan)
void | PtexUtils::average (const void *src, int sstride, int uw, int vw, void *dst, DataType dt, int nchan)
void | PtexUtils::multalpha (void *data, int npixels, DataType dt, int nchannels, int alphachan)
void | PtexUtils::divalpha (void *data, int npixels, DataType dt, int nchannels, int alphachan)
void | PtexUtils::genRfaceids (const FaceInfo *faces, int nfaces, uint32_t *rfaceids, uint32_t *faceids)
std::ostream & | operator<< (std::ostream &stream, const String &str)

## Variables
ApplyConstFn | PtexUtils::applyConstFunctions [20]

## Function Documentation

## ◆ BorderModeName()

const char* BorderModeName | ( | BorderMode | m | ) |

Definition at line 68 of file PtexUtils.cpp.

## ◆ ConvertFromFloat()

void ConvertFromFloat | ( | void * | dst,
|  | const float * | src,
|  | DataType | dt,
|  | int | numChannels
| ) |  |

Definition at line 134 of file PtexUtils.cpp.

References Ptex::dt_float, Ptex::dt_half, Ptex::dt_uint16, and Ptex::dt_uint8.

## ◆ ConvertToFloat()

void ConvertToFloat | ( | float * | dst,
|  | const void * | src,
|  | DataType | dt,
|  | int | numChannels
| ) |  |

Definition at line 123 of file PtexUtils.cpp.

References Ptex::dt_float, Ptex::dt_half, Ptex::dt_uint16, and Ptex::dt_uint8.

Referenced by PtexReader::getPixel().

## ◆ DataTypeName()

const char* DataTypeName | ( | DataType | dt | ) |

Definition at line 58 of file PtexUtils.cpp.

## ◆ EdgeFilterModeName()

const char* EdgeFilterModeName | ( | EdgeFilterMode | m | ) |

Definition at line 77 of file PtexUtils.cpp.

## ◆ EdgeIdName()

const char* EdgeIdName | ( | EdgeId | eid | ) |

Definition at line 87 of file PtexUtils.cpp.

## ◆ MeshTypeName()

PTEX_NAMESPACE_BEGIN const char* MeshTypeName | ( | MeshType | mt | ) |

Definition at line 48 of file PtexUtils.cpp.

## ◆ MetaDataTypeName()

const char* MetaDataTypeName | ( | MetaDataType | mdt | ) |

Definition at line 97 of file PtexUtils.cpp.

## ◆ operator<<()

std::ostream& operator<< | ( | std::ostream & | stream,
|  | const String & | str
| ) |  |

Definition at line 692 of file PtexUtils.cpp.

## Variable Documentation

## ◆ faces

const FaceInfo* faces

Definition at line 540 of file PtexUtils.cpp.

Referenced by PtexUtils::genRfaceids().