namespace X3DTK { namespace MESH { template TemplateVerticesDrawerStateVariables::TemplateVerticesDrawerStateVariables() : StateVariables(), _selectionMode(false) { } template void TemplateVerticesDrawerStateVariables::init() { _matrixStack.push_front(SFMatrix34f::identity); _matrixVector.clear(); _meshVector.clear(); } template void TemplateVerticesDrawerStateVariables::finish() { _matrixStack.pop_front(); if (_matrixStack.size() != 0) { cx3d << "TemplateVerticesDrawerStateVariables::finish: Non empty matrix stack at the end of TemplateVerticesDrawer traversal" << std::endl; _matrixStack.clear(); } } template void TemplateVerticesDrawerStateVariables::pushMatrix(const SFMatrix34f &transformation) { _matrixStack.push_front(_matrixStack.front()*transformation); } template void TemplateVerticesDrawerStateVariables::popMatrix() { _matrixStack.pop_front(); } template int TemplateVerticesDrawerStateVariables::getCurrentMeshId() { return _matrixVector.size() - 1; } template void TemplateVerticesDrawerStateVariables::storeMesh(TemplateMesh *mesh) { _matrixVector.push_back(_matrixStack.front()); _meshVector.push_back(mesh); } template TemplateMesh *TemplateVerticesDrawerStateVariables::getMesh(int i) const { return _meshVector[i]; } template const SFMatrix34f &TemplateVerticesDrawerStateVariables::getMatrix(int i) const { return _matrixVector[i]; } template void TemplateVerticesDrawerStateVariables::setSelectionMode(bool selectionMode) { _selectionMode = selectionMode; } template bool TemplateVerticesDrawerStateVariables::getSelectionMode() const { return _selectionMode; } } }