First claimChildren3D implementation and Starting PartItem implementation

This commit is contained in:
jriegel
2012-04-01 21:47:24 +02:00
committed by Stefan Tröger
parent d9b6c03304
commit 8eb0d198f8
11 changed files with 95 additions and 36 deletions

View File

@@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Inventor/nodes/SoGroup.h>
#endif
#include "ViewProviderAssembly.h"
@@ -50,6 +51,35 @@ bool ViewProviderItemAssembly::doubleClicked(void)
return true;
}
void ViewProviderItemAssembly::attach(App::DocumentObject *pcFeat)
{
// call parent attach method
ViewProviderGeometryObject::attach(pcFeat);
// putting all together with the switch
addDisplayMaskMode(getChildRoot(), "Main");
}
void ViewProviderItemAssembly::setDisplayMode(const char* ModeName)
{
if ( strcmp("Main",ModeName)==0 )
setDisplayMaskMode("Main");
ViewProviderGeometryObject::setDisplayMode( ModeName );
}
std::vector<std::string> ViewProviderItemAssembly::getDisplayModes(void) const
{
// get the modes of the father
std::vector<std::string> StrList = ViewProviderGeometryObject::getDisplayModes();
// add your own modes
StrList.push_back("Main");
return StrList;
}
std::vector<App::DocumentObject*> ViewProviderItemAssembly::claimChildren(void)const
{
@@ -57,3 +87,10 @@ std::vector<App::DocumentObject*> ViewProviderItemAssembly::claimChildren(void)c
return static_cast<Assembly::ItemAssembly*>(getObject())->Items.getValues();
}
std::vector<App::DocumentObject*> ViewProviderItemAssembly::claimChildren3D(void)const
{
return static_cast<Assembly::ItemAssembly*>(getObject())->Items.getValues();
}