16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 04:39:18 +02:00

build 170628. enabled support for specular component in lighting calculations

This commit is contained in:
tmj-fstate
2017-06-28 21:02:54 +02:00
parent 8e37307ff5
commit 49aad85597
20 changed files with 249 additions and 198 deletions

View File

@@ -36,9 +36,9 @@ void
cMoon::update() {
move();
Math3D::vector3 position( 0.0f, 0.0f, -2000.0f * Global::fDistanceFactor );
position.RotateX( (float)( m_body.elevref * ( M_PI / 180.0 ) ) );
position.RotateY( (float)( -m_body.hrang * ( M_PI / 180.0 ) ) );
glm::vec3 position( 0.0f, 0.0f, -2000.0f * Global::fDistanceFactor );
position = glm::rotateX( position, (float)( m_body.elevref * ( M_PI / 180.0 ) ) );
position = glm::rotateY( position, (float)( -m_body.hrang * ( M_PI / 180.0 ) ) );
m_position = position;
}
@@ -59,14 +59,10 @@ cMoon::render() {
glPopMatrix();
}
Math3D::vector3
glm::vec3
cMoon::getDirection() {
Math3D::vector3 position( 0.f, 0.f, -1.f );
position.RotateX( (float)( m_body.elevref * (M_PI/180.0)) );
position.RotateY( (float)( -m_body.hrang * (M_PI/180.0)) );
position.Normalize();
return position;
return glm::normalize( m_position );
}
float