Merge pull request #4057 from Madrich/master

Double Precision Issue
pull/4012/head^2
Kim Kulling 2021-09-07 12:49:04 +02:00 committed by GitHub
commit e70b05b41a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -267,6 +267,7 @@ ELSEIF(MSVC)
IF(MSVC12) IF(MSVC12)
ADD_COMPILE_OPTIONS(/wd4351) ADD_COMPILE_OPTIONS(/wd4351)
ENDIF() ENDIF()
ADD_COMPILE_OPTIONS(/wd4244) #supress warning for double to float conversion if Double precission is activated
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF") SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")

View File

@ -449,7 +449,7 @@ void Discreet3DSImporter::ParseChunk(const char *name, unsigned int num) {
// Read the lense angle // Read the lense angle
camera->mHorizontalFOV = AI_DEG_TO_RAD(stream->GetF4()); camera->mHorizontalFOV = AI_DEG_TO_RAD(stream->GetF4());
if (camera->mHorizontalFOV < 0.001f) { if (camera->mHorizontalFOV < 0.001f) {
camera->mHorizontalFOV = AI_DEG_TO_RAD(45.f); camera->mHorizontalFOV = float(AI_DEG_TO_RAD(45.f));
} }
// Now check for further subchunks // Now check for further subchunks

View File

@ -56,7 +56,7 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer // Constructor to be privately used by Importer
CalcTangentsProcess::CalcTangentsProcess() : CalcTangentsProcess::CalcTangentsProcess() :
configMaxAngle(AI_DEG_TO_RAD(45.f)), configSourceUV(0) { configMaxAngle(float(AI_DEG_TO_RAD(45.f))), configSourceUV(0) {
// nothing to do here // nothing to do here
} }