Public Types | |
enum | Equivalence { EAttributes = 1, EMrefName = 2 } |
Public Member Functions | |
EggMaterial (EggMaterial const copy) | |
EggMaterial (string mref_name) | |
clearAmb () | |
clearDiff () | |
clearEmit () | |
clearLocal () | |
clearShininess () | |
clearSpec () | |
VBase4 | getAmb () |
It is legal to call this even if has_amb() returns false. | |
VBase4 | getDiff () |
It is legal to call this even if has_diff() returns false. | |
VBase4 | getEmit () |
It is legal to call this even if has_emit() returns false. | |
bool | getLocal () |
double | getShininess () |
VBase4 | getSpec () |
It is legal to call this even if has_spec() returns false. | |
bool | hasAmb () |
bool | hasDiff () |
bool | hasEmit () |
bool | hasLocal () |
bool | hasShininess () |
bool | hasSpec () |
bool | isEquivalentTo (EggMaterial const other, int eq) |
Returns true if the two materials are equivalent in all relevant properties (according to eq), false otherwise. | |
setAmb (VBase4 const amb) | |
setDiff (VBase4 const diff) | |
setEmit (VBase4 const emit) | |
setLocal (bool local) | |
setShininess (double shininess) | |
setSpec (VBase4 const spec) | |
bool | sortsLessThan (EggMaterial const other, int eq) |
An ordering operator to compare two materials for sorting order. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
enum Equivalence |
EggMaterial | ( | EggMaterial const | copy | ) |
EggMaterial | ( | string | mref_name | ) |
clearAmb | ( | ) |
clearDiff | ( | ) |
clearEmit | ( | ) |
clearLocal | ( | ) |
clearShininess | ( | ) |
clearSpec | ( | ) |
VBase4 getAmb | ( | ) |
It is legal to call this even if has_amb() returns false.
If so, it simply returns the default amb color.
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from EggNode.
VBase4 getDiff | ( | ) |
It is legal to call this even if has_diff() returns false.
If so, it simply returns the default diff color.
VBase4 getEmit | ( | ) |
It is legal to call this even if has_emit() returns false.
If so, it simply returns the default emit color.
bool getLocal | ( | ) |
double getShininess | ( | ) |
VBase4 getSpec | ( | ) |
It is legal to call this even if has_spec() returns false.
If so, it simply returns the default spec color.
bool hasAmb | ( | ) |
bool hasDiff | ( | ) |
bool hasEmit | ( | ) |
bool hasLocal | ( | ) |
bool hasShininess | ( | ) |
bool hasSpec | ( | ) |
bool isEquivalentTo | ( | EggMaterial const | other, |
int | eq | ||
) |
Returns true if the two materials are equivalent in all relevant properties (according to eq), false otherwise.
The Equivalence parameter, eq, should be set to the bitwise OR of the following properties, according to what you consider relevant:
EggMaterial::E_attributes: All material attributes (diff, spec, etc.) except MRef name.
EggMaterial::E_mref_name: The MRef name.
setAmb | ( | VBase4 const | amb | ) |
setDiff | ( | VBase4 const | diff | ) |
setEmit | ( | VBase4 const | emit | ) |
setLocal | ( | bool | local | ) |
setShininess | ( | double | shininess | ) |
setSpec | ( | VBase4 const | spec | ) |
bool sortsLessThan | ( | EggMaterial const | other, |
int | eq | ||
) |
An ordering operator to compare two materials for sorting order.
This imposes an arbitrary ordering useful to identify unique materials, according to the indicated Equivalence factor. See is_equivalent_to().