112 lines
3.3 KiB
Plaintext
112 lines
3.3 KiB
Plaintext
// Filename: fog.I
|
|
// Created by: mike (05Feb99)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::get_mode
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE Fog::Mode Fog::get_mode(void) const {
|
|
return _mode;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::set_mode
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void Fog::set_mode(Mode mode) {
|
|
_mode = mode;
|
|
compute_density();
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::get_color
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE Colorf Fog::get_color(void) const {
|
|
return _color;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::set_color
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void Fog::set_color(const Colorf &color) {
|
|
_color = color;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::get_range
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void Fog::get_range(float &onset, float &opaque) const {
|
|
onset = _onset;
|
|
opaque = _opaque;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::set_range
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void Fog::set_range(float onset, float opaque) {
|
|
_onset = onset;
|
|
_opaque = opaque;
|
|
compute_density();
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::get_offsets
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void Fog::get_offsets(float &onset, float &opaque) const {
|
|
onset = _onset_offset;
|
|
opaque = _opaque_offset;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::set_offsets
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void Fog::set_offsets(float onset, float opaque) {
|
|
_onset_offset = onset;
|
|
_opaque_offset = opaque;
|
|
compute_density();
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::get_start
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE float Fog::get_start(void) const {
|
|
return _onset + _onset_offset;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::get_end
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE float Fog::get_end(void) const {
|
|
return _opaque + _opaque_offset;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Fog::get_density
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE float Fog::get_density(void) const {
|
|
return _density;
|
|
}
|