EggMaterial

class EggMaterial

Bases: EggNode

Inheritance diagram

Inheritance diagram of EggMaterial

enum Equivalence
enumerator E_attributes = 1
enumerator E_mref_name = 2
explicit EggMaterial(std::string const &mref_name)
EggMaterial(EggMaterial const &copy)
void clear_amb(void)
void clear_base(void)

New in version 1.10.0.

void clear_diff(void)
void clear_emit(void)
void clear_ior(void)

New in version 1.10.0.

void clear_local(void)
void clear_metallic(void)

New in version 1.10.0.

void clear_roughness(void)

New in version 1.10.0.

void clear_shininess(void)
void clear_spec(void)
LColor get_amb(void) const

It is legal to call this even if has_amb() returns false. If so, it simply returns the default amb color.

LColor get_base(void) const

It is legal to call this even if has_base() returns false. If so, it simply returns the default base color.

New in version 1.10.0.

static TypeHandle get_class_type(void)
LColor get_diff(void) const

It is legal to call this even if has_diff() returns false. If so, it simply returns the default diff color.

LColor get_emit(void) const

It is legal to call this even if has_emit() returns false. If so, it simply returns the default emit color.

double get_ior(void) const

New in version 1.10.0.

bool get_local(void) const
double get_metallic(void) const

New in version 1.10.0.

double get_roughness(void) const

New in version 1.10.0.

double get_shininess(void) const
LColor get_spec(void) const

It is legal to call this even if has_spec() returns false. If so, it simply returns the default spec color.

bool has_amb(void) const
bool has_base(void) const

New in version 1.10.0.

bool has_diff(void) const
bool has_emit(void) const
bool has_ior(void) const

New in version 1.10.0.

bool has_local(void) const
bool has_metallic(void) const

New in version 1.10.0.

bool has_roughness(void) const

New in version 1.10.0.

bool has_shininess(void) const
bool has_spec(void) const
bool is_equivalent_to(EggMaterial const &other, int eq) const

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.

void set_amb(LColor const &amb)
void set_base(LColor const &base)

New in version 1.10.0.

void set_diff(LColor const &diff)
void set_emit(LColor const &emit)
void set_ior(double ior)

New in version 1.10.0.

void set_local(bool local)
void set_metallic(double metallic)

New in version 1.10.0.

void set_roughness(double roughness)

New in version 1.10.0.

void set_shininess(double shininess)
void set_spec(LColor const &spec)
bool sorts_less_than(EggMaterial const &other, int eq) const

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().