- IFC: directly keep a pointer to the class name in STEP::Object. This avoid hacking around with typeid().name(), which yields platform-dependent results.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@992 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
27ee419355
commit
95e0148f95
|
@ -287,7 +287,7 @@ void IFCImporter::InternReadFile( const std::string& pFile,
|
||||||
conv.materials.clear();
|
conv.materials.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// apply world coordinate system (which includes the scaling to convert to metres and a -90 degrees rotation around x)
|
// apply world coordinate system (which includes the scaling to convert to meters and a -90 degrees rotation around x)
|
||||||
aiMatrix4x4 scale, rot;
|
aiMatrix4x4 scale, rot;
|
||||||
aiMatrix4x4::Scaling(aiVector3D(conv.len_scale,conv.len_scale,conv.len_scale),scale);
|
aiMatrix4x4::Scaling(aiVector3D(conv.len_scale,conv.len_scale,conv.len_scale),scale);
|
||||||
aiMatrix4x4::RotationX(-AI_MATH_HALF_PI_F,rot);
|
aiMatrix4x4::RotationX(-AI_MATH_HALF_PI_F,rot);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -431,6 +431,8 @@ namespace STEP {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual ~Object() {}
|
virtual ~Object() {}
|
||||||
|
Object(const char* classname = "unknown")
|
||||||
|
: classname(classname) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -463,11 +465,7 @@ namespace STEP {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetClassName() const {
|
std::string GetClassName() const {
|
||||||
// XXX this relies on unspecified behaviour - we hijack the name() field of std::type_info
|
return classname;
|
||||||
// known to work as intended for only msvc 8, with gcc 4.5 it produces reasonable, but
|
|
||||||
// not totally unmangled output - we definitely need a traits-based solution here.
|
|
||||||
const char* s = typeid(*this).name(), *s2 = strstr(s,"Ifc");
|
|
||||||
return std::string(s2?s2:s);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetID(uint64_t newval) {
|
void SetID(uint64_t newval) {
|
||||||
|
@ -476,6 +474,7 @@ namespace STEP {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint64_t id;
|
uint64_t id;
|
||||||
|
const char* const classname;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ template_entity_predef_ni = '\ttypedef NotImplemented {entity}; // (not currentl
|
||||||
template_entity = r"""
|
template_entity = r"""
|
||||||
|
|
||||||
// C++ wrapper for {entity}
|
// C++ wrapper for {entity}
|
||||||
struct {entity} : {parent} ObjectHelper<{entity},{argcnt}> {{
|
struct {entity} : {parent} ObjectHelper<{entity},{argcnt}> {{ {entity}() : Object("{entity}") {{}}
|
||||||
{fields}
|
{fields}
|
||||||
}};"""
|
}};"""
|
||||||
|
|
||||||
|
|
|
@ -1943,7 +1943,7 @@
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="icf"
|
Name="ifc"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\code\IFCLoader.cpp"
|
RelativePath="..\..\code\IFCLoader.cpp"
|
||||||
|
|
Loading…
Reference in New Issue