diff options
author | Marius Kintel <marius@kintel.net> | 2010-04-12 00:16:36 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2010-10-31 00:42:35 (GMT) |
commit | e8e213b3c9ce0580045ea6e7e86b00ab41d4c58b (patch) | |
tree | cb32e67b6334aa1f1dc62aa4a0686a22782e7f77 /src/projection.cc | |
parent | 53a9953b7dc4ab4a366046c91529b32fb6652551 (diff) |
Another refactoring session:
o mk_cache_id() obsoleted by removing the node index from the dump
o node index output removed from each node and make optional in NodeDumper
o The visitors are no longer global, but associated with a tree
o Added Tree class to manage node trees and the (now implicit) dump cache
o Moved PolySet cache into PolySetRenderer
Diffstat (limited to 'src/projection.cc')
-rw-r--r-- | src/projection.cc | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/projection.cc b/src/projection.cc index 83f0205..073a5b1 100644 --- a/src/projection.cc +++ b/src/projection.cc @@ -85,11 +85,6 @@ AbstractNode *ProjectionModule::evaluate(const Context *ctx, const ModuleInstant return node; } -void register_builtin_projection() -{ - builtin_modules["projection"] = new ProjectionModule(); -} - PolySet *ProjectionNode::render_polyset(render_mode_e mode) const { PolySetRenderer *renderer = PolySetRenderer::renderer(); @@ -100,16 +95,9 @@ PolySet *ProjectionNode::render_polyset(render_mode_e mode) const return ps; } - QString key = mk_cache_id(); - if (PolySet::ps_cache.contains(key)) { - PRINT(PolySet::ps_cache[key]->msg); - return PolySet::ps_cache[key]->ps->link(); - } - print_messages_push(); PolySet *ps = renderer->renderPolySet(*this, mode); - PolySet::ps_cache.insert(key, new PolySet::ps_cache_entry(ps->link())); print_messages_pop(); @@ -119,10 +107,14 @@ PolySet *ProjectionNode::render_polyset(render_mode_e mode) const std::string ProjectionNode::toString() const { std::stringstream stream; - stream << "n" << this->index() << ": "; stream << "projection(cut = " << (this->cut_mode ? "true" : "false") << ", convexity = " << this->convexity << ")"; return stream.str(); } + +void register_builtin_projection() +{ + builtin_modules["projection"] = new ProjectionModule(); +} |