Mesh: Apply clang-format
This commit is contained in:
@@ -22,11 +22,11 @@
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <Inventor/nodes/SoDrawStyle.h>
|
||||
# include <Inventor/nodes/SoMaterial.h>
|
||||
# include <Inventor/nodes/SoNormalBinding.h>
|
||||
# include <Inventor/nodes/SoSeparator.h>
|
||||
# include <Inventor/manips/SoTransformerManip.h>
|
||||
#include <Inventor/manips/SoTransformerManip.h>
|
||||
#include <Inventor/nodes/SoDrawStyle.h>
|
||||
#include <Inventor/nodes/SoMaterial.h>
|
||||
#include <Inventor/nodes/SoNormalBinding.h>
|
||||
#include <Inventor/nodes/SoSeparator.h>
|
||||
#endif
|
||||
|
||||
#include <Gui/SoFCSelection.h>
|
||||
@@ -42,60 +42,59 @@ PROPERTY_SOURCE(MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMesh)
|
||||
|
||||
ViewProviderMeshTransform::ViewProviderMeshTransform()
|
||||
{
|
||||
pcTransformerDragger = new SoTransformerManip();
|
||||
pcTransformerDragger->ref();
|
||||
pcTransformerDragger = new SoTransformerManip();
|
||||
pcTransformerDragger->ref();
|
||||
}
|
||||
|
||||
ViewProviderMeshTransform::~ViewProviderMeshTransform()
|
||||
{
|
||||
pcTransformerDragger->unref();
|
||||
pcTransformerDragger->unref();
|
||||
}
|
||||
|
||||
void ViewProviderMeshTransform::attach(App::DocumentObject *pcFeat)
|
||||
void ViewProviderMeshTransform::attach(App::DocumentObject* pcFeat)
|
||||
{
|
||||
// creates the standard viewing modes
|
||||
ViewProviderMesh::attach(pcFeat);
|
||||
// creates the standard viewing modes
|
||||
ViewProviderMesh::attach(pcFeat);
|
||||
|
||||
SoSeparator* pcEditRoot = new SoSeparator();
|
||||
SoSeparator* pcEditRoot = new SoSeparator();
|
||||
|
||||
// flat shaded (Normal) ------------------------------------------
|
||||
SoDrawStyle *pcFlatStyle = new SoDrawStyle();
|
||||
pcFlatStyle->style = SoDrawStyle::FILLED;
|
||||
SoNormalBinding* pcBinding = new SoNormalBinding();
|
||||
pcBinding->value=SoNormalBinding::PER_FACE;
|
||||
// flat shaded (Normal) ------------------------------------------
|
||||
SoDrawStyle* pcFlatStyle = new SoDrawStyle();
|
||||
pcFlatStyle->style = SoDrawStyle::FILLED;
|
||||
SoNormalBinding* pcBinding = new SoNormalBinding();
|
||||
pcBinding->value = SoNormalBinding::PER_FACE;
|
||||
|
||||
pcEditRoot->addChild(pcTransformerDragger);
|
||||
pcEditRoot->addChild(pcFlatStyle);
|
||||
pcEditRoot->addChild(pcShapeMaterial);
|
||||
pcEditRoot->addChild(pcBinding);
|
||||
pcEditRoot->addChild(pcHighlight);
|
||||
pcEditRoot->addChild(pcTransformerDragger);
|
||||
pcEditRoot->addChild(pcFlatStyle);
|
||||
pcEditRoot->addChild(pcShapeMaterial);
|
||||
pcEditRoot->addChild(pcBinding);
|
||||
pcEditRoot->addChild(pcHighlight);
|
||||
|
||||
// adding to the switch
|
||||
addDisplayMaskMode(pcEditRoot, "Edit");
|
||||
// adding to the switch
|
||||
addDisplayMaskMode(pcEditRoot, "Edit");
|
||||
}
|
||||
|
||||
void ViewProviderMeshTransform::updateData(const App::Property* prop)
|
||||
{
|
||||
ViewProviderMesh::updateData(prop);
|
||||
ViewProviderMesh::updateData(prop);
|
||||
}
|
||||
|
||||
void ViewProviderMeshTransform::setDisplayMode(const char* ModeName)
|
||||
{
|
||||
if ( strcmp("Transform",ModeName) == 0 )
|
||||
setDisplayMaskMode("Edit");
|
||||
ViewProviderMesh::setDisplayMode(ModeName);
|
||||
if (strcmp("Transform", ModeName) == 0) {
|
||||
setDisplayMaskMode("Edit");
|
||||
}
|
||||
ViewProviderMesh::setDisplayMode(ModeName);
|
||||
}
|
||||
|
||||
const char* ViewProviderMeshTransform::getDefaultDisplayMode() const
|
||||
{
|
||||
return "Transform";
|
||||
return "Transform";
|
||||
}
|
||||
|
||||
std::vector<std::string> ViewProviderMeshTransform::getDisplayModes() const
|
||||
{
|
||||
std::vector<std::string> StrList = ViewProviderMesh::getDisplayModes();
|
||||
StrList.emplace_back("Transform");
|
||||
return StrList;
|
||||
std::vector<std::string> StrList = ViewProviderMesh::getDisplayModes();
|
||||
StrList.emplace_back("Transform");
|
||||
return StrList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user