Silence/fix double to float conversion warnings

This commit is contained in:
Mark Roszko 2019-12-12 21:51:21 +00:00 committed by Wayne Stambaugh
parent b66ecf141f
commit ae785194ce
21 changed files with 150 additions and 150 deletions

View File

@ -485,11 +485,11 @@ S3DMODEL* S3D::GetModel( SCENEGRAPH* aNode )
// also typical of MCAD applications. When a model has no associated // also typical of MCAD applications. When a model has no associated
// material color it shall be assigned the index 0. // material color it shall be assigned the index 0.
SGAPPEARANCE app( NULL ); SGAPPEARANCE app( NULL );
app.ambient = SGCOLOR( 0.6, 0.6, 0.6 ); app.ambient = SGCOLOR( 0.6f, 0.6f, 0.6f );
app.diffuse = SGCOLOR( 0.6, 0.6, 0.6 ); app.diffuse = SGCOLOR( 0.6f, 0.6f, 0.6f );
app.specular = app.diffuse; app.specular = app.diffuse;
app.shininess = 0.05; app.shininess = 0.05f;
app.transparency = 0.0; app.transparency = 0.0f;
materials.matorder.push_back( &app ); materials.matorder.push_back( &app );
materials.matmap.insert( std::pair< SGAPPEARANCE const*, int >( &app, 0 ) ); materials.matmap.insert( std::pair< SGAPPEARANCE const*, int >( &app, 0 ) );

View File

@ -34,10 +34,10 @@ SGAPPEARANCE::SGAPPEARANCE( SGNODE* aParent ) : SGNODE( aParent)
m_SGtype = S3D::SGTYPE_APPEARANCE; m_SGtype = S3D::SGTYPE_APPEARANCE;
// defaults in accord with VRML2.0 spec // defaults in accord with VRML2.0 spec
ambient.SetColor( 0.05317, 0.17879, 0.01804 ); ambient.SetColor( 0.05317f, 0.17879f, 0.01804f );
shininess = 0.2; shininess = 0.2f;
transparency = 0.0; transparency = 0.0f;
diffuse.SetColor( 0.8, 0.8, 0.8 ); diffuse.SetColor( 0.8f, 0.8f, 0.8f );
if( NULL != aParent && S3D::SGTYPE_SHAPE != aParent->GetNodeType() ) if( NULL != aParent && S3D::SGTYPE_SHAPE != aParent->GetNodeType() )
{ {
@ -318,13 +318,13 @@ bool SGAPPEARANCE::WriteVRML( std::ostream& aFile, bool aReuseFlag )
diffuse.GetColor( ambr, ambg, ambb ); diffuse.GetColor( ambr, ambg, ambb );
float den = ( 0.212671 * ambr + 0.71516 * ambg + 0.072169 * ambb ); float den = ( 0.212671 * ambr + 0.71516 * ambg + 0.072169 * ambb );
if( den < 0.004 ) if( den < 0.004f )
den = 0.004; den = 0.004f;
amb /= den; amb /= den;
if( amb > 1.0 ) if( amb > 1.0f )
amb = 1.0; amb = 1.0f;
S3D::FormatFloat( tmp, amb ); S3D::FormatFloat( tmp, amb );
aFile << " ambientIntensity " << tmp << "\n"; aFile << " ambientIntensity " << tmp << "\n";

View File

@ -843,8 +843,8 @@ void C3D_RENDER_RAYTRACING::reload( REPORTER *aStatusTextReporter )
m_lights.Clear(); m_lights.Clear();
// This will work as the front camera light. // This will work as the front camera light.
const float light_camera_intensity = 0.20; const float light_camera_intensity = 0.20f;
const float light_top_bottom = 0.25; const float light_top_bottom = 0.25f;
const float light_directional_intensity = ( 1.0f - ( light_camera_intensity + const float light_directional_intensity = ( 1.0f - ( light_camera_intensity +
light_top_bottom * 0.5f ) ) / 4.0f; light_top_bottom * 0.5f ) ) / 4.0f;

View File

@ -32,16 +32,16 @@ using namespace KIGFX;
RENDER_SETTINGS::RENDER_SETTINGS() RENDER_SETTINGS::RENDER_SETTINGS()
{ {
// Set the default initial values // Set the default initial values
m_highlightFactor = 0.5; m_highlightFactor = 0.5f;
m_selectFactor = 0.5; m_selectFactor = 0.5f;
m_layerOpacity = 0.8; m_layerOpacity = 0.8f;
m_highlightEnabled = false; m_highlightEnabled = false;
m_hiContrastEnabled = false; m_hiContrastEnabled = false;
m_hiContrastFactor = 0.2; //TODO: Make this user-configurable m_hiContrastFactor = 0.2f; //TODO: Make this user-configurable
m_highlightNetcode = -1; m_highlightNetcode = -1;
m_outlineWidth = 1; m_outlineWidth = 1;
m_worksheetLineWidth = 100000; m_worksheetLineWidth = 100000;
m_showPageLimits = false; m_showPageLimits = false;
} }

View File

@ -63,8 +63,8 @@ void VC_SETTINGS::Reset()
m_grabMouse = false; m_grabMouse = false;
m_autoPanEnabled = false; m_autoPanEnabled = false;
m_autoPanSettingEnabled = false; m_autoPanSettingEnabled = false;
m_autoPanMargin = 0.1; m_autoPanMargin = 0.1f;
m_autoPanSpeed = 0.15; m_autoPanSpeed = 0.15f;
m_warpCursor = false; m_warpCursor = false;
m_enableMousewheelPan = false; m_enableMousewheelPan = false;
m_panWithRightButton = false; m_panWithRightButton = false;

View File

@ -92,19 +92,19 @@ struct VRML_COLOR
VRML_COLOR() VRML_COLOR()
{ {
// default green // default green
diffuse_red = 0.13; diffuse_red = 0.13f;
diffuse_grn = 0.81; diffuse_grn = 0.81f;
diffuse_blu = 0.22; diffuse_blu = 0.22f;
spec_red = 0.01; spec_red = 0.01f;
spec_grn = 0.08; spec_grn = 0.08f;
spec_blu = 0.02; spec_blu = 0.02f;
emit_red = 0.0; emit_red = 0.0f;
emit_grn = 0.0; emit_grn = 0.0f;
emit_blu = 0.0; emit_blu = 0.0f;
ambient = 0.8; ambient = 0.8f;
transp = 0; transp = 0.0f;
shiny = 0.02; shiny = 0.02f;
} }
VRML_COLOR( float dr, float dg, float db, VRML_COLOR( float dr, float dg, float db,
@ -186,17 +186,17 @@ public:
m_brd_thickness = 1.6; m_brd_thickness = 1.6;
// pcb green // pcb green
colors[ VRML_COLOR_PCB ] = VRML_COLOR( .07, .3, .12, .01, .03, .01, colors[VRML_COLOR_PCB] = VRML_COLOR(
0, 0, 0, 0.8, 0, 0.02 ); 0.07f, 0.3f, 0.12f, 0.01f, 0.03f, 0.01f, 0.0f, 0.0f, 0.0f, 0.8f, 0.0f, 0.02f );
// track green // track green
colors[ VRML_COLOR_TRACK ] = VRML_COLOR( .08, .5, .1, .01, .05, .01, colors[VRML_COLOR_TRACK] = VRML_COLOR(
0, 0, 0, 0.8, 0, 0.02 ); 0.08f, 0.5f, 0.1f, 0.01f, 0.05f, 0.01f, 0.0f, 0.0f, 0.0f, 0.8f, 0.0f, 0.02f );
// silkscreen white // silkscreen white
colors[ VRML_COLOR_SILK ] = VRML_COLOR( .9, .9, .9, .1, .1, .1, colors[VRML_COLOR_SILK] = VRML_COLOR(
0, 0, 0, 0.9, 0, 0.02 ); 0.9f, 0.9f, 0.9f, 0.1f, 0.1f, 0.1f, 0.0f, 0.0f, 0.0f, 0.9f, 0.0f, 0.02f );
// pad silver // pad silver
colors[ VRML_COLOR_TIN ] = VRML_COLOR( .749, .756, .761, .749, .756, .761, colors[VRML_COLOR_TIN] = VRML_COLOR( 0.749f, 0.756f, 0.761f, 0.749f, 0.756f, 0.761f, 0.0f,
0, 0, 0, 0.8, 0, 0.8 ); 0.0f, 0.0f, 0.8f, 0.0f, 0.8f );
m_plainPCB = false; m_plainPCB = false;
SetOffset( 0.0, 0.0 ); SetOffset( 0.0, 0.0 );

View File

@ -365,9 +365,9 @@ void PCB_PARSER::parseEDA_TEXT( EDA_TEXT* aText )
// 60mils is 1.524mm // 60mils is 1.524mm
if( !foundTextSize ) if( !foundTextSize )
{ {
const float defaultTextSize = 1.524f * IU_PER_MM; const double defaultTextSize = 1.524 * IU_PER_MM;
aText->SetTextSize( wxSize( defaultTextSize, defaultTextSize ) ); aText->SetTextSize( wxSize( defaultTextSize, defaultTextSize ) );
} }
} }

View File

@ -103,64 +103,64 @@ static SGNODE* getColor( IFSG_SHAPE& shape, int colorIdx )
{ {
case 0: case 0:
// green for PCB // green for PCB
material.SetSpecular( 0.13, 0.81, 0.22 ); material.SetSpecular( 0.13f, 0.81f, 0.22f );
material.SetDiffuse( 0.13, 0.81, 0.22 ); material.SetDiffuse( 0.13f, 0.81f, 0.22f );
// default ambient intensity // default ambient intensity
material.SetShininess( 0.3 ); material.SetShininess( 0.3f );
break; break;
case 1: case 1:
// magenta // magenta
material.SetSpecular( 0.8, 0.0, 0.8 ); material.SetSpecular( 0.8f, 0.0f, 0.8f );
material.SetDiffuse( 0.6, 0.0, 0.6 ); material.SetDiffuse( 0.6f, 0.0f, 0.6f );
// default ambient intensity // default ambient intensity
material.SetShininess( 0.3 ); material.SetShininess( 0.3f );
break; break;
case 2: case 2:
// red // red
material.SetSpecular( 0.69, 0.14, 0.14 ); material.SetSpecular( 0.69f, 0.14f, 0.14f );
material.SetDiffuse( 0.69, 0.14, 0.14 ); material.SetDiffuse( 0.69f, 0.14f, 0.14f );
// default ambient intensity // default ambient intensity
material.SetShininess( 0.3 ); material.SetShininess( 0.3f );
break; break;
case 3: case 3:
// orange // orange
material.SetSpecular( 1.0, 0.44, 0.0 ); material.SetSpecular( 1.0f, 0.44f, 0.0f );
material.SetDiffuse( 1.0, 0.44, 0.0 ); material.SetDiffuse( 1.0f, 0.44f, 0.0f );
// default ambient intensity // default ambient intensity
material.SetShininess( 0.3 ); material.SetShininess( 0.3f );
break; break;
case 4: case 4:
// yellow // yellow
material.SetSpecular( 0.93, 0.94, 0.16 ); material.SetSpecular( 0.93f, 0.94f, 0.16f );
material.SetDiffuse( 0.93, 0.94, 0.16 ); material.SetDiffuse( 0.93f, 0.94f, 0.16f );
// default ambient intensity // default ambient intensity
material.SetShininess( 0.3 ); material.SetShininess( 0.3f );
break; break;
case 5: case 5:
// blue // blue
material.SetSpecular( 0.1, 0.11, 0.88 ); material.SetSpecular( 0.1f, 0.11f, 0.88f );
material.SetDiffuse( 0.1, 0.11, 0.88 ); material.SetDiffuse( 0.1f, 0.11f, 0.88f );
// default ambient intensity // default ambient intensity
material.SetShininess( 0.3 ); material.SetShininess( 0.3f );
break; break;
default: default:
// violet // violet
material.SetSpecular( 0.32, 0.07, 0.64 ); material.SetSpecular( 0.32f, 0.07f, 0.64f );
material.SetDiffuse( 0.32, 0.07, 0.64 ); material.SetDiffuse( 0.32f, 0.07f, 0.64f );
// default ambient intensity // default ambient intensity
material.SetShininess( 0.3 ); material.SetShininess( 0.3f );
break; break;
} }

View File

@ -200,9 +200,9 @@ bool WRL1COORDS::Read( WRLPROC& proc, WRL1BASE* aTopNode )
while( sP != eP ) while( sP != eP )
{ {
sP->x *= 2.54; sP->x *= 2.54f;
sP->y *= 2.54; sP->y *= 2.54f;
sP->z *= 2.54; sP->z *= 2.54f;
++sP; ++sP;
} }

View File

@ -388,7 +388,7 @@ SGNODE* WRL1MATERIAL::GetAppearance( int aIndex )
app.SetTransparency( val ); app.SetTransparency( val );
if( aIndex == 0 || shininess.empty() ) if( aIndex == 0 || shininess.empty() )
val = 0.2; val = 0.2f;
else else
val = shininess[0]; val = shininess[0];
@ -397,9 +397,9 @@ SGNODE* WRL1MATERIAL::GetAppearance( int aIndex )
if( aIndex ==0 || ambientColor.empty() ) if( aIndex ==0 || ambientColor.empty() )
{ {
red = 0.2; red = 0.2f;
green = 0.2; green = 0.2f;
blue = 0.2; blue = 0.2f;
} }
else else
{ {
@ -415,9 +415,9 @@ SGNODE* WRL1MATERIAL::GetAppearance( int aIndex )
if( aIndex == 0 || diffuseColor.empty() ) if( aIndex == 0 || diffuseColor.empty() )
{ {
red = 0.8; red = 0.8f;
green = 0.8; green = 0.8f;
blue = 0.8; blue = 0.8f;
} }
else else
{ {
@ -503,9 +503,9 @@ void WRL1MATERIAL::GetColor( SGCOLOR* aColor, int aIndex )
} }
else else
{ {
dRed = 0.8; dRed = 0.8f;
dGreen = 0.8; dGreen = 0.8f;
dBlue = 0.8; dBlue = 0.8f;
} }
} }
else else
@ -527,9 +527,9 @@ void WRL1MATERIAL::GetColor( SGCOLOR* aColor, int aIndex )
} }
else else
{ {
eRed = 0.0; eRed = 0.0f;
eGreen = 0.0; eGreen = 0.0f;
eBlue = 0.0; eBlue = 0.0f;
} }
} }
else else
@ -551,9 +551,9 @@ void WRL1MATERIAL::GetColor( SGCOLOR* aColor, int aIndex )
} }
else else
{ {
aRed = 0.2; aRed = 0.2f;
aGreen = 0.2; aGreen = 0.2f;
aBlue = 0.2; aBlue = 0.2f;
} }
} }
else else
@ -575,9 +575,9 @@ void WRL1MATERIAL::GetColor( SGCOLOR* aColor, int aIndex )
} }
else else
{ {
sRed = 0.2; sRed = 0.2f;
sGreen = 0.2; sGreen = 0.2f;
sBlue = 0.2; sBlue = 0.2f;
} }
} }
else else
@ -593,7 +593,7 @@ void WRL1MATERIAL::GetColor( SGCOLOR* aColor, int aIndex )
if( !shininess.empty() ) if( !shininess.empty() )
shiny = shininess.back(); shiny = shininess.back();
else else
shiny = 0.2; shiny = 0.2f;
} }
else else
{ {
@ -615,16 +615,16 @@ void WRL1MATERIAL::GetColor( SGCOLOR* aColor, int aIndex )
int n = 0; int n = 0;
if( aRed + aGreen + aBlue > 0.01 ) if( aRed + aGreen + aBlue > 0.01f )
++n; ++n;
if( eRed + eGreen + eBlue > 0.01 ) if( eRed + eGreen + eBlue > 0.01f )
++n; ++n;
if( dRed + dGreen + dBlue > 0.01 ) if( dRed + dGreen + dBlue > 0.01f )
++n; ++n;
if( (sRed + sGreen + sBlue) * shiny > 0.01 ) if( ( sRed + sGreen + sBlue ) * shiny > 0.01f )
++n; ++n;
if( 0 == n ) if( 0 == n )

View File

@ -98,7 +98,7 @@ struct WRL1STATUS
coord = NULL; coord = NULL;
txmatrix = glm::scale( glm::mat4( 1.0 ), glm::vec3( 1.0 ) ); txmatrix = glm::scale( glm::mat4( 1.0 ), glm::vec3( 1.0 ) );
order = ORD_UNKNOWN; order = ORD_UNKNOWN;
creaseLimit = 0.878; creaseLimit = 0.878f;
return; return;
} }
}; };

View File

@ -36,7 +36,7 @@ WRL1SHAPEHINTS::WRL1SHAPEHINTS( NAMEREGISTER* aDictionary ) : WRL1NODE( aDiction
{ {
m_order = ORD_UNKNOWN; m_order = ORD_UNKNOWN;
m_Type = WRL1_SHAPEHINTS; m_Type = WRL1_SHAPEHINTS;
m_crease = 0.733; // approx 42 degrees; this is larger than VRML spec. m_crease = 0.733f; // approx 42 degrees; this is larger than VRML spec.
return; return;
} }
@ -46,7 +46,7 @@ WRL1SHAPEHINTS::WRL1SHAPEHINTS( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) :
{ {
m_order = ORD_UNKNOWN; m_order = ORD_UNKNOWN;
m_Type = WRL1_SHAPEHINTS; m_Type = WRL1_SHAPEHINTS;
m_crease = 0.733; // approx 42 degrees; this is larger than VRML spec. m_crease = 0.733f; // approx 42 degrees; this is larger than VRML spec.
m_Parent = aParent; m_Parent = aParent;
if( NULL != m_Parent ) if( NULL != m_Parent )
@ -280,9 +280,9 @@ bool WRL1SHAPEHINTS::Read( WRLPROC& proc, WRL1BASE* aTopNode )
} }
if( tmp < 0.0 ) if( tmp < 0.0 )
tmp = 0.0; tmp = 0.0f;
else if( tmp > M_PI ) else if( tmp > M_PI )
tmp = M_PI; tmp = static_cast<float>( M_PI );
m_crease = tmp; m_crease = tmp;
} }

View File

@ -201,9 +201,9 @@ bool WRL1TRANSFORM::Read( WRLPROC& proc, WRL1BASE* aTopNode )
} }
// convert from 1 VRML Unit = 0.1 inch to 1 VRML Unit = 1 mm // convert from 1 VRML Unit = 0.1 inch to 1 VRML Unit = 1 mm
center.x *= 2.54; center.x *= 2.54f;
center.y *= 2.54; center.y *= 2.54f;
center.z *= 2.54; center.z *= 2.54f;
} }
else if( !glob.compare( "rotation" ) ) else if( !glob.compare( "rotation" ) )
{ {
@ -282,9 +282,9 @@ bool WRL1TRANSFORM::Read( WRLPROC& proc, WRL1BASE* aTopNode )
} }
// convert from 1 VRML Unit = 0.1 inch to 1 VRML Unit = 1 mm // convert from 1 VRML Unit = 0.1 inch to 1 VRML Unit = 1 mm
translation.x *= 2.54; translation.x *= 2.54f;
translation.y *= 2.54; translation.y *= 2.54f;
translation.z *= 2.54; translation.z *= 2.54f;
} }
else else
{ {

View File

@ -493,12 +493,12 @@ SGNODE* WRL2APPEARANCE::TranslateToSG( SGNODE* aParent )
{ {
// use a default gray appearance // use a default gray appearance
IFSG_APPEARANCE matNode( aParent ); IFSG_APPEARANCE matNode( aParent );
matNode.SetEmissive( 0.0, 0.0, 0.0 ); matNode.SetEmissive( 0.0f, 0.0f, 0.0f );
matNode.SetSpecular( 0.65, 0.65, 0.65 ); matNode.SetSpecular( 0.65f, 0.65f, 0.65f );
matNode.SetDiffuse( 0.65, 0.65, 0.65 ); matNode.SetDiffuse( 0.65f, 0.65f, 0.65f );
// default ambient // default ambient
matNode.SetShininess( 0.2 ); matNode.SetShininess( 0.2f );
matNode.SetTransparency( 0.0 ); matNode.SetTransparency( 0.0f );
m_sgNode = matNode.GetRawPtr(); m_sgNode = matNode.GetRawPtr();
return m_sgNode; return m_sgNode;

View File

@ -246,9 +246,9 @@ void WRL2COLOR::GetColor( int aIndex, float& red, float& green, float& blue )
{ {
if( aIndex < 0 || aIndex >= (int)colors.size() ) if( aIndex < 0 || aIndex >= (int)colors.size() )
{ {
red = 0.8; red = 0.8f;
green = 0.8; green = 0.8f;
blue = 0.8; blue = 0.8f;
return; return;
} }

View File

@ -208,9 +208,9 @@ bool WRL2COORDS::Read( WRLPROC& proc, WRL2BASE* aTopNode )
while( sP != eP ) while( sP != eP )
{ {
sP->x *= 2.54; sP->x *= 2.54f;
sP->y *= 2.54; sP->y *= 2.54f;
sP->z *= 2.54; sP->z *= 2.54f;
++sP; ++sP;
} }

View File

@ -85,8 +85,8 @@ void WRL2FACESET::setDefaults( void )
normalPerVertex = true; normalPerVertex = true;
solid = true; solid = true;
creaseAngle = 0.733; // approx 42 degrees; this is larger than VRML spec. creaseAngle = 0.733f; // approx 42 degrees; this is larger than VRML spec.
creaseLimit = 0.74317; // cos( 0.733 ) creaseLimit = 0.74317f; // cos( 0.733 )
} }
@ -578,9 +578,9 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
} }
if( creaseAngle < 0.0 ) if( creaseAngle < 0.0 )
creaseAngle = 0.0; creaseAngle = 0.0f;
else if( creaseAngle > M_PI_2 ) else if( creaseAngle > M_PI_2 )
creaseAngle = M_PI_2; creaseAngle = static_cast<float>( M_PI_2 );
creaseLimit = cosf( creaseAngle ); creaseLimit = cosf( creaseAngle );
} }

View File

@ -65,19 +65,19 @@ WRL2MATERIAL::~WRL2MATERIAL()
void WRL2MATERIAL::setDefaults( void ) void WRL2MATERIAL::setDefaults( void )
{ {
// default material values as per VRML2 spec // default material values as per VRML2 spec
diffuseColor.x = 0.8; diffuseColor.x = 0.8f;
diffuseColor.y = 0.8; diffuseColor.y = 0.8f;
diffuseColor.z = 0.8; diffuseColor.z = 0.8f;
emissiveColor.x = 0.0; emissiveColor.x = 0.0f;
emissiveColor.y = 0.0; emissiveColor.y = 0.0f;
emissiveColor.z = 0.0; emissiveColor.z = 0.0f;
specularColor = emissiveColor; specularColor = emissiveColor;
ambientIntensity = 0.2; ambientIntensity = 0.2f;
shininess = 0.2; shininess = 0.2f;
transparency = 0.0; transparency = 0.0f;
return; return;
} }

View File

@ -216,9 +216,9 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode )
} }
// convert from 1 VRML Unit = 0.1 inch to 1 VRML Unit = 1 mm // convert from 1 VRML Unit = 0.1 inch to 1 VRML Unit = 1 mm
center.x *= 2.54; center.x *= 2.54f;
center.y *= 2.54; center.y *= 2.54f;
center.z *= 2.54; center.z *= 2.54f;
} }
else if( !glob.compare( "rotation" ) ) else if( !glob.compare( "rotation" ) )
{ {
@ -297,9 +297,9 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode )
} }
// convert from 1 VRML Unit = 0.1 inch to 1 VRML Unit = 1 mm // convert from 1 VRML Unit = 0.1 inch to 1 VRML Unit = 1 mm
translation.x *= 2.54; translation.x *= 2.54f;
translation.y *= 2.54; translation.y *= 2.54f;
translation.z *= 2.54; translation.z *= 2.54f;
} }
else if( !glob.compare( "children" ) ) else if( !glob.compare( "children" ) )
{ {

View File

@ -76,19 +76,19 @@ X3DAPP::~X3DAPP()
void X3DAPP::init() void X3DAPP::init()
{ {
// default material values as per VRML2 spec // default material values as per VRML2 spec
diffuseColor.x = 0.8; diffuseColor.x = 0.8f;
diffuseColor.y = 0.8; diffuseColor.y = 0.8f;
diffuseColor.z = 0.8; diffuseColor.z = 0.8f;
emissiveColor.x = 0.0; emissiveColor.x = 0.0f;
emissiveColor.y = 0.0; emissiveColor.y = 0.0f;
emissiveColor.z = 0.0; emissiveColor.z = 0.0f;
specularColor = emissiveColor; specularColor = emissiveColor;
ambientIntensity = 0.2; ambientIntensity = 0.2f;
shininess = 0.2; shininess = 0.2f;
transparency = 0.0; transparency = 0.0f;
return; return;
} }

View File

@ -81,8 +81,8 @@ void X3DIFACESET::init()
coord = NULL; coord = NULL;
ccw = true; ccw = true;
creaseAngle = 0.733; // approx 42 degrees; this is larger than VRML spec. creaseAngle = 0.733f; // approx 42 degrees; this is larger than VRML spec.
creaseLimit = 0.74317; // cos( 0.733 ) creaseLimit = 0.74317f; // cos( 0.733 )
return; return;
} }
@ -115,8 +115,8 @@ void X3DIFACESET::readFields( wxXmlNode* aNode )
if( creaseAngle < 0.0f ) if( creaseAngle < 0.0f )
creaseAngle = 0.0f; creaseAngle = 0.0f;
else if( creaseAngle > M_PI * 0.34 ) else if( creaseAngle > static_cast<float>( M_PI * 0.34f ) )
creaseAngle = M_PI / 3.0; creaseAngle = static_cast<float>( M_PI / 3.0f );
creaseLimit = cosf( creaseAngle ); creaseLimit = cosf( creaseAngle );
} }