#include <TrackLODManager.h>
|
| void | addNodes (SoGroup *simple, SoGroup *detailed) |
| void | removeNodes (SoGroup *simple, SoGroup *detailed) |
Definition at line 56 of file TrackLODManager.h.
◆ TrackLODHandle() [1/2]
Definition at line 247 of file TrackLODManager.cxx.
251 :
m_d(
new Imp(attachgroup_LOD,sephelper_simple,sephelper_detailed,regionindex,crossover_value))
252{
253
254
255
256 if (!attachgroup_LOD||!sephelper_simple||!sephelper_detailed)
258}
friend class TrackLODManager::Imp
static void messageDebug(const QString &)
◆ ~TrackLODHandle()
| TrackLODHandle::~TrackLODHandle |
( |
| ) |
|
|
private |
Definition at line 261 of file TrackLODManager.cxx.
262{
264 if (
m_d->attachGroup_LOD->findChild(
m_d->lod)>-1) {
265 m_d->attachGroup_LOD->removeChild(
m_d->lod);
266 m_d->attachHelper_simple->removeNode(
m_d->sep_simple);
267 m_d->attachHelper_detailed->removeNode(
m_d->sep_detailed);
268 }
270 m_d->sep_detailed->unref();
271 m_d->sep_simple->unref();
272 }
274}
◆ TrackLODHandle() [2/2]
◆ addNodes()
| void TrackLODHandle::addNodes |
( |
SoGroup * | simple, |
|
|
SoGroup * | detailed ) |
Definition at line 277 of file TrackLODManager.cxx.
278{
280
281
282 m_d->lod =
new SoLevelOfDetail;
283 m_d->sep_detailed =
new SoSeparator;
284 m_d->sep_simple =
new SoSeparator;
286 m_d->sep_detailed->ref();
287 m_d->sep_simple->ref();
288 m_d->lod->addChild(
m_d->sep_detailed);
289 m_d->lod->addChild(
m_d->sep_simple);
290 }
291
293
294 if (!detailed) {
296 return;
297 }
298 if (!simple) {
300 return;
301 }
302 if (
m_d->sep_detailed->findChild(detailed)>=0) {
304 return;
305 }
306 if (
m_d->sep_simple->findChild(simple)>=0) {
308 return;
309 }
310 }
311
312 m_d->sep_detailed->addChild(detailed);
313 m_d->sep_simple->addChild(simple);
314
315 if (
m_d->sep_detailed->getNumChildren()==1) {
316
319 m_d->attachGroup_LOD->addChild(
m_d->lod);
320 m_d->attachHelper_simple->addNode(
m_d->sep_simple);
321 m_d->attachHelper_detailed->addNode(
m_d->sep_detailed);
322 }
323 m_d->updateCrossOverField();
324}
static void messageVerbose(const QString &)
◆ operator=()
◆ removeNodes()
| void TrackLODHandle::removeNodes |
( |
SoGroup * | simple, |
|
|
SoGroup * | detailed ) |
Definition at line 327 of file TrackLODManager.cxx.
328{
330 return;
331
333
334 if (!detailed) {
336 return;
337 }
338 if (!simple) {
340 return;
341 }
342 if (
m_d->sep_detailed->findChild(detailed)<0) {
343 VP1Msg::messageVerbose(
"TrackLODHandle ERROR: removeNodes called for detailed node which is not already added");
344 return;
345 }
346 if (
m_d->sep_simple->findChild(simple)<0) {
347 VP1Msg::messageVerbose(
"TrackLODHandle ERROR: removeNodes called for simple node which is not already added");
348 return;
349 }
350 }
351 m_d->sep_detailed->removeChild(detailed);
352 m_d->sep_simple->removeChild(simple);
353
354 if (
m_d->sep_detailed->getNumChildren()<1) {
355
358 m_d->attachGroup_LOD->removeChild(
m_d->lod);
359 m_d->attachHelper_simple->removeNode(
m_d->sep_simple);
360 m_d->attachHelper_detailed->removeNode(
m_d->sep_detailed);
361 } else {
362 m_d->updateCrossOverField();
363 }
364}
◆ TrackLODManager
◆ TrackLODManager::Imp
◆ m_d
The documentation for this class was generated from the following files: