17 INLINE
void EggMaterial::
18 set_base(
const LColor &base) {
26 INLINE
void EggMaterial::
34 INLINE
bool EggMaterial::
36 return (_flags & F_base) != 0;
43 INLINE LColor EggMaterial::
48 return LColor(1.0, 1.0, 1.0, 1.0);
55 INLINE
void EggMaterial::
56 set_diff(
const LColor &diff) {
64 INLINE
void EggMaterial::
72 INLINE
bool EggMaterial::
74 return (_flags & F_diff) != 0;
81 INLINE LColor EggMaterial::
86 return LColor(1.0, 1.0, 1.0, 1.0);
93 INLINE
void EggMaterial::
94 set_amb(
const LColor &amb) {
102 INLINE
void EggMaterial::
110 INLINE
bool EggMaterial::
112 return (_flags & F_amb) != 0;
119 INLINE LColor EggMaterial::
124 return LColor(1.0, 1.0, 1.0, 1.0);
131 INLINE
void EggMaterial::
132 set_emit(
const LColor &emit) {
140 INLINE
void EggMaterial::
148 INLINE
bool EggMaterial::
150 return (_flags & F_emit) != 0;
157 INLINE LColor EggMaterial::
162 return LColor(0.0, 0.0, 0.0, 1.0);
169 INLINE
void EggMaterial::
170 set_spec(
const LColor &spec) {
178 INLINE
void EggMaterial::
186 INLINE
bool EggMaterial::
188 return (_flags & F_spec) != 0;
195 INLINE LColor EggMaterial::
200 return LColor(0.0, 0.0, 0.0, 1.0);
207 INLINE
void EggMaterial::
208 set_shininess(
double shininess) {
209 _shininess = shininess;
210 _flags |= F_shininess;
216 INLINE
void EggMaterial::
218 _flags &= ~F_shininess;
224 INLINE
bool EggMaterial::
225 has_shininess()
const {
226 return (_flags & F_shininess) != 0;
232 INLINE
double EggMaterial::
233 get_shininess()
const {
234 if (has_shininess()) {
244 INLINE
void EggMaterial::
245 set_roughness(
double roughness) {
246 _roughness = roughness;
247 _flags |= F_roughness;
253 INLINE
void EggMaterial::
255 _flags &= ~F_roughness;
261 INLINE
bool EggMaterial::
262 has_roughness()
const {
263 return (_flags & F_roughness) != 0;
269 INLINE
double EggMaterial::
270 get_roughness()
const {
271 if (has_roughness()) {
281 INLINE
void EggMaterial::
282 set_metallic(
double metallic) {
283 _metallic = metallic;
284 _flags |= F_metallic;
290 INLINE
void EggMaterial::
292 _flags &= ~F_metallic;
298 INLINE
bool EggMaterial::
299 has_metallic()
const {
300 return (_flags & F_metallic) != 0;
306 INLINE
double EggMaterial::
307 get_metallic()
const {
308 if (has_metallic()) {
318 INLINE
void EggMaterial::
319 set_ior(
double ior) {
327 INLINE
void EggMaterial::
335 INLINE
bool EggMaterial::
337 return (_flags & F_ior) != 0;
343 INLINE
double EggMaterial::
355 INLINE
void EggMaterial::
356 set_local(
bool local) {
364 INLINE
void EggMaterial::
372 INLINE
bool EggMaterial::
374 return (_flags & F_local) != 0;
380 INLINE
bool EggMaterial::
392 INLINE UniqueEggMaterials::
393 UniqueEggMaterials(
int eq) : _eq(eq) {
399 INLINE
bool UniqueEggMaterials::
bool sorts_less_than(const EggMaterial &other, int eq) const
An ordering operator to compare two materials for sorting order.