mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 02:29:19 +02:00
build 170628. enabled support for specular component in lighting calculations
This commit is contained in:
14
moon.cpp
14
moon.cpp
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user