- Ifc: make code base ready for running double precision by using the new math templates with a customizable float type, IfcFloat. (still using floats with this commit).

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1133 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2012-02-02 02:09:49 +00:00
parent 0f541f5e2b
commit e867c73327
7 changed files with 368 additions and 358 deletions

View File

@@ -76,7 +76,7 @@ void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionDat
// now see which kinds of surface information are present
BOOST_FOREACH(boost::shared_ptr< const IFC::IfcSurfaceStyleElementSelect > sel2, surf->Styles) {
if (const IFC::IfcSurfaceStyleShading* shade = sel2->ResolveSelectPtr<IFC::IfcSurfaceStyleShading>(conv.db)) {
aiColor4D col_base,col;
IfcColor4 col_base,col;
ConvertColor(col_base, shade->SurfaceColour);
mat->AddProperty(&col_base,1, AI_MATKEY_COLOR_DIFFUSE);
@@ -84,7 +84,7 @@ void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionDat
if (const IFC::IfcSurfaceStyleRendering* ren = shade->ToPtr<IFC::IfcSurfaceStyleRendering>()) {
if (ren->Transparency) {
const float t = 1.f-ren->Transparency.Get();
const IfcFloat t = 1.f-ren->Transparency.Get();
mat->AddProperty(&t,1, AI_MATKEY_OPACITY);
}
@@ -115,7 +115,7 @@ void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionDat
if(const EXPRESS::REAL* rt = ren->SpecularHighlight.Get()->ToPtr<EXPRESS::REAL>()) {
// at this point we don't distinguish between the two distinct ways of
// specifying highlight intensities. leave this to the user.
const float e = *rt;
const IfcFloat e = *rt;
mat->AddProperty(&e,1,AI_MATKEY_SHININESS);
}
else {
@@ -141,7 +141,7 @@ unsigned int ProcessMaterials(const IFC::IfcRepresentationItem& item, Conversion
name.Set("<IFCDefault>");
mat->AddProperty(&name,AI_MATKEY_NAME);
aiColor4D col = aiColor4D(0.6f,0.6f,0.6f,1.0f);
IfcColor4 col = IfcColor4(0.6f,0.6f,0.6f,1.0f);
mat->AddProperty(&col,1, AI_MATKEY_COLOR_DIFFUSE);
conv.materials.push_back(mat.release());