16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 19:09:20 +02:00

completed basic separation of visual renderer from simulation

This commit is contained in:
tmj-fstate
2017-07-21 01:27:20 +02:00
parent 215a5b6039
commit 8d5fde7371
15 changed files with 197 additions and 130 deletions

View File

@@ -53,9 +53,8 @@ std::string LogComment;
bool
degenerate( glm::dvec3 const &Vertex1, glm::dvec3 const &Vertex2, glm::dvec3 const &Vertex3 ) {
return ( ( Vertex1 == Vertex2 )
|| ( Vertex2 == Vertex3 )
|| ( Vertex3 == Vertex1 ) );
// degenerate( A, B, C, minarea ) = ( ( B - A ).cross( C - A ) ).lengthSquared() < ( 4.0f * minarea * minarea );
return glm::length2( glm::cross( Vertex2 - Vertex1, Vertex3 - Vertex1 ) ) < std::numeric_limits<double>::epsilon();
}
//---------------------------------------------------------------------------
@@ -1330,7 +1329,7 @@ TGroundNode * TGround::AddGroundNode(cParser *parser)
*parser >> token;
}
str = token;
tmp->TextureID = GfxRenderer.GetTextureId( str, szTexturePath );
tmp->TextureID = GfxRenderer.Fetch_Texture( str );
bool const clamps = (
tmp->TextureID ?
GfxRenderer.Texture( tmp->TextureID ).traits.find( 's' ) != std::string::npos :