#include "VisuGUI.h"
+#include "VISU_ColoredPrs3dHolder_i.hh"
#include "VISU_Gen_i.hh"
#include "VISU_Prs3d_i.hh"
#include "VISU_Result_i.hh"
// ========================================================================================
std::vector<VISU::Prs3d_i*> GetPrs3dList (const SalomeApp_Module* theModule,
const Handle(SALOME_InteractiveObject)& theIO,
- bool theGP)
+ bool theGP)
{
std::vector<VISU::Prs3d_i*> aList;
if (!theIO.IsNull() && theIO->hasEntry()) {
std::vector<VISU::Prs3d_i*> GetPrs3dList (const SalomeApp_Module* theModule,
_PTR(SObject) theObject,
- bool theGP)
+ bool theGP)
{
std::vector<VISU::Prs3d_i*> aList; int k = 0;
if (!theObject)
if (!CORBA::is_nil(aVisuObj)) {
VISU::VISUType aType = aVisuObj->GetType();
switch (aType) {
- case VISU::TGAUSSPOINTS:
- if ( !theGP ) break;
- case VISU::TSCALARMAP:
+ case VISU::TGAUSSPOINTS:
+ if ( !theGP ) break;
+ case VISU::TSCALARMAP:
case VISU::TISOSURFACES:
case VISU::TDEFORMEDSHAPE:
case VISU::TCUTPLANES:
case VISU::TVECTORS:
case VISU::TSTREAMLINES:
case VISU::TPLOT3D:
- case VISU::TSCALARMAPONDEFORMEDSHAPE:
- case VISU::TDEFORMEDSHAPEANDSCALARMAP:
- case VISU::TMESH:
+ case VISU::TSCALARMAPONDEFORMEDSHAPE:
+ case VISU::TDEFORMEDSHAPEANDSCALARMAP:
+ case VISU::TMESH:
{
PortableServer::ServantBase_var aServant = VISU::GetServant(aCORBAObject);
if (aServant.in()) {
}
}
break;
+ case VISU::TCOLOREDPRS3DHOLDER:
+ {
+ PortableServer::ServantBase_var aServant = VISU::GetServant(aCORBAObject);
+ if (aServant.in()) {
+ VISU::ColoredPrs3dHolder_i* aPrsHolderObject = dynamic_cast<VISU::ColoredPrs3dHolder_i*>(aServant.in());
+ if( aPrsHolderObject ) {
+ VISU::Prs3d_i* aPrsObject = aPrsHolderObject->GetPrs3dDevice();
+ aList.resize(k+1);
+ aList[k] = aPrsObject;
+ k++;
+ }
+ }
+ }
}
}
} else {
VISU::VISUType aType = VISU::Storable::SObject2Type(theObject);
switch (aType) {
case VISU::TFIELD: {
- _PTR(ChildIterator) anIter = aCStudy->NewChildIterator(theObject);
- _PTR(SObject) aTimeStamp;
- anIter->Next(); // First is reference on support
- for (; anIter->More(); anIter->Next()) {
- aTimeStamp = anIter->Value();
- if (!aTimeStamp) continue;
- std::vector<VISU::Prs3d_i*> aSubList = GetPrs3dList(theModule, aTimeStamp);
- if (!aSubList.empty()) {
- int n = aSubList.size();
- aList.resize(k+n);
- for (int i = 0; i < n; i++) {
- aList[k] = aSubList[i];
- k++;
- }
- }
- }
- break;
+ _PTR(ChildIterator) anIter = aCStudy->NewChildIterator(theObject);
+ _PTR(SObject) aTimeStamp;
+ anIter->Next(); // First is reference on support
+ for (; anIter->More(); anIter->Next()) {
+ aTimeStamp = anIter->Value();
+ if (!aTimeStamp) continue;
+ std::vector<VISU::Prs3d_i*> aSubList = GetPrs3dList(theModule, aTimeStamp);
+ if (!aSubList.empty()) {
+ int n = aSubList.size();
+ aList.resize(k+n);
+ for (int i = 0; i < n; i++) {
+ aList[k] = aSubList[i];
+ k++;
+ }
+ }
+ }
+ break;
}
case VISU::TTIMESTAMP: {
- _PTR(ChildIterator) anIter = aCStudy->NewChildIterator(theObject);
- _PTR(SObject) aPrs;
- for (; anIter->More(); anIter->Next()) {
- aPrs = anIter->Value();
- if (!aPrs) continue;
- std::vector<VISU::Prs3d_i*> aSubList = GetPrs3dList(theModule, aPrs);
- if (!aSubList.empty()) {
- int n = aSubList.size();
- aList.resize(k+n);
- for (int i = 0; i < n; i++) {
- aList[k] = aSubList[i];
- k++;
- }
- }
- }
- break;
+ _PTR(ChildIterator) anIter = aCStudy->NewChildIterator(theObject);
+ _PTR(SObject) aPrs;
+ for (; anIter->More(); anIter->Next()) {
+ aPrs = anIter->Value();
+ if (!aPrs) continue;
+ std::vector<VISU::Prs3d_i*> aSubList = GetPrs3dList(theModule, aPrs);
+ if (!aSubList.empty()) {
+ int n = aSubList.size();
+ aList.resize(k+n);
+ for (int i = 0; i < n; i++) {
+ aList[k] = aSubList[i];
+ k++;
+ }
+ }
+ }
+ break;
}}
}
return aList;