- 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();
|
||||
}
|
||||
|
||||
// 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::Scaling(aiVector3D(conv.len_scale,conv.len_scale,conv.len_scale),scale);
|
||||
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:
|
||||
|
||||
virtual ~Object() {}
|
||||
Object(const char* classname = "unknown")
|
||||
: classname(classname) {}
|
||||
|
||||
public:
|
||||
|
||||
|
@ -463,11 +465,7 @@ namespace STEP {
|
|||
}
|
||||
|
||||
std::string GetClassName() const {
|
||||
// XXX this relies on unspecified behaviour - we hijack the name() field of std::type_info
|
||||
// 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);
|
||||
return classname;
|
||||
}
|
||||
|
||||
void SetID(uint64_t newval) {
|
||||
|
@ -476,6 +474,7 @@ namespace STEP {
|
|||
|
||||
private:
|
||||
uint64_t id;
|
||||
const char* const classname;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ template_entity_predef_ni = '\ttypedef NotImplemented {entity}; // (not currentl
|
|||
template_entity = r"""
|
||||
|
||||
// C++ wrapper for {entity}
|
||||
struct {entity} : {parent} ObjectHelper<{entity},{argcnt}> {{
|
||||
struct {entity} : {parent} ObjectHelper<{entity},{argcnt}> {{ {entity}() : Object("{entity}") {{}}
|
||||
{fields}
|
||||
}};"""
|
||||
|
||||
|
|
|
@ -1943,7 +1943,7 @@
|
|||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="icf"
|
||||
Name="ifc"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\code\IFCLoader.cpp"
|
||||
|
|
Loading…
Reference in New Issue