17 INLINE Fog::Mode Fog::
42 INLINE
const LColor &Fog::
51 set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b) {
78 LVector3 forward = LVector3::forward();
79 _linear_onset_point = onset * forward;
80 _linear_opaque_point = opaque * forward;
81 _transformed_onset = onset;
82 _transformed_opaque = opaque;
90 INLINE
const LPoint3 &Fog::
91 get_linear_onset_point()
const {
92 return _linear_onset_point;
101 _linear_onset_point.set(x, y, z);
110 _linear_onset_point = linear_onset_point;
117 INLINE
const LPoint3 &Fog::
118 get_linear_opaque_point()
const {
119 return _linear_opaque_point;
128 _linear_opaque_point.set(x, y, z);
137 _linear_opaque_point = linear_opaque_point;
172 _linear_fallback_cosa = ccos(deg_2_rad(angle));
173 _linear_fallback_onset = onset;
174 _linear_fallback_opaque = opaque;
181 INLINE PN_stdfloat Fog::
182 get_exp_density()
const {
195 nassertv((exp_density >= 0.0) && (exp_density <= 1.0));
196 _exp_density = exp_density;
198 if (_mode == M_linear) {
199 _mode = M_exponential;
void set_linear_fallback(PN_stdfloat angle, PN_stdfloat onset, PN_stdfloat opaque)
Fog effects are traditionally defined in camera-relative space, but the Panda Fog node has a special ...
set_exp_density
Sets the density of the fog for exponential calculations.
set_linear_onset_point
Specifies the point in space at which the fog begins.
void set_linear_range(PN_stdfloat onset, PN_stdfloat opaque)
Specifies the effects of the fog in linear distance units.
set_color
Sets the color of the fog.
set_linear_opaque_point
Specifies the point in space at which the fog completely obscures geometry.
set_mode
Specifies the computation that is used to determine the fog effect.