26 INLINE
void EggMaterial::
34 INLINE
bool EggMaterial::
36 return (_flags & F_base) != 0;
45 INLINE LColor EggMaterial::
50 return LColor(1.0, 1.0, 1.0, 1.0);
57 INLINE
void EggMaterial::
58 set_diff(
const LColor &diff) {
66 INLINE
void EggMaterial::
74 INLINE
bool EggMaterial::
76 return (_flags & F_diff) != 0;
83 INLINE LColor EggMaterial::
88 return LColor(1.0, 1.0, 1.0, 1.0);
95 INLINE
void EggMaterial::
96 set_amb(
const LColor &amb) {
104 INLINE
void EggMaterial::
112 INLINE
bool EggMaterial::
114 return (_flags & F_amb) != 0;
121 INLINE LColor EggMaterial::
126 return LColor(1.0, 1.0, 1.0, 1.0);
133 INLINE
void EggMaterial::
134 set_emit(
const LColor &emit) {
142 INLINE
void EggMaterial::
150 INLINE
bool EggMaterial::
152 return (_flags & F_emit) != 0;
159 INLINE LColor EggMaterial::
164 return LColor(0.0, 0.0, 0.0, 1.0);
171 INLINE
void EggMaterial::
172 set_spec(
const LColor &spec) {
180 INLINE
void EggMaterial::
188 INLINE
bool EggMaterial::
190 return (_flags & F_spec) != 0;
197 INLINE LColor EggMaterial::
202 return LColor(0.0, 0.0, 0.0, 1.0);
209 INLINE
void EggMaterial::
210 set_shininess(
double shininess) {
211 _shininess = shininess;
212 _flags |= F_shininess;
218 INLINE
void EggMaterial::
220 _flags &= ~F_shininess;
226 INLINE
bool EggMaterial::
227 has_shininess()
const {
228 return (_flags & F_shininess) != 0;
234 INLINE
double EggMaterial::
235 get_shininess()
const {
236 if (has_shininess()) {
248 _roughness = roughness;
249 _flags |= F_roughness;
255 INLINE
void EggMaterial::
257 _flags &= ~F_roughness;
263 INLINE
bool EggMaterial::
264 has_roughness()
const {
265 return (_flags & F_roughness) != 0;
271 INLINE
double EggMaterial::
272 get_roughness()
const {
285 _metallic = metallic;
286 _flags |= F_metallic;
292 INLINE
void EggMaterial::
294 _flags &= ~F_metallic;
300 INLINE
bool EggMaterial::
301 has_metallic()
const {
302 return (_flags & F_metallic) != 0;
308 INLINE
double EggMaterial::
309 get_metallic()
const {
329 INLINE
void EggMaterial::
337 INLINE
bool EggMaterial::
339 return (_flags & F_ior) != 0;
345 INLINE
double EggMaterial::
357 INLINE
void EggMaterial::
358 set_local(
bool local) {
366 INLINE
void EggMaterial::
374 INLINE
bool EggMaterial::
376 return (_flags & F_local) != 0;
382 INLINE
bool EggMaterial::
394 INLINE UniqueEggMaterials::
395 UniqueEggMaterials(
int eq) : _eq(eq) {
401 INLINE
bool UniqueEggMaterials::
bool sorts_less_than(const EggMaterial &other, int eq) const
An ordering operator to compare two materials for sorting order.