mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 14:07:43 +00:00
Added a matrix for the parent node and a better id.
This commit is contained in:
@@ -89,7 +89,7 @@ private:
|
||||
{}
|
||||
void add(const std::string& node_id, const std::string& node_name, const std::string& geom_name,
|
||||
const std::vector<std::string>& material_ids, const std::vector<real_t>& matrix);
|
||||
void addParent(const std::string& node_name);
|
||||
void addParent(const IfcGeom::Element<real_t>& parent);
|
||||
void closeParent();
|
||||
void write();
|
||||
ColladaSerializer *serializer;
|
||||
@@ -127,7 +127,9 @@ private:
|
||||
class DeferredObject {
|
||||
friend bool operator < (const DeferredObject & def_obj1, const DeferredObject & def_obj2)
|
||||
{
|
||||
return (def_obj1.parent < def_obj2.parent ? true : false);
|
||||
const IfcGeom::Element<real_t> parent1 = *def_obj1.parent;
|
||||
const IfcGeom::Element<real_t> parent2 = *def_obj2.parent;
|
||||
return (parent1.name() < parent2.name() ? true : false);
|
||||
}
|
||||
public:
|
||||
std::string unique_id, representation_id, type;
|
||||
@@ -140,11 +142,11 @@ private:
|
||||
std::vector<IfcGeom::Material> materials;
|
||||
std::vector<std::string> material_references;
|
||||
std::vector<real_t> uvs;
|
||||
std::string parent;
|
||||
const IfcGeom::Element<real_t>* parent;
|
||||
DeferredObject(const std::string& unique_id, const std::string& representation_id, const std::string& type, const std::vector<real_t>& matrix,
|
||||
const std::vector<real_t>& vertices, const std::vector<real_t>& normals, const std::vector<int>& faces,
|
||||
const std::vector<int>& edges, const std::vector<int>& material_ids, const std::vector<IfcGeom::Material>& materials,
|
||||
const std::vector<std::string>& material_references, const std::vector<real_t>& uvs, const std::string& parent)
|
||||
const std::vector<std::string>& material_references, const std::vector<real_t>& uvs, const IfcGeom::Element<real_t>& _parent)
|
||||
: unique_id(unique_id)
|
||||
, representation_id(representation_id)
|
||||
, type(type)
|
||||
@@ -157,8 +159,28 @@ private:
|
||||
, materials(materials)
|
||||
, material_references(material_references)
|
||||
, uvs(uvs)
|
||||
, parent(parent)
|
||||
{}
|
||||
{
|
||||
parent = &_parent;
|
||||
}
|
||||
|
||||
DeferredObject(const std::string& unique_id, const std::string& representation_id, const std::string& type, const std::vector<real_t>& matrix,
|
||||
const std::vector<real_t>& vertices, const std::vector<real_t>& normals, const std::vector<int>& faces,
|
||||
const std::vector<int>& edges, const std::vector<int>& material_ids, const std::vector<IfcGeom::Material>& materials,
|
||||
const std::vector<std::string>& material_references, const std::vector<real_t>& uvs)
|
||||
: unique_id(unique_id)
|
||||
, representation_id(representation_id)
|
||||
, type(type)
|
||||
, matrix(matrix)
|
||||
, vertices(vertices)
|
||||
, normals(normals)
|
||||
, faces(faces)
|
||||
, edges(edges)
|
||||
, material_ids(material_ids)
|
||||
, materials(materials)
|
||||
, material_references(material_references)
|
||||
, uvs(uvs)
|
||||
{
|
||||
}
|
||||
};
|
||||
COLLADABU::NativeString filename;
|
||||
COLLADASW::StreamWriter stream;
|
||||
|
||||
Reference in New Issue
Block a user