| Ptex
    | 
Pixel resolution of a given texture. More...
#include <Ptexture.h>
| Public Member Functions | |
| Res () | |
| Default constructor, sets res to 0 (1x1 texel).  More... | |
| Res (int8_t ulog2_, int8_t vlog2_) | |
| Constructor.  More... | |
| Res (uint16_t value) | |
| Constructor.  More... | |
| int | u () const | 
| U resolution in texels.  More... | |
| int | v () const | 
| V resolution in texels.  More... | |
| uint16_t | val () const | 
| Resolution as a single 16-bit integer value.  More... | |
| int | size () const | 
| Total size of specified texture in texels (u * v).  More... | |
| bool | operator== (const Res &r) const | 
| Comparison operator.  More... | |
| bool | operator!= (const Res &r) const | 
| Comparison operator.  More... | |
| bool | operator>= (const Res &r) const | 
| True if res is >= given res in both u and v directions.  More... | |
| Res | swappeduv () const | 
| Get value of resolution with u and v swapped.  More... | |
| void | swapuv () | 
| Swap the u and v resolution values in place.  More... | |
| void | clamp (const Res &r) | 
| Clamp the resolution value against the given value.  More... | |
| int | ntilesu (Res tileres) const | 
| Determine the number of tiles in the u direction for the given tile res.  More... | |
| int | ntilesv (Res tileres) const | 
| Determine the number of tiles in the v direction for the given tile res.  More... | |
| int | ntiles (Res tileres) const | 
| Determine the total number of tiles for the given tile res.  More... | |
| Public Attributes | |
| int8_t | ulog2 | 
| log base 2 of u resolution, in texels  More... | |
| int8_t | vlog2 | 
| log base 2 of v resolution, in texels  More... | |
Pixel resolution of a given texture.
The resolution is stored in log form: ulog2 = log2(ures), vlog2 = log2(vres)). Note: negative ulog2 or vlog2 values are reserved for internal use.
Definition at line 172 of file Ptexture.h.
| 
 | inline | 
Default constructor, sets res to 0 (1x1 texel).
Definition at line 177 of file Ptexture.h.
Referenced by swappeduv().
| 
 | inline | 
Constructor.
Definition at line 180 of file Ptexture.h.
| 
 | inline | 
Constructor.
Definition at line 183 of file Ptexture.h.
| 
 | inline | 
Clamp the resolution value against the given value.
Definition at line 213 of file Ptexture.h.
| 
 | inline | 
Determine the total number of tiles for the given tile res.
Definition at line 225 of file Ptexture.h.
| 
 | inline | 
Determine the number of tiles in the u direction for the given tile res.
Definition at line 219 of file Ptexture.h.
References ulog2.
Referenced by PtexReader::getData(), and ntiles().
| 
 | inline | 
Determine the number of tiles in the v direction for the given tile res.
Definition at line 222 of file Ptexture.h.
References vlog2.
Referenced by ntiles().
| 
 | inline | 
Comparison operator.
Definition at line 201 of file Ptexture.h.
| 
 | inline | 
| 
 | inline | 
True if res is >= given res in both u and v directions.
Definition at line 204 of file Ptexture.h.
| 
 | inline | 
Total size of specified texture in texels (u * v).
Definition at line 195 of file Ptexture.h.
Referenced by PtexMainWriter::finish(), and PtexWriterBase::writeReduction().
| 
 | inline | 
| 
 | inline | 
Swap the u and v resolution values in place.
Definition at line 210 of file Ptexture.h.
References swappeduv().
| 
 | inline | 
U resolution in texels.
Definition at line 186 of file Ptexture.h.
References ulog2.
Referenced by PtexSeparableFilter::apply(), PtexTriangleFilter::applyIter(), PtexPointFilter::eval(), PtexPointFilterTri::eval(), size(), and PtexWriterBase::writeReduction().
| 
 | inline | 
V resolution in texels.
Definition at line 189 of file Ptexture.h.
References vlog2.
Referenced by PtexSeparableFilter::apply(), PtexTriangleFilter::applyIter(), and size().
| 
 | inline | 
Resolution as a single 16-bit integer value.
Definition at line 192 of file Ptexture.h.
| int8_t Ptex::Res::ulog2 | 
log base 2 of u resolution, in texels
Definition at line 173 of file Ptexture.h.
Referenced by clamp(), ntilesu(), operator==(), operator>=(), swappeduv(), u(), and val().
| int8_t Ptex::Res::vlog2 | 
log base 2 of v resolution, in texels
Definition at line 174 of file Ptexture.h.
Referenced by clamp(), ntilesv(), operator==(), operator>=(), swappeduv(), v(), and val().
 1.8.17
 1.8.17