27 #ifndef PSSMCAMERARIG_H
28 #define PSSMCAMERARIG_H
83 enum CoordinateOrigin {
91 void init_cam_nodes();
92 void compute_pssm_splits(
const LMatrix4& transform,
float max_distance,
93 const LVecBase3 &light_vector);
94 inline float get_split_start(
size_t split_index);
95 LMatrix4 compute_mvp(
size_t cam_index);
96 inline LPoint3 get_interpolated_point(CoordinateOrigin origin,
float depth);
97 LVecBase3 get_snap_offset(
const LMatrix4& mat,
size_t resolution);
99 std::vector<NodePath> _cam_nodes;
100 std::vector<Camera*> _cameras;
101 std::vector<LVecBase2> _max_film_sizes;
105 LPoint3 _curr_near_points[4];
106 LPoint3 _curr_far_points[4];
107 float _pssm_distance;
109 float _logarithmic_factor;
111 bool _use_fixed_film_size;
112 bool _use_stable_csm;
117 PTA_LMatrix4 _camera_mvps;
118 PTA_LVecBase2 _camera_nearfar;
123 #include "pssmCameraRig.I"
125 #endif // PSSMCAMERARIG_H
void set_pssm_distance(float distance)
RenderPipeline.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
~PSSMCameraRig()
Destructs the camera rig.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void reset_film_size_cache()
Resets the film size cache.
NodePath get_camera(size_t index)
Returns the n-th camera.
PSSMCameraRig(size_t num_splits)
Constructs a new PSSM camera rig.
void update(NodePath cam_node, const LVecBase3 &light_vector)
Updates the PSSM camera rig.
void reparent_to(NodePath parent)
Reparents the camera rig.
void set_use_stable_csm(bool flag)
Sets whether to use stable CSM snapping.
void set_use_fixed_film_size(bool flag)
Sets whether to use a fixed film size.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A lightweight class that represents a single element that may be timed and/or counted via stats.
void set_sun_distance(float distance)
Sets the suns distance.
void set_resolution(size_t resolution)
Sets the resolution of each split.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
const PTA_LVecBase2 & get_nearfar_array()
Returns a handle to the near and far planes array.
const PTA_LMatrix4 & get_mvp_array()
Returns a handle to the MVP array.
void set_logarithmic_factor(float factor)
Sets the logarithmic factor.
void set_border_bias(float bias)
Sets the border bias for each split.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.