36 return (_flags & F_base) != 0;
50 return LColor(1.0, 1.0, 1.0, 1.0);
57INLINE
void EggMaterial::
58set_diff(
const LColor &diff) {
66INLINE
void EggMaterial::
74INLINE
bool EggMaterial::
76 return (_flags & F_diff) != 0;
88 return LColor(1.0, 1.0, 1.0, 1.0);
95INLINE
void EggMaterial::
96set_amb(
const LColor &amb) {
104INLINE
void EggMaterial::
112INLINE
bool EggMaterial::
114 return (_flags & F_amb) != 0;
126 return LColor(1.0, 1.0, 1.0, 1.0);
133INLINE
void EggMaterial::
134set_emit(
const LColor &emit) {
142INLINE
void EggMaterial::
150INLINE
bool EggMaterial::
152 return (_flags & F_emit) != 0;
164 return LColor(0.0, 0.0, 0.0, 1.0);
171INLINE
void EggMaterial::
172set_spec(
const LColor &spec) {
180INLINE
void EggMaterial::
188INLINE
bool EggMaterial::
190 return (_flags & F_spec) != 0;
202 return LColor(0.0, 0.0, 0.0, 1.0);
209INLINE
void EggMaterial::
210set_shininess(
double shininess) {
211 _shininess = shininess;
212 _flags |= F_shininess;
218INLINE
void EggMaterial::
220 _flags &= ~F_shininess;
226INLINE
bool EggMaterial::
227has_shininess()
const {
228 return (_flags & F_shininess) != 0;
234INLINE
double EggMaterial::
235get_shininess()
const {
236 if (has_shininess()) {
248 _roughness = roughness;
249 _flags |= F_roughness;
257 _flags &= ~F_roughness;
265 return (_flags & F_roughness) != 0;
285 _metallic = metallic;
286 _flags |= F_metallic;
294 _flags &= ~F_metallic;
302 return (_flags & F_metallic) != 0;
339 return (_flags & F_ior) != 0;
357INLINE
void EggMaterial::
358set_local(
bool local) {
366INLINE
void EggMaterial::
374INLINE
bool EggMaterial::
376 return (_flags & F_local) != 0;
382INLINE
bool EggMaterial::
394INLINE UniqueEggMaterials::
395UniqueEggMaterials(
int eq) : _eq(eq) {
401INLINE
bool UniqueEggMaterials::
get_emit
It is legal to call this even if has_emit() returns false.
bool sorts_less_than(const EggMaterial &other, int eq) const
An ordering operator to compare two materials for sorting order.
get_spec
It is legal to call this even if has_spec() returns false.
get_diff
It is legal to call this even if has_diff() returns false.
get_amb
It is legal to call this even if has_amb() returns false.
get_base
It is legal to call this even if has_base() returns false.