[*] Set float type for constants: less warnings, less type truncations.
parent
897370b6ff
commit
aeb99898d3
|
@ -174,9 +174,9 @@ void X3DImporter::ParseNode_Lighting_SpotLight()
|
||||||
std::string def, use;
|
std::string def, use;
|
||||||
float ambientIntensity = 0;
|
float ambientIntensity = 0;
|
||||||
aiVector3D attenuation(1, 0, 0);
|
aiVector3D attenuation(1, 0, 0);
|
||||||
float beamWidth = 0.7854;
|
float beamWidth = 0.7854f;
|
||||||
aiColor3D color(1, 1, 1);
|
aiColor3D color(1, 1, 1);
|
||||||
float cutOffAngle = 1.570796;
|
float cutOffAngle = 1.570796f;
|
||||||
aiVector3D direction(0, 0, -1);
|
aiVector3D direction(0, 0, -1);
|
||||||
bool global = true;
|
bool global = true;
|
||||||
float intensity = 1;
|
float intensity = 1;
|
||||||
|
|
|
@ -167,7 +167,7 @@ void X3DImporter::Postprocess_BuildMaterial(const CX3DImporter_NodeElement& pNod
|
||||||
tvalf = 1;
|
tvalf = 1;
|
||||||
taimat.AddProperty(&tvalf, 1, AI_MATKEY_SHININESS_STRENGTH);
|
taimat.AddProperty(&tvalf, 1, AI_MATKEY_SHININESS_STRENGTH);
|
||||||
taimat.AddProperty(&tnemat.Shininess, 1, AI_MATKEY_SHININESS);
|
taimat.AddProperty(&tnemat.Shininess, 1, AI_MATKEY_SHININESS);
|
||||||
tvalf = 1.0 - tnemat.Transparency;
|
tvalf = 1.0f - tnemat.Transparency;
|
||||||
taimat.AddProperty(&tvalf, 1, AI_MATKEY_OPACITY);
|
taimat.AddProperty(&tvalf, 1, AI_MATKEY_OPACITY);
|
||||||
}// if((*el_it)->Type == CX3DImporter_NodeElement::ENET_Material)
|
}// if((*el_it)->Type == CX3DImporter_NodeElement::ENET_Material)
|
||||||
else if((*el_it)->Type == CX3DImporter_NodeElement::ENET_ImageTexture)
|
else if((*el_it)->Type == CX3DImporter_NodeElement::ENET_ImageTexture)
|
||||||
|
|
|
@ -159,10 +159,10 @@ CX3DImporter_NodeElement* ne;
|
||||||
void X3DImporter::ParseNode_Shape_Material()
|
void X3DImporter::ParseNode_Shape_Material()
|
||||||
{
|
{
|
||||||
std::string use, def;
|
std::string use, def;
|
||||||
float ambientIntensity = 0.2;
|
float ambientIntensity = 0.2f;
|
||||||
float shininess = 0.2;
|
float shininess = 0.2f;
|
||||||
float transparency = 0;
|
float transparency = 0;
|
||||||
aiColor3D diffuseColor(0.8, 0.8, 0.8);
|
aiColor3D diffuseColor(0.8f, 0.8f, 0.8f);
|
||||||
aiColor3D emissiveColor(0, 0, 0);
|
aiColor3D emissiveColor(0, 0, 0);
|
||||||
aiColor3D specularColor(0, 0, 0);
|
aiColor3D specularColor(0, 0, 0);
|
||||||
CX3DImporter_NodeElement* ne;
|
CX3DImporter_NodeElement* ne;
|
||||||
|
|
Loading…
Reference in New Issue