aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_track/models/advtrains_dtrack_swrcr.b3d
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-23 15:35:58 +0100
committerorwell96 <orwell@bleipb.de>2019-01-23 15:37:18 +0100
commit1c3ea960415fcbd63c5f1b2cd8a5b25f79d2879f (patch)
tree2dffb9f8ad35c7eac66752a405f1796a23eba2fe /advtrains_train_track/models/advtrains_dtrack_swrcr.b3d
parentf6f922c90cfc2c5795110a5b2c0bdbee927a67ed (diff)
downloadadvtrains-1c3ea960415fcbd63c5f1b2cd8a5b25f79d2879f.tar.gz
advtrains-1c3ea960415fcbd63c5f1b2cd8a5b25f79d2879f.tar.bz2
advtrains-1c3ea960415fcbd63c5f1b2cd8a5b25f79d2879f.zip
Possible fix for braking problems + debug outputs
Diffstat (limited to 'advtrains_train_track/models/advtrains_dtrack_swrcr.b3d')
0 files changed, 0 insertions, 0 deletions
">#include "irrlichttypes_bloated.h" #include <matrix4.h> #include "util/basic_macros.h" class Camera; class Client; struct shadowFrustum { float zNear{0.0f}; float zFar{0.0f}; float length{0.0f}; core::matrix4 ProjOrthMat; core::matrix4 ViewMat; v3f position; }; class DirectionalLight { public: DirectionalLight(const u32 shadowMapResolution, const v3f &position, video::SColorf lightColor = video::SColor(0xffffffff), f32 farValue = 100.0f); ~DirectionalLight() = default; //DISABLE_CLASS_COPY(DirectionalLight) void update_frustum(const Camera *cam, Client *client); // when set direction is updated to negative normalized(direction) void setDirection(v3f dir); v3f getDirection() const{ return direction; }; v3f getPosition() const; /// Gets the light's matrices. const core::matrix4 &getViewMatrix() const; const core::matrix4 &getProjectionMatrix() const; core::matrix4 getViewProjMatrix(); /// Gets the light's far value. f32 getMaxFarValue() const { return farPlane; } /// Gets the light's color. const video::SColorf &getLightColor() const { return diffuseColor; } /// Sets the light's color. void setLightColor(const video::SColorf &lightColor) { diffuseColor = lightColor; } /// Gets the shadow map resolution for this light. u32 getMapResolution() const { return mapRes; } bool should_update_map_shadow{true}; private: void createSplitMatrices(const Camera *cam); video::SColorf diffuseColor; f32 farPlane; u32 mapRes; v3f pos; v3f direction{0}; shadowFrustum shadow_frustum; };