- Ifc: enable double-precision arithmetics for the entire pipeline. This does fix bugs, but unfortunately not all if them.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1143 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/5/head
aramis_acg 2012-02-02 22:50:24 +00:00
parent 4fcf61c31f
commit 15e50959e6
3 changed files with 6 additions and 3 deletions

View File

@ -325,7 +325,10 @@ void SetCoordinateSpace(ConversionData& conv)
void ResolveObjectPlacement(aiMatrix4x4& m, const IfcObjectPlacement& place, ConversionData& conv)
{
if (const IfcLocalPlacement* const local = place.ToPtr<IfcLocalPlacement>()){
ConvertAxisPlacement(m, *local->RelativePlacement, conv);
IfcMatrix4 tmp;
ConvertAxisPlacement(tmp, *local->RelativePlacement, conv);
m = static_cast<aiMatrix4x4>(tmp);
if (local->PlacementRelTo) {
aiMatrix4x4 tmp;

View File

@ -269,7 +269,7 @@ void ConvertColor(aiColor4D& out, const IfcColourRgb& in)
void ConvertColor(aiColor4D& out, const IfcColourOrFactor& in,ConversionData& conv,const aiColor4D* base)
{
if (const EXPRESS::REAL* const r = in.ToPtr<EXPRESS::REAL>()) {
out.r = out.g = out.b = *r;
out.r = out.g = out.b = static_cast<float>(*r);
if(base) {
out.r *= static_cast<float>( base->r );
out.g *= static_cast<float>( base->g );

View File

@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp {
namespace IFC {
typedef float IfcFloat;
typedef double IfcFloat;
// IfcFloat-precision math data types
typedef aiVector2t<IfcFloat> IfcVector2;