Definition at line 42 of file VP1HEPVisUtils.cxx.
◆ clearAlternateRep()
template<class T >
void VP1HEPVisUtils::Imp::clearAlternateRep |
( |
SoNode * |
n | ) |
|
|
static |
Definition at line 219 of file VP1HEPVisUtils.cxx.
221 T *
t =
static_cast<T*
>(
n);
222 if (
t&&
t->alternateRep.getValue())
223 t->clearAlternateRep();
◆ convertToAlternateRep()
template<class T >
SoNode * VP1HEPVisUtils::Imp::convertToAlternateRep |
( |
SoNode * |
n | ) |
|
|
static |
Definition at line 193 of file VP1HEPVisUtils.cxx.
197 T *
t =
static_cast<T*
>(
n);
198 SoNode * n_alt =
t->alternateRep.getValue();
202 t->generateAlternateRep();
203 n_alt =
t->alternateRep.getValue();
207 t->clearAlternateRep();
208 n_alt->unrefNoDelete();
213 n_alt->setName(
n->getName());
◆ convertToStandardGroupNode()
SoGroup * VP1HEPVisUtils::Imp::convertToStandardGroupNode |
( |
SoGroup * |
g, |
|
|
bool |
transferChildren |
|
) |
| |
|
static |
Definition at line 83 of file VP1HEPVisUtils.cxx.
86 SoGroup * newgroup(0);
87 if (
g->getTypeId().isDerivedFrom(SoSeparator::getClassTypeId()) &&
88 !
g->getTypeId().isDerivedFrom(SoSelection::getClassTypeId()) ) {
89 SoSeparator *
sep =
new SoSeparator;
90 SoSeparator * origsep =
static_cast<SoSeparator*
>(
g);
91 sep->renderCaching.setValue(origsep->renderCaching.getValue());
92 sep->boundingBoxCaching.setValue(origsep->boundingBoxCaching.getValue());
93 sep->renderCulling.setValue(origsep->renderCulling.getValue());
94 sep->pickCulling.setValue(origsep->pickCulling.getValue());
96 }
else if (
g->getTypeId().isDerivedFrom(SoSelection::getClassTypeId()) ) {
97 SoSelection *
sel =
new SoSelection;
98 SoSelection * origsel =
static_cast<SoSelection*
>(
g);
99 sel->renderCaching.setValue(origsel->renderCaching.getValue());
100 sel->boundingBoxCaching.setValue(origsel->boundingBoxCaching.getValue());
101 sel->renderCulling.setValue(origsel->renderCulling.getValue());
102 sel->pickCulling.setValue(origsel->pickCulling.getValue());
103 sel->policy.setValue(origsel->policy.getValue());
105 }
else if (
g->getTypeId().isDerivedFrom(SoSwitch::getClassTypeId()) ) {
106 SoSwitch *sw =
new SoSwitch;
107 sw->whichChild.setValue(
static_cast<SoSwitch*
>(
g)->whichChild.getValue());
111 newgroup =
new SoGroup;
115 newgroup->setName(
g->getName());
118 if (transferChildren)
119 for (
int i = 0;
i<
g->getNumChildren();++
i)
120 newgroup->addChild(
g->getChild(
i));
◆ convertToStandardScene()
SoGroup * VP1HEPVisUtils::Imp::convertToStandardScene |
( |
SoGroup * |
g | ) |
|
|
static |
Definition at line 126 of file VP1HEPVisUtils.cxx.
134 std::cout <<
"BAAAAAAAAAD!"<<std::endl;
135 for (
int i = 0;
i<
g->getNumChildren();++
i) {
136 SoNode *
n =
g->getChild(
i);
140 thegroup->addChild(standard);
142 std::cout <<
"BAD 1"<<std::endl;
148 std::cout <<
"BAD 2"<<std::endl;
◆ isGroup()
bool VP1HEPVisUtils::Imp::isGroup |
( |
SoNode * |
n | ) |
|
|
static |
Definition at line 261 of file VP1HEPVisUtils.cxx.
263 return n->getTypeId().isDerivedFrom(SoGroup::getClassTypeId());
◆ isNonCustomTree()
bool VP1HEPVisUtils::Imp::isNonCustomTree |
( |
SoGroup * |
g | ) |
|
|
static |
◆ updateAllNullAlternativeReps()
void VP1HEPVisUtils::Imp::updateAllNullAlternativeReps |
( |
SoGroup * |
g | ) |
|
|
static |
Definition at line 267 of file VP1HEPVisUtils.cxx.
269 for (
int i = 0;
i<
g->getNumChildren();++
i) {
270 SoNode *
n =
g->getChild(
i);
274 if (
n->getTypeId().isDerivedFrom(SoCons::getClassTypeId()) )
return Imp::updateAlternateRepIfNull<SoCons>(
n);
275 if (
n->getTypeId().isDerivedFrom(SoLAr::getClassTypeId()) )
return Imp::updateAlternateRepIfNull<SoLAr>(
n);
277 if (
n->getTypeId().isDerivedFrom(SoPcons::getClassTypeId()) )
return Imp::updateAlternateRepIfNull<SoPcons>(
n);
278 if (
n->getTypeId().isDerivedFrom(SoGenericBox::getClassTypeId()) )
return Imp::updateAlternateRepIfNull<SoGenericBox>(
n);
279 if (
n->getTypeId().isDerivedFrom(SoTubs::getClassTypeId()) )
return Imp::updateAlternateRepIfNull<SoTubs>(
n);
280 if (
n->getTypeId().isDerivedFrom(SoPolyhedron::getClassTypeId()) )
return Imp::updateAlternateRepIfNull<SoPolyhedron>(
n);
281 if (
n->getTypeId().isDerivedFrom(SoTessellated::getClassTypeId()) )
return Imp::updateAlternateRepIfNull<SoTessellated>(
n);
◆ updateAlternateRepIfNull()
template<class T >
void VP1HEPVisUtils::Imp::updateAlternateRepIfNull |
( |
SoNode * |
n | ) |
|
|
static |
Definition at line 228 of file VP1HEPVisUtils.cxx.
230 T *
t =
static_cast<T*
>(
n);
231 if (
t&&!
t->alternateRep.getValue()) {
232 t->generateAlternateRep();
233 t->clearAlternateRep();
The documentation for this class was generated from the following file: