53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
// Filename: eggMaterial.I
|
|
// Created by: drose (29Jan99)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: EggMaterial::set_diff
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void EggMaterial::
|
|
set_diff(const Colorf &diff) {
|
|
_diff = diff;
|
|
_has_diff = true;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: EggMaterial::clear_diff
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void EggMaterial::
|
|
clear_diff() {
|
|
_has_diff = false;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: EggMaterial::has_diff
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE bool EggMaterial::
|
|
has_diff() const {
|
|
return _has_diff;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: EggMaterial::get_diff
|
|
// Access: Public
|
|
// Description: It is legal to call this even if has_diff() returns
|
|
// false. If so, it simply returns the default diff
|
|
// color.
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE Colorf EggMaterial::
|
|
get_diff() const {
|
|
if (has_diff()) {
|
|
return _diff;
|
|
} else {
|
|
return Colorf(1.0, 1.0, 1.0, 1.0);
|
|
}
|
|
}
|