#include <paramset.h>
Public Member Functions | |
ParamSet () | |
ParamSet & | operator= (const ParamSet &p2) |
ParamSet (const ParamSet &p2) | |
void | AddFloat (const string &, const float *, int nItems=1) |
void | AddInt (const string &, const int *, int nItems=1) |
void | AddBool (const string &, const bool *, int nItems=1) |
void | AddPoint (const string &, const Point *, int nItems=1) |
void | AddVector (const string &, const Vector *, int nItems=1) |
void | AddNormal (const string &, const Normal *, int nItems=1) |
void | AddSpectrum (const string &, const Spectrum *, int nItems=1) |
void | AddString (const string &, const string *, int nItems=1) |
void | AddTexture (const string &, const string &) |
bool | EraseInt (const string &) |
bool | EraseBool (const string &) |
bool | EraseFloat (const string &) |
bool | ErasePoint (const string &) |
bool | EraseVector (const string &) |
bool | EraseNormal (const string &) |
bool | EraseSpectrum (const string &) |
bool | EraseString (const string &) |
bool | EraseTexture (const string &) |
float | FindOneFloat (const string &, float d) const |
int | FindOneInt (const string &, int d) const |
bool | FindOneBool (const string &, bool d) const |
Point | FindOnePoint (const string &, const Point &d) const |
Vector | FindOneVector (const string &, const Vector &d) const |
Normal | FindOneNormal (const string &, const Normal &d) const |
Spectrum | FindOneSpectrum (const string &, const Spectrum &d) const |
string | FindOneString (const string &, const string &d) const |
string | FindTexture (const string &) const |
const float * | FindFloat (const string &, int *nItems) const |
const int * | FindInt (const string &, int *nItems) const |
const bool * | FindBool (const string &, int *nItems) const |
const Point * | FindPoint (const string &, int *nItems) const |
const Vector * | FindVector (const string &, int *nItems) const |
const Normal * | FindNormal (const string &, int *nItems) const |
const Spectrum * | FindSpectrum (const string &, int *nItems) const |
const string * | FindString (const string &, int *nItems) const |
void | ReportUnused () const |
~ParamSet () | |
void | Clear () |
string | ToString () const |
Private Attributes | |
vector< ParamSetItem< int > * > | ints |
vector< ParamSetItem< bool > * > | bools |
vector< ParamSetItem< float > * > | floats |
vector< ParamSetItem< Point > * > | points |
vector< ParamSetItem< Vector > * > | vectors |
vector< ParamSetItem< Normal > * > | normals |
vector< ParamSetItem< Spectrum > * > | spectra |
vector< ParamSetItem< string > * > | strings |
vector< ParamSetItem< string > * > | textures |
Definition at line 57 of file paramset.h.
ParamSet::ParamSet | ( | ) | [inline] |
Definition at line 60 of file paramset.h.
ParamSet::ParamSet | ( | const ParamSet & | p2 | ) |
Definition at line 27 of file paramset.cpp.
ParamSet::~ParamSet | ( | ) | [inline] |
Definition at line 117 of file paramset.h.
void ParamSet::AddFloat | ( | const string & | name, | |
const float * | data, | |||
int | nItems = 1 | |||
) |
Definition at line 55 of file paramset.cpp.
References EraseFloat(), and floats.
Referenced by main(), NURBS::Refine(), and Heightfield::Refine().
void ParamSet::AddInt | ( | const string & | name, | |
const int * | data, | |||
int | nItems = 1 | |||
) |
Definition at line 63 of file paramset.cpp.
References ADD_PARAM_TYPE, EraseInt(), and ints.
Referenced by NURBS::Refine(), LoopSubdiv::Refine(), and Heightfield::Refine().
void ParamSet::AddBool | ( | const string & | name, | |
const bool * | data, | |||
int | nItems = 1 | |||
) |
void ParamSet::AddPoint | ( | const string & | name, | |
const Point * | data, | |||
int | nItems = 1 | |||
) |
Definition at line 71 of file paramset.cpp.
References ADD_PARAM_TYPE, ErasePoint(), and points.
Referenced by NURBS::Refine(), LoopSubdiv::Refine(), and Heightfield::Refine().
void ParamSet::AddVector | ( | const string & | name, | |
const Vector * | data, | |||
int | nItems = 1 | |||
) |
void ParamSet::AddNormal | ( | const string & | name, | |
const Normal * | data, | |||
int | nItems = 1 | |||
) |
Definition at line 79 of file paramset.cpp.
References ADD_PARAM_TYPE, EraseNormal(), and normals.
Referenced by NURBS::Refine(), and LoopSubdiv::Refine().
void ParamSet::AddSpectrum | ( | const string & | name, | |
const Spectrum * | data, | |||
int | nItems = 1 | |||
) |
Definition at line 83 of file paramset.cpp.
References ADD_PARAM_TYPE, EraseSpectrum(), and spectra.
void ParamSet::AddString | ( | const string & | name, | |
const string * | data, | |||
int | nItems = 1 | |||
) |
void ParamSet::AddTexture | ( | const string & | name, | |
const string & | value | |||
) |
bool ParamSet::EraseInt | ( | const string & | n | ) |
bool ParamSet::EraseBool | ( | const string & | n | ) |
bool ParamSet::EraseFloat | ( | const string & | n | ) |
bool ParamSet::ErasePoint | ( | const string & | n | ) |
bool ParamSet::EraseVector | ( | const string & | n | ) |
bool ParamSet::EraseNormal | ( | const string & | n | ) |
bool ParamSet::EraseSpectrum | ( | const string & | n | ) |
bool ParamSet::EraseString | ( | const string & | n | ) |
bool ParamSet::EraseTexture | ( | const string & | n | ) |
float ParamSet::FindOneFloat | ( | const string & | name, | |
float | d | |||
) | const |
Definition at line 176 of file paramset.cpp.
References floats.
Referenced by CreateAccelerator(), CreateCamera(), CreateFilter(), CreateLight(), CreateShape(), CreateSurfaceIntegrator(), CreateToneMap(), CreateVolumeIntegrator(), CreateVolumeRegion(), and TextureParams::GetFloatTexture().
int ParamSet::FindOneInt | ( | const string & | name, | |
int | d | |||
) | const |
Definition at line 202 of file paramset.cpp.
References ints, and LOOKUP_ONE.
Referenced by CreateAccelerator(), CreateAreaLight(), CreateFilm(), CreateLight(), CreateSampler(), CreateShape(), CreateSurfaceIntegrator(), and CreateVolumeRegion().
bool ParamSet::FindOneBool | ( | const string & | name, | |
bool | d | |||
) | const |
Definition at line 205 of file paramset.cpp.
References bools, and LOOKUP_ONE.
Referenced by CreateAccelerator(), CreateFilm(), CreateSampler(), and CreateSurfaceIntegrator().
Definition at line 211 of file paramset.cpp.
References LOOKUP_ONE, and points.
Referenced by CreateLight(), CreateShape(), and CreateVolumeRegion().
Definition at line 217 of file paramset.cpp.
References LOOKUP_ONE, and vectors.
Referenced by CreateVolumeRegion().
Definition at line 229 of file paramset.cpp.
References LOOKUP_ONE, and spectra.
Referenced by CreateAreaLight(), CreateLight(), CreateVolumeRegion(), and TextureParams::GetSpectrumTexture().
string ParamSet::FindOneString | ( | const string & | name, | |
const string & | d | |||
) | const |
Definition at line 235 of file paramset.cpp.
References LOOKUP_ONE, and strings.
Referenced by CreateFilm(), CreateLight(), CreateShape(), and CreateSurfaceIntegrator().
string ParamSet::FindTexture | ( | const string & | name | ) | const |
Definition at line 238 of file paramset.cpp.
References LOOKUP_ONE, and textures.
Referenced by TextureParams::GetFloatTexture(), and TextureParams::GetSpectrumTexture().
const float * ParamSet::FindFloat | ( | const string & | name, | |
int * | nItems | |||
) | const |
Definition at line 186 of file paramset.cpp.
References floats.
Referenced by CreateCamera(), CreateFilm(), CreateShape(), and CreateVolumeRegion().
const int * ParamSet::FindInt | ( | const string & | name, | |
int * | nItems | |||
) | const |
Definition at line 196 of file paramset.cpp.
References ints, and LOOKUP_PTR.
Referenced by CreateShape().
const bool * ParamSet::FindBool | ( | const string & | name, | |
int * | nItems | |||
) | const |
const Point * ParamSet::FindPoint | ( | const string & | name, | |
int * | nItems | |||
) | const |
Definition at line 208 of file paramset.cpp.
References LOOKUP_PTR, and points.
Referenced by CreateShape().
const Vector * ParamSet::FindVector | ( | const string & | name, | |
int * | nItems | |||
) | const |
Definition at line 214 of file paramset.cpp.
References LOOKUP_PTR, and vectors.
Referenced by CreateShape().
const Normal * ParamSet::FindNormal | ( | const string & | name, | |
int * | nItems | |||
) | const |
Definition at line 220 of file paramset.cpp.
References LOOKUP_PTR, and normals.
Referenced by CreateShape().
const Spectrum * ParamSet::FindSpectrum | ( | const string & | name, | |
int * | nItems | |||
) | const |
const string * ParamSet::FindString | ( | const string & | name, | |
int * | nItems | |||
) | const |
void ParamSet::ReportUnused | ( | ) | const |
Definition at line 242 of file paramset.cpp.
References bools, CHECK_UNUSED, floats, ints, normals, points, spectra, strings, textures, and vectors.
Referenced by MakeAccelerator(), MakeAreaLight(), MakeCamera(), MakeFilm(), MakeFilter(), MakeLight(), MakeSampler(), MakeSurfaceIntegrator(), MakeToneMap(), MakeVolumeIntegrator(), MakeVolumeRegion(), and pbrtShape().
void ParamSet::Clear | ( | ) |
Definition at line 255 of file paramset.cpp.
References bools, DEL_PARAMS, floats, ints, normals, points, spectra, strings, textures, and vectors.
Referenced by operator=().
string ParamSet::ToString | ( | ) | const |
Definition at line 267 of file paramset.cpp.
References bools, Spectrum::c, ParamSetItem< T >::data, floats, ints, ParamSetItem< T >::name, ParamSetItem< T >::nItems, normals, points, spectra, strings, textures, vectors, Normal::x, Vector::x, Point::x, Normal::y, Vector::y, Point::y, Normal::z, Vector::z, and Point::z.
vector<ParamSetItem<int> *> ParamSet::ints [private] |
Definition at line 124 of file paramset.h.
Referenced by AddInt(), Clear(), EraseInt(), FindInt(), FindOneInt(), operator=(), ReportUnused(), and ToString().
vector<ParamSetItem<bool> *> ParamSet::bools [private] |
Definition at line 125 of file paramset.h.
Referenced by AddBool(), Clear(), EraseBool(), FindBool(), FindOneBool(), operator=(), ReportUnused(), and ToString().
vector<ParamSetItem<float> *> ParamSet::floats [private] |
Definition at line 126 of file paramset.h.
Referenced by AddFloat(), Clear(), EraseFloat(), FindFloat(), FindOneFloat(), operator=(), ReportUnused(), and ToString().
vector<ParamSetItem<Point> *> ParamSet::points [private] |
Definition at line 127 of file paramset.h.
Referenced by AddPoint(), Clear(), ErasePoint(), FindOnePoint(), FindPoint(), operator=(), ReportUnused(), and ToString().
vector<ParamSetItem<Vector> *> ParamSet::vectors [private] |
Definition at line 128 of file paramset.h.
Referenced by AddVector(), Clear(), EraseVector(), FindOneVector(), FindVector(), operator=(), ReportUnused(), and ToString().
vector<ParamSetItem<Normal> *> ParamSet::normals [private] |
Definition at line 129 of file paramset.h.
Referenced by AddNormal(), Clear(), EraseNormal(), FindNormal(), FindOneNormal(), operator=(), ReportUnused(), and ToString().
vector<ParamSetItem<Spectrum> *> ParamSet::spectra [private] |
Definition at line 130 of file paramset.h.
Referenced by AddSpectrum(), Clear(), EraseSpectrum(), FindOneSpectrum(), FindSpectrum(), operator=(), ReportUnused(), and ToString().
vector<ParamSetItem<string> *> ParamSet::strings [private] |
Definition at line 131 of file paramset.h.
Referenced by AddString(), Clear(), EraseString(), FindOneString(), FindString(), operator=(), ReportUnused(), and ToString().
vector<ParamSetItem<string> *> ParamSet::textures [private] |
Definition at line 132 of file paramset.h.
Referenced by AddTexture(), Clear(), EraseTexture(), FindTexture(), operator=(), ReportUnused(), and ToString().