diff options
author | Marius Kintel <marius@kintel.net> | 2010-08-28 19:21:44 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2010-10-31 00:42:38 (GMT) |
commit | d0390c41a2268ce23d3010c7085e4365725d2f49 (patch) | |
tree | d3f2e6b0cc58a66ff759740ddcf27191335076aa /src/csgops.cc | |
parent | 93f3d4a1b6251523428179261dc070df44b0b317 (diff) |
Added AbstractNode::name(), changed CSGTextRenderer to use this instead of the rtti name
Diffstat (limited to 'src/csgops.cc')
-rw-r--r-- | src/csgops.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/csgops.cc b/src/csgops.cc index bddb5a0..c7251f8 100644 --- a/src/csgops.cc +++ b/src/csgops.cc @@ -53,23 +53,24 @@ AbstractNode *CsgModule::evaluate(const Context*, const ModuleInstantiation *ins std::string CsgNode::toString() const { - std::stringstream stream; + return this->name() + "()"; +} +std::string CsgNode::name() const +{ switch (this->type) { case CSG_TYPE_UNION: - stream << "union()"; + return "union"; break; case CSG_TYPE_DIFFERENCE: - stream << "difference()"; + return "difference"; break; case CSG_TYPE_INTERSECTION: - stream << "intersection()"; + return "intersection"; break; default: assert(false); } - - return stream.str(); } void register_builtin_csgops() |