38 nassertv(distance > 0.0 && distance < 100000.0);
39 _pssm_distance = distance;
57 nassertv(distance > 0.0 && distance < 100000.0);
58 _sun_distance = distance;
78 nassertv(factor > 0.0);
79 _logarithmic_factor = factor;
94 _use_fixed_film_size = flag;
109 nassertv(resolution >= 0 && resolution < 65535);
110 _resolution = resolution;
123 _use_stable_csm = flag;
139 nassertv(bias >= 0.0);
157 for (
size_t i = 0; i < _max_film_sizes.size(); ++i) {
158 _max_film_sizes[i].fill(0);
179 nassertr(index >= 0 && index < _cam_nodes.size(),
NodePath());
180 return _cam_nodes[index];
196 inline float PSSMCameraRig::get_split_start(
size_t split_index) {
197 float x = (float)split_index / (
float)_cam_nodes.size();
198 return (exp(_logarithmic_factor*x)-1) / (exp(_logarithmic_factor)-1);
212 inline LPoint3 PSSMCameraRig::get_interpolated_point(CoordinateOrigin origin,
float depth) {
213 nassertr(depth >= 0.0 && depth <= 1.0, LPoint3());
214 return _curr_near_points[origin] * (1.0 - depth) + _curr_far_points[origin] * depth;
242 return _camera_nearfar;