diff --git a/Examples/Tutorial/UserInterface/01Button.cpp b/Examples/Tutorial/UserInterface/01Button.cpp index 7769e843..8a4e1e6c 100644 --- a/Examples/Tutorial/UserInterface/01Button.cpp +++ b/Examples/Tutorial/UserInterface/01Button.cpp @@ -160,13 +160,13 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); TutorialWindow->connectKeyTyped(boost::bind(keyTyped, _1)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); // Make Torus Node (creates Torus in background of scene) @@ -324,18 +324,18 @@ int main(int argc, char **argv) TutorialUIForeground->setDrawingSurface(TutorialDrawingSurface); - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRefPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRefPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Attach key controls @@ -432,7 +432,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/02AbsoluteLayout.cpp b/Examples/Tutorial/UserInterface/02AbsoluteLayout.cpp index 9c637244..11d58fdf 100644 --- a/Examples/Tutorial/UserInterface/02AbsoluteLayout.cpp +++ b/Examples/Tutorial/UserInterface/02AbsoluteLayout.cpp @@ -138,12 +138,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -285,17 +285,17 @@ int main(int argc, char **argv) TutorialUIForeground->setDrawingSurface(TutorialDrawingSurface); // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -386,7 +386,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/03Border.cpp b/Examples/Tutorial/UserInterface/03Border.cpp index dcb21dc2..dc4f6daa 100644 --- a/Examples/Tutorial/UserInterface/03Border.cpp +++ b/Examples/Tutorial/UserInterface/03Border.cpp @@ -148,12 +148,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -535,17 +535,17 @@ CompoundBorders, etc. TutorialUIForeground->setDrawingSurface(TutorialDrawingSurface); // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -629,7 +629,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/04Background.cpp b/Examples/Tutorial/UserInterface/04Background.cpp index 70508080..11532a2c 100644 --- a/Examples/Tutorial/UserInterface/04Background.cpp +++ b/Examples/Tutorial/UserInterface/04Background.cpp @@ -172,12 +172,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyTyped, _1)); @@ -504,17 +504,17 @@ int main(int argc, char **argv) // Create the SimpleSceneManager helper - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRefPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRefPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -597,7 +597,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/05FlowLayout.cpp b/Examples/Tutorial/UserInterface/05FlowLayout.cpp index c2bc4f80..54a456d3 100644 --- a/Examples/Tutorial/UserInterface/05FlowLayout.cpp +++ b/Examples/Tutorial/UserInterface/05FlowLayout.cpp @@ -138,12 +138,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -267,17 +267,17 @@ int main(int argc, char **argv) TutorialUIForeground->setDrawingSurface(TutorialDrawingSurface); // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -359,7 +359,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/06BoxLayout.cpp b/Examples/Tutorial/UserInterface/06BoxLayout.cpp index 70466c84..7bab0f73 100644 --- a/Examples/Tutorial/UserInterface/06BoxLayout.cpp +++ b/Examples/Tutorial/UserInterface/06BoxLayout.cpp @@ -146,12 +146,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -273,17 +273,17 @@ int main(int argc, char **argv) TutorialUIForeground->setDrawingSurface(TutorialDrawingSurface); // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -365,7 +365,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/07GridLayout.cpp b/Examples/Tutorial/UserInterface/07GridLayout.cpp index 6ff20982..cc7cb614 100644 --- a/Examples/Tutorial/UserInterface/07GridLayout.cpp +++ b/Examples/Tutorial/UserInterface/07GridLayout.cpp @@ -140,12 +140,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -269,17 +269,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -361,7 +361,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/08OverlayLayout.cpp b/Examples/Tutorial/UserInterface/08OverlayLayout.cpp index 906ab83a..3e1638be 100644 --- a/Examples/Tutorial/UserInterface/08OverlayLayout.cpp +++ b/Examples/Tutorial/UserInterface/08OverlayLayout.cpp @@ -112,12 +112,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -218,17 +218,17 @@ can be set. // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -311,7 +311,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/09BorderLayout.cpp b/Examples/Tutorial/UserInterface/09BorderLayout.cpp index 8b871d27..0a8e4ae1 100644 --- a/Examples/Tutorial/UserInterface/09BorderLayout.cpp +++ b/Examples/Tutorial/UserInterface/09BorderLayout.cpp @@ -114,12 +114,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -264,17 +264,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -357,7 +357,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/10Container.cpp b/Examples/Tutorial/UserInterface/10Container.cpp index d560213c..b18f40f8 100644 --- a/Examples/Tutorial/UserInterface/10Container.cpp +++ b/Examples/Tutorial/UserInterface/10Container.cpp @@ -122,12 +122,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -272,17 +272,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -365,7 +365,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/11CardLayout.cpp b/Examples/Tutorial/UserInterface/11CardLayout.cpp index 4b6d86e0..ba80d504 100644 --- a/Examples/Tutorial/UserInterface/11CardLayout.cpp +++ b/Examples/Tutorial/UserInterface/11CardLayout.cpp @@ -164,12 +164,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -354,17 +354,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -447,7 +447,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/12ComplexLayout.cpp b/Examples/Tutorial/UserInterface/12ComplexLayout.cpp index 58f05933..d9e77190 100644 --- a/Examples/Tutorial/UserInterface/12ComplexLayout.cpp +++ b/Examples/Tutorial/UserInterface/12ComplexLayout.cpp @@ -123,12 +123,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -364,17 +364,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -456,7 +456,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/13CheckboxButton.cpp b/Examples/Tutorial/UserInterface/13CheckboxButton.cpp index e3113bc2..903c1d6d 100644 --- a/Examples/Tutorial/UserInterface/13CheckboxButton.cpp +++ b/Examples/Tutorial/UserInterface/13CheckboxButton.cpp @@ -116,12 +116,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = OSG::SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -198,17 +198,17 @@ not checked(false). // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -291,7 +291,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/14RadioButton.cpp b/Examples/Tutorial/UserInterface/14RadioButton.cpp index 175dcd56..2ebd2969 100644 --- a/Examples/Tutorial/UserInterface/14RadioButton.cpp +++ b/Examples/Tutorial/UserInterface/14RadioButton.cpp @@ -114,12 +114,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -228,17 +228,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -320,7 +320,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/15TabPanel.cpp b/Examples/Tutorial/UserInterface/15TabPanel.cpp index fa0ed32c..51a72720 100644 --- a/Examples/Tutorial/UserInterface/15TabPanel.cpp +++ b/Examples/Tutorial/UserInterface/15TabPanel.cpp @@ -176,12 +176,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = OSG::SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -415,17 +415,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -508,7 +508,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/16TextField.cpp b/Examples/Tutorial/UserInterface/16TextField.cpp index 3674d7e3..eeb61431 100644 --- a/Examples/Tutorial/UserInterface/16TextField.cpp +++ b/Examples/Tutorial/UserInterface/16TextField.cpp @@ -115,12 +115,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -231,17 +231,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -324,7 +324,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/17Label_Font.cpp b/Examples/Tutorial/UserInterface/17Label_Font.cpp index e6befc13..4f196ed2 100644 --- a/Examples/Tutorial/UserInterface/17Label_Font.cpp +++ b/Examples/Tutorial/UserInterface/17Label_Font.cpp @@ -456,12 +456,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = OSG::SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -634,17 +634,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -727,7 +727,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/18List.cpp b/Examples/Tutorial/UserInterface/18List.cpp index a962fc68..c284314f 100644 --- a/Examples/Tutorial/UserInterface/18List.cpp +++ b/Examples/Tutorial/UserInterface/18List.cpp @@ -190,12 +190,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = OSG::SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); // Make Torus Node (creates Torus in background of scene) NodeRecPtr TorusGeometryNode = makeTorus(.5, 2, 16, 16); @@ -425,17 +425,17 @@ to them so this code is commented out. ExampleListModel2.get())); // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -518,7 +518,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/19GridBagLayout.cpp b/Examples/Tutorial/UserInterface/19GridBagLayout.cpp index 14857b1d..b9db1f67 100644 --- a/Examples/Tutorial/UserInterface/19GridBagLayout.cpp +++ b/Examples/Tutorial/UserInterface/19GridBagLayout.cpp @@ -120,12 +120,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = OSG::SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -327,17 +327,17 @@ center it. // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -420,7 +420,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/20UIRectangle.cpp b/Examples/Tutorial/UserInterface/20UIRectangle.cpp index 3314ce67..f5b6ab8d 100644 --- a/Examples/Tutorial/UserInterface/20UIRectangle.cpp +++ b/Examples/Tutorial/UserInterface/20UIRectangle.cpp @@ -227,18 +227,18 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); - - TutorialWindow->connectMousePressed(boost::bind(mousePressed, _1, &sceneManager)); - TutorialWindow->connectMouseReleased(boost::bind(mouseReleased, _1, &sceneManager)); - TutorialWindow->connectMouseDragged(boost::bind(mouseDragged, _1, &sceneManager)); - TutorialWindow->connectMouseWheelMoved(boost::bind(mouseWheelMoved, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); + + TutorialWindow->connectMousePressed(boost::bind(mousePressed, _1, sceneManager)); + TutorialWindow->connectMouseReleased(boost::bind(mouseReleased, _1, sceneManager)); + TutorialWindow->connectMouseDragged(boost::bind(mouseDragged, _1, sceneManager)); + TutorialWindow->connectMouseWheelMoved(boost::bind(mouseWheelMoved, _1, sceneManager)); TutorialWindow->connectKeyPressed(boost::bind(keyPressed, _1)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); // Make Torus Node (creates Torus in background of scene) NodeRecPtr TorusGeometryNode = makeTorus(90, 270, 16, 16); @@ -349,14 +349,14 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); - //sceneManager.setRoot(ExampleUIRectangleNode); + sceneManager->setRoot(scene); + //sceneManager->setRoot(ExampleUIRectangleNode); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); //Open Window @@ -570,7 +570,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/21ExampleInterface.cpp b/Examples/Tutorial/UserInterface/21ExampleInterface.cpp index b4a4c219..f3f9b477 100644 --- a/Examples/Tutorial/UserInterface/21ExampleInterface.cpp +++ b/Examples/Tutorial/UserInterface/21ExampleInterface.cpp @@ -219,17 +219,17 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); - TutorialWindow->connectMousePressed(boost::bind(mousePressed, _1, &sceneManager)); - TutorialWindow->connectMouseReleased(boost::bind(mouseReleased, _1, &sceneManager)); - TutorialWindow->connectMouseDragged(boost::bind(mouseDragged, _1, &sceneManager)); - TutorialWindow->connectMouseWheelMoved(boost::bind(mouseWheelMoved, _1, &sceneManager)); + TutorialWindow->connectMousePressed(boost::bind(mousePressed, _1, sceneManager)); + TutorialWindow->connectMouseReleased(boost::bind(mouseReleased, _1, sceneManager)); + TutorialWindow->connectMouseDragged(boost::bind(mouseDragged, _1, sceneManager)); + TutorialWindow->connectMouseWheelMoved(boost::bind(mouseWheelMoved, _1, sceneManager)); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); // Make Main Scene Node @@ -385,13 +385,13 @@ int main(int argc, char **argv) Scene->addChild(UIRectNode); - sceneManager.setRoot(Scene); + sceneManager->setRoot(Scene); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -922,7 +922,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/22TextArea.cpp b/Examples/Tutorial/UserInterface/22TextArea.cpp index 4ba515b1..a71b23da 100644 --- a/Examples/Tutorial/UserInterface/22TextArea.cpp +++ b/Examples/Tutorial/UserInterface/22TextArea.cpp @@ -116,12 +116,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -241,17 +241,17 @@ Caret to move. // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -335,7 +335,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/23SplitPanel.cpp b/Examples/Tutorial/UserInterface/23SplitPanel.cpp index 93c4e537..62e19fab 100644 --- a/Examples/Tutorial/UserInterface/23SplitPanel.cpp +++ b/Examples/Tutorial/UserInterface/23SplitPanel.cpp @@ -122,12 +122,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -280,17 +280,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -372,7 +372,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/24PasswordField.cpp b/Examples/Tutorial/UserInterface/24PasswordField.cpp index a426b98c..13f47017 100644 --- a/Examples/Tutorial/UserInterface/24PasswordField.cpp +++ b/Examples/Tutorial/UserInterface/24PasswordField.cpp @@ -116,12 +116,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -215,17 +215,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -308,7 +308,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/25PopupMenu.cpp b/Examples/Tutorial/UserInterface/25PopupMenu.cpp index 5c43dcc1..98bac975 100644 --- a/Examples/Tutorial/UserInterface/25PopupMenu.cpp +++ b/Examples/Tutorial/UserInterface/25PopupMenu.cpp @@ -119,12 +119,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -271,17 +271,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -363,7 +363,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/26MenuBar.cpp b/Examples/Tutorial/UserInterface/26MenuBar.cpp index 4f2f2df1..733f5c84 100644 --- a/Examples/Tutorial/UserInterface/26MenuBar.cpp +++ b/Examples/Tutorial/UserInterface/26MenuBar.cpp @@ -130,12 +130,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -329,17 +329,17 @@ itself // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -423,7 +423,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/27ScrollPanel.cpp b/Examples/Tutorial/UserInterface/27ScrollPanel.cpp index e4da598c..b4ea8aa6 100644 --- a/Examples/Tutorial/UserInterface/27ScrollPanel.cpp +++ b/Examples/Tutorial/UserInterface/27ScrollPanel.cpp @@ -122,12 +122,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -345,17 +345,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -471,7 +471,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/28Table.cpp b/Examples/Tutorial/UserInterface/28Table.cpp index c677bee0..a7c334cc 100644 --- a/Examples/Tutorial/UserInterface/28Table.cpp +++ b/Examples/Tutorial/UserInterface/28Table.cpp @@ -543,12 +543,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -684,17 +684,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -842,7 +842,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/29Spinner.cpp b/Examples/Tutorial/UserInterface/29Spinner.cpp index 9207edae..62faafd4 100644 --- a/Examples/Tutorial/UserInterface/29Spinner.cpp +++ b/Examples/Tutorial/UserInterface/29Spinner.cpp @@ -131,12 +131,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -250,17 +250,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -343,7 +343,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/30RotatedComponent.cpp b/Examples/Tutorial/UserInterface/30RotatedComponent.cpp index 2f2bd89d..701cc278 100644 --- a/Examples/Tutorial/UserInterface/30RotatedComponent.cpp +++ b/Examples/Tutorial/UserInterface/30RotatedComponent.cpp @@ -163,12 +163,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -272,17 +272,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -388,7 +388,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/31ProgressBar.cpp b/Examples/Tutorial/UserInterface/31ProgressBar.cpp index 43be1403..989cdb54 100644 --- a/Examples/Tutorial/UserInterface/31ProgressBar.cpp +++ b/Examples/Tutorial/UserInterface/31ProgressBar.cpp @@ -236,12 +236,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -399,17 +399,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -492,7 +492,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/32Slider.cpp b/Examples/Tutorial/UserInterface/32Slider.cpp index 39d4596c..34ebce08 100644 --- a/Examples/Tutorial/UserInterface/32Slider.cpp +++ b/Examples/Tutorial/UserInterface/32Slider.cpp @@ -123,12 +123,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -226,17 +226,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -317,7 +317,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/33ComboBox.cpp b/Examples/Tutorial/UserInterface/33ComboBox.cpp index d8188f06..cd7a799c 100644 --- a/Examples/Tutorial/UserInterface/33ComboBox.cpp +++ b/Examples/Tutorial/UserInterface/33ComboBox.cpp @@ -117,12 +117,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -239,17 +239,17 @@ the ComboBoxes to be tied together. // Tell the manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr viewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr viewport = sceneManager->getWindow()->getPort(0); viewport->addForeground(foreground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -331,7 +331,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/34Tree.cpp b/Examples/Tutorial/UserInterface/34Tree.cpp index 394851ed..62d56564 100644 --- a/Examples/Tutorial/UserInterface/34Tree.cpp +++ b/Examples/Tutorial/UserInterface/34Tree.cpp @@ -194,12 +194,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -399,17 +399,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -494,7 +494,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/36SpringLayout.cpp b/Examples/Tutorial/UserInterface/36SpringLayout.cpp index 7211c8a4..7c128049 100644 --- a/Examples/Tutorial/UserInterface/36SpringLayout.cpp +++ b/Examples/Tutorial/UserInterface/36SpringLayout.cpp @@ -116,12 +116,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -274,17 +274,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -367,7 +367,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/37InternalWindow.cpp b/Examples/Tutorial/UserInterface/37InternalWindow.cpp index cc7a3066..e477ca14 100644 --- a/Examples/Tutorial/UserInterface/37InternalWindow.cpp +++ b/Examples/Tutorial/UserInterface/37InternalWindow.cpp @@ -115,12 +115,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -231,17 +231,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -326,7 +326,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/38DialogWindow.cpp b/Examples/Tutorial/UserInterface/38DialogWindow.cpp index 24bc80e5..efed2954 100644 --- a/Examples/Tutorial/UserInterface/38DialogWindow.cpp +++ b/Examples/Tutorial/UserInterface/38DialogWindow.cpp @@ -197,12 +197,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -328,17 +328,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -423,7 +423,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/39ColorChooser.cpp b/Examples/Tutorial/UserInterface/39ColorChooser.cpp index ea7ad0db..a9370905 100644 --- a/Examples/Tutorial/UserInterface/39ColorChooser.cpp +++ b/Examples/Tutorial/UserInterface/39ColorChooser.cpp @@ -116,12 +116,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyTyped, _1)); @@ -169,17 +169,17 @@ int main(int argc, char **argv) UIForegroundRecPtr TutorialUIForeground = UIForeground::create(); TutorialUIForeground->setDrawingSurface(TutorialDrawingSurface); - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -264,7 +264,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/40UndoableCommand.cpp b/Examples/Tutorial/UserInterface/40UndoableCommand.cpp index 7bdadfc2..4052f8d3 100644 --- a/Examples/Tutorial/UserInterface/40UndoableCommand.cpp +++ b/Examples/Tutorial/UserInterface/40UndoableCommand.cpp @@ -392,12 +392,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -573,17 +573,17 @@ int main(int argc, char **argv) TutorialUIForeground->setDrawingSurface(TutorialDrawingSurface); // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -668,7 +668,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/41GLViewportComponent.cpp b/Examples/Tutorial/UserInterface/41GLViewportComponent.cpp index 2bc6b3a9..dcff1ea0 100644 --- a/Examples/Tutorial/UserInterface/41GLViewportComponent.cpp +++ b/Examples/Tutorial/UserInterface/41GLViewportComponent.cpp @@ -119,12 +119,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -240,17 +240,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -334,7 +334,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/42FieldContainerComboBox.cpp b/Examples/Tutorial/UserInterface/42FieldContainerComboBox.cpp index f2dc1cd1..b201d651 100644 --- a/Examples/Tutorial/UserInterface/42FieldContainerComboBox.cpp +++ b/Examples/Tutorial/UserInterface/42FieldContainerComboBox.cpp @@ -119,12 +119,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -203,17 +203,17 @@ int main(int argc, char **argv) // Tell the manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr viewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr viewport = sceneManager->getWindow()->getPort(0); viewport->addForeground(foreground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -295,7 +295,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/43MenuButton.cpp b/Examples/Tutorial/UserInterface/43MenuButton.cpp index bf3ba22a..58ca162c 100644 --- a/Examples/Tutorial/UserInterface/43MenuButton.cpp +++ b/Examples/Tutorial/UserInterface/43MenuButton.cpp @@ -133,12 +133,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -245,17 +245,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -337,7 +337,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/44MFieldList.cpp b/Examples/Tutorial/UserInterface/44MFieldList.cpp index aa323996..ccebc4cd 100644 --- a/Examples/Tutorial/UserInterface/44MFieldList.cpp +++ b/Examples/Tutorial/UserInterface/44MFieldList.cpp @@ -172,12 +172,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -322,18 +322,18 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); TutorialViewport->setBackground(TheBackground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -416,7 +416,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/45ToolTips.cpp b/Examples/Tutorial/UserInterface/45ToolTips.cpp index 0dc4ffcf..558992c1 100644 --- a/Examples/Tutorial/UserInterface/45ToolTips.cpp +++ b/Examples/Tutorial/UserInterface/45ToolTips.cpp @@ -50,7 +50,7 @@ OSG_USING_NAMESPACE // Forward declaration so we can have the interesting stuff upfront void display(SimpleSceneManager *mgr); void reshape(Vec2f Size, SimpleSceneManager *mgr); -AnimationTransitPtr createFadeInAnimation(Component* CompToAnimate); +TBAnimationTransitPtr createFadeInAnimation(Component* CompToAnimate); //Ctrl+q handler void keyTyped(KeyEventDetails* const details) @@ -131,14 +131,14 @@ void handleToolTipDeactivated(ComponentEventDetails* const details) void handleFadeInToolTipActivated(ComponentEventDetails* const details, WindowEventProducer* const TutorialWindow, - Animation* const FadeInAnimation) + TBAnimation* const FadeInAnimation) { FadeInAnimation->attachUpdateProducer(TutorialWindow); FadeInAnimation->start(); } void handleFadeInToolTipDeactivated(ComponentEventDetails* const details, - Animation* const FadeInAnimation) + TBAnimation* const FadeInAnimation) { FadeInAnimation->stop(); } @@ -154,12 +154,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyTyped, _1)); @@ -214,7 +214,7 @@ int main(int argc, char **argv) FadeInButton->setToolTipText("Fade In ToolTip"); //Create the Fade in animation - AnimationRecPtr FadeInAnimation = + TBAnimationRecPtr FadeInAnimation = createFadeInAnimation(FadeInButton->getToolTip()); FadeInButton->connectToolTipActivated(boost::bind(handleFadeInToolTipActivated, @@ -254,17 +254,17 @@ int main(int argc, char **argv) TutorialUIForeground->setDrawingSurface(TutorialDrawingSurface); - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRefPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRefPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -299,7 +299,7 @@ void reshape(Vec2f Size, SimpleSceneManager *mgr) mgr->resize(Size.x(), Size.y()); } -AnimationTransitPtr createFadeInAnimation(Component* CompToAnimate) +TBAnimationTransitPtr createFadeInAnimation(Component* CompToAnimate) { //Number Keyframe Sequence KeyframeNumberSequenceRecPtr OpacityKeyframes = KeyframeNumberSequenceReal32::create(); @@ -313,11 +313,11 @@ AnimationTransitPtr createFadeInAnimation(Component* CompToAnimate) //Animation FieldAnimationRecPtr TheAnimation = FieldAnimation::create(); TheAnimation->setAnimator(TheAnimator); - TheAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + TheAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); TheAnimation->setCycling(1); TheAnimation->setAnimatedField(CompToAnimate, Component::OpacityFieldId); - return AnimationTransitPtr(TheAnimation); + return TBAnimationTransitPtr(TheAnimation); } @@ -371,7 +371,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/50OpenSGTypes.cpp b/Examples/Tutorial/UserInterface/50OpenSGTypes.cpp index ee468d26..864f268d 100644 --- a/Examples/Tutorial/UserInterface/50OpenSGTypes.cpp +++ b/Examples/Tutorial/UserInterface/50OpenSGTypes.cpp @@ -532,12 +532,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -597,17 +597,17 @@ int main(int argc, char **argv) // create the SimpleSceneManager helper // tell the manager what to manage - sceneManager.setRoot (scene); + sceneManager->setRoot (scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr viewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr viewport = sceneManager->getWindow()->getPort(0); viewport->addForeground(foreground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // show the whole scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -688,7 +688,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/51OpenSGFieldContainers.cpp b/Examples/Tutorial/UserInterface/51OpenSGFieldContainers.cpp index 76fe32a1..f8eceac8 100644 --- a/Examples/Tutorial/UserInterface/51OpenSGFieldContainers.cpp +++ b/Examples/Tutorial/UserInterface/51OpenSGFieldContainers.cpp @@ -408,12 +408,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -467,17 +467,17 @@ int main(int argc, char **argv) // create the SimpleSceneManager helper // tell the manager what to manage - sceneManager.setRoot (scene); + sceneManager->setRoot (scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr viewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr viewport = sceneManager->getWindow()->getPort(0); viewport->addForeground(foreground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // show the whole scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -558,7 +558,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/52SceneGraphTree.cpp b/Examples/Tutorial/UserInterface/52SceneGraphTree.cpp index 0f444d7d..9f2f5ac2 100644 --- a/Examples/Tutorial/UserInterface/52SceneGraphTree.cpp +++ b/Examples/Tutorial/UserInterface/52SceneGraphTree.cpp @@ -365,12 +365,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -513,7 +513,7 @@ int main(int argc, char **argv) NodeDetailPanel->pushToChildren(NodeTravMaskValueLabel); SelectionHandler TheTreeSelectionHandler(TheTree, - &sceneManager, + sceneManager, NodeNameValueLabel, NodeCoreTypeValueLabel, NodeMinValueLabel, @@ -553,17 +553,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(Root); + sceneManager->setRoot(Root); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -647,7 +647,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/53GUIFromXML.cpp b/Examples/Tutorial/UserInterface/53GUIFromXML.cpp index 542f8388..641f4cd7 100644 --- a/Examples/Tutorial/UserInterface/53GUIFromXML.cpp +++ b/Examples/Tutorial/UserInterface/53GUIFromXML.cpp @@ -102,12 +102,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -171,17 +171,17 @@ int main(int argc, char **argv) TutorialUIForeground->setDrawingSurface(TutorialDrawingSurface); - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window Vec2f WinSize(TutorialWindow->getDesktopSize() * 0.85f); @@ -265,7 +265,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/54FocusProgession.cpp b/Examples/Tutorial/UserInterface/54FocusProgession.cpp index cca5667b..9b350a5a 100644 --- a/Examples/Tutorial/UserInterface/54FocusProgession.cpp +++ b/Examples/Tutorial/UserInterface/54FocusProgession.cpp @@ -119,12 +119,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyTyped, _1)); @@ -207,17 +207,17 @@ int main(int argc, char **argv) TutorialUIForeground->setDrawingSurface(TutorialDrawingSurface); - sceneManager.setRoot(scene); + sceneManager->setRoot(scene); // Add the UI Foreground Object to the Scene - ViewportRefPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRefPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -304,7 +304,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/55ComponentTree.cpp b/Examples/Tutorial/UserInterface/55ComponentTree.cpp index bbe481c2..c2903806 100644 --- a/Examples/Tutorial/UserInterface/55ComponentTree.cpp +++ b/Examples/Tutorial/UserInterface/55ComponentTree.cpp @@ -25,7 +25,7 @@ #include "OSGFieldAnimation.h" // UserInterface Headers -#include "OSGUIForeground.h" +#include "OSGUIForeground.h"d #include "OSGInternalWindow.h" #include "OSGUIDrawingSurface.h" #include "OSGGraphics2D.h" @@ -387,12 +387,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -501,17 +501,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(Root); + sceneManager->setRoot(Root); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -596,7 +596,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/56FieldContainerTree.cpp b/Examples/Tutorial/UserInterface/56FieldContainerTree.cpp index 51c55748..fbccef4e 100644 --- a/Examples/Tutorial/UserInterface/56FieldContainerTree.cpp +++ b/Examples/Tutorial/UserInterface/56FieldContainerTree.cpp @@ -234,12 +234,12 @@ int main(int argc, char **argv) TutorialWindow->initWindow(); // Create the SimpleSceneManager helper - SimpleSceneManager sceneManager; - TutorialWindow->setDisplayCallback(boost::bind(display, &sceneManager)); - TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, &sceneManager)); + SimpleSceneManagerRefPtr sceneManager = SimpleSceneManager::create(); + TutorialWindow->setDisplayCallback(boost::bind(display, sceneManager)); + TutorialWindow->setReshapeCallback(boost::bind(reshape, _1, sceneManager)); // Tell the Manager what to manage - sceneManager.setWindow(TutorialWindow); + sceneManager->setWindow(TutorialWindow); TutorialWindow->connectKeyTyped(boost::bind(keyPressed, _1)); @@ -418,17 +418,17 @@ int main(int argc, char **argv) // Tell the Manager what to manage - sceneManager.setRoot(Root); + sceneManager->setRoot(Root); // Add the UI Foreground Object to the Scene - ViewportRecPtr TutorialViewport = sceneManager.getWindow()->getPort(0); + ViewportRecPtr TutorialViewport = sceneManager->getWindow()->getPort(0); TutorialViewport->addForeground(TutorialUIForeground); //Create the Documentation Foreground and add it to the viewport - SimpleScreenDoc TheSimpleScreenDoc(&sceneManager, TutorialWindow); + SimpleScreenDoc TheSimpleScreenDoc(sceneManager, TutorialWindow); // Show the whole Scene - sceneManager.showAll(); + sceneManager->showAll(); //Open Window @@ -513,7 +513,7 @@ SimpleScreenDoc::SimpleScreenDoc(SimpleSceneManager* SceneManager, //Animation _ShowDocFadeOutAnimation = FieldAnimation::create(); _ShowDocFadeOutAnimation->setAnimator(TheAnimator); - _ShowDocFadeOutAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + _ShowDocFadeOutAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); _ShowDocFadeOutAnimation->setCycling(1); _ShowDocFadeOutAnimation->setAnimatedField(_DocShowForeground, SimpleTextForeground::ColorFieldId); diff --git a/Examples/Tutorial/UserInterface/CMakeLists.fromosg.txt b/Examples/Tutorial/UserInterface/CMakeLists.fromosg.txt index f81a75a2..dcbae817 100644 --- a/Examples/Tutorial/UserInterface/CMakeLists.fromosg.txt +++ b/Examples/Tutorial/UserInterface/CMakeLists.fromosg.txt @@ -28,7 +28,8 @@ SET(OSG_COMPONENTS OSGBase OSGSystem OSGUtil OSGWindow - OSGTBFileIO + OSGTBFileIO + OSGTBAnimation OSGText OSGContribUserInterface ) diff --git a/Source/Base/Base/OSGDocumentationUtils.cpp b/Source/Base/Base/OSGDocumentationUtils.cpp deleted file mode 100644 index b74c1cd5..00000000 --- a/Source/Base/Base/OSGDocumentationUtils.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -#include "OSGDocumentationUtils.h" -#include - -using namespace boost::xpressive; - -OSG_BEGIN_NAMESPACE - -std::string doxygenToPlainFormatting(const std::string &Doc) -{ - std::string Result(Doc); - - //Remove all newlines that do not have another newline directly afterward - sregex SingleNewlineRegex = _ln >> (s1 = ~_ln); - std::string SingleNewlineReplace(" $1"); - - Result = regex_replace( Result, SingleNewlineRegex, SingleNewlineReplace ); - - //Generate a vector of tags that define internal sections - typedef std::pair StringPair; - typedef std::vector StringPairVector; - StringPairVector TagsToRemove; - TagsToRemove.push_back(std::pair("ext","endext")); - TagsToRemove.push_back(std::pair("dev","enddev")); - - //Remove the tagged sections from the string - for(StringPairVector::const_iterator Itor(TagsToRemove.begin()); - Itor != TagsToRemove.end() ; - ++Itor) - { - sregex RemoveRegex = as_xpr('\\') >> Itor->first >> -*_ >> '\\' >> Itor->second; - Result = regex_replace( Result, RemoveRegex, "" ); - } - - /*!\todo Replace some of the embedded html tags, like
*/ - /*!\todo Convert common doxygen tags*/ - - return Result; -} - -OSG_END_NAMESPACE - diff --git a/Source/Base/Base/OSGDocumentationUtils.h b/Source/Base/Base/OSGDocumentationUtils.h deleted file mode 100644 index e9b1f7ae..00000000 --- a/Source/Base/Base/OSGDocumentationUtils.h +++ /dev/null @@ -1,61 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ -#ifndef _OSGDOCUMENTATIONUTILS_H_ -#define _OSGDOCUMENTATIONUTILS_H_ - -#include "OSGConfig.h" -#include "OSGBaseDef.h" - -#include - -OSG_BEGIN_NAMESPACE - -/*!\fn std::string doxygenToPlainFormatting(const std::string &Doc) - * \brief Get a plain string formatting of a string using doxygen documentation - * - * \param[in] Doc The string using doxygen formatting - * - * \returns A plain string formatting - */ -std::string OSG_BASE_DLLMAPPING doxygenToPlainFormatting(const std::string &Doc); - -OSG_END_NAMESPACE - -#endif - - diff --git a/Source/Base/Base/OSGPathUtils.cpp b/Source/Base/Base/OSGPathUtils.cpp deleted file mode 100644 index 7c2e2b17..00000000 --- a/Source/Base/Base/OSGPathUtils.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ - -#include "OSGPathUtils.h" -#include - -OSG_BEGIN_NAMESPACE - -BoostPath makeRelative(const BoostPath& Root, const BoostPath& ToPath) -{ - BoostPath RootComplete(boost::filesystem::system_complete(Root)); - - BoostPath ToPathComplete(boost::filesystem::system_complete(ToPath)); - - BoostPath Result; - boost::filesystem::path::iterator RootIter = RootComplete.begin(); - boost::filesystem::path::iterator ToPathIter = ToPathComplete.begin(); - - while(RootIter != RootComplete.end() && - ToPathIter != ToPathComplete.end() && - RootIter->compare(*ToPathIter) == 0) - { - ++RootIter; - ++ToPathIter; - } - - while(ToPathIter != ToPathComplete.end()) - { - if(Result.empty()) - { - Result = *ToPathIter; - } - else - { - Result = Result / *ToPathIter; - } - ++ToPathIter; - } - - if(RootIter != RootComplete.end()) - { - ++RootIter; - } - while(RootIter != RootComplete.end()) - { - Result = BoostPath("..") / Result; - ++RootIter; - } - - - return Result; -} - -OSG_END_NAMESPACE - diff --git a/Source/Base/Base/OSGPathUtils.h b/Source/Base/Base/OSGPathUtils.h deleted file mode 100644 index 15a1bc5b..00000000 --- a/Source/Base/Base/OSGPathUtils.h +++ /dev/null @@ -1,55 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ -#ifndef _OPENSG_PATH_UTILS_H_ -#define _OPENSG_PATH_UTILS_H_ - -#include "OSGConfig.h" -#include "OSGBaseDef.h" -#include "OSGPathType.h" - -OSG_BEGIN_NAMESPACE - -BoostPath OSG_BASE_DLLMAPPING makeRelative(const BoostPath& Root, - const BoostPath& ToPath); - -OSG_END_NAMESPACE - -#endif - - - diff --git a/Source/Base/Base/OSGStringUtils.cpp b/Source/Base/Base/OSGStringUtils.cpp deleted file mode 100644 index 7cd4f815..00000000 --- a/Source/Base/Base/OSGStringUtils.cpp +++ /dev/null @@ -1,276 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -#include "OSGStringUtils.h" -#include "OSGBaseTypes.h" -#include "OSGNameAttachment.h" -#include "OSGAttachmentContainer.h" -#include "OSGNode.h" -#include "OSGGLDefineMapper.h" -#include "OSGPathType.h" - -OSG_BEGIN_NAMESPACE - -void getLine(const std::string& Text, UInt32 TextPos, Int32& LineNumber, Int32& LineStartPos) -{ - std::istringstream InStream(Text); - - std::string Line; - LineNumber = 1; - LineStartPos = 0; - while(std::getline(InStream, Line) && TextPos > LineStartPos+Line.size()) - { - LineStartPos += Line.size() + 1; - ++LineNumber; - } -} - -std::string addStringBetweenUpperCaseChange(const std::string& Source, const std::string& Pad) -{ - std::string Result(Source); - - for (UInt32 i(0); i < Result.size() - 2; ++i) - { - if ((97 <= Result[i] && Result[i] <= 122) && (65 <= Result[i + 1] && Result[i + 1] <= 90)) - { - Result.insert(i+1, Pad); - } - } - - return Result; -} - -std::string lexical_cast(const boost::any& Source) -{ - if(Source.type() == typeid(std::string)) //String - { - return boost::any_cast(Source); - } - else if(Source.type() == typeid(Char8*)) //Char8 * - { - return std::string(boost::any_cast(Source)); - } - //Numbers - else if(Source.type() == typeid(UInt8)) //UInt8 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(UInt16)) //UInt16 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(UInt32)) //UInt32 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(UInt64)) //UInt64 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(Int8)) //Int8 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(Int16)) //Int16 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(Int32)) //Int32 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(Int64)) //Int64 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(Real16)) //Real16 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(Real32)) //Real32 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(Real64)) //Real64 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(Real128)) //Real128 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(Fixed32)) //Fixed32 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - - else if(Source.type() == typeid(Char8)) //Char8 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(UChar8)) //UChar8 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - else if(Source.type() == typeid(SChar8)) //SChar8 - { - return boost::lexical_cast(boost::any_cast(Source)); - } - - else if(Source.type() == typeid(GLenum)) //GLenum - { - return GLDefineMapper::the()->toString(boost::any_cast(Source)); - } - - else if(Source.type() == typeid(BoostPath)) //File Path - { - return boost::any_cast(Source).filename(); - } - - else if(Source.type() == typeid(FieldContainerType*)) //FieldContainerType - { - return std::string(boost::any_cast(Source)->getCName()); - } - - else - { - try - { - AttachmentContainerUnrecPtr Container = boost::any_cast(Source); - - if(Container != NULL) - { - const Char8 * ContainerName(getName(Container)); - if(ContainerName != NULL) - { - return std::string(ContainerName); - } - else - { - return std::string("Empty Name"); - } - } - } - catch(boost::bad_any_cast &) - { - } - throw boost::bad_lexical_cast(Source.type(), typeid(std::string)); - } - return std::string(""); -} - -bool isAlphabetChar(UChar8 c) -{ - if(c >= 65 && c <= 90 || c >= 97 && c <= 122) - { - return true; - } - return false; -} - -bool isNumericChar(UChar8 c) -{ - if(c >= 48 && c <= 57) - { - return true; - } - return false; -} - -bool isWordChar(UChar8 c) -{ - if(isAlphabetChar(c) || - isNumericChar(c) || - c == '_') - { - return true; - } - return false; -} - -bool isPunctuationChar(UChar8 c) -{ - switch(c) - { - case '!': - case '~': - case '`': - case '@': - case '#': - case '$': - case '%': - case '^': - case '&': - case '*': - case '(': - case ')': - case '-': - case '_': - case '+': - case '=': - case ':': - case ';': - case '\"': - case '\'': - case '[': - case '{': - case ']': - case '}': - case '|': - case '\\': - case '<': - case '>': - case '.': - case '/': - case ',': - case '?': - return true; - - } - return false; -} - -bool isWhitespaceChar(UChar8 c) -{ - switch(c) - { - case ' ': - case '\t': - case '\n': - return true; - } - return false; -} - -bool isPrintableChar(UChar8 c) -{ - return (isAlphabetChar(c) || - isNumericChar(c) || - isPunctuationChar(c)); -} - -OSG_END_NAMESPACE - diff --git a/Source/Base/Base/OSGStringUtils.h b/Source/Base/Base/OSGStringUtils.h deleted file mode 100644 index 924d937e..00000000 --- a/Source/Base/Base/OSGStringUtils.h +++ /dev/null @@ -1,57 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -#ifndef _OPENSG_TOOLBOX_STRING_UTILS_H_ -#define _OPENSG_TOOLBOX_STRING_UTILS_H_ - -#include "OSGConfig.h" -#include "OSGBaseDef.h" -#include "OSGBaseTypes.h" - -#include -#include -#include - -OSG_BEGIN_NAMESPACE - -std::string OSG_BASE_DLLMAPPING addStringBetweenUpperCaseChange(const std::string& Source, const std::string& Pad); - -std::string OSG_BASE_DLLMAPPING lexical_cast(const boost::any& Source); - -void OSG_BASE_DLLMAPPING getLine(const std::string& Text, UInt32 TextPos, Int32& LineNumber, Int32& LineStartPos); - -bool OSG_BASE_DLLMAPPING isPrintableChar(UChar8 c); -bool OSG_BASE_DLLMAPPING isAlphabetChar(UChar8 c); -bool OSG_BASE_DLLMAPPING isNumericChar(UChar8 c); -bool OSG_BASE_DLLMAPPING isWordChar(UChar8 c); -bool OSG_BASE_DLLMAPPING isPunctuationChar(UChar8 c); -bool OSG_BASE_DLLMAPPING isWhitespaceChar(UChar8 c); - -OSG_END_NAMESPACE - -#endif - - diff --git a/Source/Base/Event/Producers/OSGEventProducerFactory.cpp b/Source/Base/Event/Producers/OSGEventProducerFactory.cpp index d76e77ad..3e68dc14 100644 --- a/Source/Base/Event/Producers/OSGEventProducerFactory.cpp +++ b/Source/Base/Event/Producers/OSGEventProducerFactory.cpp @@ -35,6 +35,9 @@ * * * * \*---------------------------------------------------------------------------*/ +#define OSG_COMPILE_EVENTPRODUCERFACTORY + +#include "OSGConfig.h" #include "OSGEventProducerFactory.h" @@ -47,16 +50,18 @@ #include #include -OSG_BEGIN_NAMESPACE //--------------------------------------------------------------------------- // Class //--------------------------------------------------------------------------- +OSG_BEGIN_NAMESPACE + OSG_SINGLETON_INST(EventProducerFactoryBase, addPostFactoryExitFunction) template class SingletonHolder; + /***************************************************************************\ * Types * \***************************************************************************/ diff --git a/Source/Base/Event/Producers/OSGEventProducerFactory.h b/Source/Base/Event/Producers/OSGEventProducerFactory.h index 31527eb1..9c960783 100644 --- a/Source/Base/Event/Producers/OSGEventProducerFactory.h +++ b/Source/Base/Event/Producers/OSGEventProducerFactory.h @@ -227,8 +227,8 @@ class OSG_BASE_DLLMAPPING EventProducerFactoryBase : public FactoryBase #if defined(WIN32) # if !defined(OSG_COMPILE_TYPEFACTORY) -//OSG_BASE_EXPIMP_TMPL -//template class OSG_BASE_DLLMAPPING SingletonHolder; +OSG_BASE_EXPIMP_TMPL +template class OSG_BASE_DLLMAPPING SingletonHolder; # endif #endif diff --git a/Source/Base/Event/Producers/OSGEventProducerUtils.cpp b/Source/Base/Event/Producers/OSGEventProducerUtils.cpp index 1ae0c95d..9a434c1e 100644 --- a/Source/Base/Event/Producers/OSGEventProducerUtils.cpp +++ b/Source/Base/Event/Producers/OSGEventProducerUtils.cpp @@ -48,10 +48,10 @@ #include "OSGEventProducerUtils.h" #include -#include "OSGContainerUtils.h" #include "OSGContainerPtrFuncs.h" #include "OSGActivity.h" #include "OSGEventDescription.h" +#include "OSGFieldContainerUtils.h" OSG_BEGIN_NAMESPACE @@ -63,6 +63,7 @@ void putEventProducerToStream(OutStream &outVal, const ReflexiveContainer& conta { bool isFirstItemWritten(true); //Loop through all of the Produced Event Ids +#if 0 for(UInt32 ProdEventId(1) ; ProdEventId <= container.getNumEvents() ; ++ProdEventId) { //Loop through all activies attached to this Event @@ -89,6 +90,7 @@ void putEventProducerToStream(OutStream &outVal, const ReflexiveContainer& conta } }*/ } +#endif } bool getEventProducerFromCString(const Char8 *&inVal, ReflexiveContainer& container) diff --git a/Source/Base/Field/OSGBoostPathFields.h b/Source/Base/Field/OSGBoostPathFields.h deleted file mode 100644 index 38a11286..00000000 --- a/Source/Base/Field/OSGBoostPathFields.h +++ /dev/null @@ -1,45 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2003 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/* - This is a dummy header to allow automatic inference from the type to the - field type header. -*/ - -#include "OSGPathType.h" - diff --git a/Source/Base/Field/OSGInt32ToStringMapFields.h b/Source/Base/Field/OSGInt32ToStringMapFields.h deleted file mode 100644 index 8da7359c..00000000 --- a/Source/Base/Field/OSGInt32ToStringMapFields.h +++ /dev/null @@ -1,45 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2003 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/* - This is a dummy header to allow automatic inference from the type to the - field type header. -*/ - -#include "OSGInt32ToStringMapType.h" - diff --git a/Source/Base/Field/OSGInt32ToStringMapType.cpp b/Source/Base/Field/OSGInt32ToStringMapType.cpp deleted file mode 100644 index 048e89b1..00000000 --- a/Source/Base/Field/OSGInt32ToStringMapType.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ - -// Source file for new Field type - -// This define is only set in this source file. It switches the -// Windows-specific declarations in the header for compiling the Field, -// not for using it. -#define OSG_COMPILEINT32TOSTRINGMAPTYPEINST - -// You need this in every OpenSG file -#include "OSGInt32ToStringMapType.h" - -#include "OSGSField.ins" -#include "OSGMField.ins" - -// The new field type include -#include "OSGFieldContainer.h" -#include "OSGFieldType.h" -#include "OSGBaseFieldTraits.h" -#include "OSGDataType.h" - -OSG_BEGIN_NAMESPACE - -// This is where the DataType for the new Fieldtype is defined. -// The parameters are the name of the type and the name of the parent type -DataType FieldTraits::_type("Int32ToStringMap", "BaseType"); - -// These macros instantiate the necessary template methods for the fields -OSG_FIELDTRAITS_GETTYPE ( Int32ToStringMap) -OSG_FIELD_DLLEXPORT_DEF1(SField, Int32ToStringMap) -OSG_FIELD_DLLEXPORT_DEF1(MField, Int32ToStringMap) - -// Output inVal into outVal -// the exact mapping doesn't matter, -// Our recommendation is to output as a string, -// i.e. start and stop with ", as this simplifies integration into the -// OSG Loader. -void FieldTraits::putToStream(const Int32ToStringMap &inVal, - OutStream &outVal) -{ - //Put the Size of the map - FieldTraits::putToStream(static_cast(inVal.size()),outVal); - - //Loop through all of the map elelments - Int32ToStringMap::const_iterator Itor(inVal.begin()); - for(; Itor != inVal.end(); ++Itor) - { - outVal << ","; - FieldTraits::putToStream( Itor->first,outVal ); - - outVal << ","; - FieldTraits::putToStream( Itor->second,outVal ); - } -} - -// Setup outVal from the contents of inVal -// For complicated classes it makes sense to implement this function -// as a class method and just call that from here -bool FieldTraits::getFromCString( Int32ToStringMap &outVal, - const Char8 *&inVal) -{ - //Get Size of the map - UInt32 Size(0); - if(sscanf(inVal,"%d", &Size) != 1) - { - return false; - } - - outVal.clear(); - - //Loop through all of the map elelments - const Char8 *curInString(inVal); - - Int32 Key; - std::string Value; - for(UInt32 i(0) ; i::getFromCString(Key, curInString ); - - //Move past the ; seperator - curInString = strchr(curInString, ','); - ++curInString; - if(curInString == NULL) - { - return false; - } - - //Move past the ; seperator - curInString = strchr(curInString, '\"'); - ++curInString; - if(curInString == NULL) - { - return false; - } - //Get the map value - - Value.assign(curInString, (strchr(curInString, '\"') - curInString)); - - //Move past the map value - curInString = strchr(curInString, '\"'); - ++curInString; - //if(curInString == NULL) - //{ - // return false; - //} - - //Add the Key/Value pair - outVal[Key] = Value; - } - - return true; -} - -// Binary conversion - -// Return the size of the binary version in byte -// There are two versions of this function, one for a single object, -// one for an array of objects -UInt32 FieldTraits::getBinSize(const Int32ToStringMap & obj) -{ - //Size: - //Size of a Int32 -> number of items in the Map - //Sum of all the sizes of the strings - UInt32 StringSizeSum(0); - Int32ToStringMap::const_iterator Itor(obj.begin()); - for( ; Itor != obj.end() ; ++Itor) - { - StringSizeSum += FieldTraits::getBinSize(Itor->second); - } - - return sizeof(UInt32) + obj.size()*sizeof(Int32) + StringSizeSum; -} - -UInt32 FieldTraits::getBinSize (const Int32ToStringMap *obj, UInt32 num) -{ - //Size: - //Sum of all the objs - UInt32 SizeSum(0); - for(UInt32 i = 0; i < num; ++i) - { - SizeSum += getBinSize(obj[i]); - } - return SizeSum; -} - -// Copy the object into the BinaryDataHandler -// the BDH has a number of methods to add a simple type to the stream -// just use those and use the same order to read them back in. -// Again there are two versions, one for a single object, one for an -// array of objects -void FieldTraits::copyToBin( BinaryDataHandler &bdh, - const Int32ToStringMap &obj) -{ - //Number of items in the map - bdh.putValue(static_cast(obj.size())); - - //Loop through all of the map elelments - Int32ToStringMap::const_iterator Itor(obj.begin()); - for(; Itor != obj.end(); ++Itor) - { - bdh.putValue(static_cast(Itor->first)); - - bdh.putValue(static_cast(Itor->second)); - } -} - -void FieldTraits::copyToBin( BinaryDataHandler &bdh, - const Int32ToStringMap *objs, - UInt32 num) -{ - for(UInt32 i = 0; i < num; ++i) - { - copyToBin(bdh, objs[i]); - } -} - - -// Copy the object from the BinaryDataHandler -// the BDH has a number of methods to get a simple type from the stream -// just use those and use the same order you used to write them out. -// Again there are two versions, one for a single object, one for an -// array of objects -void FieldTraits::copyFromBin(BinaryDataHandler &bdh, - Int32ToStringMap &obj) -{ - //Number of items in the list - UInt32 Size(0); - bdh.getValue(Size); - - obj.clear(); - - - Int32 Key; - std::string Value; - - //Loop through all of the map elelments - for(UInt32 i(0) ; i::copyFromBin( bdh, Value ); - - obj[Key] = Value; - } -} -void FieldTraits::copyFromBin(BinaryDataHandler &bdh, - Int32ToStringMap *objs, - UInt32 num) -{ - for(UInt32 i = 0; i < num; ++i) - { - copyFromBin(bdh, objs[i]); - } -} - -OSG_END_NAMESPACE - diff --git a/Source/Base/Field/OSGInt32ToStringMapType.h b/Source/Base/Field/OSGInt32ToStringMapType.h deleted file mode 100644 index af66cb0c..00000000 --- a/Source/Base/Field/OSGInt32ToStringMapType.h +++ /dev/null @@ -1,132 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -#ifndef _OSG_INT32_TO_STRING_MAP_TYPE_H_ -#define _OSG_INT32_TO_STRING_MAP_TYPE_H_ -#ifdef __sgi -#pragma once -#endif - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include "OSGBaseDef.h" -#include "OSGBaseTypes.h" -#include "OSGFieldTraits.h" -#include "OSGSField.h" -#include "OSGMField.h" - -#include -#include - -OSG_BEGIN_NAMESPACE - -typedef std::map Int32ToStringMap; - -// The FieldDataTraits class contains the methods needed to implement -// the features a Field data element needs to have - -template <> -struct FieldTraits : public FieldTraitsTemplateBase -{ - // Static DataType descriptor, see OSGNewFieldType.cpp for implementation - static DataType _type; - - typedef FieldTraits Self; - - // Define whether string conversions are available. It is strongly - // recommended to implement both. - enum { Convertible = (Self::ToStreamConvertible | - Self::FromStringConvertible) }; - - // access method for the DataType - static OSG_BASE_DLLMAPPING DataType &getType (void); - - // Access to the names of the actual Fields - static const Char8 *getSName (void) { return "SFInt32ToStringMap"; } - static const Char8 *getMName (void) { return "MFInt32ToStringMap"; } - - // Create a default instance of the class, needed for Field creation - static Int32ToStringMap getDefault (void) { return Int32ToStringMap(); } - - - // String conversion - - // Output inVal into outVal - static OSG_BASE_DLLMAPPING void putToStream(const Int32ToStringMap &inVal, - OutStream &outVal); - - // Setup outVal from the contents of inVal - static OSG_BASE_DLLMAPPING bool getFromCString( Int32ToStringMap &outVal, - const Char8 *&inVal); - - // Binary conversion - - // Return the size of the binary version in byte - static OSG_BASE_DLLMAPPING UInt32 getBinSize(const Int32ToStringMap & obj); - - static OSG_BASE_DLLMAPPING UInt32 getBinSize (const Int32ToStringMap *obj, UInt32 num); - - // Copy the object into the BinaryDataHandler - static OSG_BASE_DLLMAPPING void copyToBin( BinaryDataHandler &bdh, - const Int32ToStringMap &obj); - - static OSG_BASE_DLLMAPPING void copyToBin( BinaryDataHandler &bdh, - const Int32ToStringMap *objs, - UInt32 num); - - - // Copy the object from the BinaryDataHandler - static OSG_BASE_DLLMAPPING void copyFromBin(BinaryDataHandler &bdh, - Int32ToStringMap &obj); - static OSG_BASE_DLLMAPPING void copyFromBin(BinaryDataHandler &bdh, - Int32ToStringMap *objs, - UInt32 num); -}; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -// Here the actual Field types are declared -// You don't always have to have both, either is fine - -typedef SField SFInt32ToStringMap; -typedef MField MFInt32ToStringMap; - -#else // these are the doxygen hacks - -/*! \ingroup GrpBaseFieldSingle \ingroup GrpLibOSGBase */ -struct SFInt32ToStringMap : public SField {}; -struct MFInt32ToStringMap : public MField {}; - -#endif // these are the doxygen hacks - - -OSG_END_NAMESPACE - -#endif /* _OSG_TOOLBOX_STRING_MAP_TYPE_H_ */ - - diff --git a/Source/Base/Field/OSGPathFields.h b/Source/Base/Field/OSGPathFields.h deleted file mode 100644 index 38a11286..00000000 --- a/Source/Base/Field/OSGPathFields.h +++ /dev/null @@ -1,45 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2003 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/* - This is a dummy header to allow automatic inference from the type to the - field type header. -*/ - -#include "OSGPathType.h" - diff --git a/Source/Base/Field/OSGPathType.cpp b/Source/Base/Field/OSGPathType.cpp deleted file mode 100644 index c57bbe00..00000000 --- a/Source/Base/Field/OSGPathType.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ - -// Source file for new Field type - -// This define is only set in this source file. It switches the -// Windows-specific declarations in the header for compiling the Field, -// not for using it. -#define OSG_COMPILEPATHTYPEINST - -// You need this in every OpenSG file -#include "OSGPathType.h" -#include "OSGSField.ins" -#include "OSGMField.ins" - -// The new field type include -#include "OSGFieldContainer.h" -#include "OSGFieldType.h" -#include "OSGBaseFieldTraits.h" -#include "OSGDataType.h" - -OSG_BEGIN_NAMESPACE - -// This is where the DataType for the new Fieldtype is defined. -// The parameters are the name of the type and the name of the parent type -DataType FieldTraits::_type("Path", "BaseType"); - -// These macros instantiate the necessary template methods for the fields -OSG_FIELDTRAITS_GETTYPE ( BoostPath) -OSG_FIELD_DLLEXPORT_DEF1(SField, BoostPath) -OSG_FIELD_DLLEXPORT_DEF1(MField, BoostPath) - -// Output inVal into outVal -// the exact mapping doesn't matter, -// Our recommendation is to output as a string, -// i.e. start and stop with ", as this simplifies integration into the -// OSG Loader. -void FieldTraits::putToStream(const BoostPath &inVal, - OutStream &outVal) -{ - outVal << inVal.string(); -} - -// Setup outVal from the contents of inVal -// For complicated classes it makes sense to implement this function -// as a class method and just call that from here -bool FieldTraits::getFromCString( BoostPath &outVal, - const Char8 *&inVal) -{ - std::string PathString(""); - if( FieldTraits::getFromCString(PathString, inVal) ) - { - try - { - outVal = PathString; - return true; - } - catch(boost::filesystem::filesystem_error& error) - { - SWARNING << - "ERROR in creating file path from string:" << error.what() << - std::endl; - return false; - } - } - else - { - return false; - } - -} - -// Binary conversion - -// Return the size of the binary version in byte -// There are two versions of this function, one for a single object, -// one for an array of objects -UInt32 FieldTraits::getBinSize(const BoostPath & obj) -{ - return FieldTraits::getBinSize(obj.string()); -} - -UInt32 FieldTraits::getBinSize (const BoostPath *obj, UInt32 num) -{ - //Size: - //Sum of all the objs - UInt32 SizeSum(0); - for(UInt32 i = 0; i < num; ++i) - { - SizeSum += FieldTraits::getBinSize(obj[i].string()); - } - return SizeSum; -} - -// Copy the object into the BinaryDataHandler -// the BDH has a number of methods to add a simple type to the stream -// just use those and use the same order to read them back in. -// Again there are two versions, one for a single object, one for an -// array of objects -void FieldTraits::copyToBin( BinaryDataHandler &bdh, - const BoostPath &obj) -{ - FieldTraits::copyToBin(bdh, obj.string()); -} - -void FieldTraits::copyToBin( BinaryDataHandler &bdh, - const BoostPath *objs, - UInt32 num) -{ - for(UInt32 i = 0; i < num; ++i) - { - copyToBin(bdh, objs[i]); - } -} - - -// Copy the object from the BinaryDataHandler -// the BDH has a number of methods to get a simple type from the stream -// just use those and use the same order you used to write them out. -// Again there are two versions, one for a single object, one for an -// array of objects -void FieldTraits::copyFromBin(BinaryDataHandler &bdh, - BoostPath &obj) -{ - std::string PathString(""); - FieldTraits::copyFromBin(bdh, PathString); - try - { - obj = PathString; - } - catch(boost::filesystem::filesystem_error& error) - { - SWARNING << - "ERROR in creating file path from binary:" << error.what() << - std::endl; - } -} -void FieldTraits::copyFromBin(BinaryDataHandler &bdh, - BoostPath *objs, - UInt32 num) -{ - for(UInt32 i = 0; i < num; ++i) - { - copyFromBin(bdh, objs[i]); - } -} - -OSG_END_NAMESPACE - - diff --git a/Source/Base/Field/OSGPathType.h b/Source/Base/Field/OSGPathType.h deleted file mode 100644 index b001fc7a..00000000 --- a/Source/Base/Field/OSGPathType.h +++ /dev/null @@ -1,137 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG Toolbox Toolbox * - * * - * * - * * - * * - * www.vrac.iastate.edu * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -#ifndef _OSG_PATH_TYPE_H_ -#define _OSG_PATH_TYPE_H_ -#ifdef __sgi -#pragma once -#endif - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include "OSGBaseDef.h" -#include "OSGBaseTypes.h" -#include "OSGFieldTraits.h" -#include "OSGSField.h" -#include "OSGMField.h" - -#include -#include - -OSG_BEGIN_NAMESPACE - -typedef boost::filesystem::path BoostPath; - -// The FieldDataTraits class contains the methods needed to implement -// the features a Field data element needs to have - - -template <> -struct FieldTraits : public FieldTraitsTemplateBase -{ - // Static DataType descriptor, see OSGNewFieldType.cpp for implementation - static DataType _type; - - typedef FieldTraits Self; - - // Define whether string conversions are available. It is strongly - // recommended to implement both. - enum { Convertible = (Self::ToStreamConvertible | - Self::FromStringConvertible) }; - - // access method for the DataType - static OSG_BASE_DLLMAPPING DataType &getType (void); - - // Access to the names of the actual Fields - static const Char8 *getSName (void) { return "SFBoostPath"; } - static const Char8 *getMName (void) { return "MFBoostPath"; } - - // Create a default instance of the class, needed for Field creation - static BoostPath getDefault (void) { return BoostPath(); } - - - - // This is where it gets interesting: the conversion functions - - // String conversion - - // Output inVal into outVal - static OSG_BASE_DLLMAPPING void putToStream(const BoostPath &inVal, - OutStream &outVal); - - // Setup outVal from the contents of inVal - static OSG_BASE_DLLMAPPING bool getFromCString( BoostPath &outVal, - const Char8 *&inVal); - - // Binary conversion - - // Return the size of the binary version in byte - static OSG_BASE_DLLMAPPING UInt32 getBinSize(const BoostPath & obj); - - static OSG_BASE_DLLMAPPING UInt32 getBinSize (const BoostPath *obj, UInt32 num); - - // Copy the object into the BinaryDataHandler - static OSG_BASE_DLLMAPPING void copyToBin( BinaryDataHandler &bdh, - const BoostPath &obj); - - static OSG_BASE_DLLMAPPING void copyToBin( BinaryDataHandler &bdh, - const BoostPath *objs, - UInt32 num); - - - // Copy the object from the BinaryDataHandler - static OSG_BASE_DLLMAPPING void copyFromBin(BinaryDataHandler &bdh, - BoostPath &obj); - static OSG_BASE_DLLMAPPING void copyFromBin(BinaryDataHandler &bdh, - BoostPath *objs, - UInt32 num); -}; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -// Here the actual Field types are declared -// You don't always have to have both, either is fine - -typedef SField SFBoostPath; -typedef MField MFBoostPath; - -#else // these are the doxygen hacks - -/*! \ingroup GrpBaseFieldSingle \ingroup GrpLibOSGBase */ -struct SFBoostPath : public SField {}; -struct MFBoostPath : public MField {}; - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSG_PATH_TYPE_H_ */ - - diff --git a/Source/Base/Field/OSGStringToUInt32MapFields.h b/Source/Base/Field/OSGStringToUInt32MapFields.h deleted file mode 100644 index 9da38808..00000000 --- a/Source/Base/Field/OSGStringToUInt32MapFields.h +++ /dev/null @@ -1,45 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2003 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/* - This is a dummy header to allow automatic inference from the type to the - field type header. -*/ - -#include "OSGStringToUInt32MapType.h" - diff --git a/Source/Base/Field/OSGStringToUInt32MapType.cpp b/Source/Base/Field/OSGStringToUInt32MapType.cpp deleted file mode 100644 index f2fd6faa..00000000 --- a/Source/Base/Field/OSGStringToUInt32MapType.cpp +++ /dev/null @@ -1,238 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ - -// Source file for new Field type - -// This define is only set in this source file. It switches the -// Windows-specific declarations in the header for compiling the Field, -// not for using it. -#define OSG_COMPILESTRINGTOUINT32MAPTYPEINST - -#include "OSGStringToUInt32MapType.h" - -#include "OSGSField.ins" -#include "OSGMField.ins" - -#include "OSGFieldContainer.h" -#include "OSGFieldType.h" -#include "OSGBaseFieldTraits.h" -#include "OSGDataType.h" - -OSG_BEGIN_NAMESPACE - -// This is where the DataType for the new Fieldtype is defined. -// The parameters are the name of the type and the name of the parent type -DataType FieldTraits::_type("StringToUInt32Map", "BaseType"); - -// These macros instantiate the necessary template methods for the fields -OSG_FIELDTRAITS_GETTYPE ( StringToUInt32Map) -OSG_FIELD_DLLEXPORT_DEF1(SField, StringToUInt32Map) -OSG_FIELD_DLLEXPORT_DEF1(MField, StringToUInt32Map) - -void FieldTraits::putToStream(const StringToUInt32Map &inVal, - OutStream &outVal) -{ - //Put the Size of the map - FieldTraits::putToStream(static_cast(inVal.size()),outVal); - - //Loop through all of the map elelments - StringToUInt32Map::const_iterator Itor(inVal.begin()); - for(; Itor != inVal.end(); ++Itor) - { - outVal << "," << Itor->first << ","; - FieldTraits::putToStream( Itor->second,outVal ); - } -} - -// Setup outVal from the contents of inVal -// For complicated classes it makes sense to implement this function -// as a class method and just call that from here -bool FieldTraits::getFromCString( StringToUInt32Map &outVal, - const Char8 *&inVal) -{ - //Get Size of the map - UInt32 Size(0); - if(sscanf(inVal,"%d", &Size) != 1) - { - return false; - } - - outVal.clear(); - - //Loop through all of the map elelments - const Char8 *curInString(inVal); - - std::string Key; - UInt32 Value; - for(UInt32 i(0) ; i::getFromCString(Value, curInString ); - - //Add the Key/Value pair - outVal[Key] = Value; - } - - return true; -} - -// Binary conversion - -// Return the size of the binary version in byte -// There are two versions of this function, one for a single object, -// one for an array of objects -UInt32 FieldTraits::getBinSize(const StringToUInt32Map & obj) -{ - //Size: - //Size of a UInt32 -> number of items in the Map - //Sum of all the sizes of the strings - UInt32 StringSizeSum(0); - StringToUInt32Map::const_iterator Itor(obj.begin()); - for( ; Itor != obj.end() ; ++Itor) - { - StringSizeSum += FieldTraits::getBinSize(Itor->first); - } - - return sizeof(UInt32) + obj.size()*sizeof(UInt32) + StringSizeSum; -} - -UInt32 FieldTraits::getBinSize (const StringToUInt32Map *obj, UInt32 num) -{ - //Size: - //Sum of all the objs - UInt32 SizeSum(0); - for(UInt32 i = 0; i < num; ++i) - { - SizeSum += getBinSize(obj[i]); - } - return SizeSum; -} - -// Copy the object into the BinaryDataHandler -// the BDH has a number of methods to add a simple type to the stream -// just use those and use the same order to read them back in. -// Again there are two versions, one for a single object, one for an -// array of objects -void FieldTraits::copyToBin( BinaryDataHandler &bdh, - const StringToUInt32Map &obj) -{ - //Number of items in the map - bdh.putValue(static_cast(obj.size())); - - //Loop through all of the map elelments - StringToUInt32Map::const_iterator Itor(obj.begin()); - for(; Itor != obj.end(); ++Itor) - { - bdh.putValue(static_cast(Itor->first)); - - bdh.putValue(static_cast(Itor->second)); - } -} - -void FieldTraits::copyToBin( BinaryDataHandler &bdh, - const StringToUInt32Map *objs, - UInt32 num) -{ - for(UInt32 i = 0; i < num; ++i) - { - copyToBin(bdh, objs[i]); - } -} - - -// Copy the object from the BinaryDataHandler -// the BDH has a number of methods to get a simple type from the stream -// just use those and use the same order you used to write them out. -// Again there are two versions, one for a single object, one for an -// array of objects -void FieldTraits::copyFromBin(BinaryDataHandler &bdh, - StringToUInt32Map &obj) -{ - //Number of items in the list - UInt32 Size(0); - bdh.getValue(Size); - - obj.clear(); - - - std::string Key; - UInt32 Value; - - //Loop through all of the map elelments - for(UInt32 i(0) ; i::copyFromBin( bdh, Key ); - bdh.getValue(Value); - - obj[Key] = Value; - } -} - -void FieldTraits::copyFromBin(BinaryDataHandler &bdh, - StringToUInt32Map *objs, - UInt32 num) -{ - for(UInt32 i = 0; i < num; ++i) - { - copyFromBin(bdh, objs[i]); - } -} - -OSG_END_NAMESPACE - diff --git a/Source/Base/Field/OSGStringToUInt32MapType.h b/Source/Base/Field/OSGStringToUInt32MapType.h deleted file mode 100644 index ac9c3024..00000000 --- a/Source/Base/Field/OSGStringToUInt32MapType.h +++ /dev/null @@ -1,132 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * - \*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * - \*---------------------------------------------------------------------------*/ -#ifndef _OSG_STRING_TO_UINT32_MAP_TYPE_H_ -#define _OSG_STRING_TO_UINT32_MAP_TYPE_H_ -#ifdef __sgi -#pragma once -#endif - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include "OSGBaseDef.h" -#include "OSGBaseTypes.h" -#include "OSGFieldTraits.h" -#include "OSGSField.h" -#include "OSGMField.h" - -#include -#include - -OSG_BEGIN_NAMESPACE - -typedef std::map StringToUInt32Map; - -// The FieldTraits class contains the methods needed to implement -// the features a Field data element needs to have - -template <> -struct FieldTraits : public FieldTraitsTemplateBase -{ - // Static DataType descriptor, see OSGNewFieldType.cpp for implementation - static DataType _type; - - typedef FieldTraits Self; - - // Define whether string conversions are available. It is strongly - // recommended to implement both. - enum { Convertible = (Self::ToStreamConvertible | - Self::FromStringConvertible) }; - - // access method for the DataType - static OSG_BASE_DLLMAPPING DataType &getType (void); - - // Access to the names of the actual Fields - static const Char8 *getSName (void) { return "SFStringToUInt32Map"; } - static const Char8 *getMName (void) { return "MFStringToUInt32Map"; } - - // Create a default instance of the class, needed for Field creation - static StringToUInt32Map getDefault (void) { return StringToUInt32Map(); } - - - // String conversion - - // Output inVal into outVal - static OSG_BASE_DLLMAPPING void putToStream(const StringToUInt32Map &inVal, - OutStream &outVal); - - // Setup outVal from the contents of inVal - static OSG_BASE_DLLMAPPING bool getFromCString( StringToUInt32Map &outVal, - const Char8 *&inVal); - - // Binary conversion - - // Return the size of the binary version in byte - static OSG_BASE_DLLMAPPING UInt32 getBinSize(const StringToUInt32Map & obj); - - static OSG_BASE_DLLMAPPING UInt32 getBinSize (const StringToUInt32Map *obj, UInt32 num); - - // Copy the object into the BinaryDataHandler - static OSG_BASE_DLLMAPPING void copyToBin( BinaryDataHandler &bdh, - const StringToUInt32Map &obj); - - static OSG_BASE_DLLMAPPING void copyToBin( BinaryDataHandler &bdh, - const StringToUInt32Map *objs, - UInt32 num); - - - // Copy the object from the BinaryDataHandler - static OSG_BASE_DLLMAPPING void copyFromBin(BinaryDataHandler &bdh, - StringToUInt32Map &obj); - - static OSG_BASE_DLLMAPPING void copyFromBin(BinaryDataHandler &bdh, - StringToUInt32Map *objs, - UInt32 num); -}; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -// Here the actual Field types are declared -// You don't always have to have both, either is fine - -typedef SField SFStringToUInt32Map; -typedef MField MFStringToUInt32Map; - -#else // these are the doxygen hacks - -/*! \ingroup GrpBaseFieldSingle \ingroup GrpLibOSGBase */ -struct SFStringToUInt32Map : public SField {}; -struct MFStringToUInt32Map : public MField {}; - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSG_STRING_TO_UINT32_MAP_TYPE_H_ */ - - diff --git a/Source/Base/FieldContainer/Fields/OSGFieldContainerMapFields.h b/Source/Base/FieldContainer/Fields/OSGFieldContainerMapFields.h deleted file mode 100644 index 63dcb0e7..00000000 --- a/Source/Base/FieldContainer/Fields/OSGFieldContainerMapFields.h +++ /dev/null @@ -1,34 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ - -/* - This is a dummy header to allow automatic inference from the type to the - field type header. -*/ - -#include "OSGFieldContainerMapType.h" - diff --git a/Source/Base/FieldContainer/Fields/OSGFieldContainerMapType.cpp b/Source/Base/FieldContainer/Fields/OSGFieldContainerMapType.cpp deleted file mode 100644 index 197a762a..00000000 --- a/Source/Base/FieldContainer/Fields/OSGFieldContainerMapType.cpp +++ /dev/null @@ -1,255 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ - -// Source file for new Field type - -// This define is only set in this source file. It switches the -// Windows-specific declarations in the header for compiling the Field, -// not for using it. -#define OSG_COMPILEFIELDCONTAINERMAPTYPEINST - -// You need this in every OpenSG file -#include "OSGField.h" - -#include "OSGSField.h" -#include "OSGSField.ins" - -#include "OSGMField.h" -#include "OSGMField.ins" - -// The new field type include -#include "OSGFieldContainerMapType.h" - -OSG_BEGIN_NAMESPACE - -// This is where the DataType for the new Fieldtype is defined. -// The parameters are the name of the type and the name of the parent type -DataType FieldTraits::_type("FieldContainerMap", "BaseType"); - -// These macros instantiate the necessary template methods for the fields -OSG_FIELD_DLLEXPORT_DEF1(SField, FieldContainerMap ) -OSG_FIELD_DLLEXPORT_DEF1(MField, FieldContainerMap ) - -void FieldTraits::putToStream(const FieldContainerMap &inVal, - OutStream &outVal) -{ - //Loop through all of the map elelments - FieldContainerMap::const_iterator Itor(inVal.begin()); - for(; Itor != inVal.end(); ++Itor) - { - if(Itor != inVal.begin()) - { - outVal << ","; - } - FieldTraits::putToStream( Itor->first,outVal ); - - outVal << ","; - if(Itor->second == NULL) - { - FieldTraits::putToStream( 0,outVal ); - } - else - { - FieldTraits::putToStream( Itor->second->getId(),outVal ); - } - } -} - -void FieldTraits::putToStream(const FieldContainerMap &inVal, - OutStream &outVal, - const ContainerIdMapper& IDMap) -{ - //Loop through all of the map elelments - FieldContainerMap::const_iterator Itor(inVal.begin()); - for(; Itor != inVal.end(); ++Itor) - { - if(Itor != inVal.begin()) - { - outVal << ","; - } - FieldTraits::putToStream(IDMap.map(Itor->first),outVal ); - - outVal << ","; - if(Itor->second == NULL) - { - FieldTraits::putToStream( 0,outVal ); - } - else - { - FieldTraits::putToStream(IDMap.map(Itor->second->getId()), - outVal ); - } - } -} - -// Setup outVal from the contents of inVal -// For complicated classes it makes sense to implement this function -// as a class method and just call that from here -bool FieldTraits::getFromCString( FieldContainerMap &outVal, - const Char8 *&inVal) -{ - outVal.clear(); - - //Loop through all of the map elelments - const Char8 *curInString(inVal); - - Int32 Key; - FieldContainerUnrecPtr Value; - UInt32 FieldContainerID(0); - while(curInString != NULL) - { - //Get the key value - /*! \todo This is a hack so the Constraints field of SpringLayout loads - * correctly */ - FieldTraits::getFromCString(Key, curInString ); - Value = FieldContainerFactory::the()->getMappedContainer(Key); - if(Value != NULL) - { - Key = Value->getId(); - } - - //Move past the ; seperator - curInString = strchr(curInString, ','); - ++curInString; - if(curInString == NULL) - { - return false; - } - - //Get the map value - FieldTraits::getFromCString(FieldContainerID, curInString); - Value = FieldContainerFactory::the()->getMappedContainer(FieldContainerID); - if(Value == NULL) - { - SWARNING << - "ERROR in FieldContainerMap::getFromCString(): Could not find Container referenced with Id: " << FieldContainerID << - std::endl; - } - - //Add the Key/Value pair - outVal[Key] = Value; - - //Move past the ; seperator - curInString = strchr(curInString, ','); - if(curInString != NULL) - { - ++curInString; - } - } - return true; -} - -// Binary conversion -UInt32 FieldTraits::getBinSize(const FieldContainerMap &oObject) -{ - - UInt32 uiNumPublicObjects = oObject.size(); - - return sizeof(UInt32) + // Number of elements in the map - uiNumPublicObjects * (sizeof(Int32) + sizeof(UInt32)); -} - -UInt32 FieldTraits::getBinSize(const FieldContainerMap *pObjectStore, - UInt32 uiNumObjects) -{ - UInt32 size = 0; - - // defaut: individual field sizes - for(UInt32 i = 0; i < uiNumObjects; ++i) - { - size += getBinSize(pObjectStore[i]); - } - - return size; -} - -void FieldTraits::copyToBin( BinaryDataHandler &pMem, - const FieldContainerMap &pObject) -{ - UInt32 id; - UInt32 uiNumPublicObjects = pObject.size(); - - pMem.putValue(uiNumPublicObjects); //Number of Key/Value pairs - - FieldContainerMap::const_iterator mapIt = pObject.begin(); - FieldContainerMap::const_iterator mapEnd = pObject.end(); - - for(; mapIt != mapEnd; ++mapIt) - { - id = mapIt->second->getId(); - - pMem.putValue(mapIt->first); //Key - pMem.putValue(id); //Value = Field Container ID - } -} - -void FieldTraits::copyToBin( BinaryDataHandler &pMem, - const FieldContainerMap *pObjectStore, - UInt32 uiNumObjects) -{ - for(UInt32 i = 0; i < uiNumObjects; ++i) - { - copyToBin(pMem, pObjectStore[i]); - } -} - -void FieldTraits::copyFromBin(BinaryDataHandler &pMem, - FieldContainerMap &pObject) -{ - FieldContainerUnrecPtr fcp; - - Int32 key; - UInt32 id; - UInt32 size; - - pMem.getValue(size); - - pObject.clear(); - - for(UInt32 i = 0; i < size; ++i) - { - pMem.getValue(key); - pMem.getValue(id); - - fcp = FieldContainerFactory::the()->getMappedContainer(id); - - pObject[key] = fcp; - } -} - -void FieldTraits::copyFromBin(BinaryDataHandler &pMem, - FieldContainerMap *pObjectStore, - UInt32 uiNumObjects) -{ - for(UInt32 i = 0; i < uiNumObjects; ++i) - { - copyFromBin(pMem, pObjectStore[i]); - } -} - -OSG_END_NAMESPACE - diff --git a/Source/Base/FieldContainer/Fields/OSGFieldContainerMapType.h b/Source/Base/FieldContainer/Fields/OSGFieldContainerMapType.h deleted file mode 100644 index 176d6ec0..00000000 --- a/Source/Base/FieldContainer/Fields/OSGFieldContainerMapType.h +++ /dev/null @@ -1,157 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG ToolBox Toolbox * - * * - * * - * * - * * - * Authors: David Kabala * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -#ifndef _OSG_FIELDCONTAINER_MAP_TYPE_H_ -#define _OSG_FIELDCONTAINER_MAP_TYPE_H_ -#ifdef __sgi -#pragma once -#endif - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include "OSGConfig.h" -#include "OSGBaseDef.h" - -#include "OSGFieldType.h" -#include "OSGBaseFieldTraits.h" -#include "OSGDataType.h" - -#include "OSGSField.h" -#include "OSGMField.h" - -#include "OSGFieldContainerFactory.h" -#include "OSGFieldContainer.h" -#include "OSGContainerIdMapper.h" - -#include -#include - -OSG_BEGIN_NAMESPACE - -typedef std::map FieldContainerMap; - -// The FieldTraits class contains the methods needed to implement -// the features a Field data element needs to have - -template <> -struct FieldTraits : public FieldTraitsTemplateBase -{ - // Static DataType descriptor, see OSGNewFieldType.cpp for implementation - static DataType _type; - - typedef FieldTraits Self; - - // Define whether string conversions are available. It is strongly - // recommended to implement both. - enum { Convertible = (Self::ToStreamConvertible | - Self::FromStringConvertible) }; - - // access method for the DataType - static OSG_BASE_DLLMAPPING DataType &getType (void) { return _type; } - - // Access to the names of the actual Fields - static const Char8 *getSName (void) { return "SFFieldContainerMap"; } - static const Char8 *getMName (void) { return "MFFieldContainerMap"; } - - // Create a default instance of the class, needed for Field creation - static FieldContainerMap getDefault (void) { return FieldContainerMap(); } - - - // This is where it gets interesting: the conversion functions - - // String conversion - // Output inVal into outVal - // the exact mapping doesn't matter, - // Our recommendation is to output as a string, - // i.e. start and stop with ", as this simplifies integration into the - // OSG Loader. - static OSG_BASE_DLLMAPPING - void putToStream(const FieldContainerMap &inVal, - OutStream &outVal); - - static OSG_BASE_DLLMAPPING - void putToStream(const FieldContainerMap &inVal, - OutStream &outVal, - const ContainerIdMapper& IDMap); - - // Setup outVal from the contents of inVal - // For complicated classes it makes sense to implement this function - // as a class method and just call that from here - static OSG_BASE_DLLMAPPING - bool getFromCString(FieldContainerMap &outVal, - const Char8 *&inVal); - - // Binary conversion - static OSG_BASE_DLLMAPPING - UInt32 getBinSize(const FieldContainerMap &oObject); - - static OSG_BASE_DLLMAPPING - UInt32 getBinSize(const FieldContainerMap *pObjectStore, - UInt32 uiNumObjects); - - static OSG_BASE_DLLMAPPING - void copyToBin(BinaryDataHandler &pMem, - const FieldContainerMap &pObject); - - static OSG_BASE_DLLMAPPING - void copyToBin(BinaryDataHandler &pMem, - const FieldContainerMap *pObjectStore, - UInt32 uiNumObjects); - - static OSG_BASE_DLLMAPPING - void copyFromBin(BinaryDataHandler &pMem, - FieldContainerMap &pObject); - - static OSG_BASE_DLLMAPPING - void copyFromBin(BinaryDataHandler &pMem, - FieldContainerMap *pObjectStore, - UInt32 uiNumObjects); -}; - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -// Here the actual Field types are declared -// You don't always have to have both, either is fine - -typedef SField SFFieldContainerMap; -typedef MField MFFieldContainerMap; - -#else // these are the doxygen hacks - -/*! \ingroup GrpBaseFieldSingle \ingroup GrpLibOSGBase */ -struct SFFieldContainerMap : public SField {}; -struct MFFieldContainerMap : public MField {}; - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSG_FIELDCONTAINER_MAP_TYPE_H_ */ - - diff --git a/Source/Base/FieldContainer/OSGContainerUtils.cpp b/Source/Base/FieldContainer/OSGContainerUtils.cpp deleted file mode 100644 index 4f161b10..00000000 --- a/Source/Base/FieldContainer/OSGContainerUtils.cpp +++ /dev/null @@ -1,200 +0,0 @@ -#include "OSGContainerUtils.h" -#include "OSGNameAttachment.h" -#include "OSGAttachmentContainer.h" -#include "OSGFieldContainerFactory.h" -//#include "OSGFilePathAttachment.h" - -OSG_BEGIN_NAMESPACE - -const FieldContainerType* getClosestAncestor(const FieldContainerType *type, - MFUnrecFieldContainerPtr::const_iterator begin, - MFUnrecFieldContainerPtr::const_iterator end) -{ - if(type == NULL) - { - return NULL; - } - - const FieldContainerType* AncestorType(NULL); - const FieldContainerType* FCType(NULL); - MFUnrecFieldContainerPtr::const_iterator Itor(begin); - for(; Itor!=end ; ++Itor) - { - FCType = &((*Itor)->getType()); - if(type->isDerivedFrom(*FCType)&& - (AncestorType == NULL || FCType->isDerivedFrom(*AncestorType))) - { - AncestorType = FCType; - } - } - - return AncestorType; -} - -//std::vector getAllContainersByType(const FieldContainerType *szType) -//{ -//std::vector Result; - -//const std::vector* FCStore( FieldContainerFactory::the()->getFieldContainerStore () ); - - //std::vector::const_iterator FCStoreIter; - //for(FCStoreIter = FCStore->begin() ; FCStoreIter != FCStore->end() ; ++FCStoreIter) - //{ - //if( (*FCStoreIter) != NullFC && (*FCStoreIter)->getType() == (*szType) ) - //{ - //Result.push_back(*FCStoreIter); - //} - //} - //return Result; -//} - -std::vector getAllContainersByDerivedType(const FieldContainerType *szType) -{ - std::vector Result; - - const FieldContainerFactoryBase::ContainerStore &FCStore( FieldContainerFactory::the()->getFieldContainerStore () ); - - FieldContainerFactoryBase::ContainerStore::const_iterator FCStoreIter; - FieldContainerFactoryBase::ContainerPtr Cont(NULL); - for(FCStoreIter = FCStore.begin() ; FCStoreIter != FCStore.end() ; ++FCStoreIter) - { - if(*FCStoreIter != NULL) - { -#ifdef OSG_MT_CPTR_ASPECT - Cont = (*FCStoreIter)->getPtr(); -#else - Cont = *FCStoreIter; -#endif - } - else - { - Cont = NULL; - } - if( Cont != NULL && Cont->getType().isDerivedFrom(*szType) ) - { - Result.push_back(Cont); - } - } - return Result; -} - -//std::vector getAllFieldContainers(const std::string &namestring) -//{ - //std::vector Result; - //std::vector::const_iterator FCStoreIter; - - //const std::vector* FCStore( FieldContainerFactory::the()->getFieldContainerStore () ); - - //for(FCStoreIter = FCStore->begin() ; FCStoreIter != FCStore->end() ; ++FCStoreIter) - //{ - //const Char8 *Name( getName(AttachmentContainerPtr::dcast(*FCStoreIter)) ); - //if(Name != NULL && namestring.compare(Name) == 0) - //{ - //Result.push_back(*FCStoreIter); - //} - //} - //return Result; -//} - -FieldContainerUnrecPtr getFieldContainer(const std::string &szTypeName, const std::string &namestring) -{ - return getFieldContainer(FieldContainerFactory::the()->findType(szTypeName.c_str()), namestring); -} - -FieldContainerUnrecPtr getFieldContainer(const FieldContainerType *szType, const std::string &namestring) -{ - if(szType == NULL) - { - SWARNING << "getFieldContainer(): The Field type is not defined." << std::endl; - return NULL; - } - - const FieldContainerFactoryBase::ContainerStore &FCStore( FieldContainerFactory::the()->getFieldContainerStore () ); - - FieldContainerFactoryBase::ContainerStore::const_iterator FCStoreIter; - FieldContainerFactoryBase::ContainerPtr Cont; - for(FCStoreIter = FCStore.begin() ; FCStoreIter != FCStore.end() ; ++FCStoreIter) - { -#ifdef OSG_MT_CPTR_ASPECT - Cont = (*FCStoreIter)->getPtr(); -#else - Cont = *FCStoreIter; -#endif - if( Cont != NULL && Cont->getType() == (*szType) ) - { - const Char8 *Name( getName(dynamic_cast(Cont)) ); - if(Name != NULL && namestring.compare(Name) == 0) - { - return Cont; - } - } - } - - return NULL; -} - - -FieldContainerUnrecPtr getFieldContainer(const std::string &namestring) -{ - const FieldContainerFactoryBase::ContainerStore &FCStore( FieldContainerFactory::the()->getFieldContainerStore () ); - - FieldContainerFactoryBase::ContainerStore::const_iterator FCStoreIter; - FieldContainerFactoryBase::ContainerPtr Cont; - for(FCStoreIter = FCStore.begin() ; FCStoreIter != FCStore.end() ; ++FCStoreIter) - { - if(*FCStoreIter == NULL) - { - continue; - } -#ifdef OSG_MT_CPTR_ASPECT - Cont = (*FCStoreIter)->getPtr(); -#else - Cont = *FCStoreIter; -#endif - const Char8 *Name( getName(dynamic_cast(Cont)) ); - if(Name != NULL && namestring.compare(Name) == 0) - { - return Cont; - } - } - - return NULL; -} - -const FieldContainerType* getFieldContainerTypeFromPtrType(const DataType& type) -{ - std::string FCPtrTypeName = type.getName().substr(0,type.getName().size()-3); - return FieldContainerFactory::the()->findType(FCPtrTypeName.c_str()); -} - -bool isFieldContentDerivedFrom(const FieldType &TheFieldType, const FieldContainerType* TheFCType) -{ - if(TheFieldType.isPtrField()) - { - std::string FieldPtrTypeName(TheFieldType.getContentType().getName()); - switch(TheFieldType.getClass()) - { - case FieldType::PtrField: - case FieldType::ParentPtrField: - case FieldType::ChildPtrField: - FieldPtrTypeName = FieldPtrTypeName.substr(0,FieldPtrTypeName.size()-3); - break; - default: - case FieldType::ValueField: - return false; - break; - } - const FieldContainerType* PtrContentType = FieldContainerFactory::the()->findType(FieldPtrTypeName.c_str()); - - return TheFCType->isDerivedFrom(*PtrContentType); - } - else - { - return false; - } - return false; -} - -OSG_END_NAMESPACE - - diff --git a/Source/Base/FieldContainer/OSGContainerUtils.h b/Source/Base/FieldContainer/OSGContainerUtils.h deleted file mode 100644 index f114d400..00000000 --- a/Source/Base/FieldContainer/OSGContainerUtils.h +++ /dev/null @@ -1,56 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -#ifndef _OPENSG_TOOLBOX_FIELD_CONATINER_UTILS_H_ -#define _OPENSG_TOOLBOX_FIELD_CONATINER_UTILS_H_ - -#include "OSGConfig.h" -#include "OSGBaseDef.h" -#include "OSGFieldContainer.h" -#include "OSGFieldContainerMFields.h" -#include "OSGEventProducerType.h" -#include -#include - -OSG_BEGIN_NAMESPACE - -FieldContainerUnrecPtr OSG_BASE_DLLMAPPING getFieldContainer(const std::string &szTypeName, const std::string &namestring); -FieldContainerUnrecPtr OSG_BASE_DLLMAPPING getFieldContainer(const FieldContainerType *szType, const std::string &namestring); -FieldContainerUnrecPtr OSG_BASE_DLLMAPPING getFieldContainer(const std::string &namestring); - -//std::vector OSG_BASE_DLLMAPPING getAllFieldContainers(const std::string &namestring); - -bool OSG_BASE_DLLMAPPING isFieldContentDerivedFrom(const FieldType &TheFieldType, const FieldContainerType* TheFCType); - -const FieldContainerType OSG_BASE_DLLMAPPING *getFieldContainerTypeFromPtrType(const DataType& type); - -//std::vector OSG_BASE_DLLMAPPING getAllContainersByType(const FieldContainerType *szType); -std::vector OSG_BASE_DLLMAPPING getAllContainersByDerivedType(const FieldContainerType *szType); - -const FieldContainerType OSG_BASE_DLLMAPPING *getClosestAncestor(const FieldContainerType *type, - MFUnrecFieldContainerPtr::const_iterator begin, - MFUnrecFieldContainerPtr::const_iterator end); - -OSG_END_NAMESPACE - -#endif - - diff --git a/Source/Contrib/CMakeLists.txt b/Source/Contrib/CMakeLists.txt index 68367249..1366a6da 100644 --- a/Source/Contrib/CMakeLists.txt +++ b/Source/Contrib/CMakeLists.txt @@ -44,8 +44,8 @@ ENDIF(WIN32) ############################################################################## # MAIN BUILD STEPS ############################################################################## - -OSG_COLLECT_LIBS() +SET( OSG_ENABLE_FCD2CODE FALSE ) +OSG_COLLECT_LIBS(FALSE) IF(OSG_WITH_CUDA) diff --git a/Source/Contrib/UserInterface/src/Component/Button/OSGMenuButton.cpp b/Source/Contrib/UserInterface/src/Component/Button/OSGMenuButton.cpp index 96c5af5d..d052da85 100644 --- a/Source/Contrib/UserInterface/src/Component/Button/OSGMenuButton.cpp +++ b/Source/Contrib/UserInterface/src/Component/Button/OSGMenuButton.cpp @@ -149,6 +149,7 @@ UInt32 MenuButton::getNumItems(void) const { return getMenuButtonPopupMenu()->getNumItems(); } + return 0u; } /*-------------------------------------------------------------------------*\ diff --git a/Source/Contrib/UserInterface/src/Component/Button/OSGRadioButtonGroup.h b/Source/Contrib/UserInterface/src/Component/Button/OSGRadioButtonGroup.h index 69a8e0cf..00c240ec 100644 --- a/Source/Contrib/UserInterface/src/Component/Button/OSGRadioButtonGroup.h +++ b/Source/Contrib/UserInterface/src/Component/Button/OSGRadioButtonGroup.h @@ -45,6 +45,9 @@ #include "OSGRadioButtonGroupBase.h" #include "OSGButtonSelectedEventDetailsFields.h" +#include +#include + OSG_BEGIN_NAMESPACE /*! \brief RadioButtonGroup class. See \ref diff --git a/Source/Contrib/UserInterface/src/Component/ComboBox/OSGComboBox.cpp b/Source/Contrib/UserInterface/src/Component/ComboBox/OSGComboBox.cpp index 7438145b..3460508c 100644 --- a/Source/Contrib/UserInterface/src/Component/ComboBox/OSGComboBox.cpp +++ b/Source/Contrib/UserInterface/src/Component/ComboBox/OSGComboBox.cpp @@ -350,7 +350,7 @@ void ComboBox::updateSelectedItemComponent(void) } } -void ComboBox::configurePropertiesFromAction(Action a) +void ComboBox::configurePropertiesFromAction( const Action& a) { //TODO:Implement } diff --git a/Source/Contrib/UserInterface/src/Component/ComboBox/OSGComboBox.h b/Source/Contrib/UserInterface/src/Component/ComboBox/OSGComboBox.h index 75e88208..e55503ad 100644 --- a/Source/Contrib/UserInterface/src/Component/ComboBox/OSGComboBox.h +++ b/Source/Contrib/UserInterface/src/Component/ComboBox/OSGComboBox.h @@ -222,7 +222,7 @@ class OSG_CONTRIBUSERINTERFACE_DLLMAPPING ComboBox : public ComboBoxBase /*! \} */ //Factory method which sets the ActionEvent source's properties according to values from the Action instance. - void configurePropertiesFromAction(Action a); + void configurePropertiesFromAction( const Action& a); //Notifies all listeners that have registered interest for notification on this event type. void produceActionPerformed(void); diff --git a/Source/Contrib/UserInterface/src/Component/ComponentContainer/ColorChooser/OSGColorSelectionModelBase.h b/Source/Contrib/UserInterface/src/Component/ComponentContainer/ColorChooser/OSGColorSelectionModelBase.h index dc17138f..2b7f460f 100644 --- a/Source/Contrib/UserInterface/src/Component/ComponentContainer/ColorChooser/OSGColorSelectionModelBase.h +++ b/Source/Contrib/UserInterface/src/Component/ComponentContainer/ColorChooser/OSGColorSelectionModelBase.h @@ -74,6 +74,8 @@ #include "OSGChangeEventDetailsFields.h" +#include "OSGWindowEventProducerBase.h" + OSG_BEGIN_NAMESPACE class ColorSelectionModel; diff --git a/Source/Contrib/UserInterface/src/Component/Misc/OSGGLViewport.cpp b/Source/Contrib/UserInterface/src/Component/Misc/OSGGLViewport.cpp index 88e2273b..09cb8bbd 100644 --- a/Source/Contrib/UserInterface/src/Component/Misc/OSGGLViewport.cpp +++ b/Source/Contrib/UserInterface/src/Component/Misc/OSGGLViewport.cpp @@ -97,10 +97,7 @@ const Matrix& GLViewport::getViewMatrix(void) { return dynamic_cast(_DrawingViewport->getCamera()->getBeacon()->getCore())->getMatrix(); } - else - { - _Navigator.getMatrix(); - } + return _Navigator.getMatrix(); } @@ -213,7 +210,7 @@ void GLViewport::mouseWheelMoved(MouseWheelEventDetails* const e) { if(e->getUnitsToScroll() > 0) { - for(UInt32 i(0) ; igetUnitsToScroll() ;++i) + for( Int32 i=0; igetUnitsToScroll() ;++i) { _Navigator.buttonPress(Navigator::DOWN_MOUSE,e->getLocation().x(),e->getLocation().y()); _Navigator.buttonRelease(Navigator::DOWN_MOUSE,e->getLocation().x(),e->getLocation().y()); @@ -222,7 +219,7 @@ void GLViewport::mouseWheelMoved(MouseWheelEventDetails* const e) } else if(e->getUnitsToScroll() < 0) { - for(UInt32 i(0) ; igetUnitsToScroll()) ;++i) + for( Int32 i=0; igetUnitsToScroll()) ;++i) { _Navigator.buttonPress(Navigator::UP_MOUSE,e->getLocation().x(),e->getLocation().y()); _Navigator.buttonRelease(Navigator::UP_MOUSE,e->getLocation().x(),e->getLocation().y()); @@ -287,7 +284,7 @@ Node* GLViewport::grabNode(const Pnt2f& Location, UInt32 TravMask, Real32 MaxDis Line ViewRay; _DrawingViewport->getCamera()->calcViewRay( ViewRay, ViewportPoint.x(), ViewportPoint.y(), *_DrawingViewport); - boost::scoped_ptr CastRayAction(IntersectAction::create()); + IntersectActionRefPtr CastRayAction = IntersectAction::create(); CastRayAction->setLine( ViewRay, MaxDistance ); CastRayAction->setTravMask(TravMask); @@ -423,10 +420,13 @@ void GLViewport::drawViewport(DrawEnv* dEnv) const getClipTopLeft(), getClipBottomRight(), InsideInsetTopLeftToWindow, InsideInsetBottomRightToWindow); + OSG::Int32 w = dEnv->getPixelWidth(); + OSG::Int32 h = dEnv->getPixelHeight(); + OSG::Int32 x = dEnv->getPixelLeft(); + OSG::Int32 y = dEnv->getPixelBottom(); - ViewportRefPtr ContainingViewport(dEnv->getAction()->getViewport()); - InsideInsetTopLeftToWindow = ComponentToWindow(InsideInsetTopLeftToWindow,this, ContainingViewport); - InsideInsetBottomRightToWindow = ComponentToWindow(InsideInsetBottomRightToWindow,this, ContainingViewport); + InsideInsetTopLeftToWindow = ComponentToWindow(InsideInsetTopLeftToWindow,this, x, y, w, h); + InsideInsetBottomRightToWindow = ComponentToWindow(InsideInsetBottomRightToWindow,this, x, y, w, h); @@ -488,23 +488,23 @@ void GLViewport::drawViewport(DrawEnv* dEnv) const _DrawingViewport->setEnabled(true); - _RenderAction->setWindow(dEnv->getAction()->getWindow()); + _RenderAction->setWindow(dEnv->getWindow()); - if(dEnv->getAction()->getWindow()->getDrawerId() < 0) + if(dEnv->getWindow()->getDrawerId() < 0) { - _RenderAction->setDrawerId(dEnv->getAction()->getWindow()->getId()); + _RenderAction->setDrawerId(dEnv->getWindow()->getId()); } else { - _RenderAction->setDrawerId(dEnv->getAction()->getWindow()->getDrawerId()); + _RenderAction->setDrawerId(dEnv->getWindow()->getDrawerId()); } - if((dEnv->getAction()->getWindow()->getDrawMode() & Window::PartitionDrawMask) == + if((dEnv->getWindow()->getDrawMode() & Window::PartitionDrawMask) == Window::SequentialPartitionDraw) { _RenderAction->setDrawPartPar(false); } - else if((dEnv->getAction()->getWindow()->getDrawMode() & Window::PartitionDrawMask) == + else if((dEnv->getWindow()->getDrawMode() & Window::PartitionDrawMask) == Window::ParallelPartitionDraw) { _RenderAction->setDrawPartPar(true); @@ -562,7 +562,7 @@ GLViewport::GLViewport(void) : { _Navigator.setMode(Navigator::TRACKBALL); _Navigator.setClickCenter(false); - _RenderAction.reset(RenderAction::create()); + _RenderAction = RenderAction::create(); } GLViewport::GLViewport(const GLViewport &source) : @@ -571,7 +571,7 @@ GLViewport::GLViewport(const GLViewport &source) : { _Navigator.setMode(Navigator::TRACKBALL); _Navigator.setClickCenter(false); - _RenderAction.reset(RenderAction::create()); + _RenderAction = RenderAction::create(); } GLViewport::~GLViewport(void) diff --git a/Source/Contrib/UserInterface/src/Component/Misc/OSGGLViewport.h b/Source/Contrib/UserInterface/src/Component/Misc/OSGGLViewport.h index 7a57391d..59dfd2f0 100644 --- a/Source/Contrib/UserInterface/src/Component/Misc/OSGGLViewport.h +++ b/Source/Contrib/UserInterface/src/Component/Misc/OSGGLViewport.h @@ -175,7 +175,7 @@ class OSG_CONTRIBUSERINTERFACE_DLLMAPPING GLViewport : public GLViewportBase Matrix _InitialMat; ViewportRecPtr _DrawingViewport; - boost::scoped_ptr _RenderAction; + OSG::RenderActionRefPtr _RenderAction; /*========================== PRIVATE ================================*/ diff --git a/Source/Contrib/UserInterface/src/Graphics/OSGGraphics2D.cpp b/Source/Contrib/UserInterface/src/Graphics/OSGGraphics2D.cpp index 145a7754..9c1e191a 100644 --- a/Source/Contrib/UserInterface/src/Graphics/OSGGraphics2D.cpp +++ b/Source/Contrib/UserInterface/src/Graphics/OSGGraphics2D.cpp @@ -52,7 +52,7 @@ #include "OSGTextureBaseChunk.h" #include "OSGDepthChunk.h" #include "OSGPrimeMaterial.h" - +#include "OSGRenderAction.h" OSG_BEGIN_NAMESPACE // Documentation for this class is emitted in the @@ -296,7 +296,7 @@ void Graphics2D::drawQuad(const Pnt2f& p1, const Pnt2f& p2, const Pnt2f& p3, con StateUnrecPtr state = NULL; if(Material != NULL) { - state = Material->finalize(MaterialMapKey(),getDrawEnv()->getWindow())->getState(); + state = Material->finalize(MaterialMapKey(), nullptr , getDrawEnv()->getWindow())->getState(); state->activate(getDrawEnv()); } diff --git a/Source/Contrib/UserInterface/src/Graphics/OSGGraphics3DExtrude.cpp b/Source/Contrib/UserInterface/src/Graphics/OSGGraphics3DExtrude.cpp index de2513b2..4a412df6 100644 --- a/Source/Contrib/UserInterface/src/Graphics/OSGGraphics3DExtrude.cpp +++ b/Source/Contrib/UserInterface/src/Graphics/OSGGraphics3DExtrude.cpp @@ -126,7 +126,7 @@ void Graphics3DExtrude::preDraw() glEnable(GL_LIGHTING); if(getMaterial() != NULL) { - getMaterial()->finalize(MaterialMapKey(),getDrawEnv()->getWindow())->getState()->activate(getDrawEnv()); + getMaterial()->finalize(MaterialMapKey(), nullptr, getDrawEnv()->getWindow())->getState()->activate(getDrawEnv()); } //_depth = glIsEnabled(GL_DEPTH_TEST); @@ -171,7 +171,7 @@ void Graphics3DExtrude::postDraw() if(getMaterial() != NULL) { - getMaterial()->finalize(MaterialMapKey(),getDrawEnv()->getWindow())->getState()->deactivate(getDrawEnv()); + getMaterial()->finalize(MaterialMapKey(), nullptr, getDrawEnv()->getWindow())->getState()->deactivate(getDrawEnv()); } glPopAttrib(); } @@ -381,7 +381,7 @@ void Graphics3DExtrude::drawQuad(const Pnt2f& p1, const Pnt2f& p2, const Pnt2f& StateUnrecPtr state = NULL; if(Material != NULL) { - state = Material->finalize(MaterialMapKey(),getDrawEnv()->getWindow())->getState(); + state = Material->finalize(MaterialMapKey(), nullptr, getDrawEnv()->getWindow())->getState(); state->activate(getDrawEnv()); } diff --git a/Source/Contrib/UserInterface/src/Layout/OSGSpringLayout.h b/Source/Contrib/UserInterface/src/Layout/OSGSpringLayout.h index 98c6192e..5c2e3082 100644 --- a/Source/Contrib/UserInterface/src/Layout/OSGSpringLayout.h +++ b/Source/Contrib/UserInterface/src/Layout/OSGSpringLayout.h @@ -50,8 +50,8 @@ #include "OSGSpringLayoutConstraintsFields.h" #include -#include "rapidxml.h" -#include "rapidxml_iterators.h" +#include "rapidxml.hpp" +#include "rapidxml_iterators.hpp" #include "OSGXMLFCFileType.h" OSG_BEGIN_NAMESPACE diff --git a/Source/Contrib/UserInterface/src/Layout/OSGSpringLayoutBase.h b/Source/Contrib/UserInterface/src/Layout/OSGSpringLayoutBase.h index c3c3739a..ee3df559 100644 --- a/Source/Contrib/UserInterface/src/Layout/OSGSpringLayoutBase.h +++ b/Source/Contrib/UserInterface/src/Layout/OSGSpringLayoutBase.h @@ -65,9 +65,9 @@ #include "OSGLayout.h" // Parent -#include "OSGFieldContainerMapType.h" // Constraints type - #include "OSGSpringLayoutFields.h" +#include "OSGFieldContainerMapFieldTraits.h" +#include "OSGFieldContainerMapFields.h" OSG_BEGIN_NAMESPACE diff --git a/Source/Contrib/UserInterface/src/LookAndFeel/OSGLookAndFeel.cpp b/Source/Contrib/UserInterface/src/LookAndFeel/OSGLookAndFeel.cpp index 6546da7c..9cbf1136 100644 --- a/Source/Contrib/UserInterface/src/LookAndFeel/OSGLookAndFeel.cpp +++ b/Source/Contrib/UserInterface/src/LookAndFeel/OSGLookAndFeel.cpp @@ -47,7 +47,7 @@ #include "OSGLookAndFeel.h" #include "OSGFieldContainerFactory.h" -#include "OSGContainerUtils.h" +#include "OSGFieldContainerUtils.h" OSG_BEGIN_NAMESPACE diff --git a/Source/Contrib/UserInterface/src/LookAndFeel/OSGXMLLookAndFeel.h b/Source/Contrib/UserInterface/src/LookAndFeel/OSGXMLLookAndFeel.h index 7d851a8f..edbb6c62 100644 --- a/Source/Contrib/UserInterface/src/LookAndFeel/OSGXMLLookAndFeel.h +++ b/Source/Contrib/UserInterface/src/LookAndFeel/OSGXMLLookAndFeel.h @@ -43,7 +43,6 @@ #endif #include "OSGXMLLookAndFeelBase.h" -#include "OSGPathType.h" #include "OSGFCFileHandler.h" OSG_BEGIN_NAMESPACE diff --git a/Source/Contrib/UserInterface/src/Text/OSGUIFont.h b/Source/Contrib/UserInterface/src/Text/OSGUIFont.h index 6f0ff5c8..634f5f80 100644 --- a/Source/Contrib/UserInterface/src/Text/OSGUIFont.h +++ b/Source/Contrib/UserInterface/src/Text/OSGUIFont.h @@ -49,7 +49,6 @@ #include "OSGTextLayoutParam.h" #include "OSGTextLayoutResult.h" #include "OSGTextTXFGlyph.h" -#include "OSGPathType.h" OSG_BEGIN_NAMESPACE diff --git a/Source/Contrib/UserInterface/src/UndoableEdit/OSGCommandFactory.h b/Source/Contrib/UserInterface/src/UndoableEdit/OSGCommandFactory.h index b7f38442..15458c5f 100644 --- a/Source/Contrib/UserInterface/src/UndoableEdit/OSGCommandFactory.h +++ b/Source/Contrib/UserInterface/src/UndoableEdit/OSGCommandFactory.h @@ -71,6 +71,11 @@ class OSG_CONTRIBUSERINTERFACE_DLLMAPPING CommandFactoryBase : public FactoryBas void operator =(const CommandFactoryBase &source); }; + +#if defined(WIN32) +template class OSG_CONTRIBUSERINTERFACE_DLLMAPPING SingletonHolder; +#endif + typedef OSG::SingletonHolder CommandFactory; OSG_END_NAMESPACE diff --git a/Source/Contrib/UserInterface/src/Util/OSGUIDrawUtils.cpp b/Source/Contrib/UserInterface/src/Util/OSGUIDrawUtils.cpp index b02658f8..91c5e2ac 100644 --- a/Source/Contrib/UserInterface/src/Util/OSGUIDrawUtils.cpp +++ b/Source/Contrib/UserInterface/src/Util/OSGUIDrawUtils.cpp @@ -124,9 +124,9 @@ Pnt2f ViewportToComponent(const Pnt2f& ViewportPoint, const Component* Comp, con return DrawingSurfaceToComponent(ViewportToDrawingSurface(ViewportPoint, Comp->getParentWindow()->getParentDrawingSurface(), TheViewport), Comp); } -Pnt2f ViewportToWindow(const Pnt2f& ViewportPoint, const Viewport* TheViewport) +Pnt2f ViewportToWindow(const Pnt2f& vpPoint, Int32 x, Int32 y, Int32 w, Int32 h ) { - return Pnt2f(ViewportPoint.x() + TheViewport->getPixelLeft(), (TheViewport->getPixelTop() - TheViewport->getPixelBottom()) - ViewportPoint.y()); + return Pnt2f( vpPoint.x() + x, h - vpPoint.y()); } Pnt2f ComponentToViewport(const Pnt2f& ComponentPoint, const Component* Comp, const Viewport* TheViewport) @@ -134,9 +134,9 @@ Pnt2f ComponentToViewport(const Pnt2f& ComponentPoint, const Component* Comp, co return DrawingSurfaceToViewport(ComponentToDrawingSurface(ComponentPoint, Comp), Comp->getParentWindow()->getParentDrawingSurface(), TheViewport); } -Pnt2f ComponentToWindow(const Pnt2f& ComponentPoint, const Component* Comp, const Viewport* TheViewport) +Pnt2f ComponentToWindow(const Pnt2f& ComponentPoint, const Component* Comp, Int32 x, Int32 y, Int32 w, Int32 h ) { - return ViewportToWindow(ComponentToViewport(ComponentPoint, Comp, TheViewport), TheViewport); + return ViewportToWindow(ComponentToViewport(ComponentPoint, Comp, nullptr), x, y, w, h ); } Pnt2f DrawingSurfaceToComponent(const Pnt2f& DrawingSurfacePoint, const Component* Comp) diff --git a/Source/Contrib/UserInterface/src/Util/OSGUIDrawUtils.h b/Source/Contrib/UserInterface/src/Util/OSGUIDrawUtils.h index 8fb249e9..db5ee369 100644 --- a/Source/Contrib/UserInterface/src/Util/OSGUIDrawUtils.h +++ b/Source/Contrib/UserInterface/src/Util/OSGUIDrawUtils.h @@ -61,10 +61,10 @@ bool OSG_CONTRIBUSERINTERFACE_DLLMAPPING isContainedClipBounds(const Pnt2f& Poin bool OSG_CONTRIBUSERINTERFACE_DLLMAPPING isContainedBounds(const Pnt2f& Point, const Pnt2f& TopLeft, const Pnt2f& BottomRight); Pnt2f OSG_CONTRIBUSERINTERFACE_DLLMAPPING DrawingSurfaceToComponent(const Pnt2f& DrawingSurfacePoint, const Component* Comp); -Pnt2f OSG_CONTRIBUSERINTERFACE_DLLMAPPING ViewportToWindow(const Pnt2f& ViewportPoint, const Viewport* TheViewport); +Pnt2f OSG_CONTRIBUSERINTERFACE_DLLMAPPING ViewportToWindow(const Pnt2f& ViewportPoint, Int32 x, Int32 y, Int32 w, Int32 h ); Pnt2f OSG_CONTRIBUSERINTERFACE_DLLMAPPING ViewportToComponent(const Pnt2f& ViewportPoint, const Component* Comp, const Viewport* TheViewport); Pnt2f OSG_CONTRIBUSERINTERFACE_DLLMAPPING ComponentToViewport(const Pnt2f& ComponentPoint, const Component* Comp, const Viewport* TheViewport); -Pnt2f OSG_CONTRIBUSERINTERFACE_DLLMAPPING ComponentToWindow(const Pnt2f& ComponentPoint, const Component* Comp, const Viewport* TheViewport); +Pnt2f OSG_CONTRIBUSERINTERFACE_DLLMAPPING ComponentToWindow(const Pnt2f& ComponentPoint, const Component* Comp, Int32 x, Int32 y, Int32 w, Int32 h ); Pnt2f OSG_CONTRIBUSERINTERFACE_DLLMAPPING ViewportToDrawingSurface(const Pnt2f& ViewportPoint, const UIDrawingSurface* DrawingSurface, const Viewport* TheViewport); Pnt2f OSG_CONTRIBUSERINTERFACE_DLLMAPPING DrawingSurfaceToViewport(const Pnt2f& DrawingSurfacePoint, const UIDrawingSurface* DrawingSurface, const Viewport* TheViewport); Pnt2f OSG_CONTRIBUSERINTERFACE_DLLMAPPING ComponentToDrawingSurface(const Pnt2f& ComponentPoint, const Component* Comp); diff --git a/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.cpp b/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.cpp index b99f40f2..8a01b065 100644 --- a/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.cpp +++ b/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.cpp @@ -58,7 +58,7 @@ -#include "OSGAnimation.h" // Animations Class +#include "OSGTBAnimation.h" // Animations Class #include "OSGAnimationGroupBase.h" #include "OSGAnimationGroup.h" @@ -93,7 +93,7 @@ OSG_BEGIN_NAMESPACE \***************************************************************************/ #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("AnimationGroupPtr", "AnimationPtr"); +DataType FieldTraits::_type("AnimationGroupPtr", "TBAnimationPtr"); #endif OSG_FIELDTRAITS_GETTYPE(AnimationGroup *) @@ -115,8 +115,8 @@ void AnimationGroupBase::classDescInserter(TypeObject &oType) FieldDescriptionBase *pDesc = NULL; - pDesc = new MFUnrecAnimationPtr::Description( - MFUnrecAnimationPtr::getClassType(), + pDesc = new MFUnrecTBAnimationPtr::Description( + MFUnrecTBAnimationPtr::getClassType(), "Animations", "", AnimationsFieldId, AnimationsFieldMask, @@ -189,12 +189,12 @@ UInt32 AnimationGroupBase::getContainerSize(void) const //! Get the AnimationGroup::_mfAnimations field. -const MFUnrecAnimationPtr *AnimationGroupBase::getMFAnimations(void) const +const MFUnrecTBAnimationPtr *AnimationGroupBase::getMFAnimations(void) const { return &_mfAnimations; } -MFUnrecAnimationPtr *AnimationGroupBase::editMFAnimations (void) +MFUnrecTBAnimationPtr *AnimationGroupBase::editMFAnimations (void) { editMField(AnimationsFieldMask, _mfAnimations); @@ -203,18 +203,18 @@ MFUnrecAnimationPtr *AnimationGroupBase::editMFAnimations (void) -void AnimationGroupBase::pushToAnimations(Animation * const value) +void AnimationGroupBase::pushToAnimations(TBAnimation * const value) { editMField(AnimationsFieldMask, _mfAnimations); _mfAnimations.push_back(value); } -void AnimationGroupBase::assignAnimations(const MFUnrecAnimationPtr &value) +void AnimationGroupBase::assignAnimations(const MFUnrecTBAnimationPtr &value) { - MFUnrecAnimationPtr::const_iterator elemIt = + MFUnrecTBAnimationPtr::const_iterator elemIt = value.begin(); - MFUnrecAnimationPtr::const_iterator elemEnd = + MFUnrecTBAnimationPtr::const_iterator elemEnd = value.end (); static_cast(this)->clearAnimations(); @@ -237,7 +237,7 @@ void AnimationGroupBase::removeFromAnimations(UInt32 uiIndex) } } -void AnimationGroupBase::removeObjFromAnimations(Animation * const value) +void AnimationGroupBase::removeObjFromAnimations(TBAnimation * const value) { Int32 iElemIdx = _mfAnimations.findIndex(value); @@ -440,9 +440,9 @@ void AnimationGroupBase::onCreate(const AnimationGroup *source) { AnimationGroup *pThis = static_cast(this); - MFUnrecAnimationPtr::const_iterator AnimationsIt = + MFUnrecTBAnimationPtr::const_iterator AnimationsIt = source->_mfAnimations.begin(); - MFUnrecAnimationPtr::const_iterator AnimationsEnd = + MFUnrecTBAnimationPtr::const_iterator AnimationsEnd = source->_mfAnimations.end (); while(AnimationsIt != AnimationsEnd) @@ -456,8 +456,8 @@ void AnimationGroupBase::onCreate(const AnimationGroup *source) GetFieldHandlePtr AnimationGroupBase::getHandleAnimations (void) const { - MFUnrecAnimationPtr::GetHandlePtr returnValue( - new MFUnrecAnimationPtr::GetHandle( + MFUnrecTBAnimationPtr::GetHandlePtr returnValue( + new MFUnrecTBAnimationPtr::GetHandle( &_mfAnimations, this->getType().getFieldDesc(AnimationsFieldId), const_cast(this))); @@ -467,8 +467,8 @@ GetFieldHandlePtr AnimationGroupBase::getHandleAnimations (void) const EditFieldHandlePtr AnimationGroupBase::editHandleAnimations (void) { - MFUnrecAnimationPtr::EditHandlePtr returnValue( - new MFUnrecAnimationPtr::EditHandle( + MFUnrecTBAnimationPtr::EditHandlePtr returnValue( + new MFUnrecTBAnimationPtr::EditHandle( &_mfAnimations, this->getType().getFieldDesc(AnimationsFieldId), this)); diff --git a/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.h b/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.h index 8edbc9c7..ab6367de 100644 --- a/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.h +++ b/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.h @@ -63,9 +63,9 @@ //#include "OSGBaseTypes.h" -#include "OSGAnimation.h" // Parent +#include "OSGTBAnimation.h" // Parent -#include "OSGAnimationFields.h" // Animations type +#include "OSGTBAnimationFields.h" // Animations type #include "OSGAnimationGroupFields.h" @@ -75,12 +75,12 @@ class AnimationGroup; //! \brief AnimationGroup Base Class. -class OSG_TBANIMATION_DLLMAPPING AnimationGroupBase : public Animation +class OSG_TBANIMATION_DLLMAPPING AnimationGroupBase : public TBAnimation { public: - typedef Animation Inherited; - typedef Animation ParentContainer; + typedef TBAnimation Inherited; + typedef TBAnimation ParentContainer; typedef Inherited::TypeObject TypeObject; typedef TypeObject::InitPhase InitPhase; @@ -104,7 +104,7 @@ class OSG_TBANIMATION_DLLMAPPING AnimationGroupBase : public Animation static const OSG::BitVector NextFieldMask = (TypeTraits::One << NextFieldId); - typedef MFUnrecAnimationPtr MFAnimationsType; + typedef MFUnrecTBAnimationPtr MFAnimationsType; /*---------------------------------------------------------------------*/ /*! \name Class Get */ @@ -129,11 +129,11 @@ class OSG_TBANIMATION_DLLMAPPING AnimationGroupBase : public Animation /*! \name Field Get */ /*! \{ */ - const MFUnrecAnimationPtr *getMFAnimations (void) const; - MFUnrecAnimationPtr *editMFAnimations (void); + const MFUnrecTBAnimationPtr *getMFAnimations (void) const; + MFUnrecTBAnimationPtr *editMFAnimations (void); - Animation * getAnimations (const UInt32 index) const; + TBAnimation * getAnimations (const UInt32 index) const; /*! \} */ /*---------------------------------------------------------------------*/ @@ -151,10 +151,10 @@ class OSG_TBANIMATION_DLLMAPPING AnimationGroupBase : public Animation /*! \name Ptr MField Set */ /*! \{ */ - void pushToAnimations (Animation * const value ); - void assignAnimations (const MFUnrecAnimationPtr &value); + void pushToAnimations (TBAnimation * const value ); + void assignAnimations (const MFUnrecTBAnimationPtr &value); void removeFromAnimations (UInt32 uiIndex ); - void removeObjFromAnimations(Animation * const value ); + void removeObjFromAnimations(TBAnimation * const value ); void clearAnimations (void ); /*! \} */ @@ -210,7 +210,7 @@ class OSG_TBANIMATION_DLLMAPPING AnimationGroupBase : public Animation /*! \name Fields */ /*! \{ */ - MFUnrecAnimationPtr _mfAnimations; + MFUnrecTBAnimationPtr _mfAnimations; /*! \} */ /*---------------------------------------------------------------------*/ diff --git a/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.inl b/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.inl index 71a5e54c..09e611a9 100644 --- a/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.inl +++ b/Source/System/Dynamics/Animation/Animations/OSGAnimationGroupBase.inl @@ -77,7 +77,7 @@ OSG::UInt16 AnimationGroupBase::getClassGroupId(void) //! Get the value of the \a index element the AnimationGroup::_mfAnimations field. inline -Animation * AnimationGroupBase::getAnimations(const UInt32 index) const +TBAnimation * AnimationGroupBase::getAnimations(const UInt32 index) const { return _mfAnimations[index]; } diff --git a/Source/System/Dynamics/Animation/Animations/OSGFieldAnimation.cpp b/Source/System/Dynamics/Animation/Animations/OSGFieldAnimation.cpp index 5310459d..651e5c86 100644 --- a/Source/System/Dynamics/Animation/Animations/OSGFieldAnimation.cpp +++ b/Source/System/Dynamics/Animation/Animations/OSGFieldAnimation.cpp @@ -45,7 +45,7 @@ #include -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGFieldAnimation.h" //#include "OSGKeyframeAnimator.h" @@ -209,8 +209,8 @@ void FieldAnimation::internalUpdate(Real32 t, const Real32 prev_t) //Update the Field Container if( getAnimator()->animate( - static_cast(getInterpolationType()), - static_cast(getReplacementPolicy()), + static_cast(getInterpolationType()), + static_cast(getReplacementPolicy()), (getCycling() < 0) || (getCycling() > getCycles()), t, prev_t, diff --git a/Source/System/Dynamics/Animation/Animations/OSGFieldAnimation.h b/Source/System/Dynamics/Animation/Animations/OSGFieldAnimation.h index 654d9e79..8ff34b5b 100644 --- a/Source/System/Dynamics/Animation/Animations/OSGFieldAnimation.h +++ b/Source/System/Dynamics/Animation/Animations/OSGFieldAnimation.h @@ -36,8 +36,8 @@ * * \*---------------------------------------------------------------------------*/ -#ifndef _OSGFIELDANIMATION_H_ -#define _OSGFIELDANIMATION_H_ +#ifndef OSGFIELDANIMATION_H_3568257 +#define OSGFIELDANIMATION_H_3568257 #ifdef __sgi #pragma once #endif @@ -134,7 +134,7 @@ typedef FieldAnimation *FieldAnimationP; OSG_END_NAMESPACE -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGFieldAnimationBase.inl" #include "OSGFieldAnimation.inl" diff --git a/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.cpp b/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.cpp index f5a894b9..cd8500ff 100644 --- a/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.cpp +++ b/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.cpp @@ -57,10 +57,10 @@ #include "OSGConfig.h" -#include "OSGAnimator.h" // InterpolationType default header -#include "OSGAnimator.h" // ReplacementPolicy default header +#include "OSGTBAnimator.h" // InterpolationType default header +#include "OSGTBAnimator.h" // ReplacementPolicy default header -#include "OSGAnimator.h" // Animator Class +#include "OSGTBAnimator.h" // Animator Class #include "OSGFieldContainer.h" // Container Class #include "OSGFieldAnimationBase.h" @@ -121,7 +121,7 @@ OSG_BEGIN_NAMESPACE \***************************************************************************/ #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("FieldAnimationPtr", "AnimationPtr"); +DataType FieldTraits::_type("FieldAnimationPtr", "TBAnimationPtr"); #endif OSG_FIELDTRAITS_GETTYPE(FieldAnimation *) @@ -143,9 +143,9 @@ void FieldAnimationBase::classDescInserter(TypeObject &oType) FieldDescriptionBase *pDesc = NULL; - pDesc = new SFUnrecAnimatorPtr::Description( - SFUnrecAnimatorPtr::getClassType(), - "Animator", + pDesc = new SFUnrecTBAnimatorPtr::Description( + SFUnrecTBAnimatorPtr::getClassType(), + "TBAnimator", "", AnimatorFieldId, AnimatorFieldMask, false, @@ -308,7 +308,7 @@ FieldAnimationBase::TypeObject FieldAnimationBase::_type( "\t\tcardinality=\"single\"\n" "\t\tvisibility=\"external\"\n" "\t\taccess=\"public\"\n" - "\t\tdefaultValue=\"Animator::LINEAR_INTERPOLATION\"\n" + "\t\tdefaultValue=\"TBAnimator::LINEAR_INTERPOLATION\"\n" "\t\tdefaultHeader=\"OSGAnimator.h\"\n" "\t>\n" "\t\n" @@ -349,12 +349,12 @@ UInt32 FieldAnimationBase::getContainerSize(void) const //! Get the FieldAnimation::_sfAnimator field. -const SFUnrecAnimatorPtr *FieldAnimationBase::getSFAnimator(void) const +const SFUnrecTBAnimatorPtr *FieldAnimationBase::getSFAnimator(void) const { return &_sfAnimator; } -SFUnrecAnimatorPtr *FieldAnimationBase::editSFAnimator (void) +SFUnrecTBAnimatorPtr *FieldAnimationBase::editSFAnimator (void) { editSField(AnimatorFieldMask); @@ -677,8 +677,8 @@ FieldAnimationBase::FieldAnimationBase(void) : _sfFieldId (), _sfFieldName (), _sfIndex (), - _sfInterpolationType (UInt32(Animator::LINEAR_INTERPOLATION)), - _sfReplacementPolicy (UInt32(Animator::OVERWRITE)) + _sfInterpolationType (UInt32(TBAnimator::LINEAR_INTERPOLATION)), + _sfReplacementPolicy (UInt32(TBAnimator::OVERWRITE)) { } @@ -717,8 +717,8 @@ void FieldAnimationBase::onCreate(const FieldAnimation *source) GetFieldHandlePtr FieldAnimationBase::getHandleAnimator (void) const { - SFUnrecAnimatorPtr::GetHandlePtr returnValue( - new SFUnrecAnimatorPtr::GetHandle( + SFUnrecTBAnimatorPtr::GetHandlePtr returnValue( + new SFUnrecTBAnimatorPtr::GetHandle( &_sfAnimator, this->getType().getFieldDesc(AnimatorFieldId), const_cast(this))); @@ -728,8 +728,8 @@ GetFieldHandlePtr FieldAnimationBase::getHandleAnimator (void) const EditFieldHandlePtr FieldAnimationBase::editHandleAnimator (void) { - SFUnrecAnimatorPtr::EditHandlePtr returnValue( - new SFUnrecAnimatorPtr::EditHandle( + SFUnrecTBAnimatorPtr::EditHandlePtr returnValue( + new SFUnrecTBAnimatorPtr::EditHandle( &_sfAnimator, this->getType().getFieldDesc(AnimatorFieldId), this)); diff --git a/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.h b/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.h index 3b605285..c1fc8160 100644 --- a/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.h +++ b/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.h @@ -63,9 +63,9 @@ //#include "OSGBaseTypes.h" -#include "OSGAnimation.h" // Parent +#include "OSGTBAnimation.h" // Parent -#include "OSGAnimatorFields.h" // Animator type +#include "OSGTBAnimatorFields.h" // Animator type #include "OSGFieldContainerFields.h" // Container type #include "OSGSysFields.h" // FieldId type #include "OSGBaseFields.h" // FieldName type @@ -78,12 +78,12 @@ class FieldAnimation; //! \brief FieldAnimation Base Class. -class OSG_TBANIMATION_DLLMAPPING FieldAnimationBase : public Animation +class OSG_TBANIMATION_DLLMAPPING FieldAnimationBase : public TBAnimation { public: - typedef Animation Inherited; - typedef Animation ParentContainer; + typedef TBAnimation Inherited; + typedef TBAnimation ParentContainer; typedef Inherited::TypeObject TypeObject; typedef TypeObject::InitPhase InitPhase; @@ -125,7 +125,7 @@ class OSG_TBANIMATION_DLLMAPPING FieldAnimationBase : public Animation static const OSG::BitVector NextFieldMask = (TypeTraits::One << NextFieldId); - typedef SFUnrecAnimatorPtr SFAnimatorType; + typedef SFUnrecTBAnimatorPtr SFTBAnimatorType; typedef SFUnrecFieldContainerPtr SFContainerType; typedef SFUInt32 SFFieldIdType; typedef SFString SFFieldNameType; @@ -156,8 +156,8 @@ class OSG_TBANIMATION_DLLMAPPING FieldAnimationBase : public Animation /*! \name Field Get */ /*! \{ */ - const SFUnrecAnimatorPtr *getSFAnimator (void) const; - SFUnrecAnimatorPtr *editSFAnimator (void); + const SFUnrecTBAnimatorPtr *getSFAnimator (void) const; + SFUnrecTBAnimatorPtr *editSFAnimator (void); SFUInt32 *editSFInterpolationType(void); const SFUInt32 *getSFInterpolationType (void) const; @@ -166,7 +166,7 @@ class OSG_TBANIMATION_DLLMAPPING FieldAnimationBase : public Animation const SFUInt32 *getSFReplacementPolicy (void) const; - Animator * getAnimator (void) const; + TBAnimator * getAnimator (void) const; UInt32 &editInterpolationType(void); UInt32 getInterpolationType (void) const; @@ -179,7 +179,7 @@ class OSG_TBANIMATION_DLLMAPPING FieldAnimationBase : public Animation /*! \name Field Set */ /*! \{ */ - void setAnimator (Animator * const value); + void setAnimator (TBAnimator * const value); void setInterpolationType(const UInt32 value); void setReplacementPolicy(const UInt32 value); @@ -246,7 +246,7 @@ class OSG_TBANIMATION_DLLMAPPING FieldAnimationBase : public Animation /*! \name Fields */ /*! \{ */ - SFUnrecAnimatorPtr _sfAnimator; + SFUnrecTBAnimatorPtr _sfAnimator; SFUnrecFieldContainerPtr _sfContainer; SFUInt32 _sfFieldId; SFString _sfFieldName; diff --git a/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.inl b/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.inl index 0a48509d..25692b26 100644 --- a/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.inl +++ b/Source/System/Dynamics/Animation/Animations/OSGFieldAnimationBase.inl @@ -77,14 +77,14 @@ OSG::UInt16 FieldAnimationBase::getClassGroupId(void) //! Get the value of the FieldAnimation::_sfAnimator field. inline -Animator * FieldAnimationBase::getAnimator(void) const +TBAnimator * FieldAnimationBase::getAnimator(void) const { return _sfAnimator.getValue(); } //! Set the value of the FieldAnimation::_sfAnimator field. inline -void FieldAnimationBase::setAnimator(Animator * const value) +void FieldAnimationBase::setAnimator(TBAnimator * const value) { editSField(AnimatorFieldMask); diff --git a/Source/System/Dynamics/Animation/Animators/OSGBlendedKeyframeAnimatorBase.cpp b/Source/System/Dynamics/Animation/Animators/OSGBlendedKeyframeAnimatorBase.cpp index e5eaa366..bada6a63 100644 --- a/Source/System/Dynamics/Animation/Animators/OSGBlendedKeyframeAnimatorBase.cpp +++ b/Source/System/Dynamics/Animation/Animators/OSGBlendedKeyframeAnimatorBase.cpp @@ -116,7 +116,7 @@ OSG_BEGIN_NAMESPACE \***************************************************************************/ #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("BlendedKeyframeAnimatorPtr", "AnimatorPtr"); +DataType FieldTraits::_type("BlendedKeyframeAnimatorPtr", "TBAnimatorPtr"); #endif OSG_FIELDTRAITS_GETTYPE(BlendedKeyframeAnimator *) diff --git a/Source/System/Dynamics/Animation/Animators/OSGBlendedKeyframeAnimatorBase.h b/Source/System/Dynamics/Animation/Animators/OSGBlendedKeyframeAnimatorBase.h index 5117e67b..c7983236 100644 --- a/Source/System/Dynamics/Animation/Animators/OSGBlendedKeyframeAnimatorBase.h +++ b/Source/System/Dynamics/Animation/Animators/OSGBlendedKeyframeAnimatorBase.h @@ -63,7 +63,7 @@ //#include "OSGBaseTypes.h" -#include "OSGAnimator.h" // Parent +#include "OSGTBAnimator.h" // Parent #include "OSGKeyframeSequenceFields.h" // KeyframeSequences type #include "OSGSysFields.h" // BlendAmounts type @@ -76,12 +76,12 @@ class BlendedKeyframeAnimator; //! \brief BlendedKeyframeAnimator Base Class. -class OSG_TBANIMATION_DLLMAPPING BlendedKeyframeAnimatorBase : public Animator +class OSG_TBANIMATION_DLLMAPPING BlendedKeyframeAnimatorBase : public TBAnimator { public: - typedef Animator Inherited; - typedef Animator ParentContainer; + typedef TBAnimator Inherited; + typedef TBAnimator ParentContainer; typedef Inherited::TypeObject TypeObject; typedef TypeObject::InitPhase InitPhase; diff --git a/Source/System/Dynamics/Animation/Animators/OSGKeyframeAnimatorBase.cpp b/Source/System/Dynamics/Animation/Animators/OSGKeyframeAnimatorBase.cpp index a021d484..7a9ece55 100644 --- a/Source/System/Dynamics/Animation/Animators/OSGKeyframeAnimatorBase.cpp +++ b/Source/System/Dynamics/Animation/Animators/OSGKeyframeAnimatorBase.cpp @@ -94,7 +94,7 @@ OSG_BEGIN_NAMESPACE \***************************************************************************/ #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("KeyframeAnimatorPtr", "AnimatorPtr"); +DataType FieldTraits::_type("KeyframeAnimatorPtr", "TBAnimatorPtr"); #endif OSG_FIELDTRAITS_GETTYPE(KeyframeAnimator *) diff --git a/Source/System/Dynamics/Animation/Animators/OSGKeyframeAnimatorBase.h b/Source/System/Dynamics/Animation/Animators/OSGKeyframeAnimatorBase.h index f3c314d8..ef2e3f8c 100644 --- a/Source/System/Dynamics/Animation/Animators/OSGKeyframeAnimatorBase.h +++ b/Source/System/Dynamics/Animation/Animators/OSGKeyframeAnimatorBase.h @@ -63,7 +63,7 @@ //#include "OSGBaseTypes.h" -#include "OSGAnimator.h" // Parent +#include "OSGTBAnimator.h" // Parent #include "OSGKeyframeSequenceFields.h" // KeyframeSequence type @@ -75,12 +75,12 @@ class KeyframeAnimator; //! \brief KeyframeAnimator Base Class. -class OSG_TBANIMATION_DLLMAPPING KeyframeAnimatorBase : public Animator +class OSG_TBANIMATION_DLLMAPPING KeyframeAnimatorBase : public TBAnimator { public: - typedef Animator Inherited; - typedef Animator ParentContainer; + typedef TBAnimator Inherited; + typedef TBAnimator ParentContainer; typedef Inherited::TypeObject TypeObject; typedef TypeObject::InitPhase InitPhase; diff --git a/Source/System/Dynamics/Animation/Animators/OSGTransformAnimatorBase.cpp b/Source/System/Dynamics/Animation/Animators/OSGTransformAnimatorBase.cpp index 2dc8c083..e0e1346a 100644 --- a/Source/System/Dynamics/Animation/Animators/OSGTransformAnimatorBase.cpp +++ b/Source/System/Dynamics/Animation/Animators/OSGTransformAnimatorBase.cpp @@ -104,7 +104,7 @@ OSG_BEGIN_NAMESPACE //Animation FieldAnimationRecPtr TheAnimation = FieldAnimation::create(); TheAnimation->setAnimator(TheAnimator); - TheAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION); + TheAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION); TheAnimation->setCycling(2); TheAnimation->setAnimatedField(TransCore, std::string("matrix")); @@ -169,7 +169,7 @@ OSG_BEGIN_NAMESPACE \***************************************************************************/ #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("TransformAnimatorPtr", "AnimatorPtr"); +DataType FieldTraits::_type("TransformAnimatorPtr", "TBAnimatorPtr"); #endif OSG_FIELDTRAITS_GETTYPE(TransformAnimator *) @@ -377,7 +377,7 @@ TransformAnimatorBase::TypeObject TransformAnimatorBase::_type( " //Animation\n" " FieldAnimationRecPtr TheAnimation = FieldAnimation::create();\n" " TheAnimation->setAnimator(TheAnimator);\n" - " TheAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION);\n" + " TheAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION);\n" " TheAnimation->setCycling(2);\n" " TheAnimation->setAnimatedField(TransCore, std::string(\"matrix\"));\n" "\n" @@ -535,7 +535,7 @@ TransformAnimatorBase::TypeObject TransformAnimatorBase::_type( "//Animation\n" "FieldAnimationRecPtr TheAnimation = FieldAnimation::create();\n" "TheAnimation->setAnimator(TheAnimator);\n" - "TheAnimation->setInterpolationType(Animator::LINEAR_INTERPOLATION);\n" + "TheAnimation->setInterpolationType(TBAnimator::LINEAR_INTERPOLATION);\n" "TheAnimation->setCycling(2);\n" "TheAnimation->setAnimatedField(TransCore, std::string(\"matrix\"));\n" "\n" diff --git a/Source/System/Dynamics/Animation/Animators/OSGTransformAnimatorBase.h b/Source/System/Dynamics/Animation/Animators/OSGTransformAnimatorBase.h index 4e0e2a98..4d8ff45e 100644 --- a/Source/System/Dynamics/Animation/Animators/OSGTransformAnimatorBase.h +++ b/Source/System/Dynamics/Animation/Animators/OSGTransformAnimatorBase.h @@ -63,7 +63,7 @@ //#include "OSGBaseTypes.h" -#include "OSGAnimator.h" // Parent +#include "OSGTBAnimator.h" // Parent #include "OSGKeyframeNumberSequenceTmplFields.h" // XTranslationSequence type #include "OSGKeyframeVectorSequenceTmplFields.h" // ScaleSequence type @@ -76,12 +76,12 @@ class TransformAnimator; //! \brief TransformAnimator Base Class. -class OSG_TBANIMATION_DLLMAPPING TransformAnimatorBase : public Animator +class OSG_TBANIMATION_DLLMAPPING TransformAnimatorBase : public TBAnimator { public: - typedef Animator Inherited; - typedef Animator ParentContainer; + typedef TBAnimator Inherited; + typedef TBAnimator ParentContainer; typedef Inherited::TypeObject TypeObject; typedef TypeObject::InitPhase InitPhase; diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimation.cpp b/Source/System/Dynamics/Animation/Base/OSGTBAnimation.cpp similarity index 89% rename from Source/System/Dynamics/Animation/Base/OSGAnimation.cpp rename to Source/System/Dynamics/Animation/Base/OSGTBAnimation.cpp index dd3ce8c6..d0fd3a97 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimation.cpp +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimation.cpp @@ -45,7 +45,7 @@ #include -#include "OSGAnimation.h" +#include "OSGTBAnimation.h" #include "OSGUpdateEventDetails.h" #include "OSGStatCollector.h" #include @@ -74,10 +74,10 @@ OSG_BEGIN_NAMESPACE * Class variables * \***************************************************************************/ -StatElemDesc Animation::statAnimUpdateTime("AnimUpdateTime", +StatElemDesc TBAnimation::statAnimUpdateTime("AnimUpdateTime", "time to update all animations"); -StatElemDesc Animation::statNAnimations("NAnimations", +StatElemDesc TBAnimation::statNAnimations("NAnimations", "number of animations updated"); @@ -85,7 +85,7 @@ StatElemDesc Animation::statNAnimations("NAnimations", * Class methods * \***************************************************************************/ -void Animation::initMethod(InitPhase ePhase) +void TBAnimation::initMethod(InitPhase ePhase) { Inherited::initMethod(ePhase); @@ -109,7 +109,7 @@ void Animation::initMethod(InitPhase ePhase) * * @return The length in seconds of the animation. */ -Real32 Animation::getLength(void) const +Real32 TBAnimation::getLength(void) const { if(getCycling() > 0) { @@ -129,7 +129,7 @@ Real32 Animation::getLength(void) const * * @return The length, in seconds, of one cycle of the animation. */ -Real32 Animation::getCycleLength(void) const +Real32 TBAnimation::getCycleLength(void) const { Real32 UnclippedCycleLength; if(getSpan() > 0.0f) @@ -163,7 +163,7 @@ Real32 Animation::getCycleLength(void) const * * @return The length, in seconds, of the unclipped animation. */ -Real32 Animation::getUnclippedLength(void) const +Real32 TBAnimation::getUnclippedLength(void) const { if(getCycling() > 0) { @@ -182,7 +182,7 @@ Real32 Animation::getUnclippedLength(void) const * @param[in] StartTime The time (in seconds) to start the animation at. * This defaults to time 0.0. */ -void Animation::start(const Time& StartTime) +void TBAnimation::start(const Time& StartTime) { if(_IsPlaying) { @@ -205,7 +205,7 @@ void Animation::start(const Time& StartTime) * * @param[in] SeekTime The time, in seconds, to move the animation to. */ -void Animation::seek(const Time& SeekTime) +void TBAnimation::seek(const Time& SeekTime) { if(_IsPlaying) { @@ -223,7 +223,7 @@ void Animation::seek(const Time& SeekTime) * animation is already paused. If false, the animation will be * unpaused. */ -void Animation::pause(bool ShouldPause) +void TBAnimation::pause(bool ShouldPause) { if(_IsPaused && !ShouldPause) { @@ -244,7 +244,7 @@ void Animation::pause(bool ShouldPause) * @param[in] DisconnectFromEventProducer If true the animation will also be * detached from the event producer. By default it is true. */ -void Animation::stop(bool DisconnectFromEventProducer) +void TBAnimation::stop(bool DisconnectFromEventProducer) { if(_IsPlaying) { @@ -268,7 +268,7 @@ void Animation::stop(bool DisconnectFromEventProducer) * \param[in] ElapsedTime The time, in seconds, since the previous call to * update. */ -bool Animation::update(const Time& ElapsedTime) +bool TBAnimation::update(const Time& ElapsedTime) { if(!_IsPlaying || _IsPaused) { @@ -359,7 +359,7 @@ bool Animation::update(const Time& ElapsedTime) * * @param[in] Producer A ReflexiveContainer that can produce an UpdateEvent. */ -void Animation::attachUpdateProducer(ReflexiveContainer* const producer) +void TBAnimation::attachUpdateProducer(ReflexiveContainer* const producer) { const EventDescription* Desc(producer->getProducerType().findEventDescription("Update")); @@ -376,17 +376,17 @@ void Animation::attachUpdateProducer(ReflexiveContainer* const producer) * \brief Detach the event update producer from this animation if there is one * attached. */ -void Animation::detachUpdateProducer(void) +void TBAnimation::detachUpdateProducer(void) { _UpdateEventConnection.disconnect(); } -bool Animation::isConnectableEvent(EventDescription const * eventDesc) const +bool TBAnimation::isConnectableEvent(EventDescription const * eventDesc) const { return eventDesc->getEventArgumentType() == FieldTraits::getType(); } -Animation::EventDescVector Animation::getConnectableEvents(void) const +TBAnimation::EventDescVector TBAnimation::getConnectableEvents(void) const { EventDescVector ConnectableEvents; @@ -398,7 +398,7 @@ Animation::EventDescVector Animation::getConnectableEvents(void) const } bool -Animation::isConnected(EventDescription const * eventDesc) const +TBAnimation::isConnected(EventDescription const * eventDesc) const { if(eventDesc->getEventArgumentType() == FieldTraits::getType()) { @@ -411,7 +411,7 @@ Animation::isConnected(EventDescription const * eventDesc) const } bool -Animation::disconnectFromEvent(EventDescription const * eventDesc) const +TBAnimation::disconnectFromEvent(EventDescription const * eventDesc) const { if(eventDesc->getEventArgumentType() == FieldTraits::getType()) { @@ -425,7 +425,7 @@ Animation::disconnectFromEvent(EventDescription const * eventDesc) const } boost::signals2::connection -Animation::connectToEvent(EventDescription const * eventDesc, +TBAnimation::connectToEvent(EventDescription const * eventDesc, ReflexiveContainer* const eventProducer) const { //Validate the EventDescription and producer @@ -433,8 +433,8 @@ Animation::connectToEvent(EventDescription const * eventDesc, if(validateConnectable(eventDesc,eventProducer)) { return eventProducer->connectEvent(LocalDesc->getEventId(), - boost::bind(&Animation::handleUpdate, - const_cast(this), + boost::bind(&TBAnimation::handleUpdate, + const_cast(this), _1)); } else @@ -447,42 +447,42 @@ Animation::connectToEvent(EventDescription const * eventDesc, - private - \*-------------------------------------------------------------------------*/ -void Animation::produceAnimationStarted(void) +void TBAnimation::produceAnimationStarted(void) { AnimationEventDetailsUnrecPtr Details = AnimationEventDetails::create(this,getTimeStamp()); Inherited::produceAnimationStarted(Details); } -void Animation::produceAnimationStopped(void) +void TBAnimation::produceAnimationStopped(void) { AnimationEventDetailsUnrecPtr Details = AnimationEventDetails::create(this,getTimeStamp()); Inherited::produceAnimationStopped(Details); } -void Animation::produceAnimationPaused(void) +void TBAnimation::produceAnimationPaused(void) { AnimationEventDetailsUnrecPtr Details = AnimationEventDetails::create(this,getTimeStamp()); Inherited::produceAnimationPaused(Details); } -void Animation::produceAnimationUnpaused(void) +void TBAnimation::produceAnimationUnpaused(void) { AnimationEventDetailsUnrecPtr Details = AnimationEventDetails::create(this,getTimeStamp()); Inherited::produceAnimationUnpaused(Details); } -void Animation::produceAnimationEnded(void) +void TBAnimation::produceAnimationEnded(void) { AnimationEventDetailsUnrecPtr Details = AnimationEventDetails::create(this,getTimeStamp()); Inherited::produceAnimationEnded(Details); } -void Animation::produceAnimationCycled(void) +void TBAnimation::produceAnimationCycled(void) { AnimationEventDetailsUnrecPtr Details = AnimationEventDetails::create(this,getTimeStamp()); @@ -491,7 +491,7 @@ void Animation::produceAnimationCycled(void) /*----------------------- constructors & destructors ----------------------*/ -Animation::Animation(void) : +TBAnimation::TBAnimation(void) : Inherited(), _CurrentTime(0.0), _PrevTime(0.0), @@ -500,7 +500,7 @@ Animation::Animation(void) : { } -Animation::Animation(const Animation &source) : +TBAnimation::TBAnimation(const TBAnimation &source) : Inherited(source), _CurrentTime(0.0), _PrevTime(0.0), @@ -509,26 +509,26 @@ Animation::Animation(const Animation &source) : { } -Animation::~Animation(void) +TBAnimation::~TBAnimation(void) { } /*----------------------------- class specific ----------------------------*/ -void Animation::changed(ConstFieldMaskArg whichField, +void TBAnimation::changed(ConstFieldMaskArg whichField, UInt32 origin, BitVector details) { Inherited::changed(whichField, origin, details); } -void Animation::dump( UInt32 , +void TBAnimation::dump( UInt32 , const BitVector ) const { SLOG << "Dump Animation NI" << std::endl; } -void Animation::handleUpdate(EventDetails* const details) +void TBAnimation::handleUpdate(EventDetails* const details) { Time elapsed = dynamic_cast(details)->getElapsedTime(); update(elapsed); diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimation.fcd b/Source/System/Dynamics/Animation/Base/OSGTBAnimation.fcd similarity index 100% rename from Source/System/Dynamics/Animation/Base/OSGAnimation.fcd rename to Source/System/Dynamics/Animation/Base/OSGTBAnimation.fcd diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimation.h b/Source/System/Dynamics/Animation/Base/OSGTBAnimation.h similarity index 93% rename from Source/System/Dynamics/Animation/Base/OSGAnimation.h rename to Source/System/Dynamics/Animation/Base/OSGTBAnimation.h index f1e8953b..a972d569 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimation.h +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimation.h @@ -36,13 +36,13 @@ * * \*---------------------------------------------------------------------------*/ -#ifndef _OSGANIMATION_H_ -#define _OSGANIMATION_H_ +#ifndef OSGTBANIMATION_H_ +#define OSGTBANIMATION_H_ #ifdef __sgi #pragma once #endif -#include "OSGAnimationBase.h" +#include "OSGTBAnimationBase.h" //#include "OSGAnimationAdvancer.h" #include "OSGAnimationEventDetails.h" @@ -50,7 +50,7 @@ OSG_BEGIN_NAMESPACE -class OSG_TBANIMATION_DLLMAPPING Animation : public AnimationBase +class OSG_TBANIMATION_DLLMAPPING TBAnimation : public TBAnimationBase { protected: @@ -58,8 +58,8 @@ class OSG_TBANIMATION_DLLMAPPING Animation : public AnimationBase public: - typedef AnimationBase Inherited; - typedef Animation Self; + typedef TBAnimationBase Inherited; + typedef TBAnimation Self; /*---------------------------------------------------------------------*/ /*! \name Sync */ @@ -137,15 +137,15 @@ class OSG_TBANIMATION_DLLMAPPING Animation : public AnimationBase /*! \name Constructors */ /*! \{ */ - Animation(void); - Animation(const Animation &source); + TBAnimation(void); + TBAnimation(const TBAnimation &source); /*! \} */ /*---------------------------------------------------------------------*/ /*! \name Destructors */ /*! \{ */ - virtual ~Animation(void); + virtual ~TBAnimation(void); /*! \} */ /*---------------------------------------------------------------------*/ @@ -176,18 +176,18 @@ class OSG_TBANIMATION_DLLMAPPING Animation : public AnimationBase private: friend class FieldContainer; - friend class AnimationBase; + friend class TBAnimationBase; friend class AnimationGroup; // prohibit default functions (move to 'public' if you need one) - void operator =(const Animation &source); + void operator =(const TBAnimation &source); }; -typedef Animation *AnimationP; +typedef TBAnimation *TBAnimationP; OSG_END_NAMESPACE -#include "OSGAnimationBase.inl" -#include "OSGAnimation.inl" +#include "OSGTBAnimationBase.inl" +#include "OSGTBAnimation.inl" #endif /* _OSGANIMATION_H_ */ diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimation.inl b/Source/System/Dynamics/Animation/Base/OSGTBAnimation.inl similarity index 97% rename from Source/System/Dynamics/Animation/Base/OSGAnimation.inl rename to Source/System/Dynamics/Animation/Base/OSGTBAnimation.inl index 821f9f46..0887478a 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimation.inl +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimation.inl @@ -47,7 +47,7 @@ OSG_BEGIN_NAMESPACE * @return true if the animation is playing, false otherwise. */ inline -bool Animation::isPlaying(void) const +bool TBAnimation::isPlaying(void) const { return _IsPlaying; } @@ -59,7 +59,7 @@ bool Animation::isPlaying(void) const * @return true if the animation is paused, false otherwise. */ inline -bool Animation::isPaused(void) const +bool TBAnimation::isPaused(void) const { return _IsPaused; } diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimationBase.cpp b/Source/System/Dynamics/Animation/Base/OSGTBAnimationBase.cpp similarity index 83% rename from Source/System/Dynamics/Animation/Base/OSGAnimationBase.cpp rename to Source/System/Dynamics/Animation/Base/OSGTBAnimationBase.cpp index a0283304..6ab29277 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimationBase.cpp +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimationBase.cpp @@ -59,8 +59,8 @@ -#include "OSGAnimationBase.h" -#include "OSGAnimation.h" +#include "OSGTBAnimationBase.h" +#include "OSGTBAnimation.h" #include @@ -122,24 +122,24 @@ OSG_BEGIN_NAMESPACE \***************************************************************************/ #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("AnimationPtr", "AttachmentContainerPtr"); +DataType FieldTraits::_type("TBAnimationPtr", "AttachmentContainerPtr"); #endif -OSG_FIELDTRAITS_GETTYPE(Animation *) +OSG_FIELDTRAITS_GETTYPE(TBAnimation *) OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - Animation *, + TBAnimation *, 0); OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - Animation *, + TBAnimation *, 0); /***************************************************************************\ * Field Description * \***************************************************************************/ -void AnimationBase::classDescInserter(TypeObject &oType) +void TBAnimationBase::classDescInserter(TypeObject &oType) { FieldDescriptionBase *pDesc = NULL; @@ -151,8 +151,8 @@ void AnimationBase::classDescInserter(TypeObject &oType) CyclingFieldId, CyclingFieldMask, false, (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&Animation::editHandleCycling), - static_cast(&Animation::getHandleCycling)); + static_cast(&TBAnimation::editHandleCycling), + static_cast(&TBAnimation::getHandleCycling)); oType.addInitialDesc(pDesc); @@ -163,8 +163,8 @@ void AnimationBase::classDescInserter(TypeObject &oType) ScaleFieldId, ScaleFieldMask, false, (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&Animation::editHandleScale), - static_cast(&Animation::getHandleScale)); + static_cast(&TBAnimation::editHandleScale), + static_cast(&TBAnimation::getHandleScale)); oType.addInitialDesc(pDesc); @@ -175,8 +175,8 @@ void AnimationBase::classDescInserter(TypeObject &oType) OffsetFieldId, OffsetFieldMask, false, (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&Animation::editHandleOffset), - static_cast(&Animation::getHandleOffset)); + static_cast(&TBAnimation::editHandleOffset), + static_cast(&TBAnimation::getHandleOffset)); oType.addInitialDesc(pDesc); @@ -187,8 +187,8 @@ void AnimationBase::classDescInserter(TypeObject &oType) SpanFieldId, SpanFieldMask, false, (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&Animation::editHandleSpan), - static_cast(&Animation::getHandleSpan)); + static_cast(&TBAnimation::editHandleSpan), + static_cast(&TBAnimation::getHandleSpan)); oType.addInitialDesc(pDesc); @@ -199,22 +199,22 @@ void AnimationBase::classDescInserter(TypeObject &oType) CyclesFieldId, CyclesFieldMask, true, (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&Animation::editHandleCycles), - static_cast(&Animation::getHandleCycles)); + static_cast(&TBAnimation::editHandleCycles), + static_cast(&TBAnimation::getHandleCycles)); oType.addInitialDesc(pDesc); } -AnimationBase::TypeObject AnimationBase::_type( - AnimationBase::getClassname(), +TBAnimationBase::TypeObject TBAnimationBase::_type( + TBAnimationBase::getClassname(), Inherited::getClassname(), "NULL", 0, NULL, - Animation::initMethod, - Animation::exitMethod, - reinterpret_cast(&Animation::classDescInserter), + TBAnimation::initMethod, + TBAnimation::exitMethod, + reinterpret_cast(&TBAnimation::classDescInserter), false, 0, "\n" @@ -350,53 +350,53 @@ AnimationBase::TypeObject AnimationBase::_type( //! Animation Produced Events -EventDescription *AnimationBase::_eventDesc[] = +EventDescription *TBAnimationBase::_eventDesc[] = { new EventDescription("AnimationStarted", "", AnimationStartedEventId, FieldTraits::getType(), true, - static_cast(&AnimationBase::getHandleAnimationStartedSignal)), + static_cast(&TBAnimationBase::getHandleAnimationStartedSignal)), new EventDescription("AnimationStopped", "", AnimationStoppedEventId, FieldTraits::getType(), true, - static_cast(&AnimationBase::getHandleAnimationStoppedSignal)), + static_cast(&TBAnimationBase::getHandleAnimationStoppedSignal)), new EventDescription("AnimationPaused", "", AnimationPausedEventId, FieldTraits::getType(), true, - static_cast(&AnimationBase::getHandleAnimationPausedSignal)), + static_cast(&TBAnimationBase::getHandleAnimationPausedSignal)), new EventDescription("AnimationUnpaused", "", AnimationUnpausedEventId, FieldTraits::getType(), true, - static_cast(&AnimationBase::getHandleAnimationUnpausedSignal)), + static_cast(&TBAnimationBase::getHandleAnimationUnpausedSignal)), new EventDescription("AnimationEnded", "", AnimationEndedEventId, FieldTraits::getType(), true, - static_cast(&AnimationBase::getHandleAnimationEndedSignal)), + static_cast(&TBAnimationBase::getHandleAnimationEndedSignal)), new EventDescription("AnimationCycled", "", AnimationCycledEventId, FieldTraits::getType(), true, - static_cast(&AnimationBase::getHandleAnimationCycledSignal)) + static_cast(&TBAnimationBase::getHandleAnimationCycledSignal)) }; -EventProducerType AnimationBase::_producerType( +EventProducerType TBAnimationBase::_producerType( "AnimationProducerType", "EventProducerType", "", @@ -406,89 +406,89 @@ EventProducerType AnimationBase::_producerType( /*------------------------------ get -----------------------------------*/ -FieldContainerType &AnimationBase::getType(void) +FieldContainerType &TBAnimationBase::getType(void) { return _type; } -const FieldContainerType &AnimationBase::getType(void) const +const FieldContainerType &TBAnimationBase::getType(void) const { return _type; } -const EventProducerType &AnimationBase::getProducerType(void) const +const EventProducerType &TBAnimationBase::getProducerType(void) const { return _producerType; } -UInt32 AnimationBase::getContainerSize(void) const +UInt32 TBAnimationBase::getContainerSize(void) const { - return sizeof(Animation); + return sizeof(TBAnimation); } /*------------------------- decorator get ------------------------------*/ -SFInt32 *AnimationBase::editSFCycling(void) +SFInt32 *TBAnimationBase::editSFCycling(void) { editSField(CyclingFieldMask); return &_sfCycling; } -const SFInt32 *AnimationBase::getSFCycling(void) const +const SFInt32 *TBAnimationBase::getSFCycling(void) const { return &_sfCycling; } -SFReal32 *AnimationBase::editSFScale(void) +SFReal32 *TBAnimationBase::editSFScale(void) { editSField(ScaleFieldMask); return &_sfScale; } -const SFReal32 *AnimationBase::getSFScale(void) const +const SFReal32 *TBAnimationBase::getSFScale(void) const { return &_sfScale; } -SFReal32 *AnimationBase::editSFOffset(void) +SFReal32 *TBAnimationBase::editSFOffset(void) { editSField(OffsetFieldMask); return &_sfOffset; } -const SFReal32 *AnimationBase::getSFOffset(void) const +const SFReal32 *TBAnimationBase::getSFOffset(void) const { return &_sfOffset; } -SFReal32 *AnimationBase::editSFSpan(void) +SFReal32 *TBAnimationBase::editSFSpan(void) { editSField(SpanFieldMask); return &_sfSpan; } -const SFReal32 *AnimationBase::getSFSpan(void) const +const SFReal32 *TBAnimationBase::getSFSpan(void) const { return &_sfSpan; } -SFReal32 *AnimationBase::editSFCycles(void) +SFReal32 *TBAnimationBase::editSFCycles(void) { editSField(CyclesFieldMask); return &_sfCycles; } -const SFReal32 *AnimationBase::getSFCycles(void) const +const SFReal32 *TBAnimationBase::getSFCycles(void) const { return &_sfCycles; } @@ -500,7 +500,7 @@ const SFReal32 *AnimationBase::getSFCycles(void) const /*------------------------------ access -----------------------------------*/ -UInt32 AnimationBase::getBinSize(ConstFieldMaskArg whichField) +UInt32 TBAnimationBase::getBinSize(ConstFieldMaskArg whichField) { UInt32 returnValue = Inherited::getBinSize(whichField); @@ -528,7 +528,7 @@ UInt32 AnimationBase::getBinSize(ConstFieldMaskArg whichField) return returnValue; } -void AnimationBase::copyToBin(BinaryDataHandler &pMem, +void TBAnimationBase::copyToBin(BinaryDataHandler &pMem, ConstFieldMaskArg whichField) { Inherited::copyToBin(pMem, whichField); @@ -555,7 +555,7 @@ void AnimationBase::copyToBin(BinaryDataHandler &pMem, } } -void AnimationBase::copyFromBin(BinaryDataHandler &pMem, +void TBAnimationBase::copyFromBin(BinaryDataHandler &pMem, ConstFieldMaskArg whichField) { Inherited::copyFromBin(pMem, whichField); @@ -585,7 +585,7 @@ void AnimationBase::copyFromBin(BinaryDataHandler &pMem, /*------------------------- event producers ----------------------------------*/ -void AnimationBase::produceEvent(UInt32 eventId, EventDetails* const e) +void TBAnimationBase::produceEvent(UInt32 eventId, EventDetails* const e) { switch(eventId) { @@ -631,7 +631,7 @@ void AnimationBase::produceEvent(UInt32 eventId, EventDetails* const e) } } -boost::signals2::connection AnimationBase::connectEvent(UInt32 eventId, +boost::signals2::connection TBAnimationBase::connectEvent(UInt32 eventId, const BaseEventType::slot_type &listener, boost::signals2::connect_position at) { @@ -664,7 +664,7 @@ boost::signals2::connection AnimationBase::connectEvent(UInt32 eventId, return boost::signals2::connection(); } -boost::signals2::connection AnimationBase::connectEvent(UInt32 eventId, +boost::signals2::connection TBAnimationBase::connectEvent(UInt32 eventId, const BaseEventType::group_type &group, const BaseEventType::slot_type &listener, boost::signals2::connect_position at) @@ -698,7 +698,7 @@ boost::signals2::connection AnimationBase::connectEvent(UInt32 eventId, return boost::signals2::connection(); } -void AnimationBase::disconnectEvent(UInt32 eventId, const BaseEventType::group_type &group) +void TBAnimationBase::disconnectEvent(UInt32 eventId, const BaseEventType::group_type &group) { switch(eventId) { @@ -726,7 +726,7 @@ void AnimationBase::disconnectEvent(UInt32 eventId, const BaseEventType::group_ } } -void AnimationBase::disconnectAllSlotsEvent(UInt32 eventId) +void TBAnimationBase::disconnectAllSlotsEvent(UInt32 eventId) { switch(eventId) { @@ -754,7 +754,7 @@ void AnimationBase::disconnectAllSlotsEvent(UInt32 eventId) } } -bool AnimationBase::isEmptyEvent(UInt32 eventId) const +bool TBAnimationBase::isEmptyEvent(UInt32 eventId) const { switch(eventId) { @@ -783,7 +783,7 @@ bool AnimationBase::isEmptyEvent(UInt32 eventId) const } } -UInt32 AnimationBase::numSlotsEvent(UInt32 eventId) const +UInt32 TBAnimationBase::numSlotsEvent(UInt32 eventId) const { switch(eventId) { @@ -815,7 +815,7 @@ UInt32 AnimationBase::numSlotsEvent(UInt32 eventId) const /*------------------------- constructors ----------------------------------*/ -AnimationBase::AnimationBase(void) : +TBAnimationBase::TBAnimationBase(void) : Inherited(), _sfCycling (Int32(-1)), _sfScale (Real32(1.0)), @@ -825,7 +825,7 @@ AnimationBase::AnimationBase(void) : { } -AnimationBase::AnimationBase(const AnimationBase &source) : +TBAnimationBase::TBAnimationBase(const TBAnimationBase &source) : Inherited(source), _sfCycling (source._sfCycling ), _sfScale (source._sfScale ), @@ -838,23 +838,23 @@ AnimationBase::AnimationBase(const AnimationBase &source) : /*-------------------------- destructors ----------------------------------*/ -AnimationBase::~AnimationBase(void) +TBAnimationBase::~TBAnimationBase(void) { } -GetFieldHandlePtr AnimationBase::getHandleCycling (void) const +GetFieldHandlePtr TBAnimationBase::getHandleCycling (void) const { SFInt32::GetHandlePtr returnValue( new SFInt32::GetHandle( &_sfCycling, this->getType().getFieldDesc(CyclingFieldId), - const_cast(this))); + const_cast(this))); return returnValue; } -EditFieldHandlePtr AnimationBase::editHandleCycling (void) +EditFieldHandlePtr TBAnimationBase::editHandleCycling (void) { SFInt32::EditHandlePtr returnValue( new SFInt32::EditHandle( @@ -868,18 +868,18 @@ EditFieldHandlePtr AnimationBase::editHandleCycling (void) return returnValue; } -GetFieldHandlePtr AnimationBase::getHandleScale (void) const +GetFieldHandlePtr TBAnimationBase::getHandleScale (void) const { SFReal32::GetHandlePtr returnValue( new SFReal32::GetHandle( &_sfScale, this->getType().getFieldDesc(ScaleFieldId), - const_cast(this))); + const_cast(this))); return returnValue; } -EditFieldHandlePtr AnimationBase::editHandleScale (void) +EditFieldHandlePtr TBAnimationBase::editHandleScale (void) { SFReal32::EditHandlePtr returnValue( new SFReal32::EditHandle( @@ -893,18 +893,18 @@ EditFieldHandlePtr AnimationBase::editHandleScale (void) return returnValue; } -GetFieldHandlePtr AnimationBase::getHandleOffset (void) const +GetFieldHandlePtr TBAnimationBase::getHandleOffset (void) const { SFReal32::GetHandlePtr returnValue( new SFReal32::GetHandle( &_sfOffset, this->getType().getFieldDesc(OffsetFieldId), - const_cast(this))); + const_cast(this))); return returnValue; } -EditFieldHandlePtr AnimationBase::editHandleOffset (void) +EditFieldHandlePtr TBAnimationBase::editHandleOffset (void) { SFReal32::EditHandlePtr returnValue( new SFReal32::EditHandle( @@ -918,18 +918,18 @@ EditFieldHandlePtr AnimationBase::editHandleOffset (void) return returnValue; } -GetFieldHandlePtr AnimationBase::getHandleSpan (void) const +GetFieldHandlePtr TBAnimationBase::getHandleSpan (void) const { SFReal32::GetHandlePtr returnValue( new SFReal32::GetHandle( &_sfSpan, this->getType().getFieldDesc(SpanFieldId), - const_cast(this))); + const_cast(this))); return returnValue; } -EditFieldHandlePtr AnimationBase::editHandleSpan (void) +EditFieldHandlePtr TBAnimationBase::editHandleSpan (void) { SFReal32::EditHandlePtr returnValue( new SFReal32::EditHandle( @@ -943,18 +943,18 @@ EditFieldHandlePtr AnimationBase::editHandleSpan (void) return returnValue; } -GetFieldHandlePtr AnimationBase::getHandleCycles (void) const +GetFieldHandlePtr TBAnimationBase::getHandleCycles (void) const { SFReal32::GetHandlePtr returnValue( new SFReal32::GetHandle( &_sfCycles, this->getType().getFieldDesc(CyclesFieldId), - const_cast(this))); + const_cast(this))); return returnValue; } -EditFieldHandlePtr AnimationBase::editHandleCycles (void) +EditFieldHandlePtr TBAnimationBase::editHandleCycles (void) { SFReal32::EditHandlePtr returnValue( new SFReal32::EditHandle( @@ -969,83 +969,83 @@ EditFieldHandlePtr AnimationBase::editHandleCycles (void) } -GetEventHandlePtr AnimationBase::getHandleAnimationStartedSignal(void) const +GetEventHandlePtr TBAnimationBase::getHandleAnimationStartedSignal(void) const { GetEventHandlePtr returnValue( new GetTypedEventHandle( const_cast(&_AnimationStartedEvent), _producerType.getEventDescription(AnimationStartedEventId), - const_cast(this))); + const_cast(this))); return returnValue; } -GetEventHandlePtr AnimationBase::getHandleAnimationStoppedSignal(void) const +GetEventHandlePtr TBAnimationBase::getHandleAnimationStoppedSignal(void) const { GetEventHandlePtr returnValue( new GetTypedEventHandle( const_cast(&_AnimationStoppedEvent), _producerType.getEventDescription(AnimationStoppedEventId), - const_cast(this))); + const_cast(this))); return returnValue; } -GetEventHandlePtr AnimationBase::getHandleAnimationPausedSignal(void) const +GetEventHandlePtr TBAnimationBase::getHandleAnimationPausedSignal(void) const { GetEventHandlePtr returnValue( new GetTypedEventHandle( const_cast(&_AnimationPausedEvent), _producerType.getEventDescription(AnimationPausedEventId), - const_cast(this))); + const_cast(this))); return returnValue; } -GetEventHandlePtr AnimationBase::getHandleAnimationUnpausedSignal(void) const +GetEventHandlePtr TBAnimationBase::getHandleAnimationUnpausedSignal(void) const { GetEventHandlePtr returnValue( new GetTypedEventHandle( const_cast(&_AnimationUnpausedEvent), _producerType.getEventDescription(AnimationUnpausedEventId), - const_cast(this))); + const_cast(this))); return returnValue; } -GetEventHandlePtr AnimationBase::getHandleAnimationEndedSignal(void) const +GetEventHandlePtr TBAnimationBase::getHandleAnimationEndedSignal(void) const { GetEventHandlePtr returnValue( new GetTypedEventHandle( const_cast(&_AnimationEndedEvent), _producerType.getEventDescription(AnimationEndedEventId), - const_cast(this))); + const_cast(this))); return returnValue; } -GetEventHandlePtr AnimationBase::getHandleAnimationCycledSignal(void) const +GetEventHandlePtr TBAnimationBase::getHandleAnimationCycledSignal(void) const { GetEventHandlePtr returnValue( new GetTypedEventHandle( const_cast(&_AnimationCycledEvent), _producerType.getEventDescription(AnimationCycledEventId), - const_cast(this))); + const_cast(this))); return returnValue; } #ifdef OSG_MT_CPTR_ASPECT -void AnimationBase::execSyncV( FieldContainer &oFrom, +void TBAnimationBase::execSyncV( FieldContainer &oFrom, ConstFieldMaskArg whichField, AspectOffsetStore &oOffsets, ConstFieldMaskArg syncMode, const UInt32 uiSyncInfo) { - Animation *pThis = static_cast(this); + TBAnimation *pThis = static_cast(this); - pThis->execSync(static_cast(&oFrom), + pThis->execSync(static_cast(&oFrom), whichField, oOffsets, syncMode, @@ -1055,7 +1055,7 @@ void AnimationBase::execSyncV( FieldContainer &oFrom, -void AnimationBase::resolveLinks(void) +void TBAnimationBase::resolveLinks(void) { Inherited::resolveLinks(); diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimationBase.h b/Source/System/Dynamics/Animation/Base/OSGTBAnimationBase.h similarity index 98% rename from Source/System/Dynamics/Animation/Base/OSGAnimationBase.h rename to Source/System/Dynamics/Animation/Base/OSGTBAnimationBase.h index 38c948b5..af6db5ca 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimationBase.h +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimationBase.h @@ -51,8 +51,8 @@ \*****************************************************************************/ -#ifndef _OSGANIMATIONBASE_H_ -#define _OSGANIMATIONBASE_H_ +#ifndef OSGTBANIMATIONBASE_H_ +#define OSGTBANIMATIONBASE_H_ #ifdef __sgi #pragma once #endif @@ -67,7 +67,7 @@ #include "OSGSysFields.h" // Cycling type -#include "OSGAnimationFields.h" +#include "OSGTBAnimationFields.h" //Event Producer Headers #include "OSGActivity.h" @@ -77,11 +77,11 @@ OSG_BEGIN_NAMESPACE -class Animation; +class TBAnimation; //! \brief Animation Base Class. -class OSG_TBANIMATION_DLLMAPPING AnimationBase : public AttachmentContainer +class OSG_TBANIMATION_DLLMAPPING TBAnimationBase : public AttachmentContainer { public: @@ -91,7 +91,7 @@ class OSG_TBANIMATION_DLLMAPPING AnimationBase : public AttachmentContainer typedef Inherited::TypeObject TypeObject; typedef TypeObject::InitPhase InitPhase; - OSG_GEN_INTERNALPTR(Animation); + OSG_GEN_INTERNALPTR(TBAnimation); typedef AnimationEventDetails AnimationStartedEventDetailsType; @@ -372,15 +372,15 @@ class OSG_TBANIMATION_DLLMAPPING AnimationBase : public AttachmentContainer /*! \name Constructors */ /*! \{ */ - AnimationBase(void); - AnimationBase(const AnimationBase &source); + TBAnimationBase(void); + TBAnimationBase(const TBAnimationBase &source); /*! \} */ /*---------------------------------------------------------------------*/ /*! \name Destructors */ /*! \{ */ - virtual ~AnimationBase(void); + virtual ~TBAnimationBase(void); /*! \} */ /*---------------------------------------------------------------------*/ @@ -440,7 +440,7 @@ class OSG_TBANIMATION_DLLMAPPING AnimationBase : public AttachmentContainer ConstFieldMaskArg syncMode , const UInt32 uiSyncInfo); - void execSync ( AnimationBase *pFrom, + void execSync ( TBAnimationBase *pFrom, ConstFieldMaskArg whichField, AspectOffsetStore &oOffsets, ConstFieldMaskArg syncMode , @@ -478,10 +478,10 @@ class OSG_TBANIMATION_DLLMAPPING AnimationBase : public AttachmentContainer // prohibit default functions (move to 'public' if you need one) - void operator =(const AnimationBase &source); + void operator =(const TBAnimationBase &source); }; -typedef AnimationBase *AnimationBaseP; +typedef TBAnimationBase *TBAnimationBaseP; OSG_END_NAMESPACE diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimationBase.inl b/Source/System/Dynamics/Animation/Base/OSGTBAnimationBase.inl similarity index 69% rename from Source/System/Dynamics/Animation/Base/OSGAnimationBase.inl rename to Source/System/Dynamics/Animation/Base/OSGTBAnimationBase.inl index 160078a5..4a1de285 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimationBase.inl +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimationBase.inl @@ -55,33 +55,33 @@ OSG_BEGIN_NAMESPACE //! access the type of the class inline -OSG::FieldContainerType &AnimationBase::getClassType(void) +OSG::FieldContainerType &TBAnimationBase::getClassType(void) { return _type; } //! access the numerical type of the class inline -OSG::UInt32 AnimationBase::getClassTypeId(void) +OSG::UInt32 TBAnimationBase::getClassTypeId(void) { return _type.getId(); } //! access the producer type of the class inline -const EventProducerType &AnimationBase::getProducerClassType(void) +const EventProducerType &TBAnimationBase::getProducerClassType(void) { return _producerType; } //! access the producer type id of the class inline -UInt32 AnimationBase::getProducerClassTypeId(void) +UInt32 TBAnimationBase::getProducerClassTypeId(void) { return _producerType.getId(); } inline -OSG::UInt16 AnimationBase::getClassGroupId(void) +OSG::UInt16 TBAnimationBase::getClassGroupId(void) { return _type.getGroupId(); } @@ -91,7 +91,7 @@ OSG::UInt16 AnimationBase::getClassGroupId(void) //! Get the value of the Animation::_sfCycling field. inline -Int32 &AnimationBase::editCycling(void) +Int32 &TBAnimationBase::editCycling(void) { editSField(CyclingFieldMask); @@ -100,14 +100,14 @@ Int32 &AnimationBase::editCycling(void) //! Get the value of the Animation::_sfCycling field. inline - Int32 AnimationBase::getCycling(void) const + Int32 TBAnimationBase::getCycling(void) const { return _sfCycling.getValue(); } //! Set the value of the Animation::_sfCycling field. inline -void AnimationBase::setCycling(const Int32 value) +void TBAnimationBase::setCycling(const Int32 value) { editSField(CyclingFieldMask); @@ -116,7 +116,7 @@ void AnimationBase::setCycling(const Int32 value) //! Get the value of the Animation::_sfScale field. inline -Real32 &AnimationBase::editScale(void) +Real32 &TBAnimationBase::editScale(void) { editSField(ScaleFieldMask); @@ -125,14 +125,14 @@ Real32 &AnimationBase::editScale(void) //! Get the value of the Animation::_sfScale field. inline - Real32 AnimationBase::getScale(void) const + Real32 TBAnimationBase::getScale(void) const { return _sfScale.getValue(); } //! Set the value of the Animation::_sfScale field. inline -void AnimationBase::setScale(const Real32 value) +void TBAnimationBase::setScale(const Real32 value) { editSField(ScaleFieldMask); @@ -141,7 +141,7 @@ void AnimationBase::setScale(const Real32 value) //! Get the value of the Animation::_sfOffset field. inline -Real32 &AnimationBase::editOffset(void) +Real32 &TBAnimationBase::editOffset(void) { editSField(OffsetFieldMask); @@ -150,14 +150,14 @@ Real32 &AnimationBase::editOffset(void) //! Get the value of the Animation::_sfOffset field. inline - Real32 AnimationBase::getOffset(void) const + Real32 TBAnimationBase::getOffset(void) const { return _sfOffset.getValue(); } //! Set the value of the Animation::_sfOffset field. inline -void AnimationBase::setOffset(const Real32 value) +void TBAnimationBase::setOffset(const Real32 value) { editSField(OffsetFieldMask); @@ -166,7 +166,7 @@ void AnimationBase::setOffset(const Real32 value) //! Get the value of the Animation::_sfSpan field. inline -Real32 &AnimationBase::editSpan(void) +Real32 &TBAnimationBase::editSpan(void) { editSField(SpanFieldMask); @@ -175,14 +175,14 @@ Real32 &AnimationBase::editSpan(void) //! Get the value of the Animation::_sfSpan field. inline - Real32 AnimationBase::getSpan(void) const + Real32 TBAnimationBase::getSpan(void) const { return _sfSpan.getValue(); } //! Set the value of the Animation::_sfSpan field. inline -void AnimationBase::setSpan(const Real32 value) +void TBAnimationBase::setSpan(const Real32 value) { editSField(SpanFieldMask); @@ -191,7 +191,7 @@ void AnimationBase::setSpan(const Real32 value) //! Get the value of the Animation::_sfCycles field. inline -Real32 &AnimationBase::editCycles(void) +Real32 &TBAnimationBase::editCycles(void) { editSField(CyclesFieldMask); @@ -200,14 +200,14 @@ Real32 &AnimationBase::editCycles(void) //! Get the value of the Animation::_sfCycles field. inline - Real32 AnimationBase::getCycles(void) const + Real32 TBAnimationBase::getCycles(void) const { return _sfCycles.getValue(); } //! Set the value of the Animation::_sfCycles field. inline -void AnimationBase::setCycles(const Real32 value) +void TBAnimationBase::setCycles(const Real32 value) { editSField(CyclesFieldMask); @@ -217,7 +217,7 @@ void AnimationBase::setCycles(const Real32 value) #ifdef OSG_MT_CPTR_ASPECT inline -void AnimationBase::execSync ( AnimationBase *pFrom, +void TBAnimationBase::execSync ( TBAnimationBase *pFrom, ConstFieldMaskArg whichField, AspectOffsetStore &oOffsets, ConstFieldMaskArg syncMode, @@ -244,300 +244,300 @@ void AnimationBase::execSync ( AnimationBase *pFrom, inline -const Char8 *AnimationBase::getClassname(void) +const Char8 *TBAnimationBase::getClassname(void) { - return "Animation"; + return "TBAnimation"; } inline -UInt32 AnimationBase::getNumProducedEvents(void) const +UInt32 TBAnimationBase::getNumProducedEvents(void) const { return getProducerType().getNumEventDescs(); } inline -const EventDescription *AnimationBase::getProducedEventDescription(const std::string &ProducedEventName) const +const EventDescription *TBAnimationBase::getProducedEventDescription(const std::string &ProducedEventName) const { return getProducerType().findEventDescription(ProducedEventName); } inline -const EventDescription *AnimationBase::getProducedEventDescription(UInt32 ProducedEventId) const +const EventDescription *TBAnimationBase::getProducedEventDescription(UInt32 ProducedEventId) const { return getProducerType().getEventDescription(ProducedEventId); } inline -UInt32 AnimationBase::getProducedEventId(const std::string &ProducedEventName) const +UInt32 TBAnimationBase::getProducedEventId(const std::string &ProducedEventName) const { return getProducerType().getProducedEventId(ProducedEventName); } inline -boost::signals2::connection AnimationBase::connectAnimationStarted(const AnimationStartedEventType::slot_type &listener, +boost::signals2::connection TBAnimationBase::connectAnimationStarted(const AnimationStartedEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationStartedEvent.connect(listener, at); } inline -boost::signals2::connection AnimationBase::connectAnimationStarted(const AnimationStartedEventType::group_type &group, +boost::signals2::connection TBAnimationBase::connectAnimationStarted(const AnimationStartedEventType::group_type &group, const AnimationStartedEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationStartedEvent.connect(group, listener, at); } inline -void AnimationBase::disconnectAnimationStarted(const AnimationStartedEventType::group_type &group) +void TBAnimationBase::disconnectAnimationStarted(const AnimationStartedEventType::group_type &group) { _AnimationStartedEvent.disconnect(group); } inline -void AnimationBase::disconnectAllSlotsAnimationStarted(void) +void TBAnimationBase::disconnectAllSlotsAnimationStarted(void) { _AnimationStartedEvent.disconnect_all_slots(); } inline -bool AnimationBase::isEmptyAnimationStarted(void) const +bool TBAnimationBase::isEmptyAnimationStarted(void) const { return _AnimationStartedEvent.empty(); } inline -UInt32 AnimationBase::numSlotsAnimationStarted(void) const +UInt32 TBAnimationBase::numSlotsAnimationStarted(void) const { return _AnimationStartedEvent.num_slots(); } inline -void AnimationBase::produceAnimationStarted(AnimationStartedEventDetailsType* const e) +void TBAnimationBase::produceAnimationStarted(AnimationStartedEventDetailsType* const e) { produceEvent(AnimationStartedEventId, e); } inline -boost::signals2::connection AnimationBase::connectAnimationStopped(const AnimationStoppedEventType::slot_type &listener, +boost::signals2::connection TBAnimationBase::connectAnimationStopped(const AnimationStoppedEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationStoppedEvent.connect(listener, at); } inline -boost::signals2::connection AnimationBase::connectAnimationStopped(const AnimationStoppedEventType::group_type &group, +boost::signals2::connection TBAnimationBase::connectAnimationStopped(const AnimationStoppedEventType::group_type &group, const AnimationStoppedEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationStoppedEvent.connect(group, listener, at); } inline -void AnimationBase::disconnectAnimationStopped(const AnimationStoppedEventType::group_type &group) +void TBAnimationBase::disconnectAnimationStopped(const AnimationStoppedEventType::group_type &group) { _AnimationStoppedEvent.disconnect(group); } inline -void AnimationBase::disconnectAllSlotsAnimationStopped(void) +void TBAnimationBase::disconnectAllSlotsAnimationStopped(void) { _AnimationStoppedEvent.disconnect_all_slots(); } inline -bool AnimationBase::isEmptyAnimationStopped(void) const +bool TBAnimationBase::isEmptyAnimationStopped(void) const { return _AnimationStoppedEvent.empty(); } inline -UInt32 AnimationBase::numSlotsAnimationStopped(void) const +UInt32 TBAnimationBase::numSlotsAnimationStopped(void) const { return _AnimationStoppedEvent.num_slots(); } inline -void AnimationBase::produceAnimationStopped(AnimationStoppedEventDetailsType* const e) +void TBAnimationBase::produceAnimationStopped(AnimationStoppedEventDetailsType* const e) { produceEvent(AnimationStoppedEventId, e); } inline -boost::signals2::connection AnimationBase::connectAnimationPaused(const AnimationPausedEventType::slot_type &listener, +boost::signals2::connection TBAnimationBase::connectAnimationPaused(const AnimationPausedEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationPausedEvent.connect(listener, at); } inline -boost::signals2::connection AnimationBase::connectAnimationPaused(const AnimationPausedEventType::group_type &group, +boost::signals2::connection TBAnimationBase::connectAnimationPaused(const AnimationPausedEventType::group_type &group, const AnimationPausedEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationPausedEvent.connect(group, listener, at); } inline -void AnimationBase::disconnectAnimationPaused(const AnimationPausedEventType::group_type &group) +void TBAnimationBase::disconnectAnimationPaused(const AnimationPausedEventType::group_type &group) { _AnimationPausedEvent.disconnect(group); } inline -void AnimationBase::disconnectAllSlotsAnimationPaused(void) +void TBAnimationBase::disconnectAllSlotsAnimationPaused(void) { _AnimationPausedEvent.disconnect_all_slots(); } inline -bool AnimationBase::isEmptyAnimationPaused(void) const +bool TBAnimationBase::isEmptyAnimationPaused(void) const { return _AnimationPausedEvent.empty(); } inline -UInt32 AnimationBase::numSlotsAnimationPaused(void) const +UInt32 TBAnimationBase::numSlotsAnimationPaused(void) const { return _AnimationPausedEvent.num_slots(); } inline -void AnimationBase::produceAnimationPaused(AnimationPausedEventDetailsType* const e) +void TBAnimationBase::produceAnimationPaused(AnimationPausedEventDetailsType* const e) { produceEvent(AnimationPausedEventId, e); } inline -boost::signals2::connection AnimationBase::connectAnimationUnpaused(const AnimationUnpausedEventType::slot_type &listener, +boost::signals2::connection TBAnimationBase::connectAnimationUnpaused(const AnimationUnpausedEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationUnpausedEvent.connect(listener, at); } inline -boost::signals2::connection AnimationBase::connectAnimationUnpaused(const AnimationUnpausedEventType::group_type &group, +boost::signals2::connection TBAnimationBase::connectAnimationUnpaused(const AnimationUnpausedEventType::group_type &group, const AnimationUnpausedEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationUnpausedEvent.connect(group, listener, at); } inline -void AnimationBase::disconnectAnimationUnpaused(const AnimationUnpausedEventType::group_type &group) +void TBAnimationBase::disconnectAnimationUnpaused(const AnimationUnpausedEventType::group_type &group) { _AnimationUnpausedEvent.disconnect(group); } inline -void AnimationBase::disconnectAllSlotsAnimationUnpaused(void) +void TBAnimationBase::disconnectAllSlotsAnimationUnpaused(void) { _AnimationUnpausedEvent.disconnect_all_slots(); } inline -bool AnimationBase::isEmptyAnimationUnpaused(void) const +bool TBAnimationBase::isEmptyAnimationUnpaused(void) const { return _AnimationUnpausedEvent.empty(); } inline -UInt32 AnimationBase::numSlotsAnimationUnpaused(void) const +UInt32 TBAnimationBase::numSlotsAnimationUnpaused(void) const { return _AnimationUnpausedEvent.num_slots(); } inline -void AnimationBase::produceAnimationUnpaused(AnimationUnpausedEventDetailsType* const e) +void TBAnimationBase::produceAnimationUnpaused(AnimationUnpausedEventDetailsType* const e) { produceEvent(AnimationUnpausedEventId, e); } inline -boost::signals2::connection AnimationBase::connectAnimationEnded(const AnimationEndedEventType::slot_type &listener, +boost::signals2::connection TBAnimationBase::connectAnimationEnded(const AnimationEndedEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationEndedEvent.connect(listener, at); } inline -boost::signals2::connection AnimationBase::connectAnimationEnded(const AnimationEndedEventType::group_type &group, +boost::signals2::connection TBAnimationBase::connectAnimationEnded(const AnimationEndedEventType::group_type &group, const AnimationEndedEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationEndedEvent.connect(group, listener, at); } inline -void AnimationBase::disconnectAnimationEnded(const AnimationEndedEventType::group_type &group) +void TBAnimationBase::disconnectAnimationEnded(const AnimationEndedEventType::group_type &group) { _AnimationEndedEvent.disconnect(group); } inline -void AnimationBase::disconnectAllSlotsAnimationEnded(void) +void TBAnimationBase::disconnectAllSlotsAnimationEnded(void) { _AnimationEndedEvent.disconnect_all_slots(); } inline -bool AnimationBase::isEmptyAnimationEnded(void) const +bool TBAnimationBase::isEmptyAnimationEnded(void) const { return _AnimationEndedEvent.empty(); } inline -UInt32 AnimationBase::numSlotsAnimationEnded(void) const +UInt32 TBAnimationBase::numSlotsAnimationEnded(void) const { return _AnimationEndedEvent.num_slots(); } inline -void AnimationBase::produceAnimationEnded(AnimationEndedEventDetailsType* const e) +void TBAnimationBase::produceAnimationEnded(AnimationEndedEventDetailsType* const e) { produceEvent(AnimationEndedEventId, e); } inline -boost::signals2::connection AnimationBase::connectAnimationCycled(const AnimationCycledEventType::slot_type &listener, +boost::signals2::connection TBAnimationBase::connectAnimationCycled(const AnimationCycledEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationCycledEvent.connect(listener, at); } inline -boost::signals2::connection AnimationBase::connectAnimationCycled(const AnimationCycledEventType::group_type &group, +boost::signals2::connection TBAnimationBase::connectAnimationCycled(const AnimationCycledEventType::group_type &group, const AnimationCycledEventType::slot_type &listener, boost::signals2::connect_position at) { return _AnimationCycledEvent.connect(group, listener, at); } inline -void AnimationBase::disconnectAnimationCycled(const AnimationCycledEventType::group_type &group) +void TBAnimationBase::disconnectAnimationCycled(const AnimationCycledEventType::group_type &group) { _AnimationCycledEvent.disconnect(group); } inline -void AnimationBase::disconnectAllSlotsAnimationCycled(void) +void TBAnimationBase::disconnectAllSlotsAnimationCycled(void) { _AnimationCycledEvent.disconnect_all_slots(); } inline -bool AnimationBase::isEmptyAnimationCycled(void) const +bool TBAnimationBase::isEmptyAnimationCycled(void) const { return _AnimationCycledEvent.empty(); } inline -UInt32 AnimationBase::numSlotsAnimationCycled(void) const +UInt32 TBAnimationBase::numSlotsAnimationCycled(void) const { return _AnimationCycledEvent.num_slots(); } inline -void AnimationBase::produceAnimationCycled(AnimationCycledEventDetailsType* const e) +void TBAnimationBase::produceAnimationCycled(AnimationCycledEventDetailsType* const e) { produceEvent(AnimationCycledEventId, e); } -OSG_GEN_CONTAINERPTR(Animation); +OSG_GEN_CONTAINERPTR(TBAnimation); OSG_END_NAMESPACE diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimationFields.h b/Source/System/Dynamics/Animation/Base/OSGTBAnimationFields.h similarity index 71% rename from Source/System/Dynamics/Animation/Base/OSGAnimationFields.h rename to Source/System/Dynamics/Animation/Base/OSGTBAnimationFields.h index 48a85db8..53131bc1 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimationFields.h +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimationFields.h @@ -48,8 +48,8 @@ \*****************************************************************************/ -#ifndef _OSGANIMATIONFIELDS_H_ -#define _OSGANIMATIONFIELDS_H_ +#ifndef _OSGTBANIMATIONFIELDS_H_ +#define _OSGTBANIMATIONFIELDS_H_ #ifdef __sgi #pragma once #endif @@ -64,16 +64,16 @@ OSG_BEGIN_NAMESPACE -class Animation; +class TBAnimation; -OSG_GEN_CONTAINERPTR(Animation); +OSG_GEN_CONTAINERPTR(TBAnimation); /*! \ingroup GrpTBAnimationFieldTraits \ingroup GrpLibOSGTBAnimation */ template <> -struct FieldTraits : - public FieldTraitsFCPtrBase +struct FieldTraits : + public FieldTraitsFCPtrBase { private: @@ -81,7 +81,7 @@ struct FieldTraits : public: - typedef FieldTraits Self; + typedef FieldTraits Self; enum { Convertible = NotConvertible }; @@ -98,81 +98,81 @@ struct FieldTraits : }; template<> inline -const Char8 *FieldTraits::getSName(void) +const Char8 *FieldTraits::getSName(void) { - return "SFRecAnimationPtr"; + return "SFRecTBAnimationPtr"; } template<> inline -const Char8 *FieldTraits::getSName(void) +const Char8 *FieldTraits::getSName(void) { - return "SFUnrecAnimationPtr"; + return "SFUnrecTBAnimationPtr"; } template<> inline -const Char8 *FieldTraits::getSName(void) +const Char8 *FieldTraits::getSName(void) { - return "SFWeakAnimationPtr"; + return "SFWeakTBAnimationPtr"; } template<> inline -const Char8 *FieldTraits::getSName(void) +const Char8 *FieldTraits::getSName(void) { - return "SFUnrefdAnimationPtr"; + return "SFUnrefdTBAnimationPtr"; } template<> inline -const Char8 *FieldTraits::getMName(void) +const Char8 *FieldTraits::getMName(void) { - return "MFRecAnimationPtr"; + return "MFRecTBAnimationPtr"; } template<> inline -const Char8 *FieldTraits::getMName(void) +const Char8 *FieldTraits::getMName(void) { - return "MFUnrecAnimationPtr"; + return "MFUnrecTBAnimationPtr"; } template<> inline -const Char8 *FieldTraits::getMName(void) +const Char8 *FieldTraits::getMName(void) { - return "MFWeakAnimationPtr"; + return "MFWeakTBAnimationPtr"; } template<> inline -const Char8 *FieldTraits::getMName(void) +const Char8 *FieldTraits::getMName(void) { - return "MFUnrefdAnimationPtr"; + return "MFUnrefdTBAnimationPtr"; } #ifndef DOXYGEN_SHOULD_SKIP_THIS /*! \ingroup GrpTBAnimationFieldSFields */ -typedef PointerSField SFRecAnimationPtr; +typedef PointerSField SFRecTBAnimationPtr; /*! \ingroup GrpTBAnimationFieldSFields */ -typedef PointerSField SFUnrecAnimationPtr; +typedef PointerSField SFUnrecTBAnimationPtr; /*! \ingroup GrpTBAnimationFieldSFields */ -typedef PointerSField SFWeakAnimationPtr; +typedef PointerSField SFWeakTBAnimationPtr; /*! \ingroup GrpTBAnimationFieldSFields */ -typedef PointerSField SFUncountedAnimationPtr; +typedef PointerSField SFUncountedTBAnimationPtr; /*! \ingroup GrpTBAnimationFieldMFields */ -typedef PointerMField MFRecAnimationPtr; +typedef PointerMField MFRecTBAnimationPtr; /*! \ingroup GrpTBAnimationFieldMFields */ -typedef PointerMField MFUnrecAnimationPtr; +typedef PointerMField MFUnrecTBAnimationPtr; /*! \ingroup GrpTBAnimationFieldMFields */ -typedef PointerMField MFWeakAnimationPtr; +typedef PointerMField MFWeakTBAnimationPtr; /*! \ingroup GrpTBAnimationFieldMFields */ -typedef PointerMField MFUncountedAnimationPtr; +typedef PointerMField MFUncountedTBAnimationPtr; @@ -180,38 +180,38 @@ typedef PointerMField {}; /*! \ingroup GrpTBAnimationFieldSFields \ingroup GrpLibOSGTBAnimation */ -struct SFUnrecAnimationPtr : - public PointerSField {}; /*! \ingroup GrpTBAnimationFieldSFields \ingroup GrpLibOSGTBAnimation */ -struct SFWeakAnimationPtr : - public PointerSField {}; /*! \ingroup GrpTBAnimationFieldSFields \ingroup GrpLibOSGTBAnimation */ -struct SFUncountedAnimationPtr : - public PointerSField {}; /*! \ingroup GrpTBAnimationFieldMFields \ingroup GrpLibOSGTBAnimation */ -struct MFRecAnimationPtr : - public PointerMField {}; /*! \ingroup GrpTBAnimationFieldMFields \ingroup GrpLibOSGTBAnimation */ -struct MFUnrecAnimationPtr : - public PointerMField {}; /*! \ingroup GrpTBAnimationFieldMFields \ingroup GrpLibOSGTBAnimation */ -struct MFWeakAnimationPtr : - public PointerMField {}; /*! \ingroup GrpTBAnimationFieldMFields \ingroup GrpLibOSGTBAnimation */ -struct MFUncountedAnimationPtr : - public PointerMField {}; diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimator.cpp b/Source/System/Dynamics/Animation/Base/OSGTBAnimator.cpp similarity index 95% rename from Source/System/Dynamics/Animation/Base/OSGAnimator.cpp rename to Source/System/Dynamics/Animation/Base/OSGTBAnimator.cpp index 1d33b71a..7821dc8f 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimator.cpp +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimator.cpp @@ -45,7 +45,7 @@ #include -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" OSG_BEGIN_NAMESPACE @@ -97,7 +97,7 @@ OSG_BEGIN_NAMESPACE * Class methods * \***************************************************************************/ -void Animator::initMethod(InitPhase ePhase) +void TBAnimator::initMethod(InitPhase ePhase) { Inherited::initMethod(ePhase); @@ -117,30 +117,30 @@ void Animator::initMethod(InitPhase ePhase) /*----------------------- constructors & destructors ----------------------*/ -Animator::Animator(void) : +TBAnimator::TBAnimator(void) : Inherited() { } -Animator::Animator(const Animator &source) : +TBAnimator::TBAnimator(const TBAnimator &source) : Inherited(source) { } -Animator::~Animator(void) +TBAnimator::~TBAnimator(void) { } /*----------------------------- class specific ----------------------------*/ -void Animator::changed(ConstFieldMaskArg whichField, +void TBAnimator::changed(ConstFieldMaskArg whichField, UInt32 origin, BitVector details) { Inherited::changed(whichField, origin, details); } -void Animator::dump( UInt32 , +void TBAnimator::dump( UInt32 , const BitVector ) const { SLOG << "Dump Animator NI" << std::endl; diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimator.fcd b/Source/System/Dynamics/Animation/Base/OSGTBAnimator.fcd similarity index 100% rename from Source/System/Dynamics/Animation/Base/OSGAnimator.fcd rename to Source/System/Dynamics/Animation/Base/OSGTBAnimator.fcd diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimator.h b/Source/System/Dynamics/Animation/Base/OSGTBAnimator.h similarity index 93% rename from Source/System/Dynamics/Animation/Base/OSGAnimator.h rename to Source/System/Dynamics/Animation/Base/OSGTBAnimator.h index 711943ba..34a94fef 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimator.h +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimator.h @@ -36,17 +36,17 @@ * * \*---------------------------------------------------------------------------*/ -#ifndef _OSGANIMATOR_H_ -#define _OSGANIMATOR_H_ +#ifndef _OSGTBANIMATOR_H_ +#define _OSGTBANIMATOR_H_ #ifdef __sgi #pragma once #endif -#include "OSGAnimatorBase.h" +#include "OSGTBAnimatorBase.h" OSG_BEGIN_NAMESPACE -class OSG_TBANIMATION_DLLMAPPING Animator : public AnimatorBase +class OSG_TBANIMATION_DLLMAPPING TBAnimator : public TBAnimatorBase { protected: @@ -78,8 +78,8 @@ class OSG_TBANIMATION_DLLMAPPING Animator : public AnimatorBase the current result with the value */ }; - typedef AnimatorBase Inherited; - typedef Animator Self; + typedef TBAnimatorBase Inherited; + typedef TBAnimator Self; /*---------------------------------------------------------------------*/ /*! \name Sync */ @@ -120,15 +120,15 @@ class OSG_TBANIMATION_DLLMAPPING Animator : public AnimatorBase /*! \name Constructors */ /*! \{ */ - Animator(void); - Animator(const Animator &source); + TBAnimator(void); + TBAnimator(const TBAnimator &source); /*! \} */ /*---------------------------------------------------------------------*/ /*! \name Destructors */ /*! \{ */ - virtual ~Animator(void); + virtual ~TBAnimator(void); /*! \} */ /*---------------------------------------------------------------------*/ @@ -143,17 +143,17 @@ class OSG_TBANIMATION_DLLMAPPING Animator : public AnimatorBase private: friend class FieldContainer; - friend class AnimatorBase; + friend class TBAnimatorBase; // prohibit default functions (move to 'public' if you need one) - void operator =(const Animator &source); + void operator =(const TBAnimator &source); }; -typedef Animator *AnimatorP; +typedef TBAnimator *TBAnimatorP; OSG_END_NAMESPACE -#include "OSGAnimatorBase.inl" -#include "OSGAnimator.inl" +#include "OSGTBAnimatorBase.inl" +#include "OSGTBAnimator.inl" #endif /* _OSGANIMATOR_H_ */ diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimator.inl b/Source/System/Dynamics/Animation/Base/OSGTBAnimator.inl similarity index 100% rename from Source/System/Dynamics/Animation/Base/OSGAnimator.inl rename to Source/System/Dynamics/Animation/Base/OSGTBAnimator.inl diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimatorBase.cpp b/Source/System/Dynamics/Animation/Base/OSGTBAnimatorBase.cpp similarity index 85% rename from Source/System/Dynamics/Animation/Base/OSGAnimatorBase.cpp rename to Source/System/Dynamics/Animation/Base/OSGTBAnimatorBase.cpp index 5e88a491..cf038f83 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimatorBase.cpp +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimatorBase.cpp @@ -59,8 +59,8 @@ -#include "OSGAnimatorBase.h" -#include "OSGAnimator.h" +#include "OSGTBAnimatorBase.h" +#include "OSGTBAnimator.h" #include @@ -89,37 +89,37 @@ OSG_BEGIN_NAMESPACE \***************************************************************************/ #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("AnimatorPtr", "FieldContainerPtr"); +DataType FieldTraits::_type("TBAnimatorPtr", "FieldContainerPtr"); #endif -OSG_FIELDTRAITS_GETTYPE(Animator *) +OSG_FIELDTRAITS_GETTYPE(TBAnimator *) OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - Animator *, + TBAnimator *, 0); OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - Animator *, + TBAnimator *, 0); /***************************************************************************\ * Field Description * \***************************************************************************/ -void AnimatorBase::classDescInserter(TypeObject &oType) +void TBAnimatorBase::classDescInserter(TypeObject &oType) { } -AnimatorBase::TypeObject AnimatorBase::_type( - AnimatorBase::getClassname(), +TBAnimatorBase::TypeObject TBAnimatorBase::_type( + TBAnimatorBase::getClassname(), Inherited::getClassname(), "NULL", 0, NULL, - Animator::initMethod, - Animator::exitMethod, - reinterpret_cast(&Animator::classDescInserter), + TBAnimator::initMethod, + TBAnimator::exitMethod, + reinterpret_cast(&TBAnimator::classDescInserter), false, 0, "\n" @@ -145,19 +145,19 @@ AnimatorBase::TypeObject AnimatorBase::_type( /*------------------------------ get -----------------------------------*/ -FieldContainerType &AnimatorBase::getType(void) +FieldContainerType &TBAnimatorBase::getType(void) { return _type; } -const FieldContainerType &AnimatorBase::getType(void) const +const FieldContainerType &TBAnimatorBase::getType(void) const { return _type; } -UInt32 AnimatorBase::getContainerSize(void) const +UInt32 TBAnimatorBase::getContainerSize(void) const { - return sizeof(Animator); + return sizeof(TBAnimator); } /*------------------------- decorator get ------------------------------*/ @@ -169,7 +169,7 @@ UInt32 AnimatorBase::getContainerSize(void) const /*------------------------------ access -----------------------------------*/ -UInt32 AnimatorBase::getBinSize(ConstFieldMaskArg whichField) +UInt32 TBAnimatorBase::getBinSize(ConstFieldMaskArg whichField) { UInt32 returnValue = Inherited::getBinSize(whichField); @@ -177,14 +177,14 @@ UInt32 AnimatorBase::getBinSize(ConstFieldMaskArg whichField) return returnValue; } -void AnimatorBase::copyToBin(BinaryDataHandler &pMem, +void TBAnimatorBase::copyToBin(BinaryDataHandler &pMem, ConstFieldMaskArg whichField) { Inherited::copyToBin(pMem, whichField); } -void AnimatorBase::copyFromBin(BinaryDataHandler &pMem, +void TBAnimatorBase::copyFromBin(BinaryDataHandler &pMem, ConstFieldMaskArg whichField) { Inherited::copyFromBin(pMem, whichField); @@ -195,12 +195,12 @@ void AnimatorBase::copyFromBin(BinaryDataHandler &pMem, /*------------------------- constructors ----------------------------------*/ -AnimatorBase::AnimatorBase(void) : +TBAnimatorBase::TBAnimatorBase(void) : Inherited() { } -AnimatorBase::AnimatorBase(const AnimatorBase &source) : +TBAnimatorBase::TBAnimatorBase(const TBAnimatorBase &source) : Inherited(source) { } @@ -208,7 +208,7 @@ AnimatorBase::AnimatorBase(const AnimatorBase &source) : /*-------------------------- destructors ----------------------------------*/ -AnimatorBase::~AnimatorBase(void) +TBAnimatorBase::~TBAnimatorBase(void) { } @@ -216,15 +216,15 @@ AnimatorBase::~AnimatorBase(void) #ifdef OSG_MT_CPTR_ASPECT -void AnimatorBase::execSyncV( FieldContainer &oFrom, +void TBAnimatorBase::execSyncV( FieldContainer &oFrom, ConstFieldMaskArg whichField, AspectOffsetStore &oOffsets, ConstFieldMaskArg syncMode, const UInt32 uiSyncInfo) { - Animator *pThis = static_cast(this); + TBAnimator *pThis = static_cast(this); - pThis->execSync(static_cast(&oFrom), + pThis->execSync(static_cast(&oFrom), whichField, oOffsets, syncMode, @@ -234,7 +234,7 @@ void AnimatorBase::execSyncV( FieldContainer &oFrom, -void AnimatorBase::resolveLinks(void) +void TBAnimatorBase::resolveLinks(void) { Inherited::resolveLinks(); diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimatorBase.h b/Source/System/Dynamics/Animation/Base/OSGTBAnimatorBase.h similarity index 95% rename from Source/System/Dynamics/Animation/Base/OSGAnimatorBase.h rename to Source/System/Dynamics/Animation/Base/OSGTBAnimatorBase.h index f8e1dcc8..9d3ba71a 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimatorBase.h +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimatorBase.h @@ -51,8 +51,8 @@ \*****************************************************************************/ -#ifndef _OSGANIMATORBASE_H_ -#define _OSGANIMATORBASE_H_ +#ifndef _OSGTBANIMATORBASE_H_ +#define _OSGTBANIMATORBASE_H_ #ifdef __sgi #pragma once #endif @@ -66,15 +66,15 @@ #include "OSGFieldContainer.h" // Parent -#include "OSGAnimatorFields.h" +#include "OSGTBAnimatorFields.h" OSG_BEGIN_NAMESPACE -class Animator; +class TBAnimator; //! \brief Animator Base Class. -class OSG_TBANIMATION_DLLMAPPING AnimatorBase : public FieldContainer +class OSG_TBANIMATION_DLLMAPPING TBAnimatorBase : public FieldContainer { public: @@ -84,7 +84,7 @@ class OSG_TBANIMATION_DLLMAPPING AnimatorBase : public FieldContainer typedef Inherited::TypeObject TypeObject; typedef TypeObject::InitPhase InitPhase; - OSG_GEN_INTERNALPTR(Animator); + OSG_GEN_INTERNALPTR(TBAnimator); @@ -137,15 +137,15 @@ class OSG_TBANIMATION_DLLMAPPING AnimatorBase : public FieldContainer /*! \name Constructors */ /*! \{ */ - AnimatorBase(void); - AnimatorBase(const AnimatorBase &source); + TBAnimatorBase(void); + TBAnimatorBase(const TBAnimatorBase &source); /*! \} */ /*---------------------------------------------------------------------*/ /*! \name Destructors */ /*! \{ */ - virtual ~AnimatorBase(void); + virtual ~TBAnimatorBase(void); /*! \} */ /*---------------------------------------------------------------------*/ @@ -171,7 +171,7 @@ class OSG_TBANIMATION_DLLMAPPING AnimatorBase : public FieldContainer ConstFieldMaskArg syncMode , const UInt32 uiSyncInfo); - void execSync ( AnimatorBase *pFrom, + void execSync ( TBAnimatorBase *pFrom, ConstFieldMaskArg whichField, AspectOffsetStore &oOffsets, ConstFieldMaskArg syncMode , @@ -206,10 +206,10 @@ class OSG_TBANIMATION_DLLMAPPING AnimatorBase : public FieldContainer /*---------------------------------------------------------------------*/ // prohibit default functions (move to 'public' if you need one) - void operator =(const AnimatorBase &source); + void operator =(const TBAnimatorBase &source); }; -typedef AnimatorBase *AnimatorBaseP; +typedef TBAnimatorBase *TBAnimatorBaseP; OSG_END_NAMESPACE diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimatorBase.inl b/Source/System/Dynamics/Animation/Base/OSGTBAnimatorBase.inl similarity index 93% rename from Source/System/Dynamics/Animation/Base/OSGAnimatorBase.inl rename to Source/System/Dynamics/Animation/Base/OSGTBAnimatorBase.inl index bf2910e9..0946ca15 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimatorBase.inl +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimatorBase.inl @@ -54,20 +54,20 @@ OSG_BEGIN_NAMESPACE //! access the type of the class inline -OSG::FieldContainerType &AnimatorBase::getClassType(void) +OSG::FieldContainerType &TBAnimatorBase::getClassType(void) { return _type; } //! access the numerical type of the class inline -OSG::UInt32 AnimatorBase::getClassTypeId(void) +OSG::UInt32 TBAnimatorBase::getClassTypeId(void) { return _type.getId(); } inline -OSG::UInt16 AnimatorBase::getClassGroupId(void) +OSG::UInt16 TBAnimatorBase::getClassGroupId(void) { return _type.getGroupId(); } @@ -78,7 +78,7 @@ OSG::UInt16 AnimatorBase::getClassGroupId(void) #ifdef OSG_MT_CPTR_ASPECT inline -void AnimatorBase::execSync ( AnimatorBase *pFrom, +void TBAnimatorBase::execSync ( TBAnimatorBase *pFrom, ConstFieldMaskArg whichField, AspectOffsetStore &oOffsets, ConstFieldMaskArg syncMode, @@ -90,11 +90,11 @@ void AnimatorBase::execSync ( AnimatorBase *pFrom, inline -const Char8 *AnimatorBase::getClassname(void) +const Char8 *TBAnimatorBase::getClassname(void) { - return "Animator"; + return "TBAnimator"; } -OSG_GEN_CONTAINERPTR(Animator); +OSG_GEN_CONTAINERPTR(TBAnimator); OSG_END_NAMESPACE diff --git a/Source/System/Dynamics/Animation/Base/OSGAnimatorFields.h b/Source/System/Dynamics/Animation/Base/OSGTBAnimatorFields.h similarity index 71% rename from Source/System/Dynamics/Animation/Base/OSGAnimatorFields.h rename to Source/System/Dynamics/Animation/Base/OSGTBAnimatorFields.h index b2bdab6c..7a36855c 100644 --- a/Source/System/Dynamics/Animation/Base/OSGAnimatorFields.h +++ b/Source/System/Dynamics/Animation/Base/OSGTBAnimatorFields.h @@ -64,16 +64,16 @@ OSG_BEGIN_NAMESPACE -class Animator; +class TBAnimator; -OSG_GEN_CONTAINERPTR(Animator); +OSG_GEN_CONTAINERPTR(TBAnimator); /*! \ingroup GrpTBAnimationFieldTraits \ingroup GrpLibOSGTBAnimation */ template <> -struct FieldTraits : - public FieldTraitsFCPtrBase +struct FieldTraits : + public FieldTraitsFCPtrBase { private: @@ -81,7 +81,7 @@ struct FieldTraits : public: - typedef FieldTraits Self; + typedef FieldTraits Self; enum { Convertible = NotConvertible }; @@ -90,89 +90,89 @@ struct FieldTraits : template inline static const Char8 *getSName (void); -// static const char *getSName(void) { return "SFAnimatorPtr"; } +// static const char *getSName(void) { return "SFTBAnimatorPtr"; } template inline static const Char8 *getMName (void); -// static const char *getMName(void) { return "MFAnimatorPtr"; } +// static const char *getMName(void) { return "MFTBAnimatorPtr"; } }; template<> inline -const Char8 *FieldTraits::getSName(void) +const Char8 *FieldTraits::getSName(void) { - return "SFRecAnimatorPtr"; + return "SFRecTBAnimatorPtr"; } template<> inline -const Char8 *FieldTraits::getSName(void) +const Char8 *FieldTraits::getSName(void) { - return "SFUnrecAnimatorPtr"; + return "SFUnrecTBAnimatorPtr"; } template<> inline -const Char8 *FieldTraits::getSName(void) +const Char8 *FieldTraits::getSName(void) { - return "SFWeakAnimatorPtr"; + return "SFWeakTBAnimatorPtr"; } template<> inline -const Char8 *FieldTraits::getSName(void) +const Char8 *FieldTraits::getSName(void) { - return "SFUnrefdAnimatorPtr"; + return "SFUnrefdTBAnimatorPtr"; } template<> inline -const Char8 *FieldTraits::getMName(void) +const Char8 *FieldTraits::getMName(void) { - return "MFRecAnimatorPtr"; + return "MFRecTBAnimatorPtr"; } template<> inline -const Char8 *FieldTraits::getMName(void) +const Char8 *FieldTraits::getMName(void) { - return "MFUnrecAnimatorPtr"; + return "MFUnrecTBAnimatorPtr"; } template<> inline -const Char8 *FieldTraits::getMName(void) +const Char8 *FieldTraits::getMName(void) { - return "MFWeakAnimatorPtr"; + return "MFWeakTBAnimatorPtr"; } template<> inline -const Char8 *FieldTraits::getMName(void) +const Char8 *FieldTraits::getMName(void) { - return "MFUnrefdAnimatorPtr"; + return "MFUnrefdTBAnimatorPtr"; } #ifndef DOXYGEN_SHOULD_SKIP_THIS /*! \ingroup GrpTBAnimationFieldSFields */ -typedef PointerSField SFRecAnimatorPtr; +typedef PointerSField SFRecTBAnimatorPtr; /*! \ingroup GrpTBAnimationFieldSFields */ -typedef PointerSField SFUnrecAnimatorPtr; +typedef PointerSField SFUnrecTBAnimatorPtr; /*! \ingroup GrpTBAnimationFieldSFields */ -typedef PointerSField SFWeakAnimatorPtr; +typedef PointerSField SFWeakTBAnimatorPtr; /*! \ingroup GrpTBAnimationFieldSFields */ -typedef PointerSField SFUncountedAnimatorPtr; +typedef PointerSField SFUncountedTBAnimatorPtr; /*! \ingroup GrpTBAnimationFieldMFields */ -typedef PointerMField MFRecAnimatorPtr; +typedef PointerMField MFRecTBAnimatorPtr; /*! \ingroup GrpTBAnimationFieldMFields */ -typedef PointerMField MFUnrecAnimatorPtr; +typedef PointerMField MFUnrecTBAnimatorPtr; /*! \ingroup GrpTBAnimationFieldMFields */ -typedef PointerMField MFWeakAnimatorPtr; +typedef PointerMField MFWeakTBAnimatorPtr; /*! \ingroup GrpTBAnimationFieldMFields */ -typedef PointerMField MFUncountedAnimatorPtr; +typedef PointerMField MFUncountedTBAnimatorPtr; @@ -180,38 +180,38 @@ typedef PointerMField {}; /*! \ingroup GrpTBAnimationFieldSFields \ingroup GrpLibOSGTBAnimation */ -struct SFUnrecAnimatorPtr : - public PointerSField {}; /*! \ingroup GrpTBAnimationFieldSFields \ingroup GrpLibOSGTBAnimation */ struct SFWeakAnimatorPtr : - public PointerSField {}; /*! \ingroup GrpTBAnimationFieldSFields \ingroup GrpLibOSGTBAnimation */ -struct SFUncountedAnimatorPtr : - public PointerSField {}; /*! \ingroup GrpTBAnimationFieldMFields \ingroup GrpLibOSGTBAnimation */ -struct MFRecAnimatorPtr : - public PointerMField {}; /*! \ingroup GrpTBAnimationFieldMFields \ingroup GrpLibOSGTBAnimation */ -struct MFUnrecAnimatorPtr : - public PointerMField {}; /*! \ingroup GrpTBAnimationFieldMFields \ingroup GrpLibOSGTBAnimation */ -struct MFWeakAnimatorPtr : - public PointerMField {}; /*! \ingroup GrpTBAnimationFieldMFields \ingroup GrpLibOSGTBAnimation */ -struct MFUncountedAnimatorPtr : - public PointerMField {}; diff --git a/Source/System/Dynamics/Base/KeyframeSequence/Basics/OSGKeyframeBasicSequenceTmpl.cpp b/Source/System/Dynamics/Base/KeyframeSequence/Basics/OSGKeyframeBasicSequenceTmpl.cpp index 2d8c7586..ad85669f 100644 --- a/Source/System/Dynamics/Base/KeyframeSequence/Basics/OSGKeyframeBasicSequenceTmpl.cpp +++ b/Source/System/Dynamics/Base/KeyframeSequence/Basics/OSGKeyframeBasicSequenceTmpl.cpp @@ -47,7 +47,7 @@ #include "OSGKeyframeBasicSequenceTmplFuncs.ins" #include "OSGKeyframeBasicSequenceTmpl.ins" -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGKeyframeInterpolations.h" OSG_USING_NAMESPACE @@ -95,10 +95,10 @@ void KeyframeBasicSequenceStringDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteNoBlendReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteNoBlendReplacement; } } @@ -106,10 +106,10 @@ void KeyframeBasicSequenceBoolDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteNoBlendReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteNoBlendReplacement; } } @@ -117,10 +117,10 @@ void KeyframeBasicSequenceGLenumDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequenceSpec; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequenceSpec; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequenceSpec; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequenceSpec; - _replacementFuncs[Animator::OVERWRITE] = overwriteNoBlendReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteNoBlendReplacement; } } @@ -128,9 +128,9 @@ void KeyframeBasicSequenceBoxVolumeDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteNoBlendReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteNoBlendReplacement; } } diff --git a/Source/System/Dynamics/Base/KeyframeSequence/Colors/OSGKeyframeColorSequenceTmpl.cpp b/Source/System/Dynamics/Base/KeyframeSequence/Colors/OSGKeyframeColorSequenceTmpl.cpp index 5896d97a..394462e6 100644 --- a/Source/System/Dynamics/Base/KeyframeSequence/Colors/OSGKeyframeColorSequenceTmpl.cpp +++ b/Source/System/Dynamics/Base/KeyframeSequence/Colors/OSGKeyframeColorSequenceTmpl.cpp @@ -47,7 +47,7 @@ #include "OSGKeyframeColorSequenceTmplFuncs.ins" #include "OSGKeyframeColorSequenceTmpl.ins" -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGKeyframeInterpolations.h" OSG_USING_NAMESPACE @@ -96,13 +96,13 @@ void KeyframeColorSequenceColor3fDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -110,13 +110,13 @@ void KeyframeColorSequenceColor4fDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -124,13 +124,13 @@ void KeyframeColorSequenceColor3fxDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -138,13 +138,13 @@ void KeyframeColorSequenceColor4fxDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -152,13 +152,13 @@ void KeyframeColorSequenceColor3ubDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -166,13 +166,13 @@ void KeyframeColorSequenceColor4ubDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } diff --git a/Source/System/Dynamics/Base/KeyframeSequence/FCPtrs/OSGKeyframeFCPtrSequence.cpp b/Source/System/Dynamics/Base/KeyframeSequence/FCPtrs/OSGKeyframeFCPtrSequence.cpp index 82888b26..3bfb85ea 100644 --- a/Source/System/Dynamics/Base/KeyframeSequence/FCPtrs/OSGKeyframeFCPtrSequence.cpp +++ b/Source/System/Dynamics/Base/KeyframeSequence/FCPtrs/OSGKeyframeFCPtrSequence.cpp @@ -46,7 +46,7 @@ #include #include "OSGKeyframeFCPtrSequence.h" -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGTypeFactory.h" #include "OSGKeyframeInterpolations.h" #include "OSGPointerSFieldBase.h" @@ -199,12 +199,12 @@ bool KeyframeFCPtrSequence::interpolate(UInt32 Type, UInt32 Index, Real32 Blend) { - if(Type != Animator::STEP_INTERPOLATION) + if(Type != TBAnimator::STEP_INTERPOLATION) { SWARNING << "Interpolation type " << Type<< " not supported for FCPtrs" << std::endl; return false; } - if(ReplacePolicy != Animator::OVERWRITE) + if(ReplacePolicy != TBAnimator::OVERWRITE) { SWARNING << "Replacement policy " << ReplacePolicy << " not supported for FCPtrs" << std::endl; return false; diff --git a/Source/System/Dynamics/Base/KeyframeSequence/Numbers/OSGKeyframeNumberSequenceTmpl.cpp b/Source/System/Dynamics/Base/KeyframeSequence/Numbers/OSGKeyframeNumberSequenceTmpl.cpp index 07423206..e1ee91a1 100644 --- a/Source/System/Dynamics/Base/KeyframeSequence/Numbers/OSGKeyframeNumberSequenceTmpl.cpp +++ b/Source/System/Dynamics/Base/KeyframeSequence/Numbers/OSGKeyframeNumberSequenceTmpl.cpp @@ -47,7 +47,7 @@ #include "OSGKeyframeNumberSequenceTmplFuncs.ins" #include "OSGKeyframeNumberSequenceTmpl.ins" -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGKeyframeInterpolations.h" OSG_USING_NAMESPACE @@ -118,13 +118,13 @@ void KeyframeNumberSequenceUInt8DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -132,13 +132,13 @@ void KeyframeNumberSequenceUInt16DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -146,13 +146,13 @@ void KeyframeNumberSequenceUInt32DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -160,13 +160,13 @@ void KeyframeNumberSequenceUInt64DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -174,13 +174,13 @@ void KeyframeNumberSequenceInt8DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -188,13 +188,13 @@ void KeyframeNumberSequenceInt16DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -202,13 +202,13 @@ void KeyframeNumberSequenceInt32DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -216,13 +216,13 @@ void KeyframeNumberSequenceInt64DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -231,13 +231,13 @@ void KeyframeNumberSequenceReal16DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } #endif //ENABLE_REAL16_ANIM_SUPPORT @@ -246,13 +246,13 @@ void KeyframeNumberSequenceReal32DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -260,13 +260,13 @@ void KeyframeNumberSequenceFixed32DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -274,13 +274,13 @@ void KeyframeNumberSequenceReal64DescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } diff --git a/Source/System/Dynamics/Base/KeyframeSequence/OSGKeyframeSequence.cpp b/Source/System/Dynamics/Base/KeyframeSequence/OSGKeyframeSequence.cpp index 4a683907..8a8457df 100644 --- a/Source/System/Dynamics/Base/KeyframeSequence/OSGKeyframeSequence.cpp +++ b/Source/System/Dynamics/Base/KeyframeSequence/OSGKeyframeSequence.cpp @@ -45,7 +45,7 @@ #include -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGKeyframeSequence.h" OSG_BEGIN_NAMESPACE diff --git a/Source/System/Dynamics/Base/KeyframeSequence/Positions/OSGKeyframePositionSequenceTmpl.cpp b/Source/System/Dynamics/Base/KeyframeSequence/Positions/OSGKeyframePositionSequenceTmpl.cpp index a30e403b..ecf75c51 100644 --- a/Source/System/Dynamics/Base/KeyframeSequence/Positions/OSGKeyframePositionSequenceTmpl.cpp +++ b/Source/System/Dynamics/Base/KeyframeSequence/Positions/OSGKeyframePositionSequenceTmpl.cpp @@ -47,7 +47,7 @@ #include "OSGKeyframePositionSequenceTmplFuncs.ins" #include "OSGKeyframePositionSequenceTmpl.ins" -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGKeyframeInterpolations.h" OSG_USING_NAMESPACE @@ -117,13 +117,13 @@ void KeyframePositionSequencePnt2sDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -131,13 +131,13 @@ void KeyframePositionSequencePnt3sDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -145,13 +145,13 @@ void KeyframePositionSequencePnt4sDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -159,13 +159,13 @@ void KeyframePositionSequencePnt2fDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -173,13 +173,13 @@ void KeyframePositionSequencePnt3fDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -187,13 +187,13 @@ void KeyframePositionSequencePnt4fDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -201,13 +201,13 @@ void KeyframePositionSequencePnt2fxDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -215,13 +215,13 @@ void KeyframePositionSequencePnt3fxDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -229,13 +229,13 @@ void KeyframePositionSequencePnt4fxDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -243,13 +243,13 @@ void KeyframePositionSequencePnt2dDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -257,13 +257,13 @@ void KeyframePositionSequencePnt3dDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -271,13 +271,13 @@ void KeyframePositionSequencePnt4dDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } diff --git a/Source/System/Dynamics/Base/KeyframeSequence/Rotations/OSGKeyframeRotationSequenceTmpl.cpp b/Source/System/Dynamics/Base/KeyframeSequence/Rotations/OSGKeyframeRotationSequenceTmpl.cpp index 1a823079..db07a171 100644 --- a/Source/System/Dynamics/Base/KeyframeSequence/Rotations/OSGKeyframeRotationSequenceTmpl.cpp +++ b/Source/System/Dynamics/Base/KeyframeSequence/Rotations/OSGKeyframeRotationSequenceTmpl.cpp @@ -47,7 +47,7 @@ #include "OSGKeyframeRotationSequenceTmplFuncs.ins" #include "OSGKeyframeRotationSequenceTmpl.ins" -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGKeyframeInterpolations.h" OSG_USING_NAMESPACE @@ -87,15 +87,15 @@ void KeyframeRotationSequenceQuaternionDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = slerpKeyframeSequence; - _interpolationFuncs[Animator::SPHERICAL_LINEAR_INTERPOLATION] = slerpKeyframeSequence; - _interpolationFuncs[Animator::NORMALIZED_LINEAR_INTERPOLATION] = nlerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = squadKeyframeSequence; - - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = slerpKeyframeSequence; + _interpolationFuncs[TBAnimator::SPHERICAL_LINEAR_INTERPOLATION] = slerpKeyframeSequence; + _interpolationFuncs[TBAnimator::NORMALIZED_LINEAR_INTERPOLATION] = nlerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = squadKeyframeSequence; + + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -103,15 +103,15 @@ void KeyframeRotationSequenceQuaternionfxDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = slerpKeyframeSequence; - _interpolationFuncs[Animator::SPHERICAL_LINEAR_INTERPOLATION] = slerpKeyframeSequence; - _interpolationFuncs[Animator::NORMALIZED_LINEAR_INTERPOLATION] = nlerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = squadKeyframeSequence; - - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = slerpKeyframeSequence; + _interpolationFuncs[TBAnimator::SPHERICAL_LINEAR_INTERPOLATION] = slerpKeyframeSequence; + _interpolationFuncs[TBAnimator::NORMALIZED_LINEAR_INTERPOLATION] = nlerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = squadKeyframeSequence; + + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -120,7 +120,7 @@ void KeyframeRotationSequenceQuaternionfxDescBase::initMethod(InitPhase ePhase) //if(ePhase == TypeObject::SystemPost) //{ //_interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - //_interpolationFuncs[Animator::LINEAR_INTERPOLATION] = slerpKeyframeSequence; + //_interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = slerpKeyframeSequence; //_interpolationFuncs[Animator::SPHERICAL_LINEAR_INTERPOLATION] = slerpKeyframeSequence; //_interpolationFuncs[Animator::NORMALIZED_LINEAR_INTERPOLATION] = nlerpKeyframeSequence; //_interpolationFuncs[Animator::CUBIC_INTERPOLATION] = squadKeyframeSequence; diff --git a/Source/System/Dynamics/Base/KeyframeSequence/Rotations/OSGKeyframeRotationSequenceTmpl.h b/Source/System/Dynamics/Base/KeyframeSequence/Rotations/OSGKeyframeRotationSequenceTmpl.h index 324057be..79a72647 100644 --- a/Source/System/Dynamics/Base/KeyframeSequence/Rotations/OSGKeyframeRotationSequenceTmpl.h +++ b/Source/System/Dynamics/Base/KeyframeSequence/Rotations/OSGKeyframeRotationSequenceTmpl.h @@ -444,7 +444,7 @@ OSG_GEN_CONTAINERPTR(KeyframeRotationSequenceQuaternionfx); //if(ePhase == TypeObject::SystemPost) //{ //_interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - //_interpolationFuncs[Animator::LINEAR_INTERPOLATION] = slerpKeyframeSequence; + //_interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = slerpKeyframeSequence; //_interpolationFuncs[Animator::SPHERICAL_LINEAR_INTERPOLATION] = slerpKeyframeSequence; //_interpolationFuncs[Animator::NORMALIZED_LINEAR_INTERPOLATION] = nlerpKeyframeSequence; //_interpolationFuncs[Animator::CUBIC_INTERPOLATION] = squadKeyframeSequence; diff --git a/Source/System/Dynamics/Base/KeyframeSequence/Transformations/OSGKeyframeTransformationSequenceTmpl.cpp b/Source/System/Dynamics/Base/KeyframeSequence/Transformations/OSGKeyframeTransformationSequenceTmpl.cpp index 6de800e9..56b5b01e 100644 --- a/Source/System/Dynamics/Base/KeyframeSequence/Transformations/OSGKeyframeTransformationSequenceTmpl.cpp +++ b/Source/System/Dynamics/Base/KeyframeSequence/Transformations/OSGKeyframeTransformationSequenceTmpl.cpp @@ -47,7 +47,7 @@ #include "OSGKeyframeTransformationSequenceTmplFuncs.ins" #include "OSGKeyframeTransformationSequenceTmpl.ins" -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGKeyframeInterpolations.h" OSG_USING_NAMESPACE @@ -87,13 +87,13 @@ void KeyframeTransformationSequenceMatrix4fDescBase::initMethod(InitPhase ePhase { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteMatrixReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteMatrixReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastMatrixReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteMatrixReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteMatrixReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastMatrixReplacement; } } @@ -101,13 +101,13 @@ void KeyframeTransformationSequenceMatrix4fxDescBase::initMethod(InitPhase ePhas { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteMatrixReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteMatrixReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastMatrixReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteMatrixReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteMatrixReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastMatrixReplacement; } } @@ -115,13 +115,13 @@ void KeyframeTransformationSequenceMatrix4dDescBase::initMethod(InitPhase ePhase { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteMatrixReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteMatrixReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastMatrixReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteMatrixReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteMatrixReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastMatrixReplacement; } } diff --git a/Source/System/Dynamics/Base/KeyframeSequence/Vectors/OSGKeyframeVectorSequenceTmpl.cpp b/Source/System/Dynamics/Base/KeyframeSequence/Vectors/OSGKeyframeVectorSequenceTmpl.cpp index 0085b76f..06b5acea 100644 --- a/Source/System/Dynamics/Base/KeyframeSequence/Vectors/OSGKeyframeVectorSequenceTmpl.cpp +++ b/Source/System/Dynamics/Base/KeyframeSequence/Vectors/OSGKeyframeVectorSequenceTmpl.cpp @@ -47,7 +47,7 @@ #include "OSGKeyframeVectorSequenceTmplFuncs.ins" #include "OSGKeyframeVectorSequenceTmpl.ins" -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include "OSGKeyframeInterpolations.h" OSG_USING_NAMESPACE @@ -129,13 +129,13 @@ void KeyframeVectorSequenceVec2sDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -143,13 +143,13 @@ void KeyframeVectorSequenceVec3sDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -157,13 +157,13 @@ void KeyframeVectorSequenceVec4sDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -171,13 +171,13 @@ void KeyframeVectorSequenceVec1fDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -185,13 +185,13 @@ void KeyframeVectorSequenceVec2fDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -199,13 +199,13 @@ void KeyframeVectorSequenceVec3fDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -213,13 +213,13 @@ void KeyframeVectorSequenceVec4fDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -227,13 +227,13 @@ void KeyframeVectorSequenceVec2fxDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -241,13 +241,13 @@ void KeyframeVectorSequenceVec3fxDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -255,13 +255,13 @@ void KeyframeVectorSequenceVec4fxDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -269,13 +269,13 @@ void KeyframeVectorSequenceVec2dDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -283,13 +283,13 @@ void KeyframeVectorSequenceVec3dDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } @@ -297,13 +297,13 @@ void KeyframeVectorSequenceVec4dDescBase::initMethod(InitPhase ePhase) { if(ePhase == TypeObject::SystemPost) { - _interpolationFuncs[Animator::STEP_INTERPOLATION] = stepKeyframeSequence; - _interpolationFuncs[Animator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; - _interpolationFuncs[Animator::CUBIC_INTERPOLATION] = splineKeyframeSequence; + _interpolationFuncs[TBAnimator::STEP_INTERPOLATION] = stepKeyframeSequence; + _interpolationFuncs[TBAnimator::LINEAR_INTERPOLATION] = lerpKeyframeSequence; + _interpolationFuncs[TBAnimator::CUBIC_INTERPOLATION] = splineKeyframeSequence; - _replacementFuncs[Animator::OVERWRITE] = overwriteReplacement; - _replacementFuncs[Animator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; - _replacementFuncs[Animator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; + _replacementFuncs[TBAnimator::OVERWRITE] = overwriteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_ABSOLUTE] = additiveAbsoluteReplacement; + _replacementFuncs[TBAnimator::ADDITIVE_SINCE_LAST] = additiveSinceLastReplacement; } } diff --git a/Source/System/Dynamics/Base/OSGKeyframeInterpolations.h b/Source/System/Dynamics/Base/OSGKeyframeInterpolations.h index 8813dcf4..9c3168ff 100644 --- a/Source/System/Dynamics/Base/OSGKeyframeInterpolations.h +++ b/Source/System/Dynamics/Base/OSGKeyframeInterpolations.h @@ -10,7 +10,7 @@ #include "OSGBaseTypes.h" #include "OSGInterpolations.h" -#include "OSGAnimator.h" +#include "OSGTBAnimator.h" #include OSG_BEGIN_NAMESPACE diff --git a/Source/System/Dynamics/Morph/OSGMorphGeometry.cpp b/Source/System/Dynamics/Morph/OSGMorphGeometry.cpp index d8e30f14..b6e36866 100644 --- a/Source/System/Dynamics/Morph/OSGMorphGeometry.cpp +++ b/Source/System/Dynamics/Morph/OSGMorphGeometry.cpp @@ -142,17 +142,17 @@ void MorphGeometry::initMethod(InitPhase ePhase) { IntersectAction::registerEnterDefault( getClassType(), - reinterpret_cast(&Geometry::intersect)); + reinterpret_cast(&Geometry::intersectEnter)); RenderAction::registerEnterDefault( getClassType(), reinterpret_cast( - &MaterialDrawable::renderActionEnterHandler)); + &MaterialDrawable::renderEnter)); RenderAction::registerLeaveDefault( getClassType(), reinterpret_cast( - &MaterialDrawable::renderActionLeaveHandler)); + &MaterialDrawable::renderLeave)); } } diff --git a/Source/System/Dynamics/SkeletalAnimation/OSGSkeletonBlendedGeometry.cpp b/Source/System/Dynamics/SkeletalAnimation/OSGSkeletonBlendedGeometry.cpp index 3e8ce701..8af83582 100644 --- a/Source/System/Dynamics/SkeletalAnimation/OSGSkeletonBlendedGeometry.cpp +++ b/Source/System/Dynamics/SkeletalAnimation/OSGSkeletonBlendedGeometry.cpp @@ -357,7 +357,7 @@ void SkeletonBlendedGeometry::addJointBlending(UInt32 VertexIndex, Node* const T getWeightIndexes()->push_back(JointIndex); //Weight Index - getWeightIndexes()->push_back(getWeights()->getSize()); + getWeightIndexes()->push_back(getWeights()->size()); getWeights()->push_back(Pnt1f(BlendAmount)); } @@ -384,7 +384,7 @@ void SkeletonBlendedGeometry::addJointBlending(UInt32 VertexIndex, getWeightIndexes()->push_back(JointIndex); //Weight Index - getWeightIndexes()->push_back(getWeights()->getSize()); + getWeightIndexes()->push_back(getWeights()->size()); getWeights()->push_back(Pnt1f(BlendAmount)); } @@ -549,7 +549,7 @@ Action::ResultE SkeletonBlendedGeometry::intersectEnter(Action *action) ia->setLine(Line(pos, dir), ia->getMaxDist()); ia->scale(dir.length()); - return Inherited::intersect(action); + return Inherited::intersectEnter(action); } Action::ResultE SkeletonBlendedGeometry::intersectLeave(Action *action) @@ -586,7 +586,7 @@ Action::ResultE SkeletonBlendedGeometry::renderEnter(Action *action) pAction->pushMatrix(mMat); - Action::ResultE Result(Inherited::renderActionEnterHandler(action)); + Action::ResultE Result(Inherited::renderEnter(action)); if(Result != Action::Continue) { pAction->popVisibility(); @@ -597,7 +597,7 @@ Action::ResultE SkeletonBlendedGeometry::renderEnter(Action *action) Action::ResultE SkeletonBlendedGeometry::renderLeave(Action *action) { - Action::ResultE Result(Inherited::renderActionLeaveHandler(action)); + Action::ResultE Result(Inherited::renderLeave(action)); RenderAction *pAction = dynamic_cast(action); diff --git a/Source/System/Dynamics/SkeletalAnimation/OSGSkeletonDrawable.cpp b/Source/System/Dynamics/SkeletalAnimation/OSGSkeletonDrawable.cpp index b441d6c7..e056f2ed 100644 --- a/Source/System/Dynamics/SkeletalAnimation/OSGSkeletonDrawable.cpp +++ b/Source/System/Dynamics/SkeletalAnimation/OSGSkeletonDrawable.cpp @@ -79,12 +79,12 @@ void SkeletonDrawable::initMethod(InitPhase ePhase) RenderAction::registerEnterDefault( SkeletonDrawable::getClassType(), reinterpret_cast( - &MaterialDrawable::renderActionEnterHandler)); + &MaterialDrawable::renderEnter)); RenderAction::registerLeaveDefault( SkeletonDrawable::getClassType(), reinterpret_cast( - &MaterialDrawable::renderActionLeaveHandler)); + &MaterialDrawable::renderLeave)); } } diff --git a/Source/System/FileIO/Attachments/OSGFilePathAttachment.cpp b/Source/System/FileIO/Attachments/OSGFilePathAttachment.cpp index 4262742b..58bdc1f0 100644 --- a/Source/System/FileIO/Attachments/OSGFilePathAttachment.cpp +++ b/Source/System/FileIO/Attachments/OSGFilePathAttachment.cpp @@ -51,7 +51,7 @@ //#include "OSGProxyGroup.h" #include "OSGFCFileHandler.h" -#include +#include OSG_BEGIN_NAMESPACE @@ -230,7 +230,7 @@ FieldContainerUnrecPtr FilePathAttachment::loadFromFilePath(BoostPath &LoadFileP } } } - catch(boost::filesystem::basic_filesystem_error &) + catch(boost::filesystem::filesystem_error &) { return NULL; } diff --git a/Source/System/FileIO/Base/OSGFCFileHandler.h b/Source/System/FileIO/Base/OSGFCFileHandler.h index da6f75c3..fe8c8bb8 100644 --- a/Source/System/FileIO/Base/OSGFCFileHandler.h +++ b/Source/System/FileIO/Base/OSGFCFileHandler.h @@ -43,7 +43,6 @@ #include "OSGBaseTypes.h" #include "OSGFCFileType.h" -#include "OSGPathType.h" #include "OSGPathHandler.h" #include "OSGSingletonHolder.h" @@ -169,6 +168,11 @@ class OSG_SYSTEM_DLLMAPPING FCFileHandlerBase std::string initPathHandler(const Char8 *filename); }; +#if defined(WIN32) +OSG_SYSTEM_EXPIMP_TMPL +template class OSG_SYSTEM_DLLMAPPING SingletonHolder; +#endif + typedef SingletonHolder FCFileHandler; typedef FCFileHandler* FCFileHandlerP; diff --git a/Source/System/FileIO/XML/OSGXMLFCFileType.cpp b/Source/System/FileIO/XML/OSGXMLFCFileType.cpp index 10aea8af..945a9fc6 100644 --- a/Source/System/FileIO/XML/OSGXMLFCFileType.cpp +++ b/Source/System/FileIO/XML/OSGXMLFCFileType.cpp @@ -58,11 +58,10 @@ #include "OSGXMLFCFileType.h" #include "OSGNode.h" +#include "OSGFieldContainerUtils.h" #include "OSGContainerGatherUtils.h" -#include "OSGContainerUtils.h" #include "OSGStringUtils.h" -#include "OSGPathUtils.h" #include #include @@ -70,9 +69,9 @@ #include #include #include -#include "rapidxml.h" -#include "rapidxml_iterators.h" -#include "rapidxml_print.h" +#include "rapidxml.hpp" +#include "rapidxml_iterators.hpp" +#include "rapidxml_print.hpp" #include "OSGSceneFileHandler.h" @@ -116,7 +115,7 @@ void XMLFCFileType::printXMLParseError(const rapidxml::parse_error& Error, const std::string& FileNameOrExtension) { Int32 LineNum; - Int32 LineStartPos; + SizeT LineStartPos; getLine(StreamText, Error.where() - &StreamText[0],LineNum,LineStartPos); // print out where the error occured @@ -132,7 +131,7 @@ void XMLFCFileType::printXMLSemanticError(const std::string& ErrorDesc, const std::string& FileNameOrExtension) { Int32 LineNum; - Int32 LineStartPos; + SizeT LineStartPos; getLine(StreamText, ErrorPos,LineNum,LineStartPos); // print out where the error occured @@ -701,7 +700,7 @@ XMLFCFileType::IDLookupMap XMLFCFileType::createFieldContainers(rapidxml::node_i std::endl; } } - catch(boost::filesystem::basic_filesystem_error& e) + catch(boost::filesystem::filesystem_error& e) { SWARNING << "ERROR in XMLFCFileType::read():" << @@ -1063,7 +1062,7 @@ bool XMLFCFileType::write(const FCPtrStore &Containers, std::ostream &OutputStre //(XMLHandlerMapItor->second.second)(*FCItor,OutputStream); } - rapidxml::print(OutputStream, doc, rapidxml::print_newline_attributes); + rapidxml::print(OutputStream, doc); return true; } diff --git a/Source/System/FileIO/XML/rapidxml-license.txt b/Source/System/FileIO/XML/license.txt similarity index 100% rename from Source/System/FileIO/XML/rapidxml-license.txt rename to Source/System/FileIO/XML/license.txt diff --git a/Source/System/FileIO/XML/rapidxml.h b/Source/System/FileIO/XML/rapidxml.hpp similarity index 99% rename from Source/System/FileIO/XML/rapidxml.h rename to Source/System/FileIO/XML/rapidxml.hpp index 342c0bcc..ae91e081 100644 --- a/Source/System/FileIO/XML/rapidxml.h +++ b/Source/System/FileIO/XML/rapidxml.hpp @@ -1522,28 +1522,28 @@ namespace rapidxml // Insert UTF8 sequence if (code < 0x80) // 1 byte sequence { - text[0] = static_cast(code); + text[0] = static_cast(code); text += 1; } else if (code < 0x800) // 2 byte sequence { - text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[0] = static_cast(code | 0xC0); + text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[0] = static_cast(code | 0xC0); text += 2; } - else if (code < 0x10000) // 3 byte sequence + else if (code < 0x10000) // 3 byte sequence { - text[2] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[0] = static_cast(code | 0xE0); + text[2] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[0] = static_cast(code | 0xE0); text += 3; } - else if (code < 0x110000) // 4 byte sequence + else if (code < 0x110000) // 4 byte sequence { - text[3] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[2] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[0] = static_cast(code | 0xF0); + text[3] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[2] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[0] = static_cast(code | 0xF0); text += 4; } else // Invalid, only codes up to 0x10FFFF are allowed in Unicode diff --git a/Source/System/FileIO/XML/rapidxml_iterators.h b/Source/System/FileIO/XML/rapidxml_iterators.hpp similarity index 89% rename from Source/System/FileIO/XML/rapidxml_iterators.h rename to Source/System/FileIO/XML/rapidxml_iterators.hpp index 5882e1a3..52ebc298 100644 --- a/Source/System/FileIO/XML/rapidxml_iterators.h +++ b/Source/System/FileIO/XML/rapidxml_iterators.hpp @@ -6,21 +6,21 @@ // Revision $DateTime: 2009/05/13 01:46:17 $ //! \file rapidxml_iterators.hpp This file contains rapidxml iterators -#include "rapidxml.h" +#include "rapidxml.hpp" namespace rapidxml { //! Iterator of child nodes of xml_node - template + template class node_iterator { public: - typedef typename rapidxml::xml_node value_type; - typedef typename rapidxml::xml_node &reference; - typedef typename rapidxml::xml_node *pointer; + typedef typename xml_node value_type; + typedef typename xml_node &reference; + typedef typename xml_node *pointer; typedef std::ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; @@ -97,9 +97,9 @@ namespace rapidxml public: - typedef typename rapidxml::xml_attribute value_type; - typedef typename rapidxml::xml_attribute &reference; - typedef typename rapidxml::xml_attribute *pointer; + typedef typename xml_attribute value_type; + typedef typename xml_attribute &reference; + typedef typename xml_attribute *pointer; typedef std::ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; diff --git a/Source/System/FileIO/XML/rapidxml_print.h b/Source/System/FileIO/XML/rapidxml_print.hpp similarity index 96% rename from Source/System/FileIO/XML/rapidxml_print.h rename to Source/System/FileIO/XML/rapidxml_print.hpp index 16cacc20..0ae2b14f 100644 --- a/Source/System/FileIO/XML/rapidxml_print.h +++ b/Source/System/FileIO/XML/rapidxml_print.hpp @@ -6,7 +6,7 @@ // Revision $DateTime: 2009/05/13 01:46:17 $ //! \file rapidxml_print.hpp This file contains rapidxml printer implementation -#include "rapidxml.h" +#include "rapidxml.hpp" // Only include streams if not disabled #ifndef RAPIDXML_NO_STREAMS @@ -21,7 +21,6 @@ namespace rapidxml // Printing flags const int print_no_indenting = 0x1; //!< Printer flag instructing the printer to suppress indenting of XML. See print() function. - const int print_newline_attributes = 0x2; //!< Printer flag instructing the printer to add newlines for each attribute indenting of XML. See print() function. /////////////////////////////////////////////////////////////////////// // Internal @@ -176,19 +175,12 @@ namespace rapidxml // Print attributes of the node template - inline OutIt print_attributes(OutIt out, const xml_node *node, int flags, int indent) + inline OutIt print_attributes(OutIt out, const xml_node *node, int flags) { for (xml_attribute *attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { if (attribute->name() && attribute->value()) { - if(flags & print_newline_attributes) - { - *out = Ch('\n'), ++out; - if (!(flags & print_no_indenting)) - out = fill_chars(out, indent+1, Ch('\t')); - } - // Print attribute name *out = Ch(' '), ++out; out = copy_chars(attribute->name(), attribute->name() + attribute->name_size(), out); @@ -256,7 +248,7 @@ namespace rapidxml out = fill_chars(out, indent, Ch('\t')); *out = Ch('<'), ++out; out = copy_chars(node->name(), node->name() + node->name_size(), out); - out = print_attributes(out, node, flags, indent); + out = print_attributes(out, node, flags); // If node is childless if (node->value_size() == 0 && !node->first_node()) @@ -315,7 +307,7 @@ namespace rapidxml *out = Ch('l'), ++out; // Print attributes - out = print_attributes(out, node, flags, indent); + out = print_attributes(out, node, flags); // Print declaration end *out = Ch('?'), ++out; diff --git a/Source/System/FileIO/XML/rapidxml_utils.h b/Source/System/FileIO/XML/rapidxml_utils.hpp similarity index 100% rename from Source/System/FileIO/XML/rapidxml_utils.h rename to Source/System/FileIO/XML/rapidxml_utils.hpp diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.cpp b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.cpp deleted file mode 100644 index c9cd2df6..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.cpp +++ /dev/null @@ -1,643 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include "OSGConfig.h" - -#include "OSGAction.h" -#include "OSGCamera.h" -#include "OSGRenderAction.h" -#include "OSGSceneFileHandler.h" -#include "OSGVolumeDraw.h" - -#include "OSGFogStage.h" -#include "OSGFogStageData.h" - -#include "OSGFrameBufferObject.h" -#include "OSGFrameBufferAttachment.h" -#include "OSGRenderBuffer.h" -#include "OSGTextureBuffer.h" - -#include "OSGChunkMaterial.h" -#include "OSGMaterialChunk.h" -#include "OSGTextureObjChunk.h" -#include "OSGDrawEnv.h" -#include "OSGImageFunctions.h" -#include "OSGStateOverride.h" -#include "OSGTextureEnvChunk.h" -#include "OSGSimpleSHLFunctions.h" -#include "OSGGL.h" - -#include "OSGMatrixUtility.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGFogStageBase.cpp file. -// To modify it, please change the .fcd file (OSGFogStage.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ -UInt32 FogStage::_uiFramebuffer_object_extension = Window::invalidExtensionID; -UInt32 FogStage::_extDepthTexture = Window::invalidExtensionID; - -UInt32 FogStage::_uiFuncDrawBuffers = Window::invalidFunctionID; - -typedef void (OSG_APIENTRY *GLDrawBuffersEXTProcT)(GLsizei n, - const GLenum *buffers); - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void FogStage::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - RenderAction::registerEnterDefault( - FogStage::getClassType(), - reinterpret_cast(&FogStage::renderEnter)); - - RenderAction::registerLeaveDefault( - FogStage::getClassType(), - reinterpret_cast(&FogStage::renderLeave)); - - _uiFramebuffer_object_extension = - Window::registerExtension("GL_EXT_framebuffer_object"); - - _extDepthTexture = - Window::registerExtension("GL_ARB_depth_texture"); - - _uiFuncDrawBuffers = - Window::registerFunction ( - OSG_DLSYM_UNDERSCORE"glDrawBuffersARB", - _uiFramebuffer_object_extension); - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -FogStageDataTransitPtr FogStage::setupStageData(Int32 iPixelWidth, - Int32 iPixelHeight) -{ - FogStageDataTransitPtr returnValue = FogStageData::createLocal(); - - if(returnValue == NULL) - return returnValue; - - OSG::Thread::setCurrentLocalFlags(); - - // Scene Target - - FrameBufferObjectUnrecPtr pSceneFBO = FrameBufferObject::createLocal(); - - //Depth texture - _SceneDepthTex = TextureObjChunk::createLocal(); - TextureEnvChunkUnrecPtr pSceneDepthTexEnv = TextureEnvChunk::createLocal(); - ImageUnrecPtr pDepthImg = Image ::createLocal(); - - pDepthImg->set(Image::OSG_L_PF, - iPixelWidth, - iPixelHeight, - 1, - 1, - 1, - 0.0, - NULL, - Image::OSG_UINT8_IMAGEDATA, - false); - - _SceneDepthTex ->setImage (pDepthImg ); - _SceneDepthTex ->setMinFilter (GL_LINEAR ); - _SceneDepthTex ->setMagFilter (GL_LINEAR ); - _SceneDepthTex ->setWrapS (GL_CLAMP_TO_EDGE ); - _SceneDepthTex ->setWrapT (GL_CLAMP_TO_EDGE ); - _SceneDepthTex ->setInternalFormat(GL_DEPTH_COMPONENT); - _SceneDepthTex ->setExternalFormat(GL_DEPTH_COMPONENT); - - pSceneDepthTexEnv->setEnvMode (GL_REPLACE ); - - TextureBufferUnrecPtr pDepthBuffer = TextureBuffer::createLocal(); - //pDepthBuffer->setInternalFormat(GL_DEPTH_COMPONENT24 ); - - pDepthBuffer->setTexture(_SceneDepthTex); - - - //Color Buffer - _SceneTex = TextureObjChunk::createLocal(); - TextureEnvChunkUnrecPtr pSceneTexEnv = TextureEnvChunk::createLocal(); - ImageUnrecPtr pImg = Image ::createLocal(); - - pImg->set(Image::OSG_RGB_PF, - iPixelWidth, - iPixelHeight, - 1, - 1, - 1, - 0.0, - 0, - Image::OSG_UINT8_IMAGEDATA, - false); - - _SceneTex ->setImage (pImg ); - _SceneTex ->setMinFilter (GL_LINEAR ); - _SceneTex ->setMagFilter (GL_LINEAR ); - _SceneTex ->setWrapS (GL_CLAMP_TO_EDGE ); - _SceneTex ->setWrapT (GL_CLAMP_TO_EDGE ); - _SceneTex ->setInternalFormat(getBufferFormat()); - - pSceneTexEnv->setEnvMode (GL_REPLACE ); - - TextureBufferUnrecPtr pSceneTexBuffer = TextureBuffer::createLocal(); - - pSceneTexBuffer->setTexture(_SceneTex); - - - - pSceneFBO->setSize(iPixelWidth, iPixelHeight); - - pSceneFBO->setColorAttachment(pSceneTexBuffer, 0); - pSceneFBO->setDepthAttachment(pDepthBuffer ); - - pSceneFBO->editMFDrawBuffers()->push_back(GL_COLOR_ATTACHMENT0_EXT); - - setRenderTarget(pSceneFBO); - - // general mat chunk - MaterialChunkUnrecPtr pMatChunk = MaterialChunk::createLocal(); - - pMatChunk->setLit(false); - - - - - //Fog material - ChunkMaterialUnrecPtr pFogMat = ChunkMaterial ::createLocal(); - - pFogMat->addChunk(pMatChunk ); - pFogMat->addChunk(_SceneTex, 0); - pFogMat->addChunk(pSceneTexEnv, 0); - pFogMat->addChunk(_SceneDepthTex, 1); - pFogMat->addChunk(pSceneDepthTexEnv, 1); - - _FogShader = generateFogFragmentProgram(); - - _FogShader->addUniformVariable("sceneTex", 0); - _FogShader->addUniformVariable("depthTex", 1); - _FogShader->addUniformVariable("nearPlane", 0.0f); - _FogShader->addUniformVariable("farPlane", 1.0f); - _FogShader->addUniformVariable("fogColor", getFogColor()); - _FogShader->addUniformVariable("fogStart", getFogStart()); - _FogShader->addUniformVariable("fogEnd", getFogEnd()); - _FogShader->addUniformVariable("fogDensity", getFogDensity()); - _FogShader->addUniformVariable("fogMode", getFogMode()); - - pFogMat->addChunk(_FogShader, 0); - - returnValue->setFogMaterial(pFogMat); - - OSG::Thread::resetCurrentLocalFlags(); - - Thread::getCurrentChangeList()->commitChanges(); - - return returnValue; -} - -void FogStage::resizeStageData(FogStageData *pData, - Int32 iPixelWidth, - Int32 iPixelHeight) -{ - //Update the image sizes - _SceneDepthTex->getImage()->set(Image::OSG_L_PF, - iPixelWidth, - iPixelHeight, - 1, - 1, - 1, - 0.0, - NULL, - Image::OSG_UINT8_IMAGEDATA, - false); - - _SceneTex->getImage()->set(Image::OSG_RGB_PF, - iPixelWidth, - iPixelHeight, - 1, - 1, - 1, - 0.0, - 0, - Image::OSG_UINT8_IMAGEDATA, - false); - - getRenderTarget()->setSize(iPixelWidth, iPixelHeight); -} - -void FogStage::postProcess(DrawEnv *pEnv) -{ - Window *win = pEnv->getWindow(); - - if(win->hasExtension(_uiFramebuffer_object_extension) == false || - win->hasExtension(_extDepthTexture ) == false) - { - FNOTICE(("Framebuffer objects not supported on Window %p!\n", win)); - return; - } - - GLDrawBuffersEXTProcT glDrawBuffersEXTProc = - reinterpret_cast( - win->getFunction(_uiFuncDrawBuffers)); - - glColor3f(1.f, 1.f, 1.f); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - glLoadIdentity(); - - FogStageData *pData = pEnv->getData(_iDataSlotId); - - if(pData == NULL) - { - return; - } - - if((pData->getWidth () != pEnv->getPixelWidth() ) || - (pData->getHeight() != pEnv->getPixelHeight()) ) - { - resizeStageData(pData, - pEnv->getPixelWidth(), - pEnv->getPixelHeight()); - } - - // Fog pass - glDisable(GL_DEPTH_TEST); - - glViewport(pEnv->getPixelLeft (), - pEnv->getPixelBottom(), - pEnv->getPixelWidth (), - pEnv->getPixelHeight()); - - ChunkMaterial *pTCM = pData->getFogMaterial(); - - State *pTState = pTCM->getState(); - - pEnv->activateState(pTState, NULL); - - glBegin(GL_QUADS); - { - glTexCoord2f(0.00, 0.00); - glVertex2f (0.00, 0.00); - - glTexCoord2f(1.00, 0.00); - glVertex2f (1.00, 0.00); - - glTexCoord2f(1.00, 1.00); - glVertex2f (1.00, 1.00); - - glTexCoord2f(0.00, 1.00); - glVertex2f (0.00, 1.00); - } - glEnd(); - - glEnable(GL_DEPTH_TEST); - - pEnv->deactivateState(); - - glPopMatrix(); -} - -void FogStage::initData(Viewport *pViewport, - RenderActionBase *pAction ) -{ - FogStageDataUnrecPtr pData;// = pAction->getData(_iDataSlotId); - - //if(pData == NULL) - //{ - pData = setupStageData(pViewport->getPixelWidth(), - pViewport->getPixelHeight()); - - pData->setWidth (pViewport->getPixelWidth ()); - pData->setHeight(pViewport->getPixelHeight()); - - this->setData(pData, _iDataSlotId, pAction); - //} -} - -#define OSGFogL << std::endl - -SimpleSHLChunkTransitPtr FogStage::generateFogFragmentProgram(void) -{ - std::ostringstream ost; - - ost << "uniform sampler2D sceneTex;" OSGFogL - << "uniform sampler2D depthTex;" OSGFogL - << "uniform float nearPlane;" OSGFogL - << "uniform float farPlane;" OSGFogL - << "uniform vec4 fogColor;" OSGFogL - << "uniform float fogStart;" OSGFogL - << "uniform float fogEnd;" OSGFogL - << "uniform float fogDensity;" OSGFogL - << "uniform int fogMode;" OSGFogL - << "" OSGFogL - << "void main(void)" OSGFogL - << "{" OSGFogL - << " vec4 scene = texture2D(sceneTex, gl_TexCoord[0].xy);" OSGFogL - << " vec4 depthSample = texture2D( depthTex, gl_TexCoord[0].st );" OSGFogL - << "" OSGFogL - << " float depth = depthSample.x * 255.0 / 256.0 +" OSGFogL - << " depthSample.y * 255.0 / 65536.0 +" OSGFogL - << " depthSample.z * 255.0 / 16777216.0;" OSGFogL - << " float zDistance = (nearPlane * farPlane) / (farPlane - depth * (farPlane - nearPlane));" OSGFogL - << " const float LOG2 = 1.442695;" OSGFogL - << " float fogFactor = 1.0;" OSGFogL - << " if(fogMode == 1)" OSGFogL - << " {" OSGFogL - << " fogFactor = (depth - fogStart)/(fogEnd - fogStart);" OSGFogL - << " }" OSGFogL - << " else if(fogMode == 2)" OSGFogL - << " {" OSGFogL - << " fogFactor = exp2( -fogDensity * " OSGFogL - << " zDistance * " OSGFogL - << " LOG2);" OSGFogL - << " }" OSGFogL - << " else if(fogMode == 3)" OSGFogL - << " {" OSGFogL - << " fogFactor = exp2( -fogDensity * " OSGFogL - << " fogDensity * " OSGFogL - << " zDistance * " OSGFogL - << " zDistance * " OSGFogL - << " LOG2);" OSGFogL - << " }" OSGFogL - << " fogFactor = clamp(fogFactor, 0.0, 1.0);" OSGFogL - << " gl_FragColor = vec4( mix( fogColor.rgb, scene.rgb,fogFactor), 1.0);" OSGFogL - << "}" OSGFogL - << ""; - - SimpleSHLChunkTransitPtr returnValue = SimpleSHLChunk::createLocal(); - - returnValue->setFragmentProgram(ost.str()); - - return returnValue; -} - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*-------------------------------------------------------------------------*/ -/* Draw */ - -/*! - Draw loaded geometry. If nothing was loaded until now, start - loading. If loading is not finished, draw the children of - thid group. - */ - -ActionBase::ResultE FogStage::renderEnter(Action *action) -{ - RenderAction *a = dynamic_cast(action); - - a->disableDefaultPartition(); - - this->beginPartitionGroup(a); - { - this->pushPartition(a); - { - RenderPartition *pPart = a->getActivePartition(); - FrameBufferObject *pTarget = this->getRenderTarget(); - Viewport *pPort = a->getViewport(); - Camera *pCam = a->getCamera (); - Background *pBack = a->getBackground(); - - if(pTarget == NULL) - { - this->initData(pPort, a); - - pTarget = this->getRenderTarget(); - } - - pPart->setRenderTarget(pTarget); - -#ifdef OSG_DEBUGX - std::string szMessage("RenderPartition\n"); - pPart->setDebugString(szMessage ); -#endif - - if(pPort != NULL) - { -// pPart->setViewport(pPort ); - pPart->setWindow (a->getWindow()); - - if(pTarget != NULL) - { - pPart->calcViewportDimension(pPort->getLeft (), - pPort->getBottom(), - pPort->getRight (), - pPort->getTop (), - - pTarget->getWidth (), - pTarget->getHeight ()); - } - else - { - pPart->calcViewportDimension(pPort->getLeft (), - pPort->getBottom(), - pPort->getRight (), - pPort->getTop (), - - a->getWindow()->getWidth (), - a->getWindow()->getHeight()); - } - - if(pCam != NULL) - { - Matrix m, t; - - // set the projection - pCam->getProjection (m, - pPart->getViewportWidth (), - pPart->getViewportHeight()); - - pCam->getProjectionTranslation(t, - pPart->getViewportWidth (), - pPart->getViewportHeight()); - - pPart->setupProjection(m, t); - - pCam->getViewing(m, - pPart->getViewportWidth (), - pPart->getViewportHeight()); - - - pPart->setupViewing(m); - - pPart->setNear (pCam->getNear()); - pPart->setFar (pCam->getFar ()); - - pPart->calcFrustum(); - } - - pPart->setBackground(pBack); - } - - this->recurseFromThis(a); - } - this->popPartition(a); - - this->pushPartition(a, - (RenderPartition::CopyWindow | - RenderPartition::CopyViewportSize), - RenderPartition::SimpleCallback ); - { - RenderPartition *pPart = a->getActivePartition(); - -#ifdef OSG_DEBUGX - std::string szMessage("PostProcessPartition\n"); - pPart->setDebugString(szMessage ); -#endif - - Matrix m, t; - - m.setIdentity(); - t.setIdentity(); - - MatrixOrthogonal( m, - 0.f, 1.f, - 0.f, 1.f, - -1.f, 1.f); - - pPart->setupProjection(m, t); - - RenderPartition::SimpleDrawCallback f; - - f = boost::bind(&FogStage::postProcess, this, _1); - - pPart->dropFunctor(f); - } - this->popPartition(a); - } - this->endPartitionGroup(a); - - _FogShader->updateUniformVariable("nearPlane", a->getCamera()->getNear()); - _FogShader->updateUniformVariable("farPlane", a->getCamera()->getFar()); - - return Action::Skip; -} - -ActionBase::ResultE FogStage::renderLeave(Action *action) -{ - return Action::Skip; -} - -/*----------------------- constructors & destructors ----------------------*/ - -FogStage::FogStage(void) : - Inherited() -{ -} - -FogStage::FogStage(const FogStage &source) : - Inherited(source) -{ -} - -FogStage::~FogStage(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void FogStage::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - if(this->getRenderTarget() != NULL) - { - if((whichField & BufferFormatFieldMask)) - { - this->setRenderTarget(NULL); - } - } - - if(_FogShader != NULL) - { - if(whichField & FogColorFieldMask) - { - _FogShader->updateUniformVariable("fogColor", getFogColor()); - } - if(whichField & FogModeFieldMask) - { - _FogShader->updateUniformVariable("fogMode", getFogMode()); - } - if(whichField & FogStartFieldMask) - { - _FogShader->updateUniformVariable("fogStart", getFogStart()); - } - if(whichField & FogEndFieldMask) - { - _FogShader->updateUniformVariable("fogEnd", getFogEnd()); - } - if(whichField & FogDensityFieldMask) - { - _FogShader->updateUniformVariable("fogDensity", getFogDensity()); - } - } -} - -void FogStage::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump FogStage NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.fcd b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.fcd deleted file mode 100644 index 1e30b276..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.fcd +++ /dev/null @@ -1,81 +0,0 @@ - - - - A stage that preforms a fog effect as a post-process. The fog is calculated the similarly to - how OpenGL calculates fog in fixed-functionality mode. - - - - The color of the fog. - - - The mode to use for calculating the fog. - - - The distance that the fog will start at when the FogMode is FOG_MODE_LINEAR. - - - The distance that the fog will end at when the FogMode is FOG_MODE_LINEAR. - - - The of the fog when the FogMode is FOG_MODE_EXP or FOG_MODE_EXP2. - - diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.h b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.h deleted file mode 100644 index 08878298..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.h +++ /dev/null @@ -1,194 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGFOGSTAGE_H_ -#define _OSGFOGSTAGE_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGFogStageBase.h" -#include "OSGAction.h" -#include "OSGFogStageDataFields.h" -#include "OSGTextureObjChunkFields.h" -#include "OSGSimpleSHLChunkFields.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief FogStage class. See \ref - PageEffectGroupsFogStage for a description. -*/ - -class OSG_EFFECTGROUPS_DLLMAPPING FogStage : public FogStageBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef FogStageBase Inherited; - typedef FogStage Self; - - enum FogModes - { - FOG_MODE_LINEAR = 1, - FOG_MODE_EXP = 2, - FOG_MODE_EXP2 = 3 - }; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Process */ - /*! \{ */ - - void postProcess(DrawEnv *); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - void initData(Viewport *pViewport, - RenderActionBase *pAction ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name GL */ - /*! \{ */ - - static UInt32 _uiFramebuffer_object_extension; - static UInt32 _extDepthTexture; - static UInt32 _uiFuncDrawBuffers; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Draw */ - /*! \{ */ - - ActionBase::ResultE renderEnter(Action *action); - ActionBase::ResultE renderLeave(Action *action); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Draw */ - /*! \{ */ - - FogStageDataTransitPtr setupStageData (Int32 iPixelWidth, - Int32 iPixelHeight); - - void resizeStageData(FogStageData *pData, - Int32 iPixelWidth, - Int32 iPixelHeight); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Draw */ - /*! \{ */ - - SimpleSHLChunkTransitPtr generateFogFragmentProgram(void); - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in FogStageBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - FogStage(void); - FogStage(const FogStage &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~FogStage(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - - SimpleSHLChunkUnrecPtr _FogShader; - TextureObjChunkRecPtr _SceneTex; - TextureObjChunkRecPtr _SceneDepthTex; - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class FogStageBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const FogStage &source); -}; - -typedef FogStage *FogStageP; - -OSG_END_NAMESPACE - -#include "OSGFogStageBase.inl" -#include "OSGFogStage.inl" - -#endif /* _OSGFOGSTAGE_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.inl b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.inl deleted file mode 100644 index 5a62f5ab..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStage.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageBase.cpp b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageBase.cpp deleted file mode 100644 index deb23cae..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageBase.cpp +++ /dev/null @@ -1,846 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class FogStage! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - -#include "OSGGLEXT.h" // BufferFormat default header - - -#include "OSGFogStageBase.h" -#include "OSGFogStage.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::FogStage - A stage that preforms a fog effect as a post-process. The fog is calculated the similarly to - how OpenGL calculates fog in fixed-functionality mode. - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var GLenum FogStageBase::_sfBufferFormat - -*/ - -/*! \var Color4f FogStageBase::_sfFogColor - The color of the fog. -*/ - -/*! \var UInt16 FogStageBase::_sfFogMode - The mode to use for calculating the fog. -*/ - -/*! \var Real32 FogStageBase::_sfFogStart - The distance that the fog will start at when the FogMode is FOG_MODE_LINEAR. -*/ - -/*! \var Real32 FogStageBase::_sfFogEnd - The distance that the fog will end at when the FogMode is FOG_MODE_LINEAR. -*/ - -/*! \var Real32 FogStageBase::_sfFogDensity - The of the fog when the FogMode is FOG_MODE_EXP or FOG_MODE_EXP2. -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("FogStagePtr", "StagePtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(FogStage *) - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void FogStageBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFGLenum::Description( - SFGLenum::getClassType(), - "BufferFormat", - "", - BufferFormatFieldId, BufferFormatFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStage::editHandleBufferFormat), - static_cast(&FogStage::getHandleBufferFormat)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFColor4f::Description( - SFColor4f::getClassType(), - "FogColor", - "The color of the fog.\n", - FogColorFieldId, FogColorFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStage::editHandleFogColor), - static_cast(&FogStage::getHandleFogColor)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFUInt16::Description( - SFUInt16::getClassType(), - "FogMode", - "The mode to use for calculating the fog.\n", - FogModeFieldId, FogModeFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStage::editHandleFogMode), - static_cast(&FogStage::getHandleFogMode)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFReal32::Description( - SFReal32::getClassType(), - "FogStart", - "The distance that the fog will start at when the FogMode is FOG_MODE_LINEAR.\n", - FogStartFieldId, FogStartFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStage::editHandleFogStart), - static_cast(&FogStage::getHandleFogStart)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFReal32::Description( - SFReal32::getClassType(), - "FogEnd", - "The distance that the fog will end at when the FogMode is FOG_MODE_LINEAR.\n", - FogEndFieldId, FogEndFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStage::editHandleFogEnd), - static_cast(&FogStage::getHandleFogEnd)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFReal32::Description( - SFReal32::getClassType(), - "FogDensity", - "The of the fog when the FogMode is FOG_MODE_EXP or FOG_MODE_EXP2.\n", - FogDensityFieldId, FogDensityFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStage::editHandleFogDensity), - static_cast(&FogStage::getHandleFogDensity)); - - oType.addInitialDesc(pDesc); -} - - -FogStageBase::TypeObject FogStageBase::_type( - FogStageBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&FogStageBase::createEmptyLocal), - FogStage::initMethod, - FogStage::exitMethod, - reinterpret_cast(&FogStage::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - " A stage that preforms a fog effect as a post-process. The fog is calculated the similarly to\n" - " how OpenGL calculates fog in fixed-functionality mode.\n" - " \n" - " \n" - " \n" - " The color of the fog.\n" - " \n" - " \n" - " The mode to use for calculating the fog.\n" - " \n" - " \n" - " The distance that the fog will start at when the FogMode is FOG_MODE_LINEAR.\n" - " \n" - " \n" - " The distance that the fog will end at when the FogMode is FOG_MODE_LINEAR.\n" - " \n" - " \n" - " The of the fog when the FogMode is FOG_MODE_EXP or FOG_MODE_EXP2.\n" - " \n" - "\n", - "A stage that preforms a fog effect as a post-process. The fog is calculated the similarly to\n" - "how OpenGL calculates fog in fixed-functionality mode.\n" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &FogStageBase::getType(void) -{ - return _type; -} - -const FieldContainerType &FogStageBase::getType(void) const -{ - return _type; -} - -UInt32 FogStageBase::getContainerSize(void) const -{ - return sizeof(FogStage); -} - -/*------------------------- decorator get ------------------------------*/ - - -SFGLenum *FogStageBase::editSFBufferFormat(void) -{ - editSField(BufferFormatFieldMask); - - return &_sfBufferFormat; -} - -const SFGLenum *FogStageBase::getSFBufferFormat(void) const -{ - return &_sfBufferFormat; -} - - -SFColor4f *FogStageBase::editSFFogColor(void) -{ - editSField(FogColorFieldMask); - - return &_sfFogColor; -} - -const SFColor4f *FogStageBase::getSFFogColor(void) const -{ - return &_sfFogColor; -} - - -SFUInt16 *FogStageBase::editSFFogMode(void) -{ - editSField(FogModeFieldMask); - - return &_sfFogMode; -} - -const SFUInt16 *FogStageBase::getSFFogMode(void) const -{ - return &_sfFogMode; -} - - -SFReal32 *FogStageBase::editSFFogStart(void) -{ - editSField(FogStartFieldMask); - - return &_sfFogStart; -} - -const SFReal32 *FogStageBase::getSFFogStart(void) const -{ - return &_sfFogStart; -} - - -SFReal32 *FogStageBase::editSFFogEnd(void) -{ - editSField(FogEndFieldMask); - - return &_sfFogEnd; -} - -const SFReal32 *FogStageBase::getSFFogEnd(void) const -{ - return &_sfFogEnd; -} - - -SFReal32 *FogStageBase::editSFFogDensity(void) -{ - editSField(FogDensityFieldMask); - - return &_sfFogDensity; -} - -const SFReal32 *FogStageBase::getSFFogDensity(void) const -{ - return &_sfFogDensity; -} - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 FogStageBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (BufferFormatFieldMask & whichField)) - { - returnValue += _sfBufferFormat.getBinSize(); - } - if(FieldBits::NoField != (FogColorFieldMask & whichField)) - { - returnValue += _sfFogColor.getBinSize(); - } - if(FieldBits::NoField != (FogModeFieldMask & whichField)) - { - returnValue += _sfFogMode.getBinSize(); - } - if(FieldBits::NoField != (FogStartFieldMask & whichField)) - { - returnValue += _sfFogStart.getBinSize(); - } - if(FieldBits::NoField != (FogEndFieldMask & whichField)) - { - returnValue += _sfFogEnd.getBinSize(); - } - if(FieldBits::NoField != (FogDensityFieldMask & whichField)) - { - returnValue += _sfFogDensity.getBinSize(); - } - - return returnValue; -} - -void FogStageBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (BufferFormatFieldMask & whichField)) - { - _sfBufferFormat.copyToBin(pMem); - } - if(FieldBits::NoField != (FogColorFieldMask & whichField)) - { - _sfFogColor.copyToBin(pMem); - } - if(FieldBits::NoField != (FogModeFieldMask & whichField)) - { - _sfFogMode.copyToBin(pMem); - } - if(FieldBits::NoField != (FogStartFieldMask & whichField)) - { - _sfFogStart.copyToBin(pMem); - } - if(FieldBits::NoField != (FogEndFieldMask & whichField)) - { - _sfFogEnd.copyToBin(pMem); - } - if(FieldBits::NoField != (FogDensityFieldMask & whichField)) - { - _sfFogDensity.copyToBin(pMem); - } -} - -void FogStageBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (BufferFormatFieldMask & whichField)) - { - editSField(BufferFormatFieldMask); - _sfBufferFormat.copyFromBin(pMem); - } - if(FieldBits::NoField != (FogColorFieldMask & whichField)) - { - editSField(FogColorFieldMask); - _sfFogColor.copyFromBin(pMem); - } - if(FieldBits::NoField != (FogModeFieldMask & whichField)) - { - editSField(FogModeFieldMask); - _sfFogMode.copyFromBin(pMem); - } - if(FieldBits::NoField != (FogStartFieldMask & whichField)) - { - editSField(FogStartFieldMask); - _sfFogStart.copyFromBin(pMem); - } - if(FieldBits::NoField != (FogEndFieldMask & whichField)) - { - editSField(FogEndFieldMask); - _sfFogEnd.copyFromBin(pMem); - } - if(FieldBits::NoField != (FogDensityFieldMask & whichField)) - { - editSField(FogDensityFieldMask); - _sfFogDensity.copyFromBin(pMem); - } -} - -//! create a new instance of the class -FogStageTransitPtr FogStageBase::createLocal(BitVector bFlags) -{ - FogStageTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -FogStageTransitPtr FogStageBase::createDependent(BitVector bFlags) -{ - FogStageTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -FogStageTransitPtr FogStageBase::create(void) -{ - FogStageTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -FogStage *FogStageBase::createEmptyLocal(BitVector bFlags) -{ - FogStage *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -FogStage *FogStageBase::createEmpty(void) -{ - FogStage *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr FogStageBase::shallowCopyLocal( - BitVector bFlags) const -{ - FogStage *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr FogStageBase::shallowCopyDependent( - BitVector bFlags) const -{ - FogStage *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr FogStageBase::shallowCopy(void) const -{ - FogStage *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -FogStageBase::FogStageBase(void) : - Inherited(), - _sfBufferFormat (GLenum(GL_RGB)), - _sfFogColor (Color4f(0.0f,0.0f,0.0f,0.0f)), - _sfFogMode (UInt16(FogStage::FOG_MODE_LINEAR)), - _sfFogStart (Real32(0.0f)), - _sfFogEnd (Real32(0.0f)), - _sfFogDensity (Real32(0.0f)) -{ -} - -FogStageBase::FogStageBase(const FogStageBase &source) : - Inherited(source), - _sfBufferFormat (source._sfBufferFormat ), - _sfFogColor (source._sfFogColor ), - _sfFogMode (source._sfFogMode ), - _sfFogStart (source._sfFogStart ), - _sfFogEnd (source._sfFogEnd ), - _sfFogDensity (source._sfFogDensity ) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -FogStageBase::~FogStageBase(void) -{ -} - - -GetFieldHandlePtr FogStageBase::getHandleBufferFormat (void) const -{ - SFGLenum::GetHandlePtr returnValue( - new SFGLenum::GetHandle( - &_sfBufferFormat, - this->getType().getFieldDesc(BufferFormatFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageBase::editHandleBufferFormat (void) -{ - SFGLenum::EditHandlePtr returnValue( - new SFGLenum::EditHandle( - &_sfBufferFormat, - this->getType().getFieldDesc(BufferFormatFieldId), - this)); - - - editSField(BufferFormatFieldMask); - - return returnValue; -} - -GetFieldHandlePtr FogStageBase::getHandleFogColor (void) const -{ - SFColor4f::GetHandlePtr returnValue( - new SFColor4f::GetHandle( - &_sfFogColor, - this->getType().getFieldDesc(FogColorFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageBase::editHandleFogColor (void) -{ - SFColor4f::EditHandlePtr returnValue( - new SFColor4f::EditHandle( - &_sfFogColor, - this->getType().getFieldDesc(FogColorFieldId), - this)); - - - editSField(FogColorFieldMask); - - return returnValue; -} - -GetFieldHandlePtr FogStageBase::getHandleFogMode (void) const -{ - SFUInt16::GetHandlePtr returnValue( - new SFUInt16::GetHandle( - &_sfFogMode, - this->getType().getFieldDesc(FogModeFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageBase::editHandleFogMode (void) -{ - SFUInt16::EditHandlePtr returnValue( - new SFUInt16::EditHandle( - &_sfFogMode, - this->getType().getFieldDesc(FogModeFieldId), - this)); - - - editSField(FogModeFieldMask); - - return returnValue; -} - -GetFieldHandlePtr FogStageBase::getHandleFogStart (void) const -{ - SFReal32::GetHandlePtr returnValue( - new SFReal32::GetHandle( - &_sfFogStart, - this->getType().getFieldDesc(FogStartFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageBase::editHandleFogStart (void) -{ - SFReal32::EditHandlePtr returnValue( - new SFReal32::EditHandle( - &_sfFogStart, - this->getType().getFieldDesc(FogStartFieldId), - this)); - - - editSField(FogStartFieldMask); - - return returnValue; -} - -GetFieldHandlePtr FogStageBase::getHandleFogEnd (void) const -{ - SFReal32::GetHandlePtr returnValue( - new SFReal32::GetHandle( - &_sfFogEnd, - this->getType().getFieldDesc(FogEndFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageBase::editHandleFogEnd (void) -{ - SFReal32::EditHandlePtr returnValue( - new SFReal32::EditHandle( - &_sfFogEnd, - this->getType().getFieldDesc(FogEndFieldId), - this)); - - - editSField(FogEndFieldMask); - - return returnValue; -} - -GetFieldHandlePtr FogStageBase::getHandleFogDensity (void) const -{ - SFReal32::GetHandlePtr returnValue( - new SFReal32::GetHandle( - &_sfFogDensity, - this->getType().getFieldDesc(FogDensityFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageBase::editHandleFogDensity (void) -{ - SFReal32::EditHandlePtr returnValue( - new SFReal32::EditHandle( - &_sfFogDensity, - this->getType().getFieldDesc(FogDensityFieldId), - this)); - - - editSField(FogDensityFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void FogStageBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - FogStage *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *FogStageBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - FogStage *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void FogStageBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageBase.h b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageBase.h deleted file mode 100644 index 7325e2cb..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageBase.h +++ /dev/null @@ -1,369 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class FogStage - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGFOGSTAGEBASE_H_ -#define _OSGFOGSTAGEBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGEffectGroupsDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGStage.h" // Parent - -#include "OSGBaseFields.h" // BufferFormat type -#include "OSGSysFields.h" // FogMode type - -#include "OSGFogStageFields.h" - -OSG_BEGIN_NAMESPACE - -class FogStage; - -//! \brief FogStage Base Class. - -class OSG_EFFECTGROUPS_DLLMAPPING FogStageBase : public Stage -{ - public: - - typedef Stage Inherited; - typedef Stage ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(FogStage); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - BufferFormatFieldId = Inherited::NextFieldId, - FogColorFieldId = BufferFormatFieldId + 1, - FogModeFieldId = FogColorFieldId + 1, - FogStartFieldId = FogModeFieldId + 1, - FogEndFieldId = FogStartFieldId + 1, - FogDensityFieldId = FogEndFieldId + 1, - NextFieldId = FogDensityFieldId + 1 - }; - - static const OSG::BitVector BufferFormatFieldMask = - (TypeTraits::One << BufferFormatFieldId); - static const OSG::BitVector FogColorFieldMask = - (TypeTraits::One << FogColorFieldId); - static const OSG::BitVector FogModeFieldMask = - (TypeTraits::One << FogModeFieldId); - static const OSG::BitVector FogStartFieldMask = - (TypeTraits::One << FogStartFieldId); - static const OSG::BitVector FogEndFieldMask = - (TypeTraits::One << FogEndFieldId); - static const OSG::BitVector FogDensityFieldMask = - (TypeTraits::One << FogDensityFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFGLenum SFBufferFormatType; - typedef SFColor4f SFFogColorType; - typedef SFUInt16 SFFogModeType; - typedef SFReal32 SFFogStartType; - typedef SFReal32 SFFogEndType; - typedef SFReal32 SFFogDensityType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - - SFGLenum *editSFBufferFormat (void); - const SFGLenum *getSFBufferFormat (void) const; - - SFColor4f *editSFFogColor (void); - const SFColor4f *getSFFogColor (void) const; - - SFUInt16 *editSFFogMode (void); - const SFUInt16 *getSFFogMode (void) const; - - SFReal32 *editSFFogStart (void); - const SFReal32 *getSFFogStart (void) const; - - SFReal32 *editSFFogEnd (void); - const SFReal32 *getSFFogEnd (void) const; - - SFReal32 *editSFFogDensity (void); - const SFReal32 *getSFFogDensity (void) const; - - - GLenum &editBufferFormat (void); - const GLenum &getBufferFormat (void) const; - - Color4f &editFogColor (void); - const Color4f &getFogColor (void) const; - - UInt16 &editFogMode (void); - UInt16 getFogMode (void) const; - - Real32 &editFogStart (void); - Real32 getFogStart (void) const; - - Real32 &editFogEnd (void); - Real32 getFogEnd (void) const; - - Real32 &editFogDensity (void); - Real32 getFogDensity (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setBufferFormat (const GLenum &value); - void setFogColor (const Color4f &value); - void setFogMode (const UInt16 value); - void setFogStart (const Real32 value); - void setFogEnd (const Real32 value); - void setFogDensity (const Real32 value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static FogStageTransitPtr create (void); - static FogStage *createEmpty (void); - - static FogStageTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static FogStage *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static FogStageTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFGLenum _sfBufferFormat; - SFColor4f _sfFogColor; - SFUInt16 _sfFogMode; - SFReal32 _sfFogStart; - SFReal32 _sfFogEnd; - SFReal32 _sfFogDensity; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - FogStageBase(void); - FogStageBase(const FogStageBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~FogStageBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleBufferFormat (void) const; - EditFieldHandlePtr editHandleBufferFormat (void); - GetFieldHandlePtr getHandleFogColor (void) const; - EditFieldHandlePtr editHandleFogColor (void); - GetFieldHandlePtr getHandleFogMode (void) const; - EditFieldHandlePtr editHandleFogMode (void); - GetFieldHandlePtr getHandleFogStart (void) const; - EditFieldHandlePtr editHandleFogStart (void); - GetFieldHandlePtr getHandleFogEnd (void) const; - EditFieldHandlePtr editHandleFogEnd (void); - GetFieldHandlePtr getHandleFogDensity (void) const; - EditFieldHandlePtr editHandleFogDensity (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( FogStageBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const FogStageBase &source); -}; - -typedef FogStageBase *FogStageBaseP; - -typedef CoredNodeRefPtr FogStageNodeRefPtr; -typedef CoredNodeMTRefPtr FogStageNodeMTRefPtr; - -OSG_END_NAMESPACE - -#endif /* _OSGFOGSTAGEBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageBase.inl b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageBase.inl deleted file mode 100644 index e297913c..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageBase.inl +++ /dev/null @@ -1,268 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class FogStage! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &FogStageBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 FogStageBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 FogStageBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - -//! Get the value of the FogStage::_sfBufferFormat field. - -inline -GLenum &FogStageBase::editBufferFormat(void) -{ - editSField(BufferFormatFieldMask); - - return _sfBufferFormat.getValue(); -} - -//! Get the value of the FogStage::_sfBufferFormat field. -inline -const GLenum &FogStageBase::getBufferFormat(void) const -{ - return _sfBufferFormat.getValue(); -} - -//! Set the value of the FogStage::_sfBufferFormat field. -inline -void FogStageBase::setBufferFormat(const GLenum &value) -{ - editSField(BufferFormatFieldMask); - - _sfBufferFormat.setValue(value); -} -//! Get the value of the FogStage::_sfFogColor field. - -inline -Color4f &FogStageBase::editFogColor(void) -{ - editSField(FogColorFieldMask); - - return _sfFogColor.getValue(); -} - -//! Get the value of the FogStage::_sfFogColor field. -inline -const Color4f &FogStageBase::getFogColor(void) const -{ - return _sfFogColor.getValue(); -} - -//! Set the value of the FogStage::_sfFogColor field. -inline -void FogStageBase::setFogColor(const Color4f &value) -{ - editSField(FogColorFieldMask); - - _sfFogColor.setValue(value); -} -//! Get the value of the FogStage::_sfFogMode field. - -inline -UInt16 &FogStageBase::editFogMode(void) -{ - editSField(FogModeFieldMask); - - return _sfFogMode.getValue(); -} - -//! Get the value of the FogStage::_sfFogMode field. -inline - UInt16 FogStageBase::getFogMode(void) const -{ - return _sfFogMode.getValue(); -} - -//! Set the value of the FogStage::_sfFogMode field. -inline -void FogStageBase::setFogMode(const UInt16 value) -{ - editSField(FogModeFieldMask); - - _sfFogMode.setValue(value); -} -//! Get the value of the FogStage::_sfFogStart field. - -inline -Real32 &FogStageBase::editFogStart(void) -{ - editSField(FogStartFieldMask); - - return _sfFogStart.getValue(); -} - -//! Get the value of the FogStage::_sfFogStart field. -inline - Real32 FogStageBase::getFogStart(void) const -{ - return _sfFogStart.getValue(); -} - -//! Set the value of the FogStage::_sfFogStart field. -inline -void FogStageBase::setFogStart(const Real32 value) -{ - editSField(FogStartFieldMask); - - _sfFogStart.setValue(value); -} -//! Get the value of the FogStage::_sfFogEnd field. - -inline -Real32 &FogStageBase::editFogEnd(void) -{ - editSField(FogEndFieldMask); - - return _sfFogEnd.getValue(); -} - -//! Get the value of the FogStage::_sfFogEnd field. -inline - Real32 FogStageBase::getFogEnd(void) const -{ - return _sfFogEnd.getValue(); -} - -//! Set the value of the FogStage::_sfFogEnd field. -inline -void FogStageBase::setFogEnd(const Real32 value) -{ - editSField(FogEndFieldMask); - - _sfFogEnd.setValue(value); -} -//! Get the value of the FogStage::_sfFogDensity field. - -inline -Real32 &FogStageBase::editFogDensity(void) -{ - editSField(FogDensityFieldMask); - - return _sfFogDensity.getValue(); -} - -//! Get the value of the FogStage::_sfFogDensity field. -inline - Real32 FogStageBase::getFogDensity(void) const -{ - return _sfFogDensity.getValue(); -} - -//! Set the value of the FogStage::_sfFogDensity field. -inline -void FogStageBase::setFogDensity(const Real32 value) -{ - editSField(FogDensityFieldMask); - - _sfFogDensity.setValue(value); -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void FogStageBase::execSync ( FogStageBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (BufferFormatFieldMask & whichField)) - _sfBufferFormat.syncWith(pFrom->_sfBufferFormat); - - if(FieldBits::NoField != (FogColorFieldMask & whichField)) - _sfFogColor.syncWith(pFrom->_sfFogColor); - - if(FieldBits::NoField != (FogModeFieldMask & whichField)) - _sfFogMode.syncWith(pFrom->_sfFogMode); - - if(FieldBits::NoField != (FogStartFieldMask & whichField)) - _sfFogStart.syncWith(pFrom->_sfFogStart); - - if(FieldBits::NoField != (FogEndFieldMask & whichField)) - _sfFogEnd.syncWith(pFrom->_sfFogEnd); - - if(FieldBits::NoField != (FogDensityFieldMask & whichField)) - _sfFogDensity.syncWith(pFrom->_sfFogDensity); -} -#endif - - -inline -const Char8 *FogStageBase::getClassname(void) -{ - return "FogStage"; -} -OSG_GEN_CONTAINERPTR(FogStage); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.cpp b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.cpp deleted file mode 100644 index 4837942d..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include "OSGConfig.h" - -#include "OSGFogStageData.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGFogStageDataBase.cpp file. -// To modify it, please change the .fcd file (OSGFogStageData.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void FogStageData::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -FogStageData::FogStageData(void) : - Inherited() -{ -} - -FogStageData::FogStageData(const FogStageData &source) : - Inherited(source) -{ -} - -FogStageData::~FogStageData(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void FogStageData::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); -} - -void FogStageData::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump FogStageData NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.fcd b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.fcd deleted file mode 100644 index a60a6ae8..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.fcd +++ /dev/null @@ -1,66 +0,0 @@ - - - - Data used for rendering by the Fog effect stage - - - - - - - - - - - diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.h b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.h deleted file mode 100644 index 0fe4c22c..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.h +++ /dev/null @@ -1,131 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGFOGSTAGEDATA_H_ -#define _OSGFOGSTAGEDATA_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGFogStageDataBase.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief FogStageData class. See \ref - PageEffectGroupsFogStageData for a description. -*/ - -class OSG_EFFECTGROUPS_DLLMAPPING FogStageData : public FogStageDataBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef FogStageDataBase Inherited; - typedef FogStageData Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in FogStageDataBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - FogStageData(void); - FogStageData(const FogStageData &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~FogStageData(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class FogStageDataBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const FogStageData &source); -}; - -typedef FogStageData *FogStageDataP; - -OSG_END_NAMESPACE - -#include "OSGChunkMaterial.h" -#include "OSGFrameBufferObject.h" -#include "OSGCamera.h" -#include "OSGTextureObjChunk.h" -#include "OSGFogStageDataBase.inl" -#include "OSGFogStageData.inl" - -#endif /* _OSGFOGSTAGEDATA_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.inl b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.inl deleted file mode 100644 index 5a62f5ab..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageData.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataBase.cpp b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataBase.cpp deleted file mode 100644 index 818bb8fe..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataBase.cpp +++ /dev/null @@ -1,792 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class FogStageData! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - -#include "OSGChunkMaterial.h" // FogMaterial Class -#include "OSGFrameBufferObject.h" // RenderTarget Class -#include "OSGCamera.h" // Camera Class - -#include "OSGFogStageDataBase.h" -#include "OSGFogStageData.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::FogStageData - Data used for rendering by the Fog effect stage - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var ChunkMaterial * FogStageDataBase::_sfFogMaterial - -*/ - -/*! \var Int32 FogStageDataBase::_sfWidth - -*/ - -/*! \var Int32 FogStageDataBase::_sfHeight - -*/ - -/*! \var FrameBufferObject * FogStageDataBase::_sfRenderTarget - -*/ - -/*! \var Camera * FogStageDataBase::_sfCamera - -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("FogStageDataPtr", "StageDataPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(FogStageData *) - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void FogStageDataBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFUnrecChunkMaterialPtr::Description( - SFUnrecChunkMaterialPtr::getClassType(), - "FogMaterial", - "", - FogMaterialFieldId, FogMaterialFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStageData::editHandleFogMaterial), - static_cast(&FogStageData::getHandleFogMaterial)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFInt32::Description( - SFInt32::getClassType(), - "Width", - "", - WidthFieldId, WidthFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStageData::editHandleWidth), - static_cast(&FogStageData::getHandleWidth)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFInt32::Description( - SFInt32::getClassType(), - "Height", - "", - HeightFieldId, HeightFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStageData::editHandleHeight), - static_cast(&FogStageData::getHandleHeight)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFUnrecFrameBufferObjectPtr::Description( - SFUnrecFrameBufferObjectPtr::getClassType(), - "RenderTarget", - "", - RenderTargetFieldId, RenderTargetFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStageData::editHandleRenderTarget), - static_cast(&FogStageData::getHandleRenderTarget)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFUnrecCameraPtr::Description( - SFUnrecCameraPtr::getClassType(), - "Camera", - "", - CameraFieldId, CameraFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&FogStageData::editHandleCamera), - static_cast(&FogStageData::getHandleCamera)); - - oType.addInitialDesc(pDesc); -} - - -FogStageDataBase::TypeObject FogStageDataBase::_type( - FogStageDataBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&FogStageDataBase::createEmptyLocal), - FogStageData::initMethod, - FogStageData::exitMethod, - reinterpret_cast(&FogStageData::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - " Data used for rendering by the Fog effect stage\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "\n", - "Data used for rendering by the Fog effect stage\n" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &FogStageDataBase::getType(void) -{ - return _type; -} - -const FieldContainerType &FogStageDataBase::getType(void) const -{ - return _type; -} - -UInt32 FogStageDataBase::getContainerSize(void) const -{ - return sizeof(FogStageData); -} - -/*------------------------- decorator get ------------------------------*/ - - -//! Get the FogStageData::_sfFogMaterial field. -const SFUnrecChunkMaterialPtr *FogStageDataBase::getSFFogMaterial(void) const -{ - return &_sfFogMaterial; -} - -SFUnrecChunkMaterialPtr *FogStageDataBase::editSFFogMaterial (void) -{ - editSField(FogMaterialFieldMask); - - return &_sfFogMaterial; -} - -SFInt32 *FogStageDataBase::editSFWidth(void) -{ - editSField(WidthFieldMask); - - return &_sfWidth; -} - -const SFInt32 *FogStageDataBase::getSFWidth(void) const -{ - return &_sfWidth; -} - - -SFInt32 *FogStageDataBase::editSFHeight(void) -{ - editSField(HeightFieldMask); - - return &_sfHeight; -} - -const SFInt32 *FogStageDataBase::getSFHeight(void) const -{ - return &_sfHeight; -} - - -//! Get the FogStageData::_sfRenderTarget field. -const SFUnrecFrameBufferObjectPtr *FogStageDataBase::getSFRenderTarget(void) const -{ - return &_sfRenderTarget; -} - -SFUnrecFrameBufferObjectPtr *FogStageDataBase::editSFRenderTarget (void) -{ - editSField(RenderTargetFieldMask); - - return &_sfRenderTarget; -} - -//! Get the FogStageData::_sfCamera field. -const SFUnrecCameraPtr *FogStageDataBase::getSFCamera(void) const -{ - return &_sfCamera; -} - -SFUnrecCameraPtr *FogStageDataBase::editSFCamera (void) -{ - editSField(CameraFieldMask); - - return &_sfCamera; -} - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 FogStageDataBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (FogMaterialFieldMask & whichField)) - { - returnValue += _sfFogMaterial.getBinSize(); - } - if(FieldBits::NoField != (WidthFieldMask & whichField)) - { - returnValue += _sfWidth.getBinSize(); - } - if(FieldBits::NoField != (HeightFieldMask & whichField)) - { - returnValue += _sfHeight.getBinSize(); - } - if(FieldBits::NoField != (RenderTargetFieldMask & whichField)) - { - returnValue += _sfRenderTarget.getBinSize(); - } - if(FieldBits::NoField != (CameraFieldMask & whichField)) - { - returnValue += _sfCamera.getBinSize(); - } - - return returnValue; -} - -void FogStageDataBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (FogMaterialFieldMask & whichField)) - { - _sfFogMaterial.copyToBin(pMem); - } - if(FieldBits::NoField != (WidthFieldMask & whichField)) - { - _sfWidth.copyToBin(pMem); - } - if(FieldBits::NoField != (HeightFieldMask & whichField)) - { - _sfHeight.copyToBin(pMem); - } - if(FieldBits::NoField != (RenderTargetFieldMask & whichField)) - { - _sfRenderTarget.copyToBin(pMem); - } - if(FieldBits::NoField != (CameraFieldMask & whichField)) - { - _sfCamera.copyToBin(pMem); - } -} - -void FogStageDataBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (FogMaterialFieldMask & whichField)) - { - editSField(FogMaterialFieldMask); - _sfFogMaterial.copyFromBin(pMem); - } - if(FieldBits::NoField != (WidthFieldMask & whichField)) - { - editSField(WidthFieldMask); - _sfWidth.copyFromBin(pMem); - } - if(FieldBits::NoField != (HeightFieldMask & whichField)) - { - editSField(HeightFieldMask); - _sfHeight.copyFromBin(pMem); - } - if(FieldBits::NoField != (RenderTargetFieldMask & whichField)) - { - editSField(RenderTargetFieldMask); - _sfRenderTarget.copyFromBin(pMem); - } - if(FieldBits::NoField != (CameraFieldMask & whichField)) - { - editSField(CameraFieldMask); - _sfCamera.copyFromBin(pMem); - } -} - -//! create a new instance of the class -FogStageDataTransitPtr FogStageDataBase::createLocal(BitVector bFlags) -{ - FogStageDataTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -FogStageDataTransitPtr FogStageDataBase::createDependent(BitVector bFlags) -{ - FogStageDataTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -FogStageDataTransitPtr FogStageDataBase::create(void) -{ - FogStageDataTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -FogStageData *FogStageDataBase::createEmptyLocal(BitVector bFlags) -{ - FogStageData *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -FogStageData *FogStageDataBase::createEmpty(void) -{ - FogStageData *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr FogStageDataBase::shallowCopyLocal( - BitVector bFlags) const -{ - FogStageData *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr FogStageDataBase::shallowCopyDependent( - BitVector bFlags) const -{ - FogStageData *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr FogStageDataBase::shallowCopy(void) const -{ - FogStageData *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -FogStageDataBase::FogStageDataBase(void) : - Inherited(), - _sfFogMaterial (NULL), - _sfWidth (Int32(0)), - _sfHeight (Int32(0)), - _sfRenderTarget (NULL), - _sfCamera (NULL) -{ -} - -FogStageDataBase::FogStageDataBase(const FogStageDataBase &source) : - Inherited(source), - _sfFogMaterial (NULL), - _sfWidth (source._sfWidth ), - _sfHeight (source._sfHeight ), - _sfRenderTarget (NULL), - _sfCamera (NULL) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -FogStageDataBase::~FogStageDataBase(void) -{ -} - -void FogStageDataBase::onCreate(const FogStageData *source) -{ - Inherited::onCreate(source); - - if(source != NULL) - { - FogStageData *pThis = static_cast(this); - - pThis->setFogMaterial(source->getFogMaterial()); - - pThis->setRenderTarget(source->getRenderTarget()); - - pThis->setCamera(source->getCamera()); - } -} - -GetFieldHandlePtr FogStageDataBase::getHandleFogMaterial (void) const -{ - SFUnrecChunkMaterialPtr::GetHandlePtr returnValue( - new SFUnrecChunkMaterialPtr::GetHandle( - &_sfFogMaterial, - this->getType().getFieldDesc(FogMaterialFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageDataBase::editHandleFogMaterial (void) -{ - SFUnrecChunkMaterialPtr::EditHandlePtr returnValue( - new SFUnrecChunkMaterialPtr::EditHandle( - &_sfFogMaterial, - this->getType().getFieldDesc(FogMaterialFieldId), - this)); - - returnValue->setSetMethod( - boost::bind(&FogStageData::setFogMaterial, - static_cast(this), _1)); - - editSField(FogMaterialFieldMask); - - return returnValue; -} - -GetFieldHandlePtr FogStageDataBase::getHandleWidth (void) const -{ - SFInt32::GetHandlePtr returnValue( - new SFInt32::GetHandle( - &_sfWidth, - this->getType().getFieldDesc(WidthFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageDataBase::editHandleWidth (void) -{ - SFInt32::EditHandlePtr returnValue( - new SFInt32::EditHandle( - &_sfWidth, - this->getType().getFieldDesc(WidthFieldId), - this)); - - - editSField(WidthFieldMask); - - return returnValue; -} - -GetFieldHandlePtr FogStageDataBase::getHandleHeight (void) const -{ - SFInt32::GetHandlePtr returnValue( - new SFInt32::GetHandle( - &_sfHeight, - this->getType().getFieldDesc(HeightFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageDataBase::editHandleHeight (void) -{ - SFInt32::EditHandlePtr returnValue( - new SFInt32::EditHandle( - &_sfHeight, - this->getType().getFieldDesc(HeightFieldId), - this)); - - - editSField(HeightFieldMask); - - return returnValue; -} - -GetFieldHandlePtr FogStageDataBase::getHandleRenderTarget (void) const -{ - SFUnrecFrameBufferObjectPtr::GetHandlePtr returnValue( - new SFUnrecFrameBufferObjectPtr::GetHandle( - &_sfRenderTarget, - this->getType().getFieldDesc(RenderTargetFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageDataBase::editHandleRenderTarget (void) -{ - SFUnrecFrameBufferObjectPtr::EditHandlePtr returnValue( - new SFUnrecFrameBufferObjectPtr::EditHandle( - &_sfRenderTarget, - this->getType().getFieldDesc(RenderTargetFieldId), - this)); - - returnValue->setSetMethod( - boost::bind(&FogStageData::setRenderTarget, - static_cast(this), _1)); - - editSField(RenderTargetFieldMask); - - return returnValue; -} - -GetFieldHandlePtr FogStageDataBase::getHandleCamera (void) const -{ - SFUnrecCameraPtr::GetHandlePtr returnValue( - new SFUnrecCameraPtr::GetHandle( - &_sfCamera, - this->getType().getFieldDesc(CameraFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr FogStageDataBase::editHandleCamera (void) -{ - SFUnrecCameraPtr::EditHandlePtr returnValue( - new SFUnrecCameraPtr::EditHandle( - &_sfCamera, - this->getType().getFieldDesc(CameraFieldId), - this)); - - returnValue->setSetMethod( - boost::bind(&FogStageData::setCamera, - static_cast(this), _1)); - - editSField(CameraFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void FogStageDataBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - FogStageData *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *FogStageDataBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - FogStageData *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void FogStageDataBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - static_cast(this)->setFogMaterial(NULL); - - static_cast(this)->setRenderTarget(NULL); - - static_cast(this)->setCamera(NULL); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataBase.h b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataBase.h deleted file mode 100644 index 5cbe65d8..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataBase.h +++ /dev/null @@ -1,354 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class FogStageData - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGFOGSTAGEDATABASE_H_ -#define _OSGFOGSTAGEDATABASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGEffectGroupsDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGStageData.h" // Parent - -#include "OSGChunkMaterialFields.h" // FogMaterial type -#include "OSGSysFields.h" // Width type -#include "OSGFrameBufferObjectFields.h" // RenderTarget type -#include "OSGCameraFields.h" // Camera type - -#include "OSGFogStageDataFields.h" - -OSG_BEGIN_NAMESPACE - -class FogStageData; - -//! \brief FogStageData Base Class. - -class OSG_EFFECTGROUPS_DLLMAPPING FogStageDataBase : public StageData -{ - public: - - typedef StageData Inherited; - typedef StageData ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(FogStageData); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - FogMaterialFieldId = Inherited::NextFieldId, - WidthFieldId = FogMaterialFieldId + 1, - HeightFieldId = WidthFieldId + 1, - RenderTargetFieldId = HeightFieldId + 1, - CameraFieldId = RenderTargetFieldId + 1, - NextFieldId = CameraFieldId + 1 - }; - - static const OSG::BitVector FogMaterialFieldMask = - (TypeTraits::One << FogMaterialFieldId); - static const OSG::BitVector WidthFieldMask = - (TypeTraits::One << WidthFieldId); - static const OSG::BitVector HeightFieldMask = - (TypeTraits::One << HeightFieldId); - static const OSG::BitVector RenderTargetFieldMask = - (TypeTraits::One << RenderTargetFieldId); - static const OSG::BitVector CameraFieldMask = - (TypeTraits::One << CameraFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFUnrecChunkMaterialPtr SFFogMaterialType; - typedef SFInt32 SFWidthType; - typedef SFInt32 SFHeightType; - typedef SFUnrecFrameBufferObjectPtr SFRenderTargetType; - typedef SFUnrecCameraPtr SFCameraType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - const SFUnrecChunkMaterialPtr *getSFFogMaterial (void) const; - SFUnrecChunkMaterialPtr *editSFFogMaterial (void); - - SFInt32 *editSFWidth (void); - const SFInt32 *getSFWidth (void) const; - - SFInt32 *editSFHeight (void); - const SFInt32 *getSFHeight (void) const; - const SFUnrecFrameBufferObjectPtr *getSFRenderTarget (void) const; - SFUnrecFrameBufferObjectPtr *editSFRenderTarget (void); - const SFUnrecCameraPtr *getSFCamera (void) const; - SFUnrecCameraPtr *editSFCamera (void); - - - ChunkMaterial * getFogMaterial (void) const; - - Int32 &editWidth (void); - Int32 getWidth (void) const; - - Int32 &editHeight (void); - Int32 getHeight (void) const; - - FrameBufferObject * getRenderTarget (void) const; - - Camera * getCamera (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setFogMaterial (ChunkMaterial * const value); - void setWidth (const Int32 value); - void setHeight (const Int32 value); - void setRenderTarget (FrameBufferObject * const value); - void setCamera (Camera * const value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr Field Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static FogStageDataTransitPtr create (void); - static FogStageData *createEmpty (void); - - static FogStageDataTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static FogStageData *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static FogStageDataTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFUnrecChunkMaterialPtr _sfFogMaterial; - SFInt32 _sfWidth; - SFInt32 _sfHeight; - SFUnrecFrameBufferObjectPtr _sfRenderTarget; - SFUnrecCameraPtr _sfCamera; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - FogStageDataBase(void); - FogStageDataBase(const FogStageDataBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~FogStageDataBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - void onCreate(const FogStageData *source = NULL); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleFogMaterial (void) const; - EditFieldHandlePtr editHandleFogMaterial (void); - GetFieldHandlePtr getHandleWidth (void) const; - EditFieldHandlePtr editHandleWidth (void); - GetFieldHandlePtr getHandleHeight (void) const; - EditFieldHandlePtr editHandleHeight (void); - GetFieldHandlePtr getHandleRenderTarget (void) const; - EditFieldHandlePtr editHandleRenderTarget (void); - GetFieldHandlePtr getHandleCamera (void) const; - EditFieldHandlePtr editHandleCamera (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( FogStageDataBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const FogStageDataBase &source); -}; - -typedef FogStageDataBase *FogStageDataBaseP; - -OSG_END_NAMESPACE - -#endif /* _OSGFOGSTAGEDATABASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataBase.inl b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataBase.inl deleted file mode 100644 index d83d31f0..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataBase.inl +++ /dev/null @@ -1,213 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class FogStageData! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &FogStageDataBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 FogStageDataBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 FogStageDataBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - - -//! Get the value of the FogStageData::_sfFogMaterial field. -inline -ChunkMaterial * FogStageDataBase::getFogMaterial(void) const -{ - return _sfFogMaterial.getValue(); -} - -//! Set the value of the FogStageData::_sfFogMaterial field. -inline -void FogStageDataBase::setFogMaterial(ChunkMaterial * const value) -{ - editSField(FogMaterialFieldMask); - - _sfFogMaterial.setValue(value); -} -//! Get the value of the FogStageData::_sfWidth field. - -inline -Int32 &FogStageDataBase::editWidth(void) -{ - editSField(WidthFieldMask); - - return _sfWidth.getValue(); -} - -//! Get the value of the FogStageData::_sfWidth field. -inline - Int32 FogStageDataBase::getWidth(void) const -{ - return _sfWidth.getValue(); -} - -//! Set the value of the FogStageData::_sfWidth field. -inline -void FogStageDataBase::setWidth(const Int32 value) -{ - editSField(WidthFieldMask); - - _sfWidth.setValue(value); -} -//! Get the value of the FogStageData::_sfHeight field. - -inline -Int32 &FogStageDataBase::editHeight(void) -{ - editSField(HeightFieldMask); - - return _sfHeight.getValue(); -} - -//! Get the value of the FogStageData::_sfHeight field. -inline - Int32 FogStageDataBase::getHeight(void) const -{ - return _sfHeight.getValue(); -} - -//! Set the value of the FogStageData::_sfHeight field. -inline -void FogStageDataBase::setHeight(const Int32 value) -{ - editSField(HeightFieldMask); - - _sfHeight.setValue(value); -} - -//! Get the value of the FogStageData::_sfRenderTarget field. -inline -FrameBufferObject * FogStageDataBase::getRenderTarget(void) const -{ - return _sfRenderTarget.getValue(); -} - -//! Set the value of the FogStageData::_sfRenderTarget field. -inline -void FogStageDataBase::setRenderTarget(FrameBufferObject * const value) -{ - editSField(RenderTargetFieldMask); - - _sfRenderTarget.setValue(value); -} - -//! Get the value of the FogStageData::_sfCamera field. -inline -Camera * FogStageDataBase::getCamera(void) const -{ - return _sfCamera.getValue(); -} - -//! Set the value of the FogStageData::_sfCamera field. -inline -void FogStageDataBase::setCamera(Camera * const value) -{ - editSField(CameraFieldMask); - - _sfCamera.setValue(value); -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void FogStageDataBase::execSync ( FogStageDataBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (FogMaterialFieldMask & whichField)) - _sfFogMaterial.syncWith(pFrom->_sfFogMaterial); - - if(FieldBits::NoField != (WidthFieldMask & whichField)) - _sfWidth.syncWith(pFrom->_sfWidth); - - if(FieldBits::NoField != (HeightFieldMask & whichField)) - _sfHeight.syncWith(pFrom->_sfHeight); - - if(FieldBits::NoField != (RenderTargetFieldMask & whichField)) - _sfRenderTarget.syncWith(pFrom->_sfRenderTarget); - - if(FieldBits::NoField != (CameraFieldMask & whichField)) - _sfCamera.syncWith(pFrom->_sfCamera); -} -#endif - - -inline -const Char8 *FogStageDataBase::getClassname(void) -{ - return "FogStageData"; -} -OSG_GEN_CONTAINERPTR(FogStageData); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataFields.h b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataFields.h deleted file mode 100644 index bbe9efb0..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageDataFields.h +++ /dev/null @@ -1,107 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGFOGSTAGEDATAFIELDS_H_ -#define _OSGFOGSTAGEDATAFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGEffectGroupsDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class FogStageData; - -OSG_GEN_CONTAINERPTR(FogStageData); - -/*! \ingroup GrpEffectsGroupsFogFieldTraits - \ingroup GrpLibOSGEffectGroups - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_EFFECTGROUPS_DLLMAPPING DataType &getType(void); - -}; - - - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - - - -#else // these are the doxygen hacks - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGFOGSTAGEDATAFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageFields.h b/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageFields.h deleted file mode 100644 index 922cc8b0..00000000 --- a/Source/System/NodeCores/Groups/Effects/Fog/OSGFogStageFields.h +++ /dev/null @@ -1,107 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGFOGSTAGEFIELDS_H_ -#define _OSGFOGSTAGEFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGEffectGroupsDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class FogStage; - -OSG_GEN_CONTAINERPTR(FogStage); - -/*! \ingroup GrpEffectsGroupsFogFieldTraits - \ingroup GrpLibOSGEffectGroups - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_EFFECTGROUPS_DLLMAPPING DataType &getType(void); - -}; - - - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - - - -#else // these are the doxygen hacks - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGFOGSTAGEFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.cpp b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.cpp deleted file mode 100644 index 757564f0..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.cpp +++ /dev/null @@ -1,837 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include "OSGConfig.h" - -#include "OSGPostShaderStage.h" -#include "OSGPostShaderStageData.h" - -#include "OSGFrameBufferObject.h" -#include "OSGFrameBufferAttachment.h" -#include "OSGRenderBuffer.h" -#include "OSGTextureBuffer.h" -#include "OSGRenderAction.h" - -#include "OSGChunkMaterial.h" -#include "OSGMaterialChunk.h" -#include "OSGTextureObjChunk.h" -#include "OSGDrawEnv.h" -#include "OSGStateOverride.h" -#include "OSGTextureEnvChunk.h" -#include "OSGGL.h" - -#include "OSGMatrixUtility.h" - -#include - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGPostShaderStageBase.cpp file. -// To modify it, please change the .fcd file (OSGPostShaderStage.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -UInt32 PostShaderStage::_uiFramebuffer_object_extension = Window::invalidExtensionID; -UInt32 PostShaderStage::_extDepthTexture = Window::invalidExtensionID; - -UInt32 PostShaderStage::_uiFuncDrawBuffers = Window::invalidFunctionID; - -typedef void (OSG_APIENTRY *GLDrawBuffersEXTProcT)(GLsizei n, - const GLenum *buffers); - -const std::string PostShaderStage::ShaderSceneColorTexName = std::string("PostSceneColorTex"); -const std::string PostShaderStage::ShaderSceneDepthTexName = std::string("PostSceneDepthTex"); -const std::string PostShaderStage::ShaderFBOWidthName = std::string("PostFBOWidth"); -const std::string PostShaderStage::ShaderFBOHeightName = std::string("PostFBOHeight"); -const std::string PostShaderStage::ShaderCameraNearName = std::string("PostCameraNear"); -const std::string PostShaderStage::ShaderCameraFarName = std::string("PostCameraFar"); -const std::string PostShaderStage::PrePassXName = std::string("PostPass"); -const std::string PostShaderStage::PostPassXColorTexName = std::string("ColorTex"); -const std::string PostShaderStage::PostPassXColorWidthName = std::string("Width"); -const std::string PostShaderStage::PostPassXColorHeightName = std::string("Height"); - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void PostShaderStage::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - RenderAction::registerEnterDefault( - PostShaderStage::getClassType(), - reinterpret_cast(&PostShaderStage::renderEnter)); - - RenderAction::registerLeaveDefault( - PostShaderStage::getClassType(), - reinterpret_cast(&PostShaderStage::renderLeave)); - - _uiFramebuffer_object_extension = - Window::registerExtension("GL_EXT_framebuffer_object"); - - _extDepthTexture = - Window::registerExtension("GL_ARB_depth_texture"); - - _uiFuncDrawBuffers = - Window::registerFunction ( - OSG_DLSYM_UNDERSCORE"glDrawBuffersARB", - _uiFramebuffer_object_extension); - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -PostShaderStageDataTransitPtr PostShaderStage::setupStageData(Int32 iPixelWidth, - Int32 iPixelHeight) -{ - PostShaderStageDataTransitPtr returnValue = PostShaderStageData::createLocal(); - - if(returnValue == NULL) - return returnValue; - - OSG::Thread::setCurrentLocalFlags(); - - // Scene Target - FrameBufferObjectUnrecPtr pSceneFBO = FrameBufferObject::createLocal(); - - //Depth texture - _SceneDepthTex = TextureObjChunk::createLocal(); - TextureEnvChunkUnrecPtr pSceneDepthTexEnv = TextureEnvChunk::createLocal(); - ImageUnrecPtr pDepthImg = Image ::createLocal(); - - pDepthImg->set(Image::OSG_L_PF, - iPixelWidth, - iPixelHeight, - 1, - 1, - 1, - 0.0, - NULL, - Image::OSG_UINT8_IMAGEDATA, - false); - - _SceneDepthTex ->setImage (pDepthImg ); - _SceneDepthTex ->setMinFilter (GL_LINEAR ); - _SceneDepthTex ->setMagFilter (GL_LINEAR ); - _SceneDepthTex ->setWrapS (GL_CLAMP_TO_EDGE ); - _SceneDepthTex ->setWrapT (GL_CLAMP_TO_EDGE ); - _SceneDepthTex ->setInternalFormat(GL_DEPTH_COMPONENT); - _SceneDepthTex ->setExternalFormat(GL_DEPTH_COMPONENT); - - pSceneDepthTexEnv->setEnvMode (GL_REPLACE ); - - TextureBufferUnrecPtr pDepthBuffer = TextureBuffer::createLocal(); - //pDepthBuffer->setInternalFormat(GL_DEPTH_COMPONENT24 ); - - pDepthBuffer->setTexture(_SceneDepthTex); - - - //Color Buffer - _SceneTex = TextureObjChunk::createLocal(); - TextureEnvChunkUnrecPtr pSceneTexEnv = TextureEnvChunk::createLocal(); - ImageUnrecPtr pImg = Image ::createLocal(); - - pImg->set(Image::OSG_RGB_PF, - iPixelWidth, - iPixelHeight, - 1, - 1, - 1, - 0.0, - 0, - Image::OSG_UINT8_IMAGEDATA, - false); - - _SceneTex ->setImage (pImg ); - _SceneTex ->setMinFilter (GL_LINEAR ); - _SceneTex ->setMagFilter (GL_LINEAR ); - _SceneTex ->setWrapS (GL_CLAMP_TO_EDGE ); - _SceneTex ->setWrapT (GL_CLAMP_TO_EDGE ); - _SceneTex ->setInternalFormat(getColorBufferFormat()); - - pSceneTexEnv->setEnvMode (GL_REPLACE ); - - TextureBufferUnrecPtr pSceneTexBuffer = TextureBuffer::createLocal(); - - pSceneTexBuffer->setTexture(_SceneTex); - - - - pSceneFBO->setSize(iPixelWidth, iPixelHeight); - - pSceneFBO->setColorAttachment(pSceneTexBuffer, 0); - pSceneFBO->setDepthAttachment(pDepthBuffer ); - - pSceneFBO->editMFDrawBuffers()->push_back(GL_COLOR_ATTACHMENT0_EXT); - - setRenderTarget(pSceneFBO); - - // general mat chunk - - //Init all of the render passes - _PostProcessPasses.clear(); - UInt32 NumPasses(getNumPasses()); - for(UInt32 i(0) ; i != NumPasses ; ++i) - { - _PostProcessPasses.push_back(RenderPassData::create(getVertexShaders(i), - getFragmentShaders(i), - (i == NumPasses-1), - i, - iPixelWidth, - iPixelHeight, - returnValue.get(), - getPassSizes(i), - _SceneTex, - _SceneDepthTex, - _PostProcessPasses, - pSceneFBO)); - } - - OSG::Thread::resetCurrentLocalFlags(); - - Thread::getCurrentChangeList()->commitChanges(); - - return returnValue; -} - -void PostShaderStage::resizeStageData(PostShaderStageData *pData, - Int32 iPixelWidth, - Int32 iPixelHeight) -{ - - //Update the sizes of the passes - for(RenderPassVector::iterator PassItor(_PostProcessPasses.begin()) ; - PassItor != _PostProcessPasses.end() ; - ++PassItor) - { - (*PassItor)->updateSize(iPixelWidth, iPixelHeight, _PostProcessPasses); - } - - //Update the image sizes - _SceneDepthTex->getImage()->set(Image::OSG_L_PF, - iPixelWidth, - iPixelHeight, - 1, - 1, - 1, - 0.0, - NULL, - Image::OSG_UINT8_IMAGEDATA, - false); - - _SceneTex->getImage()->set(Image::OSG_RGB_PF, - iPixelWidth, - iPixelHeight, - 1, - 1, - 1, - 0.0, - 0, - Image::OSG_UINT8_IMAGEDATA, - false); - - getRenderTarget()->setSize(iPixelWidth, iPixelHeight); -} - -void PostShaderStage::initData(Viewport *pViewport, - RenderActionBase *pAction ) -{ - PostShaderStageDataUnrecPtr pData;// = pAction->getData(_iDataSlotId); - - //if(pData == NULL) - //{ - pData = setupStageData(pViewport->getPixelWidth(), - pViewport->getPixelHeight()); - - pData->setWidth (pViewport->getPixelWidth ()); - pData->setHeight(pViewport->getPixelHeight()); - - this->setData(pData, _iDataSlotId, pAction); - //} -} - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -void PostShaderStage::postProcess(DrawEnv *pEnv) -{ - Window *win = pEnv->getWindow(); - - if(win->hasExtension(_uiFramebuffer_object_extension) == false || - win->hasExtension(_extDepthTexture ) == false) - { - FNOTICE(("Framebuffer objects not supported on Window %p!\n", win)); - return; - } - - GLDrawBuffersEXTProcT glDrawBuffersEXTProc = - reinterpret_cast( - win->getFunction(_uiFuncDrawBuffers)); - - glColor3f(1.f, 1.f, 1.f); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - glLoadIdentity(); - - PostShaderStageData *pData = pEnv->getData(_iDataSlotId); - - if(pData == NULL) - { - return; - } - - if((pData->getWidth () != pEnv->getPixelWidth() ) || - (pData->getHeight() != pEnv->getPixelHeight()) ) - { - resizeStageData(pData, - pEnv->getPixelWidth(), - pEnv->getPixelHeight()); - } - - // PostShader pass - glDisable(GL_DEPTH_TEST); - - //Render each pass - for(RenderPassVector::iterator PassItor(_PostProcessPasses.begin()) ; - PassItor != _PostProcessPasses.end() ; - ++PassItor) - { - (*PassItor)->draw(pEnv, pData); - } - - glEnable(GL_DEPTH_TEST); - - pEnv->deactivateState(); - - glPopMatrix(); -} - -ActionBase::ResultE PostShaderStage::renderEnter(Action *action) -{ - RenderAction *a = dynamic_cast(action); - - a->disableDefaultPartition(); - - this->beginPartitionGroup(a); - { - this->pushPartition(a); - { - RenderPartition *pPart = a->getActivePartition(); - FrameBufferObject *pTarget = this->getRenderTarget(); - Viewport *pPort = a->getViewport(); - Camera *pCam = a->getCamera (); - Background *pBack = a->getBackground(); - - if(pTarget == NULL) - { - this->initData(pPort, a); - - pTarget = this->getRenderTarget(); - } - - pPart->setRenderTarget(pTarget); - -#ifdef OSG_DEBUGX - std::string szMessage("RenderPartition\n"); - pPart->setDebugString(szMessage ); -#endif - - if(pPort != NULL) - { -// pPart->setViewport(pPort ); - pPart->setWindow (a->getWindow()); - - if(pTarget != NULL) - { - pPart->calcViewportDimension(pPort->getLeft (), - pPort->getBottom(), - pPort->getRight (), - pPort->getTop (), - - pTarget->getWidth (), - pTarget->getHeight ()); - } - else - { - pPart->calcViewportDimension(pPort->getLeft (), - pPort->getBottom(), - pPort->getRight (), - pPort->getTop (), - - a->getWindow()->getWidth (), - a->getWindow()->getHeight()); - } - - if(pCam != NULL) - { - Matrix m, t; - - // set the projection - pCam->getProjection (m, - pPart->getViewportWidth (), - pPart->getViewportHeight()); - - pCam->getProjectionTranslation(t, - pPart->getViewportWidth (), - pPart->getViewportHeight()); - - pPart->setupProjection(m, t); - - pCam->getViewing(m, - pPart->getViewportWidth (), - pPart->getViewportHeight()); - - - pPart->setupViewing(m); - - pPart->setNear (pCam->getNear()); - pPart->setFar (pCam->getFar ()); - - pPart->calcFrustum(); - } - - pPart->setBackground(pBack); - } - - this->recurseFromThis(a); - } - this->popPartition(a); - - this->pushPartition(a, - (RenderPartition::CopyWindow | - RenderPartition::CopyViewportSize), - RenderPartition::SimpleCallback ); - { - RenderPartition *pPart = a->getActivePartition(); - -#ifdef OSG_DEBUGX - std::string szMessage("PostProcessPartition\n"); - pPart->setDebugString(szMessage ); -#endif - - Matrix m, t; - - m.setIdentity(); - t.setIdentity(); - - MatrixOrthogonal( m, - 0.f, 1.f, - 0.f, 1.f, - -1.f, 1.f); - - pPart->setupProjection(m, t); - - RenderPartition::SimpleDrawCallback f; - - f = boost::bind(&PostShaderStage::postProcess, this, _1); - - pPart->dropFunctor(f); - } - this->popPartition(a); - } - this->endPartitionGroup(a); - - //Update the uniform parameters to the shader - for(RenderPassVector::iterator PassItor(_PostProcessPasses.begin()) ; - PassItor != _PostProcessPasses.end() ; - ++PassItor) - { - (*PassItor)->updateUniformVariables(a); - } - - return Action::Skip; -} - -ActionBase::ResultE PostShaderStage::renderLeave(Action *action) -{ - return Action::Skip; -} - -/*----------------------- constructors & destructors ----------------------*/ - -PostShaderStage::PostShaderStage(void) : - Inherited() -{ -} - -PostShaderStage::PostShaderStage(const PostShaderStage &source) : - Inherited(source) -{ -} - -PostShaderStage::~PostShaderStage(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void PostShaderStage::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - if(this->getRenderTarget() != NULL) - { - if((whichField & (ColorBufferFormatFieldMask | - VertexShadersFieldMask | - FragmentShadersFieldMask))) - { - this->setRenderTarget(NULL); - } - } -} - -void PostShaderStage::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump PostShaderStage NI" << std::endl; -} - -PostShaderStage::RenderPassData::RenderPassData(const std::string& VertexProgram, - const std::string& FragmentProgram, - bool isLastPass, - UInt32 Index, - Int32 iPixelWidth, - Int32 iPixelHeight, - PostShaderStageData *StageData, - const Vec2f& FBOSize, - TextureObjChunk* const SceneColorTex, - TextureObjChunk* const SceneDepthTex, - const RenderPassVector& Passes, - FrameBufferObject* const SceneFBO) : - _IsLassPass(isLastPass), - _Index(Index), - _FBOSize(FBOSize) -{ - //If this pass is not the last - if(!_IsLassPass) - { - _FBO = FrameBufferObject::createLocal(); - - _OutputTexture = TextureObjChunk::createLocal(); - TextureEnvChunkUnrecPtr pTexEnv = TextureEnvChunk::createLocal(); - ImageUnrecPtr pImg = Image ::createLocal(); - - pImg->set(Image::OSG_RGB_PF, - static_cast(iPixelWidth) * _FBOSize.x() , - static_cast(iPixelHeight) * _FBOSize.y(), - 1, - 1, - 1, - 0.0, - 0, - Image::OSG_UINT8_IMAGEDATA, - false); - - _OutputTexture ->setImage (pImg ); - _OutputTexture ->setMinFilter (GL_LINEAR ); - _OutputTexture ->setMagFilter (GL_LINEAR ); - _OutputTexture ->setWrapS (GL_CLAMP_TO_EDGE ); - _OutputTexture ->setWrapT (GL_CLAMP_TO_EDGE ); - _OutputTexture ->setInternalFormat(GL_RGB ); - - pTexEnv->setEnvMode (GL_REPLACE ); - - TextureBufferUnrecPtr pTexBuffer = TextureBuffer::createLocal(); - - pTexBuffer->setTexture(_OutputTexture); - - _FBO->setSize(static_cast(iPixelWidth) * _FBOSize.x(), - static_cast(iPixelHeight) * _FBOSize.y()); - _FBO->setColorAttachment(pTexBuffer, 0); - _FBO->editMFDrawBuffers()->push_back(GL_COLOR_ATTACHMENT0_EXT); - - StageData->pushToRenderTargets(_FBO); - OSG_ASSERT(StageData->getMFRenderTargets()->size() == _Index+1); - } - else - { - _FBO = SceneFBO; - } - //Update the flags on what uniforms are present - _ShaderHasSceneColorTex = ((FragmentProgram.find(PostShaderStage::ShaderSceneColorTexName) != std::string::npos) || - (VertexProgram.find(PostShaderStage::ShaderSceneColorTexName) != std::string::npos)); - - _ShaderHasSceneDepthTex = ((FragmentProgram.find(PostShaderStage::ShaderSceneDepthTexName) != std::string::npos) || - (VertexProgram.find(PostShaderStage::ShaderSceneDepthTexName) != std::string::npos)); - - _ShaderHasFBOWidth = ((FragmentProgram.find(PostShaderStage::ShaderFBOWidthName) != std::string::npos) || - (VertexProgram.find(PostShaderStage::ShaderFBOWidthName) != std::string::npos)); - - _ShaderHasFBOHeight = ((FragmentProgram.find(PostShaderStage::ShaderFBOHeightName) != std::string::npos) || - (VertexProgram.find(PostShaderStage::ShaderFBOHeightName) != std::string::npos)); - - _ShaderHasCameraNear = ((FragmentProgram.find(PostShaderStage::ShaderCameraNearName) != std::string::npos) || - (VertexProgram.find(PostShaderStage::ShaderCameraNearName) != std::string::npos)); - - _ShaderHasCameraFar = ((FragmentProgram.find(PostShaderStage::ShaderCameraFarName) != std::string::npos) || - (VertexProgram.find(PostShaderStage::ShaderCameraFarName) != std::string::npos)); - - //Create the material used by this pass - ChunkMaterialUnrecPtr pPostShaderMat = ChunkMaterial ::createLocal(); - - UInt16 TextureId(0); - - _Shader = SimpleSHLChunk::createLocal(); - - TextureEnvChunkUnrecPtr pGenericTexEnv = TextureEnvChunk::createLocal(); - pGenericTexEnv->setEnvMode(GL_REPLACE); - - //Scene Color Texture - if(_ShaderHasSceneColorTex) - { - pPostShaderMat->addChunk(SceneColorTex, TextureId); - pPostShaderMat->addChunk(pGenericTexEnv, TextureId); - _Shader->addUniformVariable(PostShaderStage::ShaderSceneColorTexName.c_str(), TextureId); - ++TextureId; - } - //Scene Depth Texture - if(_ShaderHasSceneDepthTex) - { - pPostShaderMat->addChunk(SceneDepthTex, TextureId); - pPostShaderMat->addChunk(pGenericTexEnv, TextureId); - _Shader->addUniformVariable(PostShaderStage::ShaderSceneDepthTexName.c_str(), TextureId); - ++TextureId; - } - _HeightRefs.clear(); - _WidthRefs.clear(); - //Preceding passes variables - std::string VariableName; - for(RenderPassVector::const_iterator PassItor(Passes.begin()) ; - PassItor != Passes.end() ; - ++PassItor) - { - VariableName = (*PassItor)->getOutputTextureName(); - if((FragmentProgram.find(VariableName) != std::string::npos) || - (VertexProgram.find(VariableName) != std::string::npos)) - { - pPostShaderMat->addChunk((*PassItor)->getOutputTexture(), TextureId); - pPostShaderMat->addChunk(pGenericTexEnv, TextureId); - _Shader->addUniformVariable(VariableName.c_str(), TextureId); - ++TextureId; - } - - VariableName = (*PassItor)->getWidthName(); - if((FragmentProgram.find(VariableName) != std::string::npos) || - (VertexProgram.find(VariableName) != std::string::npos)) - { - _Shader->addUniformVariable(VariableName.c_str(), - (*PassItor)->getOutputTexture()->getImage()->getWidth()); - _WidthRefs.push_back((*PassItor)->getIndex()); - } - - VariableName = (*PassItor)->getHeightName(); - if((FragmentProgram.find(VariableName) != std::string::npos) || - (VertexProgram.find(VariableName) != std::string::npos)) - { - _Shader->addUniformVariable(VariableName.c_str(), - (*PassItor)->getOutputTexture()->getImage()->getHeight()); - _HeightRefs.push_back((*PassItor)->getIndex()); - } - } - - MaterialChunkUnrecPtr pMatChunk = MaterialChunk::createLocal(); - pMatChunk->setLit(false); - pPostShaderMat->addChunk(pMatChunk); - - _Shader->setVertexProgram(VertexProgram); - _Shader->setFragmentProgram(FragmentProgram); - - //Add the uniform parameters - _Shader->addUniformVariable(ShaderFBOWidthName.c_str(), 0.0f); - _Shader->addUniformVariable(ShaderFBOHeightName.c_str(), 0.0f); - _Shader->addUniformVariable(ShaderCameraNearName.c_str(), 0.0f); - _Shader->addUniformVariable(ShaderCameraFarName.c_str(), 1.0f); - - pPostShaderMat->addChunk(_Shader, 0); - - StageData->pushToShaderMaterials(pPostShaderMat); - OSG_ASSERT(StageData->getMFShaderMaterials()->size() == _Index+1); -} - -void PostShaderStage::RenderPassData::updateUniformVariables(RenderAction *action) -{ - if(_ShaderHasFBOWidth) - { - _Shader->updateUniformVariable(PostShaderStage::ShaderFBOWidthName.c_str(), - static_cast(_FBO->getWidth())); - } - if(_ShaderHasFBOHeight) - { - _Shader->updateUniformVariable(PostShaderStage::ShaderFBOHeightName.c_str(), - static_cast(_FBO->getHeight())); - } - if(_ShaderHasCameraNear) - { - _Shader->updateUniformVariable(PostShaderStage::ShaderCameraNearName.c_str(), - action->getCamera()->getNear()); - } - if(_ShaderHasCameraFar) - { - _Shader->updateUniformVariable(PostShaderStage::ShaderCameraFarName.c_str(), - action->getCamera()->getFar()); - } -} - -void PostShaderStage::RenderPassData::updateSize(Int32 iPixelWidth, - Int32 iPixelHeight, - const RenderPassVector& Passes) -{ - if(!_IsLassPass) - { - _OutputTexture->getImage()->set(Image::OSG_RGB_PF, - static_cast(iPixelWidth) * _FBOSize.x(), - static_cast(iPixelHeight) * _FBOSize.y(), - 1, - 1, - 1, - 0.0, - 0, - Image::OSG_UINT8_IMAGEDATA, - false); - - _FBO->setSize(static_cast(iPixelWidth) * _FBOSize.x(), - static_cast(iPixelHeight) * _FBOSize.y()); - } - //Update references to preceding passes - for(UInt32 i(0) ; i < _WidthRefs.size() ; ++i) - { - _Shader->updateUniformVariable(Passes[_WidthRefs[i]]->getWidthName().c_str(), - Passes[_WidthRefs[i]]->getOutputTexture()->getImage()->getWidth()); - } - for(UInt32 i(0) ; i < _HeightRefs.size() ; ++i) - { - _Shader->updateUniformVariable(Passes[_HeightRefs[i]]->getHeightName().c_str(), - Passes[_HeightRefs[i]]->getOutputTexture()->getImage()->getHeight()); - } -} - -void PostShaderStage::RenderPassData::draw(DrawEnv *pEnv, - PostShaderStageData* const StageData) -{ - if(!_IsLassPass) - { - StageData->getRenderTargets(_Index)->activate(pEnv); - glViewport(pEnv->getPixelLeft (), - pEnv->getPixelBottom(), - pEnv->getPixelLeft () + - StageData->getRenderTargets(_Index)->getWidth(), - pEnv->getPixelBottom() + - StageData->getRenderTargets(_Index)->getHeight()); - } - else - { - glViewport(pEnv->getPixelLeft (), - pEnv->getPixelBottom(), - pEnv->getPixelRight (), - pEnv->getPixelHeight()); - } - - - pEnv->activateState(StageData->getShaderMaterials(_Index)->getState(), NULL); - - glBegin(GL_QUADS); - { - glTexCoord2f(0.00, 0.00); - glVertex2f (0.00, 0.00); - - glTexCoord2f(1.00, 0.00); - glVertex2f (1.00, 0.00); - - glTexCoord2f(1.00, 1.00); - glVertex2f (1.00, 1.00); - - glTexCoord2f(0.00, 1.00); - glVertex2f (0.00, 1.00); - } - glEnd(); - - if(!_IsLassPass) - { - StageData->getRenderTargets(_Index)->deactivate(pEnv); - } -} - -PostShaderStage::RenderPassDataPtr -PostShaderStage::RenderPassData::create(const std::string& VertexProgram, - const std::string& FragmentProgram, - bool isLastPass, - UInt32 Index, - Int32 iPixelWidth, - Int32 iPixelHeight, - PostShaderStageData *StageData, - const Vec2f& FBOSize, - TextureObjChunk* const SceneColorTex, - TextureObjChunk* const SceneDepthTex, - const RenderPassVector& Passes, - FrameBufferObject* const SceneFBO) -{ - return RenderPassDataPtr(new RenderPassData(VertexProgram, - FragmentProgram, - isLastPass, - Index, - iPixelWidth, - iPixelHeight, - StageData, - FBOSize, - SceneColorTex, - SceneDepthTex, - Passes, - SceneFBO)); -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.fcd b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.fcd deleted file mode 100644 index b3c41b51..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.fcd +++ /dev/null @@ -1,84 +0,0 @@ - - - - A stage that uses a shader in a post-process. - - - - Use a texture buffer with the frame buffer object so that the - color buffer is available as a texture in the shader. - - - Use a texture buffer with the frame buffer object so that the - depth buffer is available as a texture in the shader. - - - The shader code to use for the vertex program of the post-processess. - - - The shader code to use for the post-processess. - - - The size of the texture buffers used for the post-processess. - - diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.h b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.h deleted file mode 100644 index 8072f995..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.h +++ /dev/null @@ -1,290 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGPOSTSHADERSTAGE_H_ -#define _OSGPOSTSHADERSTAGE_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGPostShaderStageBase.h" - -#include "OSGRenderAction.h" -#include "OSGPostShaderStageDataFields.h" -#include "OSGTextureObjChunkFields.h" -#include "OSGSimpleSHLChunk.h" - -#include - -OSG_BEGIN_NAMESPACE - -/*! \brief PostShaderStage class. See \ref - PageEffectGroupsPostShaderStage for a description. -*/ - -class OSG_EFFECTGROUPS_DLLMAPPING PostShaderStage : public PostShaderStageBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef PostShaderStageBase Inherited; - typedef PostShaderStage Self; - - static const std::string ShaderSceneColorTexName; - static const std::string ShaderSceneDepthTexName; - static const std::string ShaderFBOWidthName; - static const std::string ShaderFBOHeightName; - static const std::string ShaderCameraNearName; - static const std::string ShaderCameraFarName; - static const std::string PrePassXName; - static const std::string PostPassXColorTexName; - static const std::string PostPassXColorWidthName; - static const std::string PostPassXColorHeightName; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name GL */ - /*! \{ */ - - static UInt32 _uiFramebuffer_object_extension; - static UInt32 _extDepthTexture; - static UInt32 _uiFuncDrawBuffers; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Render Passes */ - /*! \{ */ - - UInt32 getNumPasses(void) const; - - void insertPass(UInt32 Index, - const std::string& VertexProgram, - const std::string& FragmentProgram, - Vec2f Size = Vec2f(1.0f, 1.0f)); - - void addPass(const std::string& VertexProgram, - const std::string& FragmentProgram, - Vec2f Size = Vec2f(1.0f, 1.0f)); - - void clearPasses(void); - - void erasePass(UInt32 Index); - - SimpleSHLChunk* getPassShader(UInt32 Index) const; - - /*! \} */ - - - - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in PostShaderStageBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - PostShaderStage(void); - PostShaderStage(const PostShaderStage &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~PostShaderStage(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Stage init */ - /*! \{ */ - - void initData(Viewport *pViewport, - RenderActionBase *pAction ); - - PostShaderStageDataTransitPtr setupStageData (Int32 iPixelWidth, - Int32 iPixelHeight); - - void resizeStageData(PostShaderStageData *pData, - Int32 iPixelWidth, - Int32 iPixelHeight); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Process */ - /*! \{ */ - - void postProcess(DrawEnv *); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Draw */ - /*! \{ */ - - ActionBase::ResultE renderEnter(Action *action); - ActionBase::ResultE renderLeave(Action *action); - - /*! \} */ - - - class RenderPassData; - - typedef boost::shared_ptr RenderPassDataPtr; - - typedef std::vector RenderPassVector; - - class RenderPassData - { - public: - - static RenderPassDataPtr create(const std::string& VertexProgram, - const std::string& FragmentProgram, - bool isLastPass, - UInt32 Index, - Int32 iPixelWidth, - Int32 iPixelHeight, - PostShaderStageData *StageData, - const Vec2f& FBOSize, - TextureObjChunk* const SceneColorTex, - TextureObjChunk* const SceneDepthTex, - const RenderPassVector& Passes, - FrameBufferObject* const SceneFBO); - - void updateUniformVariables(RenderAction *action); - void updateSize(Int32 iPixelWidth, - Int32 iPixelHeight, - const RenderPassVector& Passes); - void draw(DrawEnv *pEnv, - PostShaderStageData* const StageData); - - TextureObjChunk* getOutputTexture (void) const; - std::string getOutputTextureName(void) const; - std::string getWidthName (void) const; - std::string getHeightName (void) const; - bool getIsLastPass (void) const; - SimpleSHLChunk* getShader (void) const; - UInt32 getIndex (void) const; - - private: - RenderPassData(const std::string& VertexProgram, - const std::string& FragmentProgram, - bool isLastPass, - UInt32 Index, - Int32 iPixelWidth, - Int32 iPixelHeight, - PostShaderStageData *StageData, - const Vec2f& FBOSize, - TextureObjChunk* const SceneColorTex, - TextureObjChunk* const SceneDepthTex, - const RenderPassVector& Passes, - FrameBufferObject* const SceneFBO - ); - - // prohibit default functions - RenderPassData(const RenderPassData&); - void operator=(const RenderPassData&); - - SimpleSHLChunkUnrecPtr _Shader; - FrameBufferObjectUnrecPtr _FBO; - TextureObjChunkRecPtr _OutputTexture; - bool _IsLassPass; - UInt32 _Index; - Vec2f _FBOSize; - std::vector _WidthRefs; - std::vector _HeightRefs; - - bool _ShaderHasSceneColorTex, - _ShaderHasSceneDepthTex, - _ShaderHasFBOWidth, - _ShaderHasFBOHeight, - _ShaderHasCameraNear, - _ShaderHasCameraFar; - }; - - RenderPassVector _PostProcessPasses; - TextureObjChunkRecPtr _SceneTex; - TextureObjChunkRecPtr _SceneDepthTex; - - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class PostShaderStageBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const PostShaderStage &source); -}; - -typedef PostShaderStage *PostShaderStageP; - -OSG_END_NAMESPACE - -#include "OSGPostShaderStageBase.inl" -#include "OSGPostShaderStage.inl" - -#endif /* _OSGPOSTSHADERSTAGE_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.inl b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.inl deleted file mode 100644 index 150f3358..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStage.inl +++ /dev/null @@ -1,140 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -inline -TextureObjChunk* PostShaderStage::RenderPassData::getOutputTexture(void) const -{ - return _OutputTexture; -} - -inline -bool PostShaderStage::RenderPassData::getIsLastPass(void) const -{ - return _IsLassPass; -} - -inline -SimpleSHLChunk* PostShaderStage::RenderPassData::getShader(void) const -{ - return _Shader; -} - -inline -std::string PostShaderStage::RenderPassData::getOutputTextureName(void) const -{ - return PostShaderStage::PrePassXName - + boost::lexical_cast(_Index) - + PostShaderStage::PostPassXColorTexName; -} - -inline -std::string PostShaderStage::RenderPassData::getWidthName(void) const -{ - return PostShaderStage::PrePassXName - + boost::lexical_cast(_Index) - + PostShaderStage::PostPassXColorWidthName; -} - -inline -std::string PostShaderStage::RenderPassData::getHeightName(void) const -{ - return PostShaderStage::PrePassXName - + boost::lexical_cast(_Index) - + PostShaderStage::PostPassXColorHeightName; -} - -inline -UInt32 PostShaderStage::RenderPassData::getIndex(void) const -{ - return _Index; -} - -inline -UInt32 PostShaderStage::getNumPasses(void) const -{ - return getMFVertexShaders()->size(); -} - -inline -void PostShaderStage::insertPass(UInt32 Index, - const std::string& VertexProgram, - const std::string& FragmentProgram, - Vec2f Size) -{ - editMFVertexShaders()->insert(Index, VertexProgram); - editMFFragmentShaders()->insert(Index, FragmentProgram); - editMFPassSizes()->push_back(Size); -} - -inline -void PostShaderStage::addPass(const std::string& VertexProgram, - const std::string& FragmentProgram, - Vec2f Size) -{ - editMFVertexShaders()->push_back(VertexProgram); - editMFFragmentShaders()->push_back(FragmentProgram); - editMFPassSizes()->push_back(Size); -} - -inline -void PostShaderStage::clearPasses(void) -{ - editMFVertexShaders()->clear(); - editMFFragmentShaders()->clear(); - editMFPassSizes()->clear(); -} - -inline -void PostShaderStage::erasePass(UInt32 Index) -{ - editMFVertexShaders()->erase(Index); - editMFFragmentShaders()->erase(Index); - editMFPassSizes()->erase(Index); -} - -inline -SimpleSHLChunk* PostShaderStage::getPassShader(UInt32 Index) const -{ - _PostProcessPasses[Index]->getShader(); -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageBase.cpp b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageBase.cpp deleted file mode 100644 index 2e342b6e..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageBase.cpp +++ /dev/null @@ -1,868 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class PostShaderStage! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - -#include "OSGGLEXT.h" // ColorBufferFormat default header - - -#include "OSGPostShaderStageBase.h" -#include "OSGPostShaderStage.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::PostShaderStage - A stage that uses a shader in a post-process. - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var GLenum PostShaderStageBase::_sfColorBufferFormat - -*/ - -/*! \var bool PostShaderStageBase::_sfUseColorTextureBuffer - Use a texture buffer with the frame buffer object so that the - color buffer is available as a texture in the shader. -*/ - -/*! \var bool PostShaderStageBase::_sfUseDepthTextureBuffer - Use a texture buffer with the frame buffer object so that the - depth buffer is available as a texture in the shader. -*/ - -/*! \var std::string PostShaderStageBase::_mfVertexShaders - The shader code to use for the vertex program of the post-processess. -*/ - -/*! \var std::string PostShaderStageBase::_mfFragmentShaders - The shader code to use for the post-processess. -*/ - -/*! \var Vec2f PostShaderStageBase::_mfPassSizes - The size of the texture buffers used for the post-processess. -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("PostShaderStagePtr", "StagePtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(PostShaderStage *) - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void PostShaderStageBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFGLenum::Description( - SFGLenum::getClassType(), - "ColorBufferFormat", - "", - ColorBufferFormatFieldId, ColorBufferFormatFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStage::editHandleColorBufferFormat), - static_cast(&PostShaderStage::getHandleColorBufferFormat)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFBool::Description( - SFBool::getClassType(), - "UseColorTextureBuffer", - "Use a texture buffer with the frame buffer object so that the \n" - "color buffer is available as a texture in the shader.\n", - UseColorTextureBufferFieldId, UseColorTextureBufferFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStage::editHandleUseColorTextureBuffer), - static_cast(&PostShaderStage::getHandleUseColorTextureBuffer)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFBool::Description( - SFBool::getClassType(), - "UseDepthTextureBuffer", - "Use a texture buffer with the frame buffer object so that the \n" - "depth buffer is available as a texture in the shader.\n", - UseDepthTextureBufferFieldId, UseDepthTextureBufferFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStage::editHandleUseDepthTextureBuffer), - static_cast(&PostShaderStage::getHandleUseDepthTextureBuffer)); - - oType.addInitialDesc(pDesc); - - pDesc = new MFString::Description( - MFString::getClassType(), - "VertexShaders", - "The shader code to use for the vertex program of the post-processess.\n", - VertexShadersFieldId, VertexShadersFieldMask, - false, - (Field::MFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStage::editHandleVertexShaders), - static_cast(&PostShaderStage::getHandleVertexShaders)); - - oType.addInitialDesc(pDesc); - - pDesc = new MFString::Description( - MFString::getClassType(), - "FragmentShaders", - "The shader code to use for the post-processess.\n", - FragmentShadersFieldId, FragmentShadersFieldMask, - false, - (Field::MFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStage::editHandleFragmentShaders), - static_cast(&PostShaderStage::getHandleFragmentShaders)); - - oType.addInitialDesc(pDesc); - - pDesc = new MFVec2f::Description( - MFVec2f::getClassType(), - "PassSizes", - "The size of the texture buffers used for the post-processess.\n", - PassSizesFieldId, PassSizesFieldMask, - false, - (Field::MFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStage::editHandlePassSizes), - static_cast(&PostShaderStage::getHandlePassSizes)); - - oType.addInitialDesc(pDesc); -} - - -PostShaderStageBase::TypeObject PostShaderStageBase::_type( - PostShaderStageBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&PostShaderStageBase::createEmptyLocal), - PostShaderStage::initMethod, - PostShaderStage::exitMethod, - reinterpret_cast(&PostShaderStage::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - " A stage that uses a shader in a post-process.\n" - " \n" - " \n" - " \n" - " Use a texture buffer with the frame buffer object so that the \n" - " color buffer is available as a texture in the shader.\n" - " \n" - " \n" - " Use a texture buffer with the frame buffer object so that the \n" - " depth buffer is available as a texture in the shader.\n" - " \n" - " \n" - " The shader code to use for the vertex program of the post-processess.\n" - " \n" - " \n" - " The shader code to use for the post-processess.\n" - " \n" - " \n" - " The size of the texture buffers used for the post-processess.\n" - " \n" - "\n", - "A stage that uses a shader in a post-process.\n" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &PostShaderStageBase::getType(void) -{ - return _type; -} - -const FieldContainerType &PostShaderStageBase::getType(void) const -{ - return _type; -} - -UInt32 PostShaderStageBase::getContainerSize(void) const -{ - return sizeof(PostShaderStage); -} - -/*------------------------- decorator get ------------------------------*/ - - -SFGLenum *PostShaderStageBase::editSFColorBufferFormat(void) -{ - editSField(ColorBufferFormatFieldMask); - - return &_sfColorBufferFormat; -} - -const SFGLenum *PostShaderStageBase::getSFColorBufferFormat(void) const -{ - return &_sfColorBufferFormat; -} - - -SFBool *PostShaderStageBase::editSFUseColorTextureBuffer(void) -{ - editSField(UseColorTextureBufferFieldMask); - - return &_sfUseColorTextureBuffer; -} - -const SFBool *PostShaderStageBase::getSFUseColorTextureBuffer(void) const -{ - return &_sfUseColorTextureBuffer; -} - - -SFBool *PostShaderStageBase::editSFUseDepthTextureBuffer(void) -{ - editSField(UseDepthTextureBufferFieldMask); - - return &_sfUseDepthTextureBuffer; -} - -const SFBool *PostShaderStageBase::getSFUseDepthTextureBuffer(void) const -{ - return &_sfUseDepthTextureBuffer; -} - - -MFString *PostShaderStageBase::editMFVertexShaders(void) -{ - editMField(VertexShadersFieldMask, _mfVertexShaders); - - return &_mfVertexShaders; -} - -const MFString *PostShaderStageBase::getMFVertexShaders(void) const -{ - return &_mfVertexShaders; -} - - -MFString *PostShaderStageBase::editMFFragmentShaders(void) -{ - editMField(FragmentShadersFieldMask, _mfFragmentShaders); - - return &_mfFragmentShaders; -} - -const MFString *PostShaderStageBase::getMFFragmentShaders(void) const -{ - return &_mfFragmentShaders; -} - - -MFVec2f *PostShaderStageBase::editMFPassSizes(void) -{ - editMField(PassSizesFieldMask, _mfPassSizes); - - return &_mfPassSizes; -} - -const MFVec2f *PostShaderStageBase::getMFPassSizes(void) const -{ - return &_mfPassSizes; -} - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 PostShaderStageBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (ColorBufferFormatFieldMask & whichField)) - { - returnValue += _sfColorBufferFormat.getBinSize(); - } - if(FieldBits::NoField != (UseColorTextureBufferFieldMask & whichField)) - { - returnValue += _sfUseColorTextureBuffer.getBinSize(); - } - if(FieldBits::NoField != (UseDepthTextureBufferFieldMask & whichField)) - { - returnValue += _sfUseDepthTextureBuffer.getBinSize(); - } - if(FieldBits::NoField != (VertexShadersFieldMask & whichField)) - { - returnValue += _mfVertexShaders.getBinSize(); - } - if(FieldBits::NoField != (FragmentShadersFieldMask & whichField)) - { - returnValue += _mfFragmentShaders.getBinSize(); - } - if(FieldBits::NoField != (PassSizesFieldMask & whichField)) - { - returnValue += _mfPassSizes.getBinSize(); - } - - return returnValue; -} - -void PostShaderStageBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (ColorBufferFormatFieldMask & whichField)) - { - _sfColorBufferFormat.copyToBin(pMem); - } - if(FieldBits::NoField != (UseColorTextureBufferFieldMask & whichField)) - { - _sfUseColorTextureBuffer.copyToBin(pMem); - } - if(FieldBits::NoField != (UseDepthTextureBufferFieldMask & whichField)) - { - _sfUseDepthTextureBuffer.copyToBin(pMem); - } - if(FieldBits::NoField != (VertexShadersFieldMask & whichField)) - { - _mfVertexShaders.copyToBin(pMem); - } - if(FieldBits::NoField != (FragmentShadersFieldMask & whichField)) - { - _mfFragmentShaders.copyToBin(pMem); - } - if(FieldBits::NoField != (PassSizesFieldMask & whichField)) - { - _mfPassSizes.copyToBin(pMem); - } -} - -void PostShaderStageBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (ColorBufferFormatFieldMask & whichField)) - { - editSField(ColorBufferFormatFieldMask); - _sfColorBufferFormat.copyFromBin(pMem); - } - if(FieldBits::NoField != (UseColorTextureBufferFieldMask & whichField)) - { - editSField(UseColorTextureBufferFieldMask); - _sfUseColorTextureBuffer.copyFromBin(pMem); - } - if(FieldBits::NoField != (UseDepthTextureBufferFieldMask & whichField)) - { - editSField(UseDepthTextureBufferFieldMask); - _sfUseDepthTextureBuffer.copyFromBin(pMem); - } - if(FieldBits::NoField != (VertexShadersFieldMask & whichField)) - { - editMField(VertexShadersFieldMask, _mfVertexShaders); - _mfVertexShaders.copyFromBin(pMem); - } - if(FieldBits::NoField != (FragmentShadersFieldMask & whichField)) - { - editMField(FragmentShadersFieldMask, _mfFragmentShaders); - _mfFragmentShaders.copyFromBin(pMem); - } - if(FieldBits::NoField != (PassSizesFieldMask & whichField)) - { - editMField(PassSizesFieldMask, _mfPassSizes); - _mfPassSizes.copyFromBin(pMem); - } -} - -//! create a new instance of the class -PostShaderStageTransitPtr PostShaderStageBase::createLocal(BitVector bFlags) -{ - PostShaderStageTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -PostShaderStageTransitPtr PostShaderStageBase::createDependent(BitVector bFlags) -{ - PostShaderStageTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -PostShaderStageTransitPtr PostShaderStageBase::create(void) -{ - PostShaderStageTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -PostShaderStage *PostShaderStageBase::createEmptyLocal(BitVector bFlags) -{ - PostShaderStage *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -PostShaderStage *PostShaderStageBase::createEmpty(void) -{ - PostShaderStage *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr PostShaderStageBase::shallowCopyLocal( - BitVector bFlags) const -{ - PostShaderStage *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr PostShaderStageBase::shallowCopyDependent( - BitVector bFlags) const -{ - PostShaderStage *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr PostShaderStageBase::shallowCopy(void) const -{ - PostShaderStage *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -PostShaderStageBase::PostShaderStageBase(void) : - Inherited(), - _sfColorBufferFormat (GLenum(GL_RGB)), - _sfUseColorTextureBuffer (bool(true)), - _sfUseDepthTextureBuffer (bool(false)), - _mfVertexShaders (), - _mfFragmentShaders (), - _mfPassSizes () -{ -} - -PostShaderStageBase::PostShaderStageBase(const PostShaderStageBase &source) : - Inherited(source), - _sfColorBufferFormat (source._sfColorBufferFormat ), - _sfUseColorTextureBuffer (source._sfUseColorTextureBuffer ), - _sfUseDepthTextureBuffer (source._sfUseDepthTextureBuffer ), - _mfVertexShaders (source._mfVertexShaders ), - _mfFragmentShaders (source._mfFragmentShaders ), - _mfPassSizes (source._mfPassSizes ) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -PostShaderStageBase::~PostShaderStageBase(void) -{ -} - - -GetFieldHandlePtr PostShaderStageBase::getHandleColorBufferFormat (void) const -{ - SFGLenum::GetHandlePtr returnValue( - new SFGLenum::GetHandle( - &_sfColorBufferFormat, - this->getType().getFieldDesc(ColorBufferFormatFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageBase::editHandleColorBufferFormat(void) -{ - SFGLenum::EditHandlePtr returnValue( - new SFGLenum::EditHandle( - &_sfColorBufferFormat, - this->getType().getFieldDesc(ColorBufferFormatFieldId), - this)); - - - editSField(ColorBufferFormatFieldMask); - - return returnValue; -} - -GetFieldHandlePtr PostShaderStageBase::getHandleUseColorTextureBuffer (void) const -{ - SFBool::GetHandlePtr returnValue( - new SFBool::GetHandle( - &_sfUseColorTextureBuffer, - this->getType().getFieldDesc(UseColorTextureBufferFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageBase::editHandleUseColorTextureBuffer(void) -{ - SFBool::EditHandlePtr returnValue( - new SFBool::EditHandle( - &_sfUseColorTextureBuffer, - this->getType().getFieldDesc(UseColorTextureBufferFieldId), - this)); - - - editSField(UseColorTextureBufferFieldMask); - - return returnValue; -} - -GetFieldHandlePtr PostShaderStageBase::getHandleUseDepthTextureBuffer (void) const -{ - SFBool::GetHandlePtr returnValue( - new SFBool::GetHandle( - &_sfUseDepthTextureBuffer, - this->getType().getFieldDesc(UseDepthTextureBufferFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageBase::editHandleUseDepthTextureBuffer(void) -{ - SFBool::EditHandlePtr returnValue( - new SFBool::EditHandle( - &_sfUseDepthTextureBuffer, - this->getType().getFieldDesc(UseDepthTextureBufferFieldId), - this)); - - - editSField(UseDepthTextureBufferFieldMask); - - return returnValue; -} - -GetFieldHandlePtr PostShaderStageBase::getHandleVertexShaders (void) const -{ - MFString::GetHandlePtr returnValue( - new MFString::GetHandle( - &_mfVertexShaders, - this->getType().getFieldDesc(VertexShadersFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageBase::editHandleVertexShaders (void) -{ - MFString::EditHandlePtr returnValue( - new MFString::EditHandle( - &_mfVertexShaders, - this->getType().getFieldDesc(VertexShadersFieldId), - this)); - - - editMField(VertexShadersFieldMask, _mfVertexShaders); - - return returnValue; -} - -GetFieldHandlePtr PostShaderStageBase::getHandleFragmentShaders (void) const -{ - MFString::GetHandlePtr returnValue( - new MFString::GetHandle( - &_mfFragmentShaders, - this->getType().getFieldDesc(FragmentShadersFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageBase::editHandleFragmentShaders(void) -{ - MFString::EditHandlePtr returnValue( - new MFString::EditHandle( - &_mfFragmentShaders, - this->getType().getFieldDesc(FragmentShadersFieldId), - this)); - - - editMField(FragmentShadersFieldMask, _mfFragmentShaders); - - return returnValue; -} - -GetFieldHandlePtr PostShaderStageBase::getHandlePassSizes (void) const -{ - MFVec2f::GetHandlePtr returnValue( - new MFVec2f::GetHandle( - &_mfPassSizes, - this->getType().getFieldDesc(PassSizesFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageBase::editHandlePassSizes (void) -{ - MFVec2f::EditHandlePtr returnValue( - new MFVec2f::EditHandle( - &_mfPassSizes, - this->getType().getFieldDesc(PassSizesFieldId), - this)); - - - editMField(PassSizesFieldMask, _mfPassSizes); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void PostShaderStageBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - PostShaderStage *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *PostShaderStageBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - PostShaderStage *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void PostShaderStageBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - -#ifdef OSG_MT_CPTR_ASPECT - AspectOffsetStore oOffsets; - - _pAspectStore->fillOffsetArray(oOffsets, this); -#endif - -#ifdef OSG_MT_CPTR_ASPECT - _mfVertexShaders.terminateShare(Thread::getCurrentAspect(), - oOffsets); -#endif -#ifdef OSG_MT_CPTR_ASPECT - _mfFragmentShaders.terminateShare(Thread::getCurrentAspect(), - oOffsets); -#endif -#ifdef OSG_MT_CPTR_ASPECT - _mfPassSizes.terminateShare(Thread::getCurrentAspect(), - oOffsets); -#endif -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageBase.h b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageBase.h deleted file mode 100644 index f17c0917..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageBase.h +++ /dev/null @@ -1,385 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class PostShaderStage - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGPOSTSHADERSTAGEBASE_H_ -#define _OSGPOSTSHADERSTAGEBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGEffectGroupsDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGStage.h" // Parent - -#include "OSGBaseFields.h" // ColorBufferFormat type -#include "OSGSysFields.h" // UseColorTextureBuffer type -#include "OSGVecFields.h" // PassSizes type - -#include "OSGPostShaderStageFields.h" - -OSG_BEGIN_NAMESPACE - -class PostShaderStage; - -//! \brief PostShaderStage Base Class. - -class OSG_EFFECTGROUPS_DLLMAPPING PostShaderStageBase : public Stage -{ - public: - - typedef Stage Inherited; - typedef Stage ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(PostShaderStage); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - ColorBufferFormatFieldId = Inherited::NextFieldId, - UseColorTextureBufferFieldId = ColorBufferFormatFieldId + 1, - UseDepthTextureBufferFieldId = UseColorTextureBufferFieldId + 1, - VertexShadersFieldId = UseDepthTextureBufferFieldId + 1, - FragmentShadersFieldId = VertexShadersFieldId + 1, - PassSizesFieldId = FragmentShadersFieldId + 1, - NextFieldId = PassSizesFieldId + 1 - }; - - static const OSG::BitVector ColorBufferFormatFieldMask = - (TypeTraits::One << ColorBufferFormatFieldId); - static const OSG::BitVector UseColorTextureBufferFieldMask = - (TypeTraits::One << UseColorTextureBufferFieldId); - static const OSG::BitVector UseDepthTextureBufferFieldMask = - (TypeTraits::One << UseDepthTextureBufferFieldId); - static const OSG::BitVector VertexShadersFieldMask = - (TypeTraits::One << VertexShadersFieldId); - static const OSG::BitVector FragmentShadersFieldMask = - (TypeTraits::One << FragmentShadersFieldId); - static const OSG::BitVector PassSizesFieldMask = - (TypeTraits::One << PassSizesFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFGLenum SFColorBufferFormatType; - typedef SFBool SFUseColorTextureBufferType; - typedef SFBool SFUseDepthTextureBufferType; - typedef MFString MFVertexShadersType; - typedef MFString MFFragmentShadersType; - typedef MFVec2f MFPassSizesType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - - SFGLenum *editSFColorBufferFormat(void); - const SFGLenum *getSFColorBufferFormat (void) const; - - SFBool *editSFUseColorTextureBuffer(void); - const SFBool *getSFUseColorTextureBuffer (void) const; - - SFBool *editSFUseDepthTextureBuffer(void); - const SFBool *getSFUseDepthTextureBuffer (void) const; - - - GLenum &editColorBufferFormat(void); - const GLenum &getColorBufferFormat (void) const; - - bool &editUseColorTextureBuffer(void); - bool getUseColorTextureBuffer (void) const; - - bool &editUseDepthTextureBuffer(void); - bool getUseDepthTextureBuffer (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setColorBufferFormat(const GLenum &value); - void setUseColorTextureBuffer(const bool value); - void setUseDepthTextureBuffer(const bool value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static PostShaderStageTransitPtr create (void); - static PostShaderStage *createEmpty (void); - - static PostShaderStageTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static PostShaderStage *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static PostShaderStageTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFGLenum _sfColorBufferFormat; - SFBool _sfUseColorTextureBuffer; - SFBool _sfUseDepthTextureBuffer; - MFString _mfVertexShaders; - MFString _mfFragmentShaders; - MFVec2f _mfPassSizes; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - PostShaderStageBase(void); - PostShaderStageBase(const PostShaderStageBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~PostShaderStageBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleColorBufferFormat (void) const; - EditFieldHandlePtr editHandleColorBufferFormat(void); - GetFieldHandlePtr getHandleUseColorTextureBuffer (void) const; - EditFieldHandlePtr editHandleUseColorTextureBuffer(void); - GetFieldHandlePtr getHandleUseDepthTextureBuffer (void) const; - EditFieldHandlePtr editHandleUseDepthTextureBuffer(void); - GetFieldHandlePtr getHandleVertexShaders (void) const; - EditFieldHandlePtr editHandleVertexShaders (void); - GetFieldHandlePtr getHandleFragmentShaders (void) const; - EditFieldHandlePtr editHandleFragmentShaders(void); - GetFieldHandlePtr getHandlePassSizes (void) const; - EditFieldHandlePtr editHandlePassSizes (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - - MFString *editMFVertexShaders (void); - const MFString *getMFVertexShaders (void) const; - - MFString *editMFFragmentShaders(void); - const MFString *getMFFragmentShaders (void) const; - - MFVec2f *editMFPassSizes (void); - const MFVec2f *getMFPassSizes (void) const; - - - std::string &editVertexShaders (const UInt32 index); - const std::string &getVertexShaders (const UInt32 index) const; - - std::string &editFragmentShaders(const UInt32 index); - const std::string &getFragmentShaders (const UInt32 index) const; - - Vec2f &editPassSizes (const UInt32 index); - const Vec2f &getPassSizes (const UInt32 index) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( PostShaderStageBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const PostShaderStageBase &source); -}; - -typedef PostShaderStageBase *PostShaderStageBaseP; - -typedef CoredNodeRefPtr PostShaderStageNodeRefPtr; -typedef CoredNodeMTRefPtr PostShaderStageNodeMTRefPtr; - -OSG_END_NAMESPACE - -#endif /* _OSGPOSTSHADERSTAGEBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageBase.inl b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageBase.inl deleted file mode 100644 index 912d876a..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageBase.inl +++ /dev/null @@ -1,250 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class PostShaderStage! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &PostShaderStageBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 PostShaderStageBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 PostShaderStageBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - -//! Get the value of the PostShaderStage::_sfColorBufferFormat field. - -inline -GLenum &PostShaderStageBase::editColorBufferFormat(void) -{ - editSField(ColorBufferFormatFieldMask); - - return _sfColorBufferFormat.getValue(); -} - -//! Get the value of the PostShaderStage::_sfColorBufferFormat field. -inline -const GLenum &PostShaderStageBase::getColorBufferFormat(void) const -{ - return _sfColorBufferFormat.getValue(); -} - -//! Set the value of the PostShaderStage::_sfColorBufferFormat field. -inline -void PostShaderStageBase::setColorBufferFormat(const GLenum &value) -{ - editSField(ColorBufferFormatFieldMask); - - _sfColorBufferFormat.setValue(value); -} -//! Get the value of the PostShaderStage::_sfUseColorTextureBuffer field. - -inline -bool &PostShaderStageBase::editUseColorTextureBuffer(void) -{ - editSField(UseColorTextureBufferFieldMask); - - return _sfUseColorTextureBuffer.getValue(); -} - -//! Get the value of the PostShaderStage::_sfUseColorTextureBuffer field. -inline - bool PostShaderStageBase::getUseColorTextureBuffer(void) const -{ - return _sfUseColorTextureBuffer.getValue(); -} - -//! Set the value of the PostShaderStage::_sfUseColorTextureBuffer field. -inline -void PostShaderStageBase::setUseColorTextureBuffer(const bool value) -{ - editSField(UseColorTextureBufferFieldMask); - - _sfUseColorTextureBuffer.setValue(value); -} -//! Get the value of the PostShaderStage::_sfUseDepthTextureBuffer field. - -inline -bool &PostShaderStageBase::editUseDepthTextureBuffer(void) -{ - editSField(UseDepthTextureBufferFieldMask); - - return _sfUseDepthTextureBuffer.getValue(); -} - -//! Get the value of the PostShaderStage::_sfUseDepthTextureBuffer field. -inline - bool PostShaderStageBase::getUseDepthTextureBuffer(void) const -{ - return _sfUseDepthTextureBuffer.getValue(); -} - -//! Set the value of the PostShaderStage::_sfUseDepthTextureBuffer field. -inline -void PostShaderStageBase::setUseDepthTextureBuffer(const bool value) -{ - editSField(UseDepthTextureBufferFieldMask); - - _sfUseDepthTextureBuffer.setValue(value); -} - -//! Get the value of the \a index element the PostShaderStage::_mfVertexShaders field. -inline -const std::string &PostShaderStageBase::getVertexShaders(const UInt32 index) const -{ - return _mfVertexShaders[index]; -} - -inline -std::string &PostShaderStageBase::editVertexShaders(const UInt32 index) -{ - editMField(VertexShadersFieldMask, _mfVertexShaders); - - return _mfVertexShaders[index]; -} - - -//! Get the value of the \a index element the PostShaderStage::_mfFragmentShaders field. -inline -const std::string &PostShaderStageBase::getFragmentShaders(const UInt32 index) const -{ - return _mfFragmentShaders[index]; -} - -inline -std::string &PostShaderStageBase::editFragmentShaders(const UInt32 index) -{ - editMField(FragmentShadersFieldMask, _mfFragmentShaders); - - return _mfFragmentShaders[index]; -} - - -//! Get the value of the \a index element the PostShaderStage::_mfPassSizes field. -inline -const Vec2f &PostShaderStageBase::getPassSizes(const UInt32 index) const -{ - return _mfPassSizes[index]; -} - -inline -Vec2f &PostShaderStageBase::editPassSizes(const UInt32 index) -{ - editMField(PassSizesFieldMask, _mfPassSizes); - - return _mfPassSizes[index]; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void PostShaderStageBase::execSync ( PostShaderStageBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (ColorBufferFormatFieldMask & whichField)) - _sfColorBufferFormat.syncWith(pFrom->_sfColorBufferFormat); - - if(FieldBits::NoField != (UseColorTextureBufferFieldMask & whichField)) - _sfUseColorTextureBuffer.syncWith(pFrom->_sfUseColorTextureBuffer); - - if(FieldBits::NoField != (UseDepthTextureBufferFieldMask & whichField)) - _sfUseDepthTextureBuffer.syncWith(pFrom->_sfUseDepthTextureBuffer); - - if(FieldBits::NoField != (VertexShadersFieldMask & whichField)) - _mfVertexShaders.syncWith(pFrom->_mfVertexShaders, - syncMode, - uiSyncInfo, - oOffsets); - - if(FieldBits::NoField != (FragmentShadersFieldMask & whichField)) - _mfFragmentShaders.syncWith(pFrom->_mfFragmentShaders, - syncMode, - uiSyncInfo, - oOffsets); - - if(FieldBits::NoField != (PassSizesFieldMask & whichField)) - _mfPassSizes.syncWith(pFrom->_mfPassSizes, - syncMode, - uiSyncInfo, - oOffsets); -} -#endif - - -inline -const Char8 *PostShaderStageBase::getClassname(void) -{ - return "PostShaderStage"; -} -OSG_GEN_CONTAINERPTR(PostShaderStage); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.cpp b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.cpp deleted file mode 100644 index 5e55390a..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include "OSGConfig.h" - -#include "OSGPostShaderStageData.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGPostShaderStageDataBase.cpp file. -// To modify it, please change the .fcd file (OSGPostShaderStageData.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void PostShaderStageData::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -PostShaderStageData::PostShaderStageData(void) : - Inherited() -{ -} - -PostShaderStageData::PostShaderStageData(const PostShaderStageData &source) : - Inherited(source) -{ -} - -PostShaderStageData::~PostShaderStageData(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void PostShaderStageData::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); -} - -void PostShaderStageData::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump PostShaderStageData NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.fcd b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.fcd deleted file mode 100644 index c6f3fbba..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.fcd +++ /dev/null @@ -1,64 +0,0 @@ - - - - Data used for rendering by the Fog effect stage - - - - - - - - - - - diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.h b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.h deleted file mode 100644 index 75416604..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.h +++ /dev/null @@ -1,131 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGPOSTSHADERSTAGEDATA_H_ -#define _OSGPOSTSHADERSTAGEDATA_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGPostShaderStageDataBase.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief PostShaderStageData class. See \ref - PageEffectGroupsPostShaderStageData for a description. -*/ - -class OSG_EFFECTGROUPS_DLLMAPPING PostShaderStageData : public PostShaderStageDataBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef PostShaderStageDataBase Inherited; - typedef PostShaderStageData Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in PostShaderStageDataBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - PostShaderStageData(void); - PostShaderStageData(const PostShaderStageData &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~PostShaderStageData(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class PostShaderStageDataBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const PostShaderStageData &source); -}; - -typedef PostShaderStageData *PostShaderStageDataP; - -OSG_END_NAMESPACE - -#include "OSGChunkMaterial.h" -#include "OSGFrameBufferObject.h" -#include "OSGCamera.h" -#include "OSGTextureObjChunk.h" -#include "OSGPostShaderStageDataBase.inl" -#include "OSGPostShaderStageData.inl" - -#endif /* _OSGPOSTSHADERSTAGEDATA_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.inl b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.inl deleted file mode 100644 index 5a62f5ab..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageData.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataBase.cpp b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataBase.cpp deleted file mode 100644 index b5e66cd6..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataBase.cpp +++ /dev/null @@ -1,934 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class PostShaderStageData! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - -#include "OSGChunkMaterial.h" // ShaderMaterials Class -#include "OSGFrameBufferObject.h" // RenderTargets Class -#include "OSGCamera.h" // Camera Class - -#include "OSGPostShaderStageDataBase.h" -#include "OSGPostShaderStageData.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::PostShaderStageData - Data used for rendering by the Fog effect stage - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var ChunkMaterial * PostShaderStageDataBase::_mfShaderMaterials - -*/ - -/*! \var Int32 PostShaderStageDataBase::_sfWidth - -*/ - -/*! \var Int32 PostShaderStageDataBase::_sfHeight - -*/ - -/*! \var FrameBufferObject * PostShaderStageDataBase::_mfRenderTargets - -*/ - -/*! \var Camera * PostShaderStageDataBase::_sfCamera - -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("PostShaderStageDataPtr", "StageDataPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(PostShaderStageData *) - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void PostShaderStageDataBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new MFUnrecChunkMaterialPtr::Description( - MFUnrecChunkMaterialPtr::getClassType(), - "ShaderMaterials", - "", - ShaderMaterialsFieldId, ShaderMaterialsFieldMask, - false, - (Field::MFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStageData::editHandleShaderMaterials), - static_cast(&PostShaderStageData::getHandleShaderMaterials)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFInt32::Description( - SFInt32::getClassType(), - "Width", - "", - WidthFieldId, WidthFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStageData::editHandleWidth), - static_cast(&PostShaderStageData::getHandleWidth)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFInt32::Description( - SFInt32::getClassType(), - "Height", - "", - HeightFieldId, HeightFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStageData::editHandleHeight), - static_cast(&PostShaderStageData::getHandleHeight)); - - oType.addInitialDesc(pDesc); - - pDesc = new MFUnrecFrameBufferObjectPtr::Description( - MFUnrecFrameBufferObjectPtr::getClassType(), - "RenderTargets", - "", - RenderTargetsFieldId, RenderTargetsFieldMask, - false, - (Field::MFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStageData::editHandleRenderTargets), - static_cast(&PostShaderStageData::getHandleRenderTargets)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFUnrecCameraPtr::Description( - SFUnrecCameraPtr::getClassType(), - "Camera", - "", - CameraFieldId, CameraFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&PostShaderStageData::editHandleCamera), - static_cast(&PostShaderStageData::getHandleCamera)); - - oType.addInitialDesc(pDesc); -} - - -PostShaderStageDataBase::TypeObject PostShaderStageDataBase::_type( - PostShaderStageDataBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&PostShaderStageDataBase::createEmptyLocal), - PostShaderStageData::initMethod, - PostShaderStageData::exitMethod, - reinterpret_cast(&PostShaderStageData::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - " Data used for rendering by the Fog effect stage\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "\n", - "Data used for rendering by the Fog effect stage\n" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &PostShaderStageDataBase::getType(void) -{ - return _type; -} - -const FieldContainerType &PostShaderStageDataBase::getType(void) const -{ - return _type; -} - -UInt32 PostShaderStageDataBase::getContainerSize(void) const -{ - return sizeof(PostShaderStageData); -} - -/*------------------------- decorator get ------------------------------*/ - - -//! Get the PostShaderStageData::_mfShaderMaterials field. -const MFUnrecChunkMaterialPtr *PostShaderStageDataBase::getMFShaderMaterials(void) const -{ - return &_mfShaderMaterials; -} - -MFUnrecChunkMaterialPtr *PostShaderStageDataBase::editMFShaderMaterials(void) -{ - editMField(ShaderMaterialsFieldMask, _mfShaderMaterials); - - return &_mfShaderMaterials; -} - -SFInt32 *PostShaderStageDataBase::editSFWidth(void) -{ - editSField(WidthFieldMask); - - return &_sfWidth; -} - -const SFInt32 *PostShaderStageDataBase::getSFWidth(void) const -{ - return &_sfWidth; -} - - -SFInt32 *PostShaderStageDataBase::editSFHeight(void) -{ - editSField(HeightFieldMask); - - return &_sfHeight; -} - -const SFInt32 *PostShaderStageDataBase::getSFHeight(void) const -{ - return &_sfHeight; -} - - -//! Get the PostShaderStageData::_mfRenderTargets field. -const MFUnrecFrameBufferObjectPtr *PostShaderStageDataBase::getMFRenderTargets(void) const -{ - return &_mfRenderTargets; -} - -MFUnrecFrameBufferObjectPtr *PostShaderStageDataBase::editMFRenderTargets (void) -{ - editMField(RenderTargetsFieldMask, _mfRenderTargets); - - return &_mfRenderTargets; -} - -//! Get the PostShaderStageData::_sfCamera field. -const SFUnrecCameraPtr *PostShaderStageDataBase::getSFCamera(void) const -{ - return &_sfCamera; -} - -SFUnrecCameraPtr *PostShaderStageDataBase::editSFCamera (void) -{ - editSField(CameraFieldMask); - - return &_sfCamera; -} - - - -void PostShaderStageDataBase::pushToShaderMaterials(ChunkMaterial * const value) -{ - editMField(ShaderMaterialsFieldMask, _mfShaderMaterials); - - _mfShaderMaterials.push_back(value); -} - -void PostShaderStageDataBase::assignShaderMaterials(const MFUnrecChunkMaterialPtr &value) -{ - MFUnrecChunkMaterialPtr::const_iterator elemIt = - value.begin(); - MFUnrecChunkMaterialPtr::const_iterator elemEnd = - value.end (); - - static_cast(this)->clearShaderMaterials(); - - while(elemIt != elemEnd) - { - this->pushToShaderMaterials(*elemIt); - - ++elemIt; - } -} - -void PostShaderStageDataBase::removeFromShaderMaterials(UInt32 uiIndex) -{ - if(uiIndex < _mfShaderMaterials.size()) - { - editMField(ShaderMaterialsFieldMask, _mfShaderMaterials); - - _mfShaderMaterials.erase(uiIndex); - } -} - -void PostShaderStageDataBase::removeObjFromShaderMaterials(ChunkMaterial * const value) -{ - Int32 iElemIdx = _mfShaderMaterials.findIndex(value); - - if(iElemIdx != -1) - { - editMField(ShaderMaterialsFieldMask, _mfShaderMaterials); - - _mfShaderMaterials.erase(iElemIdx); - } -} -void PostShaderStageDataBase::clearShaderMaterials(void) -{ - editMField(ShaderMaterialsFieldMask, _mfShaderMaterials); - - - _mfShaderMaterials.clear(); -} - -void PostShaderStageDataBase::pushToRenderTargets(FrameBufferObject * const value) -{ - editMField(RenderTargetsFieldMask, _mfRenderTargets); - - _mfRenderTargets.push_back(value); -} - -void PostShaderStageDataBase::assignRenderTargets(const MFUnrecFrameBufferObjectPtr &value) -{ - MFUnrecFrameBufferObjectPtr::const_iterator elemIt = - value.begin(); - MFUnrecFrameBufferObjectPtr::const_iterator elemEnd = - value.end (); - - static_cast(this)->clearRenderTargets(); - - while(elemIt != elemEnd) - { - this->pushToRenderTargets(*elemIt); - - ++elemIt; - } -} - -void PostShaderStageDataBase::removeFromRenderTargets(UInt32 uiIndex) -{ - if(uiIndex < _mfRenderTargets.size()) - { - editMField(RenderTargetsFieldMask, _mfRenderTargets); - - _mfRenderTargets.erase(uiIndex); - } -} - -void PostShaderStageDataBase::removeObjFromRenderTargets(FrameBufferObject * const value) -{ - Int32 iElemIdx = _mfRenderTargets.findIndex(value); - - if(iElemIdx != -1) - { - editMField(RenderTargetsFieldMask, _mfRenderTargets); - - _mfRenderTargets.erase(iElemIdx); - } -} -void PostShaderStageDataBase::clearRenderTargets(void) -{ - editMField(RenderTargetsFieldMask, _mfRenderTargets); - - - _mfRenderTargets.clear(); -} - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 PostShaderStageDataBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (ShaderMaterialsFieldMask & whichField)) - { - returnValue += _mfShaderMaterials.getBinSize(); - } - if(FieldBits::NoField != (WidthFieldMask & whichField)) - { - returnValue += _sfWidth.getBinSize(); - } - if(FieldBits::NoField != (HeightFieldMask & whichField)) - { - returnValue += _sfHeight.getBinSize(); - } - if(FieldBits::NoField != (RenderTargetsFieldMask & whichField)) - { - returnValue += _mfRenderTargets.getBinSize(); - } - if(FieldBits::NoField != (CameraFieldMask & whichField)) - { - returnValue += _sfCamera.getBinSize(); - } - - return returnValue; -} - -void PostShaderStageDataBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (ShaderMaterialsFieldMask & whichField)) - { - _mfShaderMaterials.copyToBin(pMem); - } - if(FieldBits::NoField != (WidthFieldMask & whichField)) - { - _sfWidth.copyToBin(pMem); - } - if(FieldBits::NoField != (HeightFieldMask & whichField)) - { - _sfHeight.copyToBin(pMem); - } - if(FieldBits::NoField != (RenderTargetsFieldMask & whichField)) - { - _mfRenderTargets.copyToBin(pMem); - } - if(FieldBits::NoField != (CameraFieldMask & whichField)) - { - _sfCamera.copyToBin(pMem); - } -} - -void PostShaderStageDataBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (ShaderMaterialsFieldMask & whichField)) - { - editMField(ShaderMaterialsFieldMask, _mfShaderMaterials); - _mfShaderMaterials.copyFromBin(pMem); - } - if(FieldBits::NoField != (WidthFieldMask & whichField)) - { - editSField(WidthFieldMask); - _sfWidth.copyFromBin(pMem); - } - if(FieldBits::NoField != (HeightFieldMask & whichField)) - { - editSField(HeightFieldMask); - _sfHeight.copyFromBin(pMem); - } - if(FieldBits::NoField != (RenderTargetsFieldMask & whichField)) - { - editMField(RenderTargetsFieldMask, _mfRenderTargets); - _mfRenderTargets.copyFromBin(pMem); - } - if(FieldBits::NoField != (CameraFieldMask & whichField)) - { - editSField(CameraFieldMask); - _sfCamera.copyFromBin(pMem); - } -} - -//! create a new instance of the class -PostShaderStageDataTransitPtr PostShaderStageDataBase::createLocal(BitVector bFlags) -{ - PostShaderStageDataTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -PostShaderStageDataTransitPtr PostShaderStageDataBase::createDependent(BitVector bFlags) -{ - PostShaderStageDataTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -PostShaderStageDataTransitPtr PostShaderStageDataBase::create(void) -{ - PostShaderStageDataTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -PostShaderStageData *PostShaderStageDataBase::createEmptyLocal(BitVector bFlags) -{ - PostShaderStageData *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -PostShaderStageData *PostShaderStageDataBase::createEmpty(void) -{ - PostShaderStageData *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr PostShaderStageDataBase::shallowCopyLocal( - BitVector bFlags) const -{ - PostShaderStageData *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr PostShaderStageDataBase::shallowCopyDependent( - BitVector bFlags) const -{ - PostShaderStageData *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr PostShaderStageDataBase::shallowCopy(void) const -{ - PostShaderStageData *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -PostShaderStageDataBase::PostShaderStageDataBase(void) : - Inherited(), - _mfShaderMaterials (), - _sfWidth (Int32(0)), - _sfHeight (Int32(0)), - _mfRenderTargets (), - _sfCamera (NULL) -{ -} - -PostShaderStageDataBase::PostShaderStageDataBase(const PostShaderStageDataBase &source) : - Inherited(source), - _mfShaderMaterials (), - _sfWidth (source._sfWidth ), - _sfHeight (source._sfHeight ), - _mfRenderTargets (), - _sfCamera (NULL) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -PostShaderStageDataBase::~PostShaderStageDataBase(void) -{ -} - -void PostShaderStageDataBase::onCreate(const PostShaderStageData *source) -{ - Inherited::onCreate(source); - - if(source != NULL) - { - PostShaderStageData *pThis = static_cast(this); - - MFUnrecChunkMaterialPtr::const_iterator ShaderMaterialsIt = - source->_mfShaderMaterials.begin(); - MFUnrecChunkMaterialPtr::const_iterator ShaderMaterialsEnd = - source->_mfShaderMaterials.end (); - - while(ShaderMaterialsIt != ShaderMaterialsEnd) - { - pThis->pushToShaderMaterials(*ShaderMaterialsIt); - - ++ShaderMaterialsIt; - } - - MFUnrecFrameBufferObjectPtr::const_iterator RenderTargetsIt = - source->_mfRenderTargets.begin(); - MFUnrecFrameBufferObjectPtr::const_iterator RenderTargetsEnd = - source->_mfRenderTargets.end (); - - while(RenderTargetsIt != RenderTargetsEnd) - { - pThis->pushToRenderTargets(*RenderTargetsIt); - - ++RenderTargetsIt; - } - - pThis->setCamera(source->getCamera()); - } -} - -GetFieldHandlePtr PostShaderStageDataBase::getHandleShaderMaterials (void) const -{ - MFUnrecChunkMaterialPtr::GetHandlePtr returnValue( - new MFUnrecChunkMaterialPtr::GetHandle( - &_mfShaderMaterials, - this->getType().getFieldDesc(ShaderMaterialsFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageDataBase::editHandleShaderMaterials(void) -{ - MFUnrecChunkMaterialPtr::EditHandlePtr returnValue( - new MFUnrecChunkMaterialPtr::EditHandle( - &_mfShaderMaterials, - this->getType().getFieldDesc(ShaderMaterialsFieldId), - this)); - - returnValue->setAddMethod( - boost::bind(&PostShaderStageData::pushToShaderMaterials, - static_cast(this), _1)); - returnValue->setRemoveMethod( - boost::bind(&PostShaderStageData::removeFromShaderMaterials, - static_cast(this), _1)); - returnValue->setRemoveObjMethod( - boost::bind(&PostShaderStageData::removeObjFromShaderMaterials, - static_cast(this), _1)); - returnValue->setClearMethod( - boost::bind(&PostShaderStageData::clearShaderMaterials, - static_cast(this))); - - editMField(ShaderMaterialsFieldMask, _mfShaderMaterials); - - return returnValue; -} - -GetFieldHandlePtr PostShaderStageDataBase::getHandleWidth (void) const -{ - SFInt32::GetHandlePtr returnValue( - new SFInt32::GetHandle( - &_sfWidth, - this->getType().getFieldDesc(WidthFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageDataBase::editHandleWidth (void) -{ - SFInt32::EditHandlePtr returnValue( - new SFInt32::EditHandle( - &_sfWidth, - this->getType().getFieldDesc(WidthFieldId), - this)); - - - editSField(WidthFieldMask); - - return returnValue; -} - -GetFieldHandlePtr PostShaderStageDataBase::getHandleHeight (void) const -{ - SFInt32::GetHandlePtr returnValue( - new SFInt32::GetHandle( - &_sfHeight, - this->getType().getFieldDesc(HeightFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageDataBase::editHandleHeight (void) -{ - SFInt32::EditHandlePtr returnValue( - new SFInt32::EditHandle( - &_sfHeight, - this->getType().getFieldDesc(HeightFieldId), - this)); - - - editSField(HeightFieldMask); - - return returnValue; -} - -GetFieldHandlePtr PostShaderStageDataBase::getHandleRenderTargets (void) const -{ - MFUnrecFrameBufferObjectPtr::GetHandlePtr returnValue( - new MFUnrecFrameBufferObjectPtr::GetHandle( - &_mfRenderTargets, - this->getType().getFieldDesc(RenderTargetsFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageDataBase::editHandleRenderTargets (void) -{ - MFUnrecFrameBufferObjectPtr::EditHandlePtr returnValue( - new MFUnrecFrameBufferObjectPtr::EditHandle( - &_mfRenderTargets, - this->getType().getFieldDesc(RenderTargetsFieldId), - this)); - - returnValue->setAddMethod( - boost::bind(&PostShaderStageData::pushToRenderTargets, - static_cast(this), _1)); - returnValue->setRemoveMethod( - boost::bind(&PostShaderStageData::removeFromRenderTargets, - static_cast(this), _1)); - returnValue->setRemoveObjMethod( - boost::bind(&PostShaderStageData::removeObjFromRenderTargets, - static_cast(this), _1)); - returnValue->setClearMethod( - boost::bind(&PostShaderStageData::clearRenderTargets, - static_cast(this))); - - editMField(RenderTargetsFieldMask, _mfRenderTargets); - - return returnValue; -} - -GetFieldHandlePtr PostShaderStageDataBase::getHandleCamera (void) const -{ - SFUnrecCameraPtr::GetHandlePtr returnValue( - new SFUnrecCameraPtr::GetHandle( - &_sfCamera, - this->getType().getFieldDesc(CameraFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr PostShaderStageDataBase::editHandleCamera (void) -{ - SFUnrecCameraPtr::EditHandlePtr returnValue( - new SFUnrecCameraPtr::EditHandle( - &_sfCamera, - this->getType().getFieldDesc(CameraFieldId), - this)); - - returnValue->setSetMethod( - boost::bind(&PostShaderStageData::setCamera, - static_cast(this), _1)); - - editSField(CameraFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void PostShaderStageDataBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - PostShaderStageData *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *PostShaderStageDataBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - PostShaderStageData *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void PostShaderStageDataBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - static_cast(this)->clearShaderMaterials(); - - static_cast(this)->clearRenderTargets(); - - static_cast(this)->setCamera(NULL); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataBase.h b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataBase.h deleted file mode 100644 index 61c6ffb8..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataBase.h +++ /dev/null @@ -1,364 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class PostShaderStageData - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGPOSTSHADERSTAGEDATABASE_H_ -#define _OSGPOSTSHADERSTAGEDATABASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGEffectGroupsDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGStageData.h" // Parent - -#include "OSGChunkMaterialFields.h" // ShaderMaterials type -#include "OSGSysFields.h" // Width type -#include "OSGFrameBufferObjectFields.h" // RenderTargets type -#include "OSGCameraFields.h" // Camera type - -#include "OSGPostShaderStageDataFields.h" - -OSG_BEGIN_NAMESPACE - -class PostShaderStageData; - -//! \brief PostShaderStageData Base Class. - -class OSG_EFFECTGROUPS_DLLMAPPING PostShaderStageDataBase : public StageData -{ - public: - - typedef StageData Inherited; - typedef StageData ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(PostShaderStageData); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - ShaderMaterialsFieldId = Inherited::NextFieldId, - WidthFieldId = ShaderMaterialsFieldId + 1, - HeightFieldId = WidthFieldId + 1, - RenderTargetsFieldId = HeightFieldId + 1, - CameraFieldId = RenderTargetsFieldId + 1, - NextFieldId = CameraFieldId + 1 - }; - - static const OSG::BitVector ShaderMaterialsFieldMask = - (TypeTraits::One << ShaderMaterialsFieldId); - static const OSG::BitVector WidthFieldMask = - (TypeTraits::One << WidthFieldId); - static const OSG::BitVector HeightFieldMask = - (TypeTraits::One << HeightFieldId); - static const OSG::BitVector RenderTargetsFieldMask = - (TypeTraits::One << RenderTargetsFieldId); - static const OSG::BitVector CameraFieldMask = - (TypeTraits::One << CameraFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef MFUnrecChunkMaterialPtr MFShaderMaterialsType; - typedef SFInt32 SFWidthType; - typedef SFInt32 SFHeightType; - typedef MFUnrecFrameBufferObjectPtr MFRenderTargetsType; - typedef SFUnrecCameraPtr SFCameraType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - const MFUnrecChunkMaterialPtr *getMFShaderMaterials(void) const; - MFUnrecChunkMaterialPtr *editMFShaderMaterials(void); - - SFInt32 *editSFWidth (void); - const SFInt32 *getSFWidth (void) const; - - SFInt32 *editSFHeight (void); - const SFInt32 *getSFHeight (void) const; - const MFUnrecFrameBufferObjectPtr *getMFRenderTargets (void) const; - MFUnrecFrameBufferObjectPtr *editMFRenderTargets (void); - const SFUnrecCameraPtr *getSFCamera (void) const; - SFUnrecCameraPtr *editSFCamera (void); - - - ChunkMaterial * getShaderMaterials(const UInt32 index) const; - - Int32 &editWidth (void); - Int32 getWidth (void) const; - - Int32 &editHeight (void); - Int32 getHeight (void) const; - - FrameBufferObject * getRenderTargets (const UInt32 index) const; - - Camera * getCamera (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setWidth (const Int32 value); - void setHeight (const Int32 value); - void setCamera (Camera * const value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr Field Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - void pushToShaderMaterials (ChunkMaterial * const value ); - void assignShaderMaterials (const MFUnrecChunkMaterialPtr &value); - void removeFromShaderMaterials (UInt32 uiIndex ); - void removeObjFromShaderMaterials(ChunkMaterial * const value ); - void clearShaderMaterials (void ); - - void pushToRenderTargets (FrameBufferObject * const value ); - void assignRenderTargets (const MFUnrecFrameBufferObjectPtr &value); - void removeFromRenderTargets (UInt32 uiIndex ); - void removeObjFromRenderTargets(FrameBufferObject * const value ); - void clearRenderTargets (void ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static PostShaderStageDataTransitPtr create (void); - static PostShaderStageData *createEmpty (void); - - static PostShaderStageDataTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static PostShaderStageData *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static PostShaderStageDataTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - MFUnrecChunkMaterialPtr _mfShaderMaterials; - SFInt32 _sfWidth; - SFInt32 _sfHeight; - MFUnrecFrameBufferObjectPtr _mfRenderTargets; - SFUnrecCameraPtr _sfCamera; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - PostShaderStageDataBase(void); - PostShaderStageDataBase(const PostShaderStageDataBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~PostShaderStageDataBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - void onCreate(const PostShaderStageData *source = NULL); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleShaderMaterials (void) const; - EditFieldHandlePtr editHandleShaderMaterials(void); - GetFieldHandlePtr getHandleWidth (void) const; - EditFieldHandlePtr editHandleWidth (void); - GetFieldHandlePtr getHandleHeight (void) const; - EditFieldHandlePtr editHandleHeight (void); - GetFieldHandlePtr getHandleRenderTargets (void) const; - EditFieldHandlePtr editHandleRenderTargets (void); - GetFieldHandlePtr getHandleCamera (void) const; - EditFieldHandlePtr editHandleCamera (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( PostShaderStageDataBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const PostShaderStageDataBase &source); -}; - -typedef PostShaderStageDataBase *PostShaderStageDataBaseP; - -OSG_END_NAMESPACE - -#endif /* _OSGPOSTSHADERSTAGEDATABASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataBase.inl b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataBase.inl deleted file mode 100644 index 97d944ae..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataBase.inl +++ /dev/null @@ -1,201 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class PostShaderStageData! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &PostShaderStageDataBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 PostShaderStageDataBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 PostShaderStageDataBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - -//! Get the value of the PostShaderStageData::_sfWidth field. - -inline -Int32 &PostShaderStageDataBase::editWidth(void) -{ - editSField(WidthFieldMask); - - return _sfWidth.getValue(); -} - -//! Get the value of the PostShaderStageData::_sfWidth field. -inline - Int32 PostShaderStageDataBase::getWidth(void) const -{ - return _sfWidth.getValue(); -} - -//! Set the value of the PostShaderStageData::_sfWidth field. -inline -void PostShaderStageDataBase::setWidth(const Int32 value) -{ - editSField(WidthFieldMask); - - _sfWidth.setValue(value); -} -//! Get the value of the PostShaderStageData::_sfHeight field. - -inline -Int32 &PostShaderStageDataBase::editHeight(void) -{ - editSField(HeightFieldMask); - - return _sfHeight.getValue(); -} - -//! Get the value of the PostShaderStageData::_sfHeight field. -inline - Int32 PostShaderStageDataBase::getHeight(void) const -{ - return _sfHeight.getValue(); -} - -//! Set the value of the PostShaderStageData::_sfHeight field. -inline -void PostShaderStageDataBase::setHeight(const Int32 value) -{ - editSField(HeightFieldMask); - - _sfHeight.setValue(value); -} - -//! Get the value of the PostShaderStageData::_sfCamera field. -inline -Camera * PostShaderStageDataBase::getCamera(void) const -{ - return _sfCamera.getValue(); -} - -//! Set the value of the PostShaderStageData::_sfCamera field. -inline -void PostShaderStageDataBase::setCamera(Camera * const value) -{ - editSField(CameraFieldMask); - - _sfCamera.setValue(value); -} - -//! Get the value of the \a index element the PostShaderStageData::_mfShaderMaterials field. -inline -ChunkMaterial * PostShaderStageDataBase::getShaderMaterials(const UInt32 index) const -{ - return _mfShaderMaterials[index]; -} - -//! Get the value of the \a index element the PostShaderStageData::_mfRenderTargets field. -inline -FrameBufferObject * PostShaderStageDataBase::getRenderTargets(const UInt32 index) const -{ - return _mfRenderTargets[index]; -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void PostShaderStageDataBase::execSync ( PostShaderStageDataBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (ShaderMaterialsFieldMask & whichField)) - _mfShaderMaterials.syncWith(pFrom->_mfShaderMaterials, - syncMode, - uiSyncInfo, - oOffsets); - - if(FieldBits::NoField != (WidthFieldMask & whichField)) - _sfWidth.syncWith(pFrom->_sfWidth); - - if(FieldBits::NoField != (HeightFieldMask & whichField)) - _sfHeight.syncWith(pFrom->_sfHeight); - - if(FieldBits::NoField != (RenderTargetsFieldMask & whichField)) - _mfRenderTargets.syncWith(pFrom->_mfRenderTargets, - syncMode, - uiSyncInfo, - oOffsets); - - if(FieldBits::NoField != (CameraFieldMask & whichField)) - _sfCamera.syncWith(pFrom->_sfCamera); -} -#endif - - -inline -const Char8 *PostShaderStageDataBase::getClassname(void) -{ - return "PostShaderStageData"; -} -OSG_GEN_CONTAINERPTR(PostShaderStageData); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataFields.h b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataFields.h deleted file mode 100644 index 76c50139..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageDataFields.h +++ /dev/null @@ -1,107 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGPOSTSHADERSTAGEDATAFIELDS_H_ -#define _OSGPOSTSHADERSTAGEDATAFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGEffectGroupsDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class PostShaderStageData; - -OSG_GEN_CONTAINERPTR(PostShaderStageData); - -/*! \ingroup GrpEffectsGroupsMiscFieldTraits - \ingroup GrpLibOSGEffectGroups - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_EFFECTGROUPS_DLLMAPPING DataType &getType(void); - -}; - - - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - - - -#else // these are the doxygen hacks - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGPOSTSHADERSTAGEDATAFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageFields.h b/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageFields.h deleted file mode 100644 index f6ba211d..00000000 --- a/Source/System/NodeCores/Groups/Effects/Misc/OSGPostShaderStageFields.h +++ /dev/null @@ -1,107 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGPOSTSHADERSTAGEFIELDS_H_ -#define _OSGPOSTSHADERSTAGEFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGEffectGroupsDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class PostShaderStage; - -OSG_GEN_CONTAINERPTR(PostShaderStage); - -/*! \ingroup GrpEffectsGroupsMiscFieldTraits - \ingroup GrpLibOSGEffectGroups - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_EFFECTGROUPS_DLLMAPPING DataType &getType(void); - -}; - - - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - - - -#else // these are the doxygen hacks - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGPOSTSHADERSTAGEFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.cpp b/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.cpp deleted file mode 100644 index 0b906c65..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.cpp +++ /dev/null @@ -1,241 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include - -#include "OSGReplicateTransform.h" -#include "OSGVolume.h" - -#ifndef OSG_EMBEDDED -#include "OSGIntersectAction.h" -#endif - -#include "OSGRenderAction.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGReplicateTransformBase.cpp file. -// To modify it, please change the .fcd file (OSGReplicateTransform.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void ReplicateTransform::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { -#ifndef OSG_EMBEDDED - IntersectAction::registerEnterDefault( - getClassType(), - reinterpret_cast(&ReplicateTransform::intersectEnter)); - - IntersectAction::registerLeaveDefault( - getClassType(), - reinterpret_cast(&ReplicateTransform::intersectLeave)); -#endif - - RenderAction::registerEnterDefault( - ReplicateTransform::getClassType(), - reinterpret_cast(&ReplicateTransform::renderEnter)); - - RenderAction::registerLeaveDefault( - ReplicateTransform::getClassType(), - reinterpret_cast(&ReplicateTransform::renderLeave)); - - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void ReplicateTransform::calcMatrix(const Matrix &mToWorld) -{ - Matrix prevValue(_invWorld); - _invWorld.invertFrom(mToWorld); - if(getTarget() != NULL) - { - _invWorld.mult(getTarget()->getToWorld()); - } - - if(_invWorld != prevValue) - { - invalidateVolume(); - } -} - -void ReplicateTransform::accumulateMatrix(Matrix &result) -{ - result.mult(_invWorld); -} - -void ReplicateTransform::adjustVolume(Volume &volume) -{ - volume.transform(_invWorld); -} - -/*-------------------------------------------------------------------------*/ -/* Render */ - -ActionBase::ResultE ReplicateTransform::renderEnter(Action *action) -{ - RenderAction *pAction = - dynamic_cast(action); - - calcMatrix(pAction->topMatrix()); - - pAction->pushVisibility(); - - pAction->pushMatrix(_invWorld); - - return Action::Continue; -} - -ActionBase::ResultE ReplicateTransform::renderLeave(Action *action) -{ - RenderAction *pAction = - dynamic_cast(action); - - pAction->popVisibility(); - - pAction->popMatrix(); - - return ActionBase::Continue; -} - -/*-------------------------------------------------------------------------*/ -/* Intersect */ - -#ifndef OSG_EMBEDDED -ActionBase::ResultE ReplicateTransform::intersectEnter(Action *action) -{ - IntersectAction *ia = dynamic_cast(action); - Matrix m(_invWorld); - - m.invert(); - - Pnt3f pos; - Vec3f dir; - - m.multFull(ia->getLine().getPosition (), pos); - m.mult (ia->getLine().getDirection(), dir); - - ia->setLine(Line(pos, dir), ia->getMaxDist()); - ia->scale(dir.length()); - - return Action::Continue; -} - -ActionBase::ResultE ReplicateTransform::intersectLeave(Action *action) -{ - IntersectAction *ia = dynamic_cast(action); - Matrix m(_invWorld); - - Pnt3f pos; - Vec3f dir; - - m.multFull(ia->getLine().getPosition (), pos); - m.mult (ia->getLine().getDirection(), dir); - - ia->setLine(Line(pos, dir), ia->getMaxDist()); - ia->scale(dir.length()); - - return Action::Continue; -} -#endif - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -ReplicateTransform::ReplicateTransform(void) : - Inherited(), - _invWorld () -{ -} - -ReplicateTransform::ReplicateTransform(const ReplicateTransform &source) : - Inherited(source), - _invWorld (source._invWorld) -{ -} - -ReplicateTransform::~ReplicateTransform(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void ReplicateTransform::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - if(whichField & TargetFieldMask) - { - invalidateVolume(); - } - - Inherited::changed(whichField, origin, details); -} - -void ReplicateTransform::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump ReplicateTransform NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.fcd b/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.fcd deleted file mode 100644 index c14b6db7..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.fcd +++ /dev/null @@ -1,25 +0,0 @@ - - - -This core replicates the to world transformation of the target node attached to it. -This means that when this core accumulates it's transform with it's parent, that it -overwrites it instead of multiplying with it. - - The target node. The to world transformation will be replicated by this core. - - diff --git a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.h b/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.h deleted file mode 100644 index a21f2442..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.h +++ /dev/null @@ -1,157 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGREPLICATETRANSFORM_H_ -#define _OSGREPLICATETRANSFORM_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGReplicateTransformBase.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief ReplicateTransform class. See \ref - PageGroupReplicateTransform for a description. -*/ - -class OSG_GROUP_DLLMAPPING ReplicateTransform : public ReplicateTransformBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef ReplicateTransformBase Inherited; - typedef ReplicateTransform Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Transformation */ - /*! \{ */ - - virtual void accumulateMatrix(Matrix &result); - - void calcMatrix(const Matrix &mToWorld); - - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in ReplicateTransformBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - ReplicateTransform(void); - ReplicateTransform(const ReplicateTransform &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~ReplicateTransform(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Volume */ - /*! \{ */ - - virtual void adjustVolume (Volume &volume); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Intersect & Render */ - /*! \{ */ - -#ifndef OSG_EMBEDDED - ActionBase::ResultE intersectEnter(Action *action); - ActionBase::ResultE intersectLeave(Action *action); -#endif - - ActionBase::ResultE renderEnter (Action *action); - ActionBase::ResultE renderLeave (Action *action); - /*========================== PRIVATE ================================*/ - - private: - - Matrix _invWorld; - - friend class FieldContainer; - friend class ReplicateTransformBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const ReplicateTransform &source); -}; - -typedef ReplicateTransform *ReplicateTransformP; - -OSG_END_NAMESPACE - -#include "OSGReplicateTransformBase.inl" -#include "OSGReplicateTransform.inl" - -#endif /* _OSGREPLICATETRANSFORM_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.inl b/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.inl deleted file mode 100644 index ff2f79cd..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransform.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformBase.cpp b/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformBase.cpp deleted file mode 100644 index 59e778e5..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformBase.cpp +++ /dev/null @@ -1,471 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class ReplicateTransform! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - -#include "OSGNode.h" // Target Class - -#include "OSGReplicateTransformBase.h" -#include "OSGReplicateTransform.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::ReplicateTransform - This core replicates the to world transformation of the target node attached to it. - This means that when this core accumulates it's transform with it's parent, that it - overwrites it instead of multiplying with it. - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var Node * ReplicateTransformBase::_sfTarget - The target node. The to world transformation will be replicated by this core. -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("ReplicateTransformPtr", "GroupPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(ReplicateTransform *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - ReplicateTransform *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - ReplicateTransform *, - 0); - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void ReplicateTransformBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFUnrecNodePtr::Description( - SFUnrecNodePtr::getClassType(), - "Target", - "The target node. The to world transformation will be replicated by this core.\n", - TargetFieldId, TargetFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&ReplicateTransform::editHandleTarget), - static_cast(&ReplicateTransform::getHandleTarget)); - - oType.addInitialDesc(pDesc); -} - - -ReplicateTransformBase::TypeObject ReplicateTransformBase::_type( - ReplicateTransformBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&ReplicateTransformBase::createEmptyLocal), - ReplicateTransform::initMethod, - ReplicateTransform::exitMethod, - reinterpret_cast(&ReplicateTransform::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - "This core replicates the to world transformation of the target node attached to it. \n" - "This means that when this core accumulates it's transform with it's parent, that it \n" - "overwrites it instead of multiplying with it.\n" - "\t\n" - "\tThe target node. The to world transformation will be replicated by this core.\n" - "\t\n" - "\n", - "This core replicates the to world transformation of the target node attached to it. \n" - "This means that when this core accumulates it's transform with it's parent, that it \n" - "overwrites it instead of multiplying with it.\n" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &ReplicateTransformBase::getType(void) -{ - return _type; -} - -const FieldContainerType &ReplicateTransformBase::getType(void) const -{ - return _type; -} - -UInt32 ReplicateTransformBase::getContainerSize(void) const -{ - return sizeof(ReplicateTransform); -} - -/*------------------------- decorator get ------------------------------*/ - - -//! Get the ReplicateTransform::_sfTarget field. -const SFUnrecNodePtr *ReplicateTransformBase::getSFTarget(void) const -{ - return &_sfTarget; -} - -SFUnrecNodePtr *ReplicateTransformBase::editSFTarget (void) -{ - editSField(TargetFieldMask); - - return &_sfTarget; -} - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 ReplicateTransformBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (TargetFieldMask & whichField)) - { - returnValue += _sfTarget.getBinSize(); - } - - return returnValue; -} - -void ReplicateTransformBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (TargetFieldMask & whichField)) - { - _sfTarget.copyToBin(pMem); - } -} - -void ReplicateTransformBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (TargetFieldMask & whichField)) - { - _sfTarget.copyFromBin(pMem); - } -} - -//! create a new instance of the class -ReplicateTransformTransitPtr ReplicateTransformBase::createLocal(BitVector bFlags) -{ - ReplicateTransformTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -ReplicateTransformTransitPtr ReplicateTransformBase::createDependent(BitVector bFlags) -{ - ReplicateTransformTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -ReplicateTransformTransitPtr ReplicateTransformBase::create(void) -{ - ReplicateTransformTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -ReplicateTransform *ReplicateTransformBase::createEmptyLocal(BitVector bFlags) -{ - ReplicateTransform *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -ReplicateTransform *ReplicateTransformBase::createEmpty(void) -{ - ReplicateTransform *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - - -FieldContainerTransitPtr ReplicateTransformBase::shallowCopyLocal( - BitVector bFlags) const -{ - ReplicateTransform *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr ReplicateTransformBase::shallowCopyDependent( - BitVector bFlags) const -{ - ReplicateTransform *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr ReplicateTransformBase::shallowCopy(void) const -{ - ReplicateTransform *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - - -/*------------------------- constructors ----------------------------------*/ - -ReplicateTransformBase::ReplicateTransformBase(void) : - Inherited(), - _sfTarget (NULL) -{ -} - -ReplicateTransformBase::ReplicateTransformBase(const ReplicateTransformBase &source) : - Inherited(source), - _sfTarget (NULL) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -ReplicateTransformBase::~ReplicateTransformBase(void) -{ -} - -void ReplicateTransformBase::onCreate(const ReplicateTransform *source) -{ - Inherited::onCreate(source); - - if(source != NULL) - { - ReplicateTransform *pThis = static_cast(this); - - pThis->setTarget(source->getTarget()); - } -} - -GetFieldHandlePtr ReplicateTransformBase::getHandleTarget (void) const -{ - SFUnrecNodePtr::GetHandlePtr returnValue( - new SFUnrecNodePtr::GetHandle( - &_sfTarget, - this->getType().getFieldDesc(TargetFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr ReplicateTransformBase::editHandleTarget (void) -{ - SFUnrecNodePtr::EditHandlePtr returnValue( - new SFUnrecNodePtr::EditHandle( - &_sfTarget, - this->getType().getFieldDesc(TargetFieldId), - this)); - - returnValue->setSetMethod( - boost::bind(&ReplicateTransform::setTarget, - static_cast(this), _1)); - - editSField(TargetFieldMask); - - return returnValue; -} - - -#ifdef OSG_MT_CPTR_ASPECT -void ReplicateTransformBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - ReplicateTransform *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *ReplicateTransformBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - ReplicateTransform *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void ReplicateTransformBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - static_cast(this)->setTarget(NULL); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformBase.h b/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformBase.h deleted file mode 100644 index fc8621b2..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformBase.h +++ /dev/null @@ -1,300 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class ReplicateTransform - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGREPLICATETRANSFORMBASE_H_ -#define _OSGREPLICATETRANSFORMBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGGroup.h" // Parent - -#include "OSGNodeFields.h" // Target type - -#include "OSGReplicateTransformFields.h" - -OSG_BEGIN_NAMESPACE - -class ReplicateTransform; - -//! \brief ReplicateTransform Base Class. - -class OSG_GROUP_DLLMAPPING ReplicateTransformBase : public Group -{ - public: - - typedef Group Inherited; - typedef Group ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(ReplicateTransform); - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - TargetFieldId = Inherited::NextFieldId, - NextFieldId = TargetFieldId + 1 - }; - - static const OSG::BitVector TargetFieldMask = - (TypeTraits::One << TargetFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFUnrecNodePtr SFTargetType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - const SFUnrecNodePtr *getSFTarget (void) const; - SFUnrecNodePtr *editSFTarget (void); - - - Node * getTarget (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setTarget (Node * const value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr Field Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static ReplicateTransformTransitPtr create (void); - static ReplicateTransform *createEmpty (void); - - static ReplicateTransformTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static ReplicateTransform *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static ReplicateTransformTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFUnrecNodePtr _sfTarget; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - ReplicateTransformBase(void); - ReplicateTransformBase(const ReplicateTransformBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~ReplicateTransformBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - void onCreate(const ReplicateTransform *source = NULL); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleTarget (void) const; - EditFieldHandlePtr editHandleTarget (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( ReplicateTransformBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const ReplicateTransformBase &source); -}; - -typedef ReplicateTransformBase *ReplicateTransformBaseP; - -typedef CoredNodeRefPtr ReplicateTransformNodeRefPtr; -typedef CoredNodeMTRefPtr ReplicateTransformNodeMTRefPtr; - -OSG_END_NAMESPACE - -#endif /* _OSGREPLICATETRANSFORMBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformBase.inl b/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformBase.inl deleted file mode 100644 index 8acf5202..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformBase.inl +++ /dev/null @@ -1,118 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class ReplicateTransform! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &ReplicateTransformBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 ReplicateTransformBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 ReplicateTransformBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - - -//! Get the value of the ReplicateTransform::_sfTarget field. -inline -Node * ReplicateTransformBase::getTarget(void) const -{ - return _sfTarget.getValue(); -} - -//! Set the value of the ReplicateTransform::_sfTarget field. -inline -void ReplicateTransformBase::setTarget(Node * const value) -{ - editSField(TargetFieldMask); - - _sfTarget.setValue(value); -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void ReplicateTransformBase::execSync ( ReplicateTransformBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (TargetFieldMask & whichField)) - _sfTarget.syncWith(pFrom->_sfTarget); -} -#endif - - -inline -const Char8 *ReplicateTransformBase::getClassname(void) -{ - return "ReplicateTransform"; -} -OSG_GEN_CONTAINERPTR(ReplicateTransform); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformFields.h b/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformFields.h deleted file mode 100644 index c110502a..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGReplicateTransformFields.h +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGREPLICATETRANSFORMFIELDS_H_ -#define _OSGREPLICATETRANSFORMFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class ReplicateTransform; - -OSG_GEN_CONTAINERPTR(ReplicateTransform); - -/*! \ingroup GrpGroupFieldTraits - \ingroup GrpLibOSGGroup - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFReplicateTransformPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFReplicateTransformPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecReplicateTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecReplicateTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakReplicateTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdReplicateTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecReplicateTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecReplicateTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakReplicateTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdReplicateTransformPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFRecReplicateTransformPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUnrecReplicateTransformPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFWeakReplicateTransformPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUncountedReplicateTransformPtr; - - -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFRecReplicateTransformPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUnrecReplicateTransformPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFWeakReplicateTransformPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUncountedReplicateTransformPtr; - - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFRecReplicateTransformPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUnrecReplicateTransformPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFWeakReplicateTransformPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUncountedReplicateTransformPtr : - public PointerSField {}; - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFRecReplicateTransformPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecReplicateTransformPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFWeakReplicateTransformPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUncountedReplicateTransformPtr : - public PointerMField {}; - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGREPLICATETRANSFORMFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.cpp b/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.cpp deleted file mode 100644 index c3c03b7a..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include - -#include "OSGScreenTransform.h" -#include "OSGVolume.h" -#include "OSGPlane.h" - -#ifndef OSG_EMBEDDED -#include "OSGIntersectAction.h" -#endif - -#include "OSGRenderAction.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGScreenTransformBase.cpp file. -// To modify it, please change the .fcd file (OSGScreenTransform.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void ScreenTransform::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { -#ifndef OSG_EMBEDDED - IntersectAction::registerEnterDefault( - getClassType(), - reinterpret_cast(&ScreenTransform::intersectEnter)); - - IntersectAction::registerLeaveDefault( - getClassType(), - reinterpret_cast(&ScreenTransform::intersectLeave)); -#endif - - RenderAction::registerEnterDefault( - ScreenTransform::getClassType(), - reinterpret_cast(&ScreenTransform::renderEnter)); - - RenderAction::registerLeaveDefault( - ScreenTransform::getClassType(), - reinterpret_cast(&ScreenTransform::renderLeave)); - - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void ScreenTransform::calcMatrix(const Matrix &toWorld, Viewport* const theViewport) -{ - //Get the local to world transformation - Matrix BeaconToWorld; - if(getBeacon() != NULL) - { - BeaconToWorld = getBeacon()->getToWorld(); - } - - //Get the Viewport Camera - CameraUnrecPtr ViewportCamera = theViewport->getCamera(); - - //Get the World to View transformation - Matrix WorldToView; - ViewportCamera->getViewing(WorldToView, theViewport->getPixelWidth(), theViewport->getPixelHeight()); - - //Store the previous value - Matrix prevValue(_Transform); - - //Invert the current Model Transformation - if(getInvertWorldTransform()) - { - _Transform.invertFrom(toWorld); - } - else - { - _Transform.setIdentity(); - } - - //Invert the current View Transformation - if(getInvertViewTransform()) - { - Matrix ViewToWorld; - ViewToWorld.invertFrom(WorldToView); - _Transform.mult(ViewToWorld); - - - //Setup a new view transformation - _Transform.mult(getView()); - } - - //Setup a new Model Transformation, transform such that the screen position of the origin of the beacon - //node and the screen position of the origin of child nodes are the same. - if(getApplyBeaconScreenTranslation()) - { - //The Screen Pos should now be projected to the near plane - Matrix proj, projtrans; - - ViewportCamera->getProjection(proj, - theViewport->getPixelWidth(), - theViewport->getPixelHeight()); - - ViewportCamera->getProjectionTranslation(projtrans, - theViewport->getPixelWidth(), - theViewport->getPixelHeight()); - - Matrix wctocc = proj; - - wctocc.mult(projtrans); - - Matrix cctowc; - - cctowc.invertFrom(wctocc); - - Pnt3f from, at; - - Pnt3f BeaconScreenPos = BeaconToWorld * Pnt3f(0.0f,0.0f,0.0f); - - - //Get the World to Screen transformation - Matrix WorldToScreen; - ViewportCamera->getWorldToScreen(WorldToScreen, *theViewport); - WorldToScreen.multFull(BeaconScreenPos, BeaconScreenPos); - - cctowc.multFull(Pnt3f(BeaconScreenPos.x(), BeaconScreenPos.y(), -1), from); - cctowc.multFull(Pnt3f(BeaconScreenPos.x(), BeaconScreenPos.y(), 1), at ); - - Vec3f dir = at - from; - - Line line; - line.setValue(from, dir); - - Vec3f PlaneNormal(0.0f,0.0f,1.0f); - Pnt3f PlanePoint(0.0f,0.0f,0.0f); - getView().mult(PlaneNormal,PlaneNormal); - getView().mult(PlanePoint,PlanePoint); - Plane p(PlaneNormal, PlanePoint); - Real32 t; - p.intersect(line,t); - - Pnt3f TransformedPoint = line.getPosition() + line.getDirection() * t; - - Matrix TranslateMat; - TranslateMat.setIdentity(); - - TranslateMat.setTranslate(Vec3f(TransformedPoint.x(),TransformedPoint.y(),0.0f)); - - _Transform.mult(TranslateMat); - } - - //The new model transformation should be rotated by the Beacons rotation - if(getApplyBeaconRotation()) - { - Matrix BeaconToView(BeaconToWorld); - if(getInvertViewTransform()) - { - BeaconToView.multLeft(WorldToView); - } - Vec3f translation; // for matrix decomposition - Quaternion BeaconRot; - Vec3f scaleFactor; - Quaternion scaleOrientation; - BeaconToView.getTransform(translation, BeaconRot, scaleFactor, scaleOrientation); - - Matrix RotMat; - RotMat.setRotate(BeaconRot); - _Transform.mult(RotMat); - } - - if(_Transform != prevValue) - { - invalidateVolume(); - } -} - -void ScreenTransform::accumulateMatrix(Matrix &result) -{ - result.mult(_Transform); -} - -void ScreenTransform::adjustVolume(Volume &volume) -{ - volume.transform(_Transform); -} - -/*-------------------------------------------------------------------------*/ -/* Render */ - -ActionBase::ResultE ScreenTransform::renderEnter(Action *action) -{ - RenderAction *pAction = - dynamic_cast(action); - - calcMatrix(pAction->topMatrix(), pAction->getViewport()); - - pAction->pushVisibility(); - - pAction->pushMatrix(_Transform); - - return Action::Continue; -} - -ActionBase::ResultE ScreenTransform::renderLeave(Action *action) -{ - RenderAction *pAction = - dynamic_cast(action); - - pAction->popVisibility(); - - pAction->popMatrix(); - - return ActionBase::Continue; -} - -/*-------------------------------------------------------------------------*/ -/* Intersect */ - -#ifndef OSG_EMBEDDED -ActionBase::ResultE ScreenTransform::intersectEnter(Action *action) -{ - IntersectAction *ia = dynamic_cast(action); - Matrix m(_Transform); - - m.invert(); - - Pnt3f pos; - Vec3f dir; - - m.multFull(ia->getLine().getPosition (), pos); - m.mult (ia->getLine().getDirection(), dir); - - ia->setLine(Line(pos, dir), ia->getMaxDist()); - ia->scale(dir.length()); - - return Action::Continue; -} - -ActionBase::ResultE ScreenTransform::intersectLeave(Action *action) -{ - IntersectAction *ia = dynamic_cast(action); - Matrix m(_Transform); - - Pnt3f pos; - Vec3f dir; - - m.multFull(ia->getLine().getPosition (), pos); - m.mult (ia->getLine().getDirection(), dir); - - ia->setLine(Line(pos, dir), ia->getMaxDist()); - ia->scale(dir.length()); - - return Action::Continue; -} -#endif -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -ScreenTransform::ScreenTransform(void) : - Inherited(), - _Transform () -{ -} - -ScreenTransform::ScreenTransform(const ScreenTransform &source) : - Inherited(source), - _Transform (source._Transform) -{ -} - -ScreenTransform::~ScreenTransform(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void ScreenTransform::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - - if(whichField & BeaconFieldMask) - { - invalidateVolume(); - } -} - -void ScreenTransform::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump ScreenTransform NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.fcd b/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.fcd deleted file mode 100644 index 3c5abede..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.fcd +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.h b/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.h deleted file mode 100644 index 205f9b4b..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.h +++ /dev/null @@ -1,158 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGSCREENTRANSFORM_H_ -#define _OSGSCREENTRANSFORM_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGScreenTransformBase.h" -#include "OSGViewportFields.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief ScreenTransform class. See \ref - PageGroupScreenTransform for a description. -*/ - -class OSG_GROUP_DLLMAPPING ScreenTransform : public ScreenTransformBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef ScreenTransformBase Inherited; - typedef ScreenTransform Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Transformation */ - /*! \{ */ - - virtual void accumulateMatrix(Matrix &result); - - void calcMatrix(const Matrix &toWorld, Viewport* const theViewport); - - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in ScreenTransformBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - ScreenTransform(void); - ScreenTransform(const ScreenTransform &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~ScreenTransform(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Volume */ - /*! \{ */ - - virtual void adjustVolume (Volume &volume); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Intersect & Render */ - /*! \{ */ - -#ifndef OSG_EMBEDDED - ActionBase::ResultE intersectEnter(Action *action); - ActionBase::ResultE intersectLeave(Action *action); -#endif - - ActionBase::ResultE renderEnter (Action *action); - ActionBase::ResultE renderLeave (Action *action); - /*========================== PRIVATE ================================*/ - - private: - - Matrix _Transform; - - friend class FieldContainer; - friend class ScreenTransformBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const ScreenTransform &source); -}; - -typedef ScreenTransform *ScreenTransformP; - -OSG_END_NAMESPACE - -#include "OSGScreenTransformBase.inl" -#include "OSGScreenTransform.inl" - -#endif /* _OSGSCREENTRANSFORM_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.inl b/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.inl deleted file mode 100644 index ff2f79cd..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGScreenTransform.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/OSGScreenTransformBase.cpp b/Source/System/NodeCores/Groups/Misc/OSGScreenTransformBase.cpp deleted file mode 100644 index 27a2e4fc..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGScreenTransformBase.cpp +++ /dev/null @@ -1,853 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class ScreenTransform! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - -#include "OSGNode.h" // Beacon Class - -#include "OSGScreenTransformBase.h" -#include "OSGScreenTransform.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::ScreenTransform - - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var Node * ScreenTransformBase::_sfBeacon - -*/ - -/*! \var bool ScreenTransformBase::_sfInvertWorldTransform - -*/ - -/*! \var bool ScreenTransformBase::_sfInvertViewTransform - -*/ - -/*! \var bool ScreenTransformBase::_sfApplyBeaconRotation - -*/ - -/*! \var bool ScreenTransformBase::_sfApplyBeaconScreenTranslation - -*/ - -/*! \var Matrix ScreenTransformBase::_sfView - -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("ScreenTransformPtr", "GroupPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(ScreenTransform *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - ScreenTransform *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - ScreenTransform *, - 0); - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void ScreenTransformBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFWeakNodePtr::Description( - SFWeakNodePtr::getClassType(), - "Beacon", - "", - BeaconFieldId, BeaconFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&ScreenTransform::editHandleBeacon), - static_cast(&ScreenTransform::getHandleBeacon)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFBool::Description( - SFBool::getClassType(), - "InvertWorldTransform", - "", - InvertWorldTransformFieldId, InvertWorldTransformFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&ScreenTransform::editHandleInvertWorldTransform), - static_cast(&ScreenTransform::getHandleInvertWorldTransform)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFBool::Description( - SFBool::getClassType(), - "InvertViewTransform", - "", - InvertViewTransformFieldId, InvertViewTransformFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&ScreenTransform::editHandleInvertViewTransform), - static_cast(&ScreenTransform::getHandleInvertViewTransform)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFBool::Description( - SFBool::getClassType(), - "ApplyBeaconRotation", - "", - ApplyBeaconRotationFieldId, ApplyBeaconRotationFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&ScreenTransform::editHandleApplyBeaconRotation), - static_cast(&ScreenTransform::getHandleApplyBeaconRotation)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFBool::Description( - SFBool::getClassType(), - "ApplyBeaconScreenTranslation", - "", - ApplyBeaconScreenTranslationFieldId, ApplyBeaconScreenTranslationFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&ScreenTransform::editHandleApplyBeaconScreenTranslation), - static_cast(&ScreenTransform::getHandleApplyBeaconScreenTranslation)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFMatrix::Description( - SFMatrix::getClassType(), - "View", - "", - ViewFieldId, ViewFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&ScreenTransform::editHandleView), - static_cast(&ScreenTransform::getHandleView)); - - oType.addInitialDesc(pDesc); -} - - -ScreenTransformBase::TypeObject ScreenTransformBase::_type( - ScreenTransformBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&ScreenTransformBase::createEmptyLocal), - ScreenTransform::initMethod, - ScreenTransform::exitMethod, - reinterpret_cast(&ScreenTransform::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\n", - "" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &ScreenTransformBase::getType(void) -{ - return _type; -} - -const FieldContainerType &ScreenTransformBase::getType(void) const -{ - return _type; -} - -UInt32 ScreenTransformBase::getContainerSize(void) const -{ - return sizeof(ScreenTransform); -} - -/*------------------------- decorator get ------------------------------*/ - - -//! Get the ScreenTransform::_sfBeacon field. -const SFWeakNodePtr *ScreenTransformBase::getSFBeacon(void) const -{ - return &_sfBeacon; -} - -SFWeakNodePtr *ScreenTransformBase::editSFBeacon (void) -{ - editSField(BeaconFieldMask); - - return &_sfBeacon; -} - -SFBool *ScreenTransformBase::editSFInvertWorldTransform(void) -{ - editSField(InvertWorldTransformFieldMask); - - return &_sfInvertWorldTransform; -} - -const SFBool *ScreenTransformBase::getSFInvertWorldTransform(void) const -{ - return &_sfInvertWorldTransform; -} - - -SFBool *ScreenTransformBase::editSFInvertViewTransform(void) -{ - editSField(InvertViewTransformFieldMask); - - return &_sfInvertViewTransform; -} - -const SFBool *ScreenTransformBase::getSFInvertViewTransform(void) const -{ - return &_sfInvertViewTransform; -} - - -SFBool *ScreenTransformBase::editSFApplyBeaconRotation(void) -{ - editSField(ApplyBeaconRotationFieldMask); - - return &_sfApplyBeaconRotation; -} - -const SFBool *ScreenTransformBase::getSFApplyBeaconRotation(void) const -{ - return &_sfApplyBeaconRotation; -} - - -SFBool *ScreenTransformBase::editSFApplyBeaconScreenTranslation(void) -{ - editSField(ApplyBeaconScreenTranslationFieldMask); - - return &_sfApplyBeaconScreenTranslation; -} - -const SFBool *ScreenTransformBase::getSFApplyBeaconScreenTranslation(void) const -{ - return &_sfApplyBeaconScreenTranslation; -} - - -SFMatrix *ScreenTransformBase::editSFView(void) -{ - editSField(ViewFieldMask); - - return &_sfView; -} - -const SFMatrix *ScreenTransformBase::getSFView(void) const -{ - return &_sfView; -} - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 ScreenTransformBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (BeaconFieldMask & whichField)) - { - returnValue += _sfBeacon.getBinSize(); - } - if(FieldBits::NoField != (InvertWorldTransformFieldMask & whichField)) - { - returnValue += _sfInvertWorldTransform.getBinSize(); - } - if(FieldBits::NoField != (InvertViewTransformFieldMask & whichField)) - { - returnValue += _sfInvertViewTransform.getBinSize(); - } - if(FieldBits::NoField != (ApplyBeaconRotationFieldMask & whichField)) - { - returnValue += _sfApplyBeaconRotation.getBinSize(); - } - if(FieldBits::NoField != (ApplyBeaconScreenTranslationFieldMask & whichField)) - { - returnValue += _sfApplyBeaconScreenTranslation.getBinSize(); - } - if(FieldBits::NoField != (ViewFieldMask & whichField)) - { - returnValue += _sfView.getBinSize(); - } - - return returnValue; -} - -void ScreenTransformBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (BeaconFieldMask & whichField)) - { - _sfBeacon.copyToBin(pMem); - } - if(FieldBits::NoField != (InvertWorldTransformFieldMask & whichField)) - { - _sfInvertWorldTransform.copyToBin(pMem); - } - if(FieldBits::NoField != (InvertViewTransformFieldMask & whichField)) - { - _sfInvertViewTransform.copyToBin(pMem); - } - if(FieldBits::NoField != (ApplyBeaconRotationFieldMask & whichField)) - { - _sfApplyBeaconRotation.copyToBin(pMem); - } - if(FieldBits::NoField != (ApplyBeaconScreenTranslationFieldMask & whichField)) - { - _sfApplyBeaconScreenTranslation.copyToBin(pMem); - } - if(FieldBits::NoField != (ViewFieldMask & whichField)) - { - _sfView.copyToBin(pMem); - } -} - -void ScreenTransformBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (BeaconFieldMask & whichField)) - { - _sfBeacon.copyFromBin(pMem); - } - if(FieldBits::NoField != (InvertWorldTransformFieldMask & whichField)) - { - _sfInvertWorldTransform.copyFromBin(pMem); - } - if(FieldBits::NoField != (InvertViewTransformFieldMask & whichField)) - { - _sfInvertViewTransform.copyFromBin(pMem); - } - if(FieldBits::NoField != (ApplyBeaconRotationFieldMask & whichField)) - { - _sfApplyBeaconRotation.copyFromBin(pMem); - } - if(FieldBits::NoField != (ApplyBeaconScreenTranslationFieldMask & whichField)) - { - _sfApplyBeaconScreenTranslation.copyFromBin(pMem); - } - if(FieldBits::NoField != (ViewFieldMask & whichField)) - { - _sfView.copyFromBin(pMem); - } -} - -//! create a new instance of the class -ScreenTransformTransitPtr ScreenTransformBase::createLocal(BitVector bFlags) -{ - ScreenTransformTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -ScreenTransformTransitPtr ScreenTransformBase::createDependent(BitVector bFlags) -{ - ScreenTransformTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -ScreenTransformTransitPtr ScreenTransformBase::create(void) -{ - ScreenTransformTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -ScreenTransform *ScreenTransformBase::createEmptyLocal(BitVector bFlags) -{ - ScreenTransform *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -ScreenTransform *ScreenTransformBase::createEmpty(void) -{ - ScreenTransform *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr ScreenTransformBase::shallowCopyLocal( - BitVector bFlags) const -{ - ScreenTransform *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr ScreenTransformBase::shallowCopyDependent( - BitVector bFlags) const -{ - ScreenTransform *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr ScreenTransformBase::shallowCopy(void) const -{ - ScreenTransform *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -ScreenTransformBase::ScreenTransformBase(void) : - Inherited(), - _sfBeacon (NULL), - _sfInvertWorldTransform (bool(true)), - _sfInvertViewTransform (bool(true)), - _sfApplyBeaconRotation (bool(true)), - _sfApplyBeaconScreenTranslation(bool(true)), - _sfView (Matrix(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f)) -{ -} - -ScreenTransformBase::ScreenTransformBase(const ScreenTransformBase &source) : - Inherited(source), - _sfBeacon (NULL), - _sfInvertWorldTransform (source._sfInvertWorldTransform ), - _sfInvertViewTransform (source._sfInvertViewTransform ), - _sfApplyBeaconRotation (source._sfApplyBeaconRotation ), - _sfApplyBeaconScreenTranslation(source._sfApplyBeaconScreenTranslation), - _sfView (source._sfView ) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -ScreenTransformBase::~ScreenTransformBase(void) -{ -} - -void ScreenTransformBase::onCreate(const ScreenTransform *source) -{ - Inherited::onCreate(source); - - if(source != NULL) - { - ScreenTransform *pThis = static_cast(this); - - pThis->setBeacon(source->getBeacon()); - } -} - -GetFieldHandlePtr ScreenTransformBase::getHandleBeacon (void) const -{ - SFWeakNodePtr::GetHandlePtr returnValue( - new SFWeakNodePtr::GetHandle( - &_sfBeacon, - this->getType().getFieldDesc(BeaconFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr ScreenTransformBase::editHandleBeacon (void) -{ - SFWeakNodePtr::EditHandlePtr returnValue( - new SFWeakNodePtr::EditHandle( - &_sfBeacon, - this->getType().getFieldDesc(BeaconFieldId), - this)); - - returnValue->setSetMethod( - boost::bind(&ScreenTransform::setBeacon, - static_cast(this), _1)); - - editSField(BeaconFieldMask); - - return returnValue; -} - -GetFieldHandlePtr ScreenTransformBase::getHandleInvertWorldTransform (void) const -{ - SFBool::GetHandlePtr returnValue( - new SFBool::GetHandle( - &_sfInvertWorldTransform, - this->getType().getFieldDesc(InvertWorldTransformFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr ScreenTransformBase::editHandleInvertWorldTransform(void) -{ - SFBool::EditHandlePtr returnValue( - new SFBool::EditHandle( - &_sfInvertWorldTransform, - this->getType().getFieldDesc(InvertWorldTransformFieldId), - this)); - - - editSField(InvertWorldTransformFieldMask); - - return returnValue; -} - -GetFieldHandlePtr ScreenTransformBase::getHandleInvertViewTransform (void) const -{ - SFBool::GetHandlePtr returnValue( - new SFBool::GetHandle( - &_sfInvertViewTransform, - this->getType().getFieldDesc(InvertViewTransformFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr ScreenTransformBase::editHandleInvertViewTransform(void) -{ - SFBool::EditHandlePtr returnValue( - new SFBool::EditHandle( - &_sfInvertViewTransform, - this->getType().getFieldDesc(InvertViewTransformFieldId), - this)); - - - editSField(InvertViewTransformFieldMask); - - return returnValue; -} - -GetFieldHandlePtr ScreenTransformBase::getHandleApplyBeaconRotation (void) const -{ - SFBool::GetHandlePtr returnValue( - new SFBool::GetHandle( - &_sfApplyBeaconRotation, - this->getType().getFieldDesc(ApplyBeaconRotationFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr ScreenTransformBase::editHandleApplyBeaconRotation(void) -{ - SFBool::EditHandlePtr returnValue( - new SFBool::EditHandle( - &_sfApplyBeaconRotation, - this->getType().getFieldDesc(ApplyBeaconRotationFieldId), - this)); - - - editSField(ApplyBeaconRotationFieldMask); - - return returnValue; -} - -GetFieldHandlePtr ScreenTransformBase::getHandleApplyBeaconScreenTranslation (void) const -{ - SFBool::GetHandlePtr returnValue( - new SFBool::GetHandle( - &_sfApplyBeaconScreenTranslation, - this->getType().getFieldDesc(ApplyBeaconScreenTranslationFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr ScreenTransformBase::editHandleApplyBeaconScreenTranslation(void) -{ - SFBool::EditHandlePtr returnValue( - new SFBool::EditHandle( - &_sfApplyBeaconScreenTranslation, - this->getType().getFieldDesc(ApplyBeaconScreenTranslationFieldId), - this)); - - - editSField(ApplyBeaconScreenTranslationFieldMask); - - return returnValue; -} - -GetFieldHandlePtr ScreenTransformBase::getHandleView (void) const -{ - SFMatrix::GetHandlePtr returnValue( - new SFMatrix::GetHandle( - &_sfView, - this->getType().getFieldDesc(ViewFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr ScreenTransformBase::editHandleView (void) -{ - SFMatrix::EditHandlePtr returnValue( - new SFMatrix::EditHandle( - &_sfView, - this->getType().getFieldDesc(ViewFieldId), - this)); - - - editSField(ViewFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void ScreenTransformBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - ScreenTransform *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *ScreenTransformBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - ScreenTransform *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void ScreenTransformBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - static_cast(this)->setBeacon(NULL); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/OSGScreenTransformBase.h b/Source/System/NodeCores/Groups/Misc/OSGScreenTransformBase.h deleted file mode 100644 index 71345f1d..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGScreenTransformBase.h +++ /dev/null @@ -1,374 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class ScreenTransform - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGSCREENTRANSFORMBASE_H_ -#define _OSGSCREENTRANSFORMBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGGroup.h" // Parent - -#include "OSGNodeFields.h" // Beacon type -#include "OSGSysFields.h" // InvertWorldTransform type -#include "OSGMathFields.h" // View type - -#include "OSGScreenTransformFields.h" - -OSG_BEGIN_NAMESPACE - -class ScreenTransform; - -//! \brief ScreenTransform Base Class. - -class OSG_GROUP_DLLMAPPING ScreenTransformBase : public Group -{ - public: - - typedef Group Inherited; - typedef Group ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(ScreenTransform); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - BeaconFieldId = Inherited::NextFieldId, - InvertWorldTransformFieldId = BeaconFieldId + 1, - InvertViewTransformFieldId = InvertWorldTransformFieldId + 1, - ApplyBeaconRotationFieldId = InvertViewTransformFieldId + 1, - ApplyBeaconScreenTranslationFieldId = ApplyBeaconRotationFieldId + 1, - ViewFieldId = ApplyBeaconScreenTranslationFieldId + 1, - NextFieldId = ViewFieldId + 1 - }; - - static const OSG::BitVector BeaconFieldMask = - (TypeTraits::One << BeaconFieldId); - static const OSG::BitVector InvertWorldTransformFieldMask = - (TypeTraits::One << InvertWorldTransformFieldId); - static const OSG::BitVector InvertViewTransformFieldMask = - (TypeTraits::One << InvertViewTransformFieldId); - static const OSG::BitVector ApplyBeaconRotationFieldMask = - (TypeTraits::One << ApplyBeaconRotationFieldId); - static const OSG::BitVector ApplyBeaconScreenTranslationFieldMask = - (TypeTraits::One << ApplyBeaconScreenTranslationFieldId); - static const OSG::BitVector ViewFieldMask = - (TypeTraits::One << ViewFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFWeakNodePtr SFBeaconType; - typedef SFBool SFInvertWorldTransformType; - typedef SFBool SFInvertViewTransformType; - typedef SFBool SFApplyBeaconRotationType; - typedef SFBool SFApplyBeaconScreenTranslationType; - typedef SFMatrix SFViewType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - const SFWeakNodePtr *getSFBeacon (void) const; - SFWeakNodePtr *editSFBeacon (void); - - SFBool *editSFInvertWorldTransform(void); - const SFBool *getSFInvertWorldTransform (void) const; - - SFBool *editSFInvertViewTransform(void); - const SFBool *getSFInvertViewTransform (void) const; - - SFBool *editSFApplyBeaconRotation(void); - const SFBool *getSFApplyBeaconRotation (void) const; - - SFBool *editSFApplyBeaconScreenTranslation(void); - const SFBool *getSFApplyBeaconScreenTranslation (void) const; - - SFMatrix *editSFView (void); - const SFMatrix *getSFView (void) const; - - - Node * getBeacon (void) const; - - bool &editInvertWorldTransform(void); - bool getInvertWorldTransform (void) const; - - bool &editInvertViewTransform(void); - bool getInvertViewTransform (void) const; - - bool &editApplyBeaconRotation(void); - bool getApplyBeaconRotation (void) const; - - bool &editApplyBeaconScreenTranslation(void); - bool getApplyBeaconScreenTranslation (void) const; - - Matrix &editView (void); - const Matrix &getView (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setBeacon (Node * const value); - void setInvertWorldTransform(const bool value); - void setInvertViewTransform(const bool value); - void setApplyBeaconRotation(const bool value); - void setApplyBeaconScreenTranslation(const bool value); - void setView (const Matrix &value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr Field Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static ScreenTransformTransitPtr create (void); - static ScreenTransform *createEmpty (void); - - static ScreenTransformTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static ScreenTransform *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static ScreenTransformTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFWeakNodePtr _sfBeacon; - SFBool _sfInvertWorldTransform; - SFBool _sfInvertViewTransform; - SFBool _sfApplyBeaconRotation; - SFBool _sfApplyBeaconScreenTranslation; - SFMatrix _sfView; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - ScreenTransformBase(void); - ScreenTransformBase(const ScreenTransformBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~ScreenTransformBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - void onCreate(const ScreenTransform *source = NULL); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleBeacon (void) const; - EditFieldHandlePtr editHandleBeacon (void); - GetFieldHandlePtr getHandleInvertWorldTransform (void) const; - EditFieldHandlePtr editHandleInvertWorldTransform(void); - GetFieldHandlePtr getHandleInvertViewTransform (void) const; - EditFieldHandlePtr editHandleInvertViewTransform(void); - GetFieldHandlePtr getHandleApplyBeaconRotation (void) const; - EditFieldHandlePtr editHandleApplyBeaconRotation(void); - GetFieldHandlePtr getHandleApplyBeaconScreenTranslation (void) const; - EditFieldHandlePtr editHandleApplyBeaconScreenTranslation(void); - GetFieldHandlePtr getHandleView (void) const; - EditFieldHandlePtr editHandleView (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( ScreenTransformBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const ScreenTransformBase &source); -}; - -typedef ScreenTransformBase *ScreenTransformBaseP; - -typedef CoredNodeRefPtr ScreenTransformNodeRefPtr; -typedef CoredNodeMTRefPtr ScreenTransformNodeMTRefPtr; - -OSG_END_NAMESPACE - -#endif /* _OSGSCREENTRANSFORMBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/OSGScreenTransformBase.inl b/Source/System/NodeCores/Groups/Misc/OSGScreenTransformBase.inl deleted file mode 100644 index 0a20f124..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGScreenTransformBase.inl +++ /dev/null @@ -1,259 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class ScreenTransform! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &ScreenTransformBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 ScreenTransformBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 ScreenTransformBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - - -//! Get the value of the ScreenTransform::_sfBeacon field. -inline -Node * ScreenTransformBase::getBeacon(void) const -{ - return _sfBeacon.getValue(); -} - -//! Set the value of the ScreenTransform::_sfBeacon field. -inline -void ScreenTransformBase::setBeacon(Node * const value) -{ - editSField(BeaconFieldMask); - - _sfBeacon.setValue(value); -} -//! Get the value of the ScreenTransform::_sfInvertWorldTransform field. - -inline -bool &ScreenTransformBase::editInvertWorldTransform(void) -{ - editSField(InvertWorldTransformFieldMask); - - return _sfInvertWorldTransform.getValue(); -} - -//! Get the value of the ScreenTransform::_sfInvertWorldTransform field. -inline - bool ScreenTransformBase::getInvertWorldTransform(void) const -{ - return _sfInvertWorldTransform.getValue(); -} - -//! Set the value of the ScreenTransform::_sfInvertWorldTransform field. -inline -void ScreenTransformBase::setInvertWorldTransform(const bool value) -{ - editSField(InvertWorldTransformFieldMask); - - _sfInvertWorldTransform.setValue(value); -} -//! Get the value of the ScreenTransform::_sfInvertViewTransform field. - -inline -bool &ScreenTransformBase::editInvertViewTransform(void) -{ - editSField(InvertViewTransformFieldMask); - - return _sfInvertViewTransform.getValue(); -} - -//! Get the value of the ScreenTransform::_sfInvertViewTransform field. -inline - bool ScreenTransformBase::getInvertViewTransform(void) const -{ - return _sfInvertViewTransform.getValue(); -} - -//! Set the value of the ScreenTransform::_sfInvertViewTransform field. -inline -void ScreenTransformBase::setInvertViewTransform(const bool value) -{ - editSField(InvertViewTransformFieldMask); - - _sfInvertViewTransform.setValue(value); -} -//! Get the value of the ScreenTransform::_sfApplyBeaconRotation field. - -inline -bool &ScreenTransformBase::editApplyBeaconRotation(void) -{ - editSField(ApplyBeaconRotationFieldMask); - - return _sfApplyBeaconRotation.getValue(); -} - -//! Get the value of the ScreenTransform::_sfApplyBeaconRotation field. -inline - bool ScreenTransformBase::getApplyBeaconRotation(void) const -{ - return _sfApplyBeaconRotation.getValue(); -} - -//! Set the value of the ScreenTransform::_sfApplyBeaconRotation field. -inline -void ScreenTransformBase::setApplyBeaconRotation(const bool value) -{ - editSField(ApplyBeaconRotationFieldMask); - - _sfApplyBeaconRotation.setValue(value); -} -//! Get the value of the ScreenTransform::_sfApplyBeaconScreenTranslation field. - -inline -bool &ScreenTransformBase::editApplyBeaconScreenTranslation(void) -{ - editSField(ApplyBeaconScreenTranslationFieldMask); - - return _sfApplyBeaconScreenTranslation.getValue(); -} - -//! Get the value of the ScreenTransform::_sfApplyBeaconScreenTranslation field. -inline - bool ScreenTransformBase::getApplyBeaconScreenTranslation(void) const -{ - return _sfApplyBeaconScreenTranslation.getValue(); -} - -//! Set the value of the ScreenTransform::_sfApplyBeaconScreenTranslation field. -inline -void ScreenTransformBase::setApplyBeaconScreenTranslation(const bool value) -{ - editSField(ApplyBeaconScreenTranslationFieldMask); - - _sfApplyBeaconScreenTranslation.setValue(value); -} -//! Get the value of the ScreenTransform::_sfView field. - -inline -Matrix &ScreenTransformBase::editView(void) -{ - editSField(ViewFieldMask); - - return _sfView.getValue(); -} - -//! Get the value of the ScreenTransform::_sfView field. -inline -const Matrix &ScreenTransformBase::getView(void) const -{ - return _sfView.getValue(); -} - -//! Set the value of the ScreenTransform::_sfView field. -inline -void ScreenTransformBase::setView(const Matrix &value) -{ - editSField(ViewFieldMask); - - _sfView.setValue(value); -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void ScreenTransformBase::execSync ( ScreenTransformBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (BeaconFieldMask & whichField)) - _sfBeacon.syncWith(pFrom->_sfBeacon); - - if(FieldBits::NoField != (InvertWorldTransformFieldMask & whichField)) - _sfInvertWorldTransform.syncWith(pFrom->_sfInvertWorldTransform); - - if(FieldBits::NoField != (InvertViewTransformFieldMask & whichField)) - _sfInvertViewTransform.syncWith(pFrom->_sfInvertViewTransform); - - if(FieldBits::NoField != (ApplyBeaconRotationFieldMask & whichField)) - _sfApplyBeaconRotation.syncWith(pFrom->_sfApplyBeaconRotation); - - if(FieldBits::NoField != (ApplyBeaconScreenTranslationFieldMask & whichField)) - _sfApplyBeaconScreenTranslation.syncWith(pFrom->_sfApplyBeaconScreenTranslation); - - if(FieldBits::NoField != (ViewFieldMask & whichField)) - _sfView.syncWith(pFrom->_sfView); -} -#endif - - -inline -const Char8 *ScreenTransformBase::getClassname(void) -{ - return "ScreenTransform"; -} -OSG_GEN_CONTAINERPTR(ScreenTransform); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Misc/OSGScreenTransformFields.h b/Source/System/NodeCores/Groups/Misc/OSGScreenTransformFields.h deleted file mode 100644 index 81ed1de8..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGScreenTransformFields.h +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGSCREENTRANSFORMFIELDS_H_ -#define _OSGSCREENTRANSFORMFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class ScreenTransform; - -OSG_GEN_CONTAINERPTR(ScreenTransform); - -/*! \ingroup GrpGroupFieldTraits - \ingroup GrpLibOSGGroup - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFScreenTransformPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFScreenTransformPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecScreenTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecScreenTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakScreenTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdScreenTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecScreenTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecScreenTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakScreenTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdScreenTransformPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFRecScreenTransformPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUnrecScreenTransformPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFWeakScreenTransformPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUncountedScreenTransformPtr; - - -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFRecScreenTransformPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUnrecScreenTransformPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFWeakScreenTransformPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUncountedScreenTransformPtr; - - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFRecScreenTransformPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUnrecScreenTransformPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFWeakScreenTransformPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUncountedScreenTransformPtr : - public PointerSField {}; - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFRecScreenTransformPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecScreenTransformPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFWeakScreenTransformPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUncountedScreenTransformPtr : - public PointerMField {}; - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGSCREENTRANSFORMFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.cpp b/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.cpp deleted file mode 100644 index b15eaecd..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.cpp +++ /dev/null @@ -1,395 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include - -#include "OSGStackedTransform.h" -#include "OSGTransformationElement.h" - -#ifndef OSG_EMBEDDED -#include "OSGIntersectAction.h" -#endif - -#include "OSGRenderAction.h" -#include "OSGNameAttachment.h" - -#ifdef OSG_HAVE_ACTION //CHECK -#include "OSGIntersectActor.h" -#endif - -#include "OSGVolume.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGStackedTransformBase.cpp file. -// To modify it, please change the .fcd file (OSGStackedTransform.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ -std::string StackedTransform::TranslateName = std::string("translate"); -std::string StackedTransform::RotateXName = std::string("rotateX"); -std::string StackedTransform::RotateYName = std::string("rotateY"); -std::string StackedTransform::RotateZName = std::string("rotateZ"); -std::string StackedTransform::ScaleName = std::string("scale"); - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void StackedTransform::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - RenderAction::registerEnterDefault( - StackedTransform::getClassType(), - reinterpret_cast( - &StackedTransform::renderEnter)); - - RenderAction::registerLeaveDefault( - StackedTransform::getClassType(), - reinterpret_cast( - &StackedTransform::renderLeave)); - - -#ifndef OSG_EMBEDDED - IntersectAction::registerEnterDefault( - getClassType(), - reinterpret_cast( - &StackedTransform::intersectEnter)); - - IntersectAction::registerLeaveDefault( - getClassType(), - reinterpret_cast( - &StackedTransform::intersectLeave)); -#endif - -#ifdef OSG_HAVE_ACTION //CHECK - IntersectActor::regClassEnter( - osgTypedMethodFunctor2BaseCPtr< - NewActionTypes::ResultE, - StackedTransformPtr , - NodeCorePtr , - ActorBase::FunctorArgumentType &>( - &StackedTransform::intersectActorEnter), - getClassType()); - - IntersectActor::regClassLeave( - osgTypedMethodFunctor2BaseCPtr< - NewActionTypes::ResultE, - StackedTransformPtr , - NodeCorePtr , - ActorBase::FunctorArgumentType &>( - &StackedTransform::intersectActorLeave), - getClassType()); -#endif - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void StackedTransform::updateTransform(void) -{ - _Transformation.setIdentity(); - - for(UInt32 i(0) ; isize(); ++i) - { - getTransformElements(i)->accumulateMatrix(_Transformation); - } - - invalidateVolume(); -} - -void StackedTransform::accumulateMatrix(Matrix &result) -{ - result.mult(_Transformation); -} - -void StackedTransform::adjustVolume(Volume &volume) -{ - volume.transform(_Transformation); -} - -TransformationElement* StackedTransform::getElement(const std::string& Name) const -{ - const Char8* ElemName; - for(UInt32 i(0) ; isize(); ++i) - { - ElemName = getName(getTransformElements(i)); - if(ElemName != NULL && - Name.compare(ElemName) == 0) - { - return getTransformElements(i); - } - } - - return NULL; -} - -void StackedTransform::pushToNamedTransformElements(TransformationElement * const value, - const std::string& Name) -{ - setName(value, Name.c_str()); - Inherited::pushToTransformElements(value); -} - -void StackedTransform::insertIntoNamedTransformElements(UInt32 uiIndex, - TransformationElement * const value, - const std::string& Name) -{ - setName(value, Name.c_str()); - Inherited::insertIntoTransformElements(uiIndex, value); -} - -void StackedTransform::replaceInNamedTransformElements(UInt32 uiIndex, - TransformationElement * const value, - const std::string& Name) -{ - setName(value, Name.c_str()); - Inherited::replaceInTransformElements(uiIndex, value); -} - -void StackedTransform::replaceObjInNamedTransformElements (TransformationElement * const pOldElem, - TransformationElement * const pNewElem, - const std::string& Name) -{ - setName(pNewElem, Name.c_str()); - Inherited::replaceObjInTransformElements(pOldElem, pNewElem); -} - -void StackedTransform::removeFromNamedTransformElements (const std::string& Name) -{ - const Char8* ElemName; - for(UInt32 i(0) ; isize(); ++i) - { - ElemName = getName(getTransformElements(i)); - if(ElemName != NULL && - Name.compare(ElemName) == 0) - { - Inherited::removeFromTransformElements(i); - return; - } - } -} - -/*-------------------------------------------------------------------------*/ -/* Render */ - -ActionBase::ResultE StackedTransform::renderEnter(Action *action) -{ - RenderAction *pAction = - dynamic_cast(action); - - pAction->pushVisibility(); - - pAction->pushMatrix(this->_Transformation); - - return ActionBase::Continue; -} - -ActionBase::ResultE StackedTransform::renderLeave(Action *action) -{ - RenderAction *pAction = - dynamic_cast(action); - - pAction->popVisibility(); - - pAction->popMatrix(); - - return ActionBase::Continue; -} - -/*-------------------------------------------------------------------------*/ -/* Intersect */ - -#ifndef OSG_EMBEDDED -ActionBase::ResultE StackedTransform::intersectEnter(Action *action) -{ - // Use parent class for trivial reject - if(Inherited::intersect(action) == Action::Skip) - return Action::Skip; - - // Need to check children - IntersectAction *ia = dynamic_cast(action); - Matrix m = this->_Transformation; - - m.invert(); - - Pnt3f pos; - Vec3f dir; - - m.multFull(ia->getLine().getPosition (), pos); - m.mult (ia->getLine().getDirection(), dir); - - Real32 length = dir.length(); - - if(length < TypeTraits::getDefaultEps()) - SWARNING << "StackedTransform::intersectEnter: Near-zero scale!" << std::endl; - - ia->setLine(Line(pos, dir), ia->getMaxDist()); - ia->scale (length ); - - return ActionBase::Continue; -} - -ActionBase::ResultE StackedTransform::intersectLeave(Action *action) -{ - IntersectAction *ia = dynamic_cast(action); - Matrix m = this->_Transformation; - - Pnt3f pos; - Vec3f dir; - - m.multFull(ia->getLine().getPosition (), pos); - m.mult (ia->getLine().getDirection(), dir); - - ia->setLine(Line(pos, dir), ia->getMaxDist()); - ia->scale(dir.length()); - - return ActionBase::Continue; -} -#endif - -#ifdef OSG_HAVE_ACTION //CHECK -NewActionTypes::ResultE StackedTransform::intersectActorEnter( - ActorBase::FunctorArgumentType &funcArg) -{ - IntersectActor *pIA = dynamic_cast( - funcArg.getActor()); - Matrix matrix = this->_Transformation; - Line transLine; - Pnt3f pos; - Vec3f dir; - - matrix.invert(); - - matrix.multFull(pIA->getRay().getPosition (), pos); - matrix.mult (pIA->getRay().getDirection(), dir); - - transLine.setValue(pos, dir); - - pIA->beginEditState(); - { - pIA->setRay (transLine ); - pIA->setScaleFactor(pIA->getScaleFactor() / dir.length()); - } - pIA->endEditState (); - - pIA->setupChildrenPriorities(); - - return NewActionTypes::Continue; -} - -NewActionTypes::ResultE StackedTransform::intersectActorLeave( - ActorBase::FunctorArgumentType &funcArg) -{ - IntersectActor *pIA = dynamic_cast( - funcArg.getActor()); - const Matrix &matrix = this->_Transformation; - Pnt3f pos; - Vec3f dir; - - matrix.multFull(pIA->getRay().getPosition (), pos); - matrix.mult (pIA->getRay().getDirection(), dir); - - pIA->beginEditState(); - { - pIA->setRay (Line(pos, dir) ); - pIA->setScaleFactor(pIA->getScaleFactor() / dir.length()); - } - pIA->endEditState (); - - return NewActionTypes::Continue; -} -#endif - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -StackedTransform::StackedTransform(void) : - Inherited() -{ -} - -StackedTransform::StackedTransform(const StackedTransform &source) : - Inherited(source) -{ -} - -StackedTransform::~StackedTransform(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void StackedTransform::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - - if((whichField & TransformElementsFieldMask)) - { - updateTransform(); - } -} - -void StackedTransform::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump StackedTransform NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.fcd b/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.fcd deleted file mode 100644 index d1443376..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.fcd +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.h b/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.h deleted file mode 100644 index 7820f7e9..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.h +++ /dev/null @@ -1,197 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGSTACKEDTRANSFORM_H_ -#define _OSGSTACKEDTRANSFORM_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGStackedTransformBase.h" - -#ifdef OSG_HAVE_ACTION //CHECK -#include "OSGActorBase.h" -#endif - -OSG_BEGIN_NAMESPACE - -/*! \brief StackedTransform class. See \ref - PageGroupStackedTransform for a description. -*/ - -class OSG_GROUP_DLLMAPPING StackedTransform : public StackedTransformBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef StackedTransformBase Inherited; - typedef StackedTransform Self; - - static std::string TranslateName; - static std::string RotateXName; - static std::string RotateYName; - static std::string RotateZName; - static std::string ScaleName; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Transformation */ - /*! \{ */ - - virtual void accumulateMatrix(Matrix &result); - - TransformationElement* getElement(const std::string& Name) const; - - template - TYPE* getElement(const std::string& Name) const; - - void pushToNamedTransformElements (TransformationElement * const value, - const std::string& Name); - - void insertIntoNamedTransformElements (UInt32 uiIndex, - TransformationElement * const value, - const std::string& Name); - - void replaceInNamedTransformElements (UInt32 uiIndex, - TransformationElement * const value, - const std::string& Name); - - void replaceObjInNamedTransformElements (TransformationElement * const pOldElem, - TransformationElement * const pNewElem, - const std::string& Name); - - void removeFromNamedTransformElements (const std::string& Name); - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in StackedTransformBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - StackedTransform(void); - StackedTransform(const StackedTransform &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~StackedTransform(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Volume */ - /*! \{ */ - - virtual void adjustVolume (Volume &volume); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Intersect & Render */ - /*! \{ */ - -#ifndef OSG_EMBEDDED - ActionBase::ResultE intersectEnter(Action *action); - ActionBase::ResultE intersectLeave(Action *action); -#endif - - ActionBase::ResultE renderEnter (Action *action); - ActionBase::ResultE renderLeave (Action *action); - -#ifdef OSG_HAVE_ACTION //CHECK - NewActionTypes::ResultE - intersectActorEnter(ActorBase::FunctorArgumentType &funcArg); - - NewActionTypes::ResultE - intersectActorLeave(ActorBase::FunctorArgumentType &funcArg); -#endif - - void updateTransform(void); - void invalidateTransform(void); - /*========================== PRIVATE ================================*/ - - private: - Matrix _Transformation; - - friend class FieldContainer; - friend class StackedTransformBase; - friend class TransformationElement; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const StackedTransform &source); -}; - -typedef StackedTransform *StackedTransformP; - -OSG_END_NAMESPACE - -#include "OSGStackedTransformBase.inl" -#include "OSGStackedTransform.inl" - -#endif /* _OSGSTACKEDTRANSFORM_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.inl b/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.inl deleted file mode 100644 index 50574aa3..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGStackedTransform.inl +++ /dev/null @@ -1,56 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -inline -void StackedTransform::invalidateTransform(void) -{ - editMField(TransformElementsFieldMask, _mfTransformElements); -} - -template -inline -TYPE* StackedTransform::getElement(const std::string& Name) const -{ - return dynamic_cast(getElement(Name)); -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/OSGStackedTransformBase.cpp b/Source/System/NodeCores/Groups/Misc/OSGStackedTransformBase.cpp deleted file mode 100644 index 2a7c8a2d..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGStackedTransformBase.cpp +++ /dev/null @@ -1,630 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class StackedTransform! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - -#include "OSGTransformationElement.h" // TransformElements Class - -#include "OSGStackedTransformBase.h" -#include "OSGStackedTransform.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::StackedTransform - - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var TransformationElement * StackedTransformBase::_mfTransformElements - -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("StackedTransformPtr", "GroupPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(StackedTransform *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - StackedTransform *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - StackedTransform *, - 0); - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void StackedTransformBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new MFUnrecChildTransformationElementPtr::Description( - MFUnrecChildTransformationElementPtr::getClassType(), - "TransformElements", - "", - TransformElementsFieldId, TransformElementsFieldMask, - false, - (Field::MFDefaultFlags | Field::FNullCheckAccess), - static_cast(&StackedTransform::editHandleTransformElements), - static_cast(&StackedTransform::getHandleTransformElements)); - - oType.addInitialDesc(pDesc); -} - - -StackedTransformBase::TypeObject StackedTransformBase::_type( - StackedTransformBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&StackedTransformBase::createEmptyLocal), - StackedTransform::initMethod, - StackedTransform::exitMethod, - reinterpret_cast(&StackedTransform::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - "\t\n" - "\t\n" - "\n", - "" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &StackedTransformBase::getType(void) -{ - return _type; -} - -const FieldContainerType &StackedTransformBase::getType(void) const -{ - return _type; -} - -UInt32 StackedTransformBase::getContainerSize(void) const -{ - return sizeof(StackedTransform); -} - -/*------------------------- decorator get ------------------------------*/ - - -//! Get the StackedTransform::_mfTransformElements field. -const MFUnrecChildTransformationElementPtr *StackedTransformBase::getMFTransformElements(void) const -{ - return &_mfTransformElements; -} - - - -void StackedTransformBase::pushToTransformElements(TransformationElement * const value) -{ - if(value == NULL) - return; - - editMField(TransformElementsFieldMask, _mfTransformElements); - - _mfTransformElements.push_back(value); -} - -void StackedTransformBase::assignTransformElements(const MFUnrecChildTransformationElementPtr &value) -{ - MFUnrecChildTransformationElementPtr::const_iterator elemIt = - value.begin(); - MFUnrecChildTransformationElementPtr::const_iterator elemEnd = - value.end (); - - static_cast(this)->clearTransformElements(); - - while(elemIt != elemEnd) - { - this->pushToTransformElements(*elemIt); - - ++elemIt; - } -} - -void StackedTransformBase::insertIntoTransformElements(UInt32 uiIndex, - TransformationElement * const value ) -{ - if(value == NULL) - return; - - editMField(TransformElementsFieldMask, _mfTransformElements); - - MFUnrecChildTransformationElementPtr::iterator fieldIt = _mfTransformElements.begin_nc(); - - fieldIt += uiIndex; - - _mfTransformElements.insert(fieldIt, value); -} - -void StackedTransformBase::replaceInTransformElements(UInt32 uiIndex, - TransformationElement * const value ) -{ - if(value == NULL) - return; - - if(uiIndex >= _mfTransformElements.size()) - return; - - editMField(TransformElementsFieldMask, _mfTransformElements); - - _mfTransformElements.replace(uiIndex, value); -} - -void StackedTransformBase::replaceObjInTransformElements(TransformationElement * const pOldElem, - TransformationElement * const pNewElem) -{ - if(pNewElem == NULL) - return; - - Int32 elemIdx = _mfTransformElements.findIndex(pOldElem); - - if(elemIdx != -1) - { - editMField(TransformElementsFieldMask, _mfTransformElements); - - _mfTransformElements.replace(elemIdx, pNewElem); - } -} - -void StackedTransformBase::removeFromTransformElements(UInt32 uiIndex) -{ - if(uiIndex < _mfTransformElements.size()) - { - editMField(TransformElementsFieldMask, _mfTransformElements); - - _mfTransformElements.erase(uiIndex); - } -} - -void StackedTransformBase::removeObjFromTransformElements(TransformationElement * const value) -{ - Int32 iElemIdx = _mfTransformElements.findIndex(value); - - if(iElemIdx != -1) - { - editMField(TransformElementsFieldMask, _mfTransformElements); - - _mfTransformElements.erase(iElemIdx); - } -} -void StackedTransformBase::clearTransformElements(void) -{ - editMField(TransformElementsFieldMask, _mfTransformElements); - - - _mfTransformElements.clear(); -} - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 StackedTransformBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (TransformElementsFieldMask & whichField)) - { - returnValue += _mfTransformElements.getBinSize(); - } - - return returnValue; -} - -void StackedTransformBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (TransformElementsFieldMask & whichField)) - { - _mfTransformElements.copyToBin(pMem); - } -} - -void StackedTransformBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (TransformElementsFieldMask & whichField)) - { - _mfTransformElements.copyFromBin(pMem); - } -} - -//! create a new instance of the class -StackedTransformTransitPtr StackedTransformBase::createLocal(BitVector bFlags) -{ - StackedTransformTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -StackedTransformTransitPtr StackedTransformBase::createDependent(BitVector bFlags) -{ - StackedTransformTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -StackedTransformTransitPtr StackedTransformBase::create(void) -{ - StackedTransformTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -StackedTransform *StackedTransformBase::createEmptyLocal(BitVector bFlags) -{ - StackedTransform *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -StackedTransform *StackedTransformBase::createEmpty(void) -{ - StackedTransform *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr StackedTransformBase::shallowCopyLocal( - BitVector bFlags) const -{ - StackedTransform *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr StackedTransformBase::shallowCopyDependent( - BitVector bFlags) const -{ - StackedTransform *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr StackedTransformBase::shallowCopy(void) const -{ - StackedTransform *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -StackedTransformBase::StackedTransformBase(void) : - Inherited(), - _mfTransformElements (this, - TransformElementsFieldId, - TransformationElement::ParentStackFieldId) -{ -} - -StackedTransformBase::StackedTransformBase(const StackedTransformBase &source) : - Inherited(source), - _mfTransformElements (this, - TransformElementsFieldId, - TransformationElement::ParentStackFieldId) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -StackedTransformBase::~StackedTransformBase(void) -{ -} - -/*-------------------------------------------------------------------------*/ -/* Child linking */ - -bool StackedTransformBase::unlinkChild( - FieldContainer * const pChild, - UInt16 const childFieldId) -{ - if(childFieldId == TransformElementsFieldId) - { - TransformationElement * pTypedChild = - dynamic_cast(pChild); - - if(pTypedChild != NULL) - { - Int32 iChildIdx = _mfTransformElements.findIndex(pTypedChild); - - if(iChildIdx != -1) - { - editMField(TransformElementsFieldMask, _mfTransformElements); - - _mfTransformElements.erase(iChildIdx); - - return true; - } - - FWARNING(("StackedTransformBase::unlinkParent: Child <-> " - "Parent link inconsistent.\n")); - - return false; - } - - return false; - } - - - return Inherited::unlinkChild(pChild, childFieldId); -} - -void StackedTransformBase::onCreate(const StackedTransform *source) -{ - Inherited::onCreate(source); - - if(source != NULL) - { - StackedTransform *pThis = static_cast(this); - - MFUnrecChildTransformationElementPtr::const_iterator TransformElementsIt = - source->_mfTransformElements.begin(); - MFUnrecChildTransformationElementPtr::const_iterator TransformElementsEnd = - source->_mfTransformElements.end (); - - while(TransformElementsIt != TransformElementsEnd) - { - pThis->pushToTransformElements(*TransformElementsIt); - - ++TransformElementsIt; - } - } -} - -GetFieldHandlePtr StackedTransformBase::getHandleTransformElements (void) const -{ - MFUnrecChildTransformationElementPtr::GetHandlePtr returnValue( - new MFUnrecChildTransformationElementPtr::GetHandle( - &_mfTransformElements, - this->getType().getFieldDesc(TransformElementsFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr StackedTransformBase::editHandleTransformElements(void) -{ - MFUnrecChildTransformationElementPtr::EditHandlePtr returnValue( - new MFUnrecChildTransformationElementPtr::EditHandle( - &_mfTransformElements, - this->getType().getFieldDesc(TransformElementsFieldId), - this)); - - returnValue->setAddMethod( - boost::bind(&StackedTransform::pushToTransformElements, - static_cast(this), _1)); - returnValue->setInsertMethod( - boost::bind(&StackedTransform::insertIntoTransformElements, - static_cast(this), _1, _2)); - returnValue->setReplaceMethod( - boost::bind(&StackedTransform::replaceInTransformElements, - static_cast(this), _1, _2)); - returnValue->setReplaceObjMethod( - boost::bind(&StackedTransform::replaceObjInTransformElements, - static_cast(this), _1, _2)); - returnValue->setRemoveMethod( - boost::bind(&StackedTransform::removeFromTransformElements, - static_cast(this), _1)); - returnValue->setRemoveObjMethod( - boost::bind(&StackedTransform::removeObjFromTransformElements, - static_cast(this), _1)); - returnValue->setClearMethod( - boost::bind(&StackedTransform::clearTransformElements, - static_cast(this))); - - editMField(TransformElementsFieldMask, _mfTransformElements); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void StackedTransformBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - StackedTransform *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *StackedTransformBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - StackedTransform *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void StackedTransformBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - static_cast(this)->clearTransformElements(); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/OSGStackedTransformBase.h b/Source/System/NodeCores/Groups/Misc/OSGStackedTransformBase.h deleted file mode 100644 index 6f40e4e8..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGStackedTransformBase.h +++ /dev/null @@ -1,320 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class StackedTransform - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGSTACKEDTRANSFORMBASE_H_ -#define _OSGSTACKEDTRANSFORMBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGGroup.h" // Parent - -#include "OSGTransformationElementFields.h" // TransformElements type - -#include "OSGStackedTransformFields.h" - -OSG_BEGIN_NAMESPACE - -class StackedTransform; - -//! \brief StackedTransform Base Class. - -class OSG_GROUP_DLLMAPPING StackedTransformBase : public Group -{ - public: - - typedef Group Inherited; - typedef Group ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(StackedTransform); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - TransformElementsFieldId = Inherited::NextFieldId, - NextFieldId = TransformElementsFieldId + 1 - }; - - static const OSG::BitVector TransformElementsFieldMask = - (TypeTraits::One << TransformElementsFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef MFUnrecChildTransformationElementPtr MFTransformElementsType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - const MFUnrecChildTransformationElementPtr *getMFTransformElements(void) const; - - - TransformationElement * getTransformElements(const UInt32 index) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr Field Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - void pushToTransformElements (TransformationElement * const value ); - void assignTransformElements (const MFUnrecChildTransformationElementPtr &value); - void clearTransformElements (void ); - void insertIntoTransformElements (UInt32 uiIndex, - TransformationElement * const value ); - void replaceInTransformElements ( UInt32 uiIndex, - TransformationElement * const value ); - void replaceObjInTransformElements (TransformationElement * const pOldElem, - TransformationElement * const pNewElem); - void removeFromTransformElements (UInt32 uiIndex ); - void removeObjFromTransformElements(TransformationElement * const value ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static StackedTransformTransitPtr create (void); - static StackedTransform *createEmpty (void); - - static StackedTransformTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static StackedTransform *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static StackedTransformTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - MFUnrecChildTransformationElementPtr _mfTransformElements; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - StackedTransformBase(void); - StackedTransformBase(const StackedTransformBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~StackedTransformBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - void onCreate(const StackedTransform *source = NULL); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Child linking */ - /*! \{ */ - - virtual bool unlinkChild(FieldContainer * const pChild, - UInt16 const childFieldId); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleTransformElements (void) const; - EditFieldHandlePtr editHandleTransformElements(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( StackedTransformBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const StackedTransformBase &source); -}; - -typedef StackedTransformBase *StackedTransformBaseP; - -typedef CoredNodeRefPtr StackedTransformNodeRefPtr; -typedef CoredNodeMTRefPtr StackedTransformNodeMTRefPtr; - -OSG_END_NAMESPACE - -#endif /* _OSGSTACKEDTRANSFORMBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/OSGStackedTransformBase.inl b/Source/System/NodeCores/Groups/Misc/OSGStackedTransformBase.inl deleted file mode 100644 index 8a7ca989..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGStackedTransformBase.inl +++ /dev/null @@ -1,113 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class StackedTransform! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &StackedTransformBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 StackedTransformBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 StackedTransformBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - - -//! Get the value of the \a index element the StackedTransform::_mfTransformElements field. -inline -TransformationElement * StackedTransformBase::getTransformElements(const UInt32 index) const -{ - return _mfTransformElements[index]; -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void StackedTransformBase::execSync ( StackedTransformBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (TransformElementsFieldMask & whichField)) - _mfTransformElements.syncWith(pFrom->_mfTransformElements, - syncMode, - uiSyncInfo, - oOffsets); -} -#endif - - -inline -const Char8 *StackedTransformBase::getClassname(void) -{ - return "StackedTransform"; -} -OSG_GEN_CONTAINERPTR(StackedTransform); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Misc/OSGStackedTransformFields.h b/Source/System/NodeCores/Groups/Misc/OSGStackedTransformFields.h deleted file mode 100644 index 9e1a07d4..00000000 --- a/Source/System/NodeCores/Groups/Misc/OSGStackedTransformFields.h +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGSTACKEDTRANSFORMFIELDS_H_ -#define _OSGSTACKEDTRANSFORMFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class StackedTransform; - -OSG_GEN_CONTAINERPTR(StackedTransform); - -/*! \ingroup GrpGroupFieldTraits - \ingroup GrpLibOSGGroup - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFStackedTransformPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFStackedTransformPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecStackedTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecStackedTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakStackedTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdStackedTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecStackedTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecStackedTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakStackedTransformPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdStackedTransformPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFRecStackedTransformPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUnrecStackedTransformPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFWeakStackedTransformPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUncountedStackedTransformPtr; - - -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFRecStackedTransformPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUnrecStackedTransformPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFWeakStackedTransformPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUncountedStackedTransformPtr; - - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFRecStackedTransformPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUnrecStackedTransformPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFWeakStackedTransformPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUncountedStackedTransformPtr : - public PointerSField {}; - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFRecStackedTransformPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecStackedTransformPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFWeakStackedTransformPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUncountedStackedTransformPtr : - public PointerMField {}; - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGSTACKEDTRANSFORMFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.cpp deleted file mode 100644 index 92bb6466..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include - -#include "OSGLookAtTransformationElement.h" -#include "OSGMatrixUtility.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGLookAtTransformationElementBase.cpp file. -// To modify it, please change the .fcd file (OSGLookAtTransformationElement.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void LookAtTransformationElement::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void LookAtTransformationElement::calcMatrix(Matrix &result) const -{ - MatrixLookAt(result, getEyePosition(), getLookAtPosition(), getUpDirection()); -} - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -LookAtTransformationElement::LookAtTransformationElement(void) : - Inherited() -{ -} - -LookAtTransformationElement::LookAtTransformationElement(const LookAtTransformationElement &source) : - Inherited(source) -{ -} - -LookAtTransformationElement::~LookAtTransformationElement(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void LookAtTransformationElement::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - - if(whichField & (EyePositionFieldMask | - LookAtPositionFieldMask | - UpDirectionFieldMask)) - { - updateParentTransform(); - } -} - -void LookAtTransformationElement::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump LookAtTransformationElement NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.fcd b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.fcd deleted file mode 100644 index 9c84374d..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.fcd +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.h deleted file mode 100644 index 1a827327..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.h +++ /dev/null @@ -1,129 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGLOOKATTRANSFORMATIONELEMENT_H_ -#define _OSGLOOKATTRANSFORMATIONELEMENT_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGLookAtTransformationElementBase.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief LookAtTransformationElement class. See \ref - PageGroupLookAtTransformationElement for a description. -*/ - -class OSG_GROUP_DLLMAPPING LookAtTransformationElement : public LookAtTransformationElementBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef LookAtTransformationElementBase Inherited; - typedef LookAtTransformationElement Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - - virtual void calcMatrix(Matrix &result) const; - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in LookAtTransformationElementBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - LookAtTransformationElement(void); - LookAtTransformationElement(const LookAtTransformationElement &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~LookAtTransformationElement(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class LookAtTransformationElementBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const LookAtTransformationElement &source); -}; - -typedef LookAtTransformationElement *LookAtTransformationElementP; - -OSG_END_NAMESPACE - -#include "OSGLookAtTransformationElementBase.inl" -#include "OSGLookAtTransformationElement.inl" - -#endif /* _OSGLOOKATTRANSFORMATIONELEMENT_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.inl deleted file mode 100644 index 5ecdb6f4..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElement.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementBase.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementBase.cpp deleted file mode 100644 index f1369dc3..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementBase.cpp +++ /dev/null @@ -1,606 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class LookAtTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - - -#include "OSGLookAtTransformationElementBase.h" -#include "OSGLookAtTransformationElement.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::LookAtTransformationElement - - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var Pnt3f LookAtTransformationElementBase::_sfEyePosition - -*/ - -/*! \var Pnt3f LookAtTransformationElementBase::_sfLookAtPosition - -*/ - -/*! \var Vec3f LookAtTransformationElementBase::_sfUpDirection - -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("LookAtTransformationElementPtr", "TransformationElementPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(LookAtTransformationElement *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - LookAtTransformationElement *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - LookAtTransformationElement *, - 0); - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void LookAtTransformationElementBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFPnt3f::Description( - SFPnt3f::getClassType(), - "EyePosition", - "", - EyePositionFieldId, EyePositionFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&LookAtTransformationElement::editHandleEyePosition), - static_cast(&LookAtTransformationElement::getHandleEyePosition)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFPnt3f::Description( - SFPnt3f::getClassType(), - "LookAtPosition", - "", - LookAtPositionFieldId, LookAtPositionFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&LookAtTransformationElement::editHandleLookAtPosition), - static_cast(&LookAtTransformationElement::getHandleLookAtPosition)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFVec3f::Description( - SFVec3f::getClassType(), - "UpDirection", - "", - UpDirectionFieldId, UpDirectionFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&LookAtTransformationElement::editHandleUpDirection), - static_cast(&LookAtTransformationElement::getHandleUpDirection)); - - oType.addInitialDesc(pDesc); -} - - -LookAtTransformationElementBase::TypeObject LookAtTransformationElementBase::_type( - LookAtTransformationElementBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&LookAtTransformationElementBase::createEmptyLocal), - LookAtTransformationElement::initMethod, - LookAtTransformationElement::exitMethod, - reinterpret_cast(&LookAtTransformationElement::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\n", - "" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &LookAtTransformationElementBase::getType(void) -{ - return _type; -} - -const FieldContainerType &LookAtTransformationElementBase::getType(void) const -{ - return _type; -} - -UInt32 LookAtTransformationElementBase::getContainerSize(void) const -{ - return sizeof(LookAtTransformationElement); -} - -/*------------------------- decorator get ------------------------------*/ - - -SFPnt3f *LookAtTransformationElementBase::editSFEyePosition(void) -{ - editSField(EyePositionFieldMask); - - return &_sfEyePosition; -} - -const SFPnt3f *LookAtTransformationElementBase::getSFEyePosition(void) const -{ - return &_sfEyePosition; -} - - -SFPnt3f *LookAtTransformationElementBase::editSFLookAtPosition(void) -{ - editSField(LookAtPositionFieldMask); - - return &_sfLookAtPosition; -} - -const SFPnt3f *LookAtTransformationElementBase::getSFLookAtPosition(void) const -{ - return &_sfLookAtPosition; -} - - -SFVec3f *LookAtTransformationElementBase::editSFUpDirection(void) -{ - editSField(UpDirectionFieldMask); - - return &_sfUpDirection; -} - -const SFVec3f *LookAtTransformationElementBase::getSFUpDirection(void) const -{ - return &_sfUpDirection; -} - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 LookAtTransformationElementBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (EyePositionFieldMask & whichField)) - { - returnValue += _sfEyePosition.getBinSize(); - } - if(FieldBits::NoField != (LookAtPositionFieldMask & whichField)) - { - returnValue += _sfLookAtPosition.getBinSize(); - } - if(FieldBits::NoField != (UpDirectionFieldMask & whichField)) - { - returnValue += _sfUpDirection.getBinSize(); - } - - return returnValue; -} - -void LookAtTransformationElementBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (EyePositionFieldMask & whichField)) - { - _sfEyePosition.copyToBin(pMem); - } - if(FieldBits::NoField != (LookAtPositionFieldMask & whichField)) - { - _sfLookAtPosition.copyToBin(pMem); - } - if(FieldBits::NoField != (UpDirectionFieldMask & whichField)) - { - _sfUpDirection.copyToBin(pMem); - } -} - -void LookAtTransformationElementBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (EyePositionFieldMask & whichField)) - { - _sfEyePosition.copyFromBin(pMem); - } - if(FieldBits::NoField != (LookAtPositionFieldMask & whichField)) - { - _sfLookAtPosition.copyFromBin(pMem); - } - if(FieldBits::NoField != (UpDirectionFieldMask & whichField)) - { - _sfUpDirection.copyFromBin(pMem); - } -} - -//! create a new instance of the class -LookAtTransformationElementTransitPtr LookAtTransformationElementBase::createLocal(BitVector bFlags) -{ - LookAtTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -LookAtTransformationElementTransitPtr LookAtTransformationElementBase::createDependent(BitVector bFlags) -{ - LookAtTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -LookAtTransformationElementTransitPtr LookAtTransformationElementBase::create(void) -{ - LookAtTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -LookAtTransformationElement *LookAtTransformationElementBase::createEmptyLocal(BitVector bFlags) -{ - LookAtTransformationElement *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -LookAtTransformationElement *LookAtTransformationElementBase::createEmpty(void) -{ - LookAtTransformationElement *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr LookAtTransformationElementBase::shallowCopyLocal( - BitVector bFlags) const -{ - LookAtTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr LookAtTransformationElementBase::shallowCopyDependent( - BitVector bFlags) const -{ - LookAtTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr LookAtTransformationElementBase::shallowCopy(void) const -{ - LookAtTransformationElement *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -LookAtTransformationElementBase::LookAtTransformationElementBase(void) : - Inherited(), - _sfEyePosition (Pnt3f(0.0f,0.0f,0.0f)), - _sfLookAtPosition (Pnt3f(0.0f,0.0f,-1.0f)), - _sfUpDirection (Vec3f(0.0f,1.0f,0.0f)) -{ -} - -LookAtTransformationElementBase::LookAtTransformationElementBase(const LookAtTransformationElementBase &source) : - Inherited(source), - _sfEyePosition (source._sfEyePosition ), - _sfLookAtPosition (source._sfLookAtPosition ), - _sfUpDirection (source._sfUpDirection ) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -LookAtTransformationElementBase::~LookAtTransformationElementBase(void) -{ -} - - -GetFieldHandlePtr LookAtTransformationElementBase::getHandleEyePosition (void) const -{ - SFPnt3f::GetHandlePtr returnValue( - new SFPnt3f::GetHandle( - &_sfEyePosition, - this->getType().getFieldDesc(EyePositionFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr LookAtTransformationElementBase::editHandleEyePosition (void) -{ - SFPnt3f::EditHandlePtr returnValue( - new SFPnt3f::EditHandle( - &_sfEyePosition, - this->getType().getFieldDesc(EyePositionFieldId), - this)); - - - editSField(EyePositionFieldMask); - - return returnValue; -} - -GetFieldHandlePtr LookAtTransformationElementBase::getHandleLookAtPosition (void) const -{ - SFPnt3f::GetHandlePtr returnValue( - new SFPnt3f::GetHandle( - &_sfLookAtPosition, - this->getType().getFieldDesc(LookAtPositionFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr LookAtTransformationElementBase::editHandleLookAtPosition (void) -{ - SFPnt3f::EditHandlePtr returnValue( - new SFPnt3f::EditHandle( - &_sfLookAtPosition, - this->getType().getFieldDesc(LookAtPositionFieldId), - this)); - - - editSField(LookAtPositionFieldMask); - - return returnValue; -} - -GetFieldHandlePtr LookAtTransformationElementBase::getHandleUpDirection (void) const -{ - SFVec3f::GetHandlePtr returnValue( - new SFVec3f::GetHandle( - &_sfUpDirection, - this->getType().getFieldDesc(UpDirectionFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr LookAtTransformationElementBase::editHandleUpDirection (void) -{ - SFVec3f::EditHandlePtr returnValue( - new SFVec3f::EditHandle( - &_sfUpDirection, - this->getType().getFieldDesc(UpDirectionFieldId), - this)); - - - editSField(UpDirectionFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void LookAtTransformationElementBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - LookAtTransformationElement *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *LookAtTransformationElementBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - LookAtTransformationElement *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void LookAtTransformationElementBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementBase.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementBase.h deleted file mode 100644 index 10b2a29b..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementBase.h +++ /dev/null @@ -1,323 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class LookAtTransformationElement - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGLOOKATTRANSFORMATIONELEMENTBASE_H_ -#define _OSGLOOKATTRANSFORMATIONELEMENTBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGTransformationElement.h" // Parent - -#include "OSGVecFields.h" // EyePosition type - -#include "OSGLookAtTransformationElementFields.h" - -OSG_BEGIN_NAMESPACE - -class LookAtTransformationElement; - -//! \brief LookAtTransformationElement Base Class. - -class OSG_GROUP_DLLMAPPING LookAtTransformationElementBase : public TransformationElement -{ - public: - - typedef TransformationElement Inherited; - typedef TransformationElement ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(LookAtTransformationElement); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - EyePositionFieldId = Inherited::NextFieldId, - LookAtPositionFieldId = EyePositionFieldId + 1, - UpDirectionFieldId = LookAtPositionFieldId + 1, - NextFieldId = UpDirectionFieldId + 1 - }; - - static const OSG::BitVector EyePositionFieldMask = - (TypeTraits::One << EyePositionFieldId); - static const OSG::BitVector LookAtPositionFieldMask = - (TypeTraits::One << LookAtPositionFieldId); - static const OSG::BitVector UpDirectionFieldMask = - (TypeTraits::One << UpDirectionFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFPnt3f SFEyePositionType; - typedef SFPnt3f SFLookAtPositionType; - typedef SFVec3f SFUpDirectionType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - - SFPnt3f *editSFEyePosition (void); - const SFPnt3f *getSFEyePosition (void) const; - - SFPnt3f *editSFLookAtPosition (void); - const SFPnt3f *getSFLookAtPosition (void) const; - - SFVec3f *editSFUpDirection (void); - const SFVec3f *getSFUpDirection (void) const; - - - Pnt3f &editEyePosition (void); - const Pnt3f &getEyePosition (void) const; - - Pnt3f &editLookAtPosition (void); - const Pnt3f &getLookAtPosition (void) const; - - Vec3f &editUpDirection (void); - const Vec3f &getUpDirection (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setEyePosition (const Pnt3f &value); - void setLookAtPosition (const Pnt3f &value); - void setUpDirection (const Vec3f &value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static LookAtTransformationElementTransitPtr create (void); - static LookAtTransformationElement *createEmpty (void); - - static LookAtTransformationElementTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static LookAtTransformationElement *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static LookAtTransformationElementTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFPnt3f _sfEyePosition; - SFPnt3f _sfLookAtPosition; - SFVec3f _sfUpDirection; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - LookAtTransformationElementBase(void); - LookAtTransformationElementBase(const LookAtTransformationElementBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~LookAtTransformationElementBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleEyePosition (void) const; - EditFieldHandlePtr editHandleEyePosition (void); - GetFieldHandlePtr getHandleLookAtPosition (void) const; - EditFieldHandlePtr editHandleLookAtPosition (void); - GetFieldHandlePtr getHandleUpDirection (void) const; - EditFieldHandlePtr editHandleUpDirection (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( LookAtTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const LookAtTransformationElementBase &source); -}; - -typedef LookAtTransformationElementBase *LookAtTransformationElementBaseP; - -OSG_END_NAMESPACE - -#endif /* _OSGLOOKATTRANSFORMATIONELEMENTBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementBase.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementBase.inl deleted file mode 100644 index 2cd14144..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementBase.inl +++ /dev/null @@ -1,184 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class LookAtTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &LookAtTransformationElementBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 LookAtTransformationElementBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 LookAtTransformationElementBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - -//! Get the value of the LookAtTransformationElement::_sfEyePosition field. - -inline -Pnt3f &LookAtTransformationElementBase::editEyePosition(void) -{ - editSField(EyePositionFieldMask); - - return _sfEyePosition.getValue(); -} - -//! Get the value of the LookAtTransformationElement::_sfEyePosition field. -inline -const Pnt3f &LookAtTransformationElementBase::getEyePosition(void) const -{ - return _sfEyePosition.getValue(); -} - -//! Set the value of the LookAtTransformationElement::_sfEyePosition field. -inline -void LookAtTransformationElementBase::setEyePosition(const Pnt3f &value) -{ - editSField(EyePositionFieldMask); - - _sfEyePosition.setValue(value); -} -//! Get the value of the LookAtTransformationElement::_sfLookAtPosition field. - -inline -Pnt3f &LookAtTransformationElementBase::editLookAtPosition(void) -{ - editSField(LookAtPositionFieldMask); - - return _sfLookAtPosition.getValue(); -} - -//! Get the value of the LookAtTransformationElement::_sfLookAtPosition field. -inline -const Pnt3f &LookAtTransformationElementBase::getLookAtPosition(void) const -{ - return _sfLookAtPosition.getValue(); -} - -//! Set the value of the LookAtTransformationElement::_sfLookAtPosition field. -inline -void LookAtTransformationElementBase::setLookAtPosition(const Pnt3f &value) -{ - editSField(LookAtPositionFieldMask); - - _sfLookAtPosition.setValue(value); -} -//! Get the value of the LookAtTransformationElement::_sfUpDirection field. - -inline -Vec3f &LookAtTransformationElementBase::editUpDirection(void) -{ - editSField(UpDirectionFieldMask); - - return _sfUpDirection.getValue(); -} - -//! Get the value of the LookAtTransformationElement::_sfUpDirection field. -inline -const Vec3f &LookAtTransformationElementBase::getUpDirection(void) const -{ - return _sfUpDirection.getValue(); -} - -//! Set the value of the LookAtTransformationElement::_sfUpDirection field. -inline -void LookAtTransformationElementBase::setUpDirection(const Vec3f &value) -{ - editSField(UpDirectionFieldMask); - - _sfUpDirection.setValue(value); -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void LookAtTransformationElementBase::execSync ( LookAtTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (EyePositionFieldMask & whichField)) - _sfEyePosition.syncWith(pFrom->_sfEyePosition); - - if(FieldBits::NoField != (LookAtPositionFieldMask & whichField)) - _sfLookAtPosition.syncWith(pFrom->_sfLookAtPosition); - - if(FieldBits::NoField != (UpDirectionFieldMask & whichField)) - _sfUpDirection.syncWith(pFrom->_sfUpDirection); -} -#endif - - -inline -const Char8 *LookAtTransformationElementBase::getClassname(void) -{ - return "LookAtTransformationElement"; -} -OSG_GEN_CONTAINERPTR(LookAtTransformationElement); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementFields.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementFields.h deleted file mode 100644 index c9f65a34..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGLookAtTransformationElementFields.h +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGLOOKATTRANSFORMATIONELEMENTFIELDS_H_ -#define _OSGLOOKATTRANSFORMATIONELEMENTFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class LookAtTransformationElement; - -OSG_GEN_CONTAINERPTR(LookAtTransformationElement); - -/*! \ingroup GrpGroupFieldTraits - \ingroup GrpLibOSGGroup - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFLookAtTransformationElementPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFLookAtTransformationElementPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecLookAtTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecLookAtTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakLookAtTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdLookAtTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecLookAtTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecLookAtTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakLookAtTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdLookAtTransformationElementPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFRecLookAtTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUnrecLookAtTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFWeakLookAtTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUncountedLookAtTransformationElementPtr; - - -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFRecLookAtTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUnrecLookAtTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFWeakLookAtTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUncountedLookAtTransformationElementPtr; - - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFRecLookAtTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUnrecLookAtTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFWeakLookAtTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUncountedLookAtTransformationElementPtr : - public PointerSField {}; - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFRecLookAtTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecLookAtTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFWeakLookAtTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUncountedLookAtTransformationElementPtr : - public PointerMField {}; - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGLOOKATTRANSFORMATIONELEMENTFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.cpp deleted file mode 100644 index b2c1162b..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include - -#include "OSGMatrixTransformationElement.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGMatrixTransformationElementBase.cpp file. -// To modify it, please change the .fcd file (OSGMatrixTransformationElement.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void MatrixTransformationElement::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void MatrixTransformationElement::calcMatrix(Matrix &result) const -{ - result = getMatrix(); -} - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -MatrixTransformationElement::MatrixTransformationElement(void) : - Inherited() -{ -} - -MatrixTransformationElement::MatrixTransformationElement(const MatrixTransformationElement &source) : - Inherited(source) -{ -} - -MatrixTransformationElement::~MatrixTransformationElement(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void MatrixTransformationElement::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - - if(whichField & MatrixFieldMask) - { - updateParentTransform(); - } -} - -void MatrixTransformationElement::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump MatrixTransformationElement NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.fcd b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.fcd deleted file mode 100644 index d6eb0816..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.fcd +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.h deleted file mode 100644 index 6b92b939..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.h +++ /dev/null @@ -1,129 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGMATRIXTRANSFORMATIONELEMENT_H_ -#define _OSGMATRIXTRANSFORMATIONELEMENT_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGMatrixTransformationElementBase.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief MatrixTransformationElement class. See \ref - PageGroupMatrixTransformationElement for a description. -*/ - -class OSG_GROUP_DLLMAPPING MatrixTransformationElement : public MatrixTransformationElementBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef MatrixTransformationElementBase Inherited; - typedef MatrixTransformationElement Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - - virtual void calcMatrix(Matrix &result) const; - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in MatrixTransformationElementBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - MatrixTransformationElement(void); - MatrixTransformationElement(const MatrixTransformationElement &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~MatrixTransformationElement(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class MatrixTransformationElementBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const MatrixTransformationElement &source); -}; - -typedef MatrixTransformationElement *MatrixTransformationElementP; - -OSG_END_NAMESPACE - -#include "OSGMatrixTransformationElementBase.inl" -#include "OSGMatrixTransformationElement.inl" - -#endif /* _OSGMATRIXTRANSFORMATIONELEMENT_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.inl deleted file mode 100644 index 5ecdb6f4..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElement.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementBase.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementBase.cpp deleted file mode 100644 index dcafffdb..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementBase.cpp +++ /dev/null @@ -1,449 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class MatrixTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - - -#include "OSGMatrixTransformationElementBase.h" -#include "OSGMatrixTransformationElement.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::MatrixTransformationElement - - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var Matrix MatrixTransformationElementBase::_sfMatrix - -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("MatrixTransformationElementPtr", "TransformationElementPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(MatrixTransformationElement *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - MatrixTransformationElement *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - MatrixTransformationElement *, - 0); - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void MatrixTransformationElementBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFMatrix::Description( - SFMatrix::getClassType(), - "Matrix", - "", - MatrixFieldId, MatrixFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&MatrixTransformationElement::editHandleMatrix), - static_cast(&MatrixTransformationElement::getHandleMatrix)); - - oType.addInitialDesc(pDesc); -} - - -MatrixTransformationElementBase::TypeObject MatrixTransformationElementBase::_type( - MatrixTransformationElementBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&MatrixTransformationElementBase::createEmptyLocal), - MatrixTransformationElement::initMethod, - MatrixTransformationElement::exitMethod, - reinterpret_cast(&MatrixTransformationElement::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - "\t\n" - "\t\n" - "\n", - "" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &MatrixTransformationElementBase::getType(void) -{ - return _type; -} - -const FieldContainerType &MatrixTransformationElementBase::getType(void) const -{ - return _type; -} - -UInt32 MatrixTransformationElementBase::getContainerSize(void) const -{ - return sizeof(MatrixTransformationElement); -} - -/*------------------------- decorator get ------------------------------*/ - - -SFMatrix *MatrixTransformationElementBase::editSFMatrix(void) -{ - editSField(MatrixFieldMask); - - return &_sfMatrix; -} - -const SFMatrix *MatrixTransformationElementBase::getSFMatrix(void) const -{ - return &_sfMatrix; -} - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 MatrixTransformationElementBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (MatrixFieldMask & whichField)) - { - returnValue += _sfMatrix.getBinSize(); - } - - return returnValue; -} - -void MatrixTransformationElementBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (MatrixFieldMask & whichField)) - { - _sfMatrix.copyToBin(pMem); - } -} - -void MatrixTransformationElementBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (MatrixFieldMask & whichField)) - { - _sfMatrix.copyFromBin(pMem); - } -} - -//! create a new instance of the class -MatrixTransformationElementTransitPtr MatrixTransformationElementBase::createLocal(BitVector bFlags) -{ - MatrixTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -MatrixTransformationElementTransitPtr MatrixTransformationElementBase::createDependent(BitVector bFlags) -{ - MatrixTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -MatrixTransformationElementTransitPtr MatrixTransformationElementBase::create(void) -{ - MatrixTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -MatrixTransformationElement *MatrixTransformationElementBase::createEmptyLocal(BitVector bFlags) -{ - MatrixTransformationElement *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -MatrixTransformationElement *MatrixTransformationElementBase::createEmpty(void) -{ - MatrixTransformationElement *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr MatrixTransformationElementBase::shallowCopyLocal( - BitVector bFlags) const -{ - MatrixTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr MatrixTransformationElementBase::shallowCopyDependent( - BitVector bFlags) const -{ - MatrixTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr MatrixTransformationElementBase::shallowCopy(void) const -{ - MatrixTransformationElement *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -MatrixTransformationElementBase::MatrixTransformationElementBase(void) : - Inherited(), - _sfMatrix () -{ -} - -MatrixTransformationElementBase::MatrixTransformationElementBase(const MatrixTransformationElementBase &source) : - Inherited(source), - _sfMatrix (source._sfMatrix ) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -MatrixTransformationElementBase::~MatrixTransformationElementBase(void) -{ -} - - -GetFieldHandlePtr MatrixTransformationElementBase::getHandleMatrix (void) const -{ - SFMatrix::GetHandlePtr returnValue( - new SFMatrix::GetHandle( - &_sfMatrix, - this->getType().getFieldDesc(MatrixFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr MatrixTransformationElementBase::editHandleMatrix (void) -{ - SFMatrix::EditHandlePtr returnValue( - new SFMatrix::EditHandle( - &_sfMatrix, - this->getType().getFieldDesc(MatrixFieldId), - this)); - - - editSField(MatrixFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void MatrixTransformationElementBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - MatrixTransformationElement *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *MatrixTransformationElementBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - MatrixTransformationElement *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void MatrixTransformationElementBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementBase.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementBase.h deleted file mode 100644 index f31e9af6..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementBase.h +++ /dev/null @@ -1,295 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class MatrixTransformationElement - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGMATRIXTRANSFORMATIONELEMENTBASE_H_ -#define _OSGMATRIXTRANSFORMATIONELEMENTBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGTransformationElement.h" // Parent - -#include "OSGMathFields.h" // Matrix type - -#include "OSGMatrixTransformationElementFields.h" - -OSG_BEGIN_NAMESPACE - -class MatrixTransformationElement; - -//! \brief MatrixTransformationElement Base Class. - -class OSG_GROUP_DLLMAPPING MatrixTransformationElementBase : public TransformationElement -{ - public: - - typedef TransformationElement Inherited; - typedef TransformationElement ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(MatrixTransformationElement); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - MatrixFieldId = Inherited::NextFieldId, - NextFieldId = MatrixFieldId + 1 - }; - - static const OSG::BitVector MatrixFieldMask = - (TypeTraits::One << MatrixFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFMatrix SFMatrixType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - - SFMatrix *editSFMatrix (void); - const SFMatrix *getSFMatrix (void) const; - - - Matrix &editMatrix (void); - const Matrix &getMatrix (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setMatrix (const Matrix &value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static MatrixTransformationElementTransitPtr create (void); - static MatrixTransformationElement *createEmpty (void); - - static MatrixTransformationElementTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static MatrixTransformationElement *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static MatrixTransformationElementTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFMatrix _sfMatrix; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - MatrixTransformationElementBase(void); - MatrixTransformationElementBase(const MatrixTransformationElementBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~MatrixTransformationElementBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleMatrix (void) const; - EditFieldHandlePtr editHandleMatrix (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( MatrixTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const MatrixTransformationElementBase &source); -}; - -typedef MatrixTransformationElementBase *MatrixTransformationElementBaseP; - -OSG_END_NAMESPACE - -#endif /* _OSGMATRIXTRANSFORMATIONELEMENTBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementBase.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementBase.inl deleted file mode 100644 index f402568c..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementBase.inl +++ /dev/null @@ -1,128 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class MatrixTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &MatrixTransformationElementBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 MatrixTransformationElementBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 MatrixTransformationElementBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - -//! Get the value of the MatrixTransformationElement::_sfMatrix field. - -inline -Matrix &MatrixTransformationElementBase::editMatrix(void) -{ - editSField(MatrixFieldMask); - - return _sfMatrix.getValue(); -} - -//! Get the value of the MatrixTransformationElement::_sfMatrix field. -inline -const Matrix &MatrixTransformationElementBase::getMatrix(void) const -{ - return _sfMatrix.getValue(); -} - -//! Set the value of the MatrixTransformationElement::_sfMatrix field. -inline -void MatrixTransformationElementBase::setMatrix(const Matrix &value) -{ - editSField(MatrixFieldMask); - - _sfMatrix.setValue(value); -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void MatrixTransformationElementBase::execSync ( MatrixTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (MatrixFieldMask & whichField)) - _sfMatrix.syncWith(pFrom->_sfMatrix); -} -#endif - - -inline -const Char8 *MatrixTransformationElementBase::getClassname(void) -{ - return "MatrixTransformationElement"; -} -OSG_GEN_CONTAINERPTR(MatrixTransformationElement); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementFields.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementFields.h deleted file mode 100644 index f8caa62c..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGMatrixTransformationElementFields.h +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGMATRIXTRANSFORMATIONELEMENTFIELDS_H_ -#define _OSGMATRIXTRANSFORMATIONELEMENTFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class MatrixTransformationElement; - -OSG_GEN_CONTAINERPTR(MatrixTransformationElement); - -/*! \ingroup GrpGroupFieldTraits - \ingroup GrpLibOSGGroup - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFMatrixTransformationElementPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFMatrixTransformationElementPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecMatrixTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecMatrixTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakMatrixTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdMatrixTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecMatrixTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecMatrixTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakMatrixTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdMatrixTransformationElementPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFRecMatrixTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUnrecMatrixTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFWeakMatrixTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUncountedMatrixTransformationElementPtr; - - -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFRecMatrixTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUnrecMatrixTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFWeakMatrixTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUncountedMatrixTransformationElementPtr; - - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFRecMatrixTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUnrecMatrixTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFWeakMatrixTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUncountedMatrixTransformationElementPtr : - public PointerSField {}; - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFRecMatrixTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecMatrixTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFWeakMatrixTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUncountedMatrixTransformationElementPtr : - public PointerMField {}; - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGMATRIXTRANSFORMATIONELEMENTFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.cpp deleted file mode 100644 index 017e9e3d..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include - -#include "OSGRotationTransformationElement.h" -#include "OSGQuaternion.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGRotationTransformationElementBase.cpp file. -// To modify it, please change the .fcd file (OSGRotationTransformationElement.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void RotationTransformationElement::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void RotationTransformationElement::calcMatrix(Matrix &result) const -{ - result.setTransform(Quaternion(getAxis(),osgDegree2Rad(getAngle()))); -} - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -RotationTransformationElement::RotationTransformationElement(void) : - Inherited() -{ -} - -RotationTransformationElement::RotationTransformationElement(const RotationTransformationElement &source) : - Inherited(source) -{ -} - -RotationTransformationElement::~RotationTransformationElement(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void RotationTransformationElement::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - - if(whichField & (AxisFieldMask | - AngleFieldMask)) - { - updateParentTransform(); - } -} - -void RotationTransformationElement::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump RotationTransformationElement NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.fcd b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.fcd deleted file mode 100644 index 6be840b9..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.fcd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.h deleted file mode 100644 index 7f978e47..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.h +++ /dev/null @@ -1,128 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGROTATIONTRANSFORMATIONELEMENT_H_ -#define _OSGROTATIONTRANSFORMATIONELEMENT_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGRotationTransformationElementBase.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief RotationTransformationElement class. See \ref - PageGroupRotationTransformationElement for a description. -*/ - -class OSG_GROUP_DLLMAPPING RotationTransformationElement : public RotationTransformationElementBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef RotationTransformationElementBase Inherited; - typedef RotationTransformationElement Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - virtual void calcMatrix(Matrix &result) const; - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in RotationTransformationElementBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - RotationTransformationElement(void); - RotationTransformationElement(const RotationTransformationElement &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~RotationTransformationElement(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class RotationTransformationElementBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const RotationTransformationElement &source); -}; - -typedef RotationTransformationElement *RotationTransformationElementP; - -OSG_END_NAMESPACE - -#include "OSGRotationTransformationElementBase.inl" -#include "OSGRotationTransformationElement.inl" - -#endif /* _OSGROTATIONTRANSFORMATIONELEMENT_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.inl deleted file mode 100644 index 5ecdb6f4..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElement.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementBase.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementBase.cpp deleted file mode 100644 index a71da5bb..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementBase.cpp +++ /dev/null @@ -1,528 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class RotationTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - - -#include "OSGRotationTransformationElementBase.h" -#include "OSGRotationTransformationElement.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::RotationTransformationElement - - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var Vec3f RotationTransformationElementBase::_sfAxis - -*/ - -/*! \var Real32 RotationTransformationElementBase::_sfAngle - -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("RotationTransformationElementPtr", "TransformationElementPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(RotationTransformationElement *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - RotationTransformationElement *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - RotationTransformationElement *, - 0); - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void RotationTransformationElementBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFVec3f::Description( - SFVec3f::getClassType(), - "Axis", - "", - AxisFieldId, AxisFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&RotationTransformationElement::editHandleAxis), - static_cast(&RotationTransformationElement::getHandleAxis)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFReal32::Description( - SFReal32::getClassType(), - "Angle", - "", - AngleFieldId, AngleFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&RotationTransformationElement::editHandleAngle), - static_cast(&RotationTransformationElement::getHandleAngle)); - - oType.addInitialDesc(pDesc); -} - - -RotationTransformationElementBase::TypeObject RotationTransformationElementBase::_type( - RotationTransformationElementBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&RotationTransformationElementBase::createEmptyLocal), - RotationTransformationElement::initMethod, - RotationTransformationElement::exitMethod, - reinterpret_cast(&RotationTransformationElement::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\n", - "" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &RotationTransformationElementBase::getType(void) -{ - return _type; -} - -const FieldContainerType &RotationTransformationElementBase::getType(void) const -{ - return _type; -} - -UInt32 RotationTransformationElementBase::getContainerSize(void) const -{ - return sizeof(RotationTransformationElement); -} - -/*------------------------- decorator get ------------------------------*/ - - -SFVec3f *RotationTransformationElementBase::editSFAxis(void) -{ - editSField(AxisFieldMask); - - return &_sfAxis; -} - -const SFVec3f *RotationTransformationElementBase::getSFAxis(void) const -{ - return &_sfAxis; -} - - -SFReal32 *RotationTransformationElementBase::editSFAngle(void) -{ - editSField(AngleFieldMask); - - return &_sfAngle; -} - -const SFReal32 *RotationTransformationElementBase::getSFAngle(void) const -{ - return &_sfAngle; -} - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 RotationTransformationElementBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (AxisFieldMask & whichField)) - { - returnValue += _sfAxis.getBinSize(); - } - if(FieldBits::NoField != (AngleFieldMask & whichField)) - { - returnValue += _sfAngle.getBinSize(); - } - - return returnValue; -} - -void RotationTransformationElementBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (AxisFieldMask & whichField)) - { - _sfAxis.copyToBin(pMem); - } - if(FieldBits::NoField != (AngleFieldMask & whichField)) - { - _sfAngle.copyToBin(pMem); - } -} - -void RotationTransformationElementBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (AxisFieldMask & whichField)) - { - _sfAxis.copyFromBin(pMem); - } - if(FieldBits::NoField != (AngleFieldMask & whichField)) - { - _sfAngle.copyFromBin(pMem); - } -} - -//! create a new instance of the class -RotationTransformationElementTransitPtr RotationTransformationElementBase::createLocal(BitVector bFlags) -{ - RotationTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -RotationTransformationElementTransitPtr RotationTransformationElementBase::createDependent(BitVector bFlags) -{ - RotationTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -RotationTransformationElementTransitPtr RotationTransformationElementBase::create(void) -{ - RotationTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -RotationTransformationElement *RotationTransformationElementBase::createEmptyLocal(BitVector bFlags) -{ - RotationTransformationElement *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -RotationTransformationElement *RotationTransformationElementBase::createEmpty(void) -{ - RotationTransformationElement *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr RotationTransformationElementBase::shallowCopyLocal( - BitVector bFlags) const -{ - RotationTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr RotationTransformationElementBase::shallowCopyDependent( - BitVector bFlags) const -{ - RotationTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr RotationTransformationElementBase::shallowCopy(void) const -{ - RotationTransformationElement *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -RotationTransformationElementBase::RotationTransformationElementBase(void) : - Inherited(), - _sfAxis (Vec3f(0.0f,1.0f,0.0f)), - _sfAngle (Real32(0.0f)) -{ -} - -RotationTransformationElementBase::RotationTransformationElementBase(const RotationTransformationElementBase &source) : - Inherited(source), - _sfAxis (source._sfAxis ), - _sfAngle (source._sfAngle ) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -RotationTransformationElementBase::~RotationTransformationElementBase(void) -{ -} - - -GetFieldHandlePtr RotationTransformationElementBase::getHandleAxis (void) const -{ - SFVec3f::GetHandlePtr returnValue( - new SFVec3f::GetHandle( - &_sfAxis, - this->getType().getFieldDesc(AxisFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr RotationTransformationElementBase::editHandleAxis (void) -{ - SFVec3f::EditHandlePtr returnValue( - new SFVec3f::EditHandle( - &_sfAxis, - this->getType().getFieldDesc(AxisFieldId), - this)); - - - editSField(AxisFieldMask); - - return returnValue; -} - -GetFieldHandlePtr RotationTransformationElementBase::getHandleAngle (void) const -{ - SFReal32::GetHandlePtr returnValue( - new SFReal32::GetHandle( - &_sfAngle, - this->getType().getFieldDesc(AngleFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr RotationTransformationElementBase::editHandleAngle (void) -{ - SFReal32::EditHandlePtr returnValue( - new SFReal32::EditHandle( - &_sfAngle, - this->getType().getFieldDesc(AngleFieldId), - this)); - - - editSField(AngleFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void RotationTransformationElementBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - RotationTransformationElement *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *RotationTransformationElementBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - RotationTransformationElement *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void RotationTransformationElementBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementBase.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementBase.h deleted file mode 100644 index 258afcae..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementBase.h +++ /dev/null @@ -1,310 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class RotationTransformationElement - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGROTATIONTRANSFORMATIONELEMENTBASE_H_ -#define _OSGROTATIONTRANSFORMATIONELEMENTBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGTransformationElement.h" // Parent - -#include "OSGVecFields.h" // Axis type -#include "OSGSysFields.h" // Angle type - -#include "OSGRotationTransformationElementFields.h" - -OSG_BEGIN_NAMESPACE - -class RotationTransformationElement; - -//! \brief RotationTransformationElement Base Class. - -class OSG_GROUP_DLLMAPPING RotationTransformationElementBase : public TransformationElement -{ - public: - - typedef TransformationElement Inherited; - typedef TransformationElement ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(RotationTransformationElement); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - AxisFieldId = Inherited::NextFieldId, - AngleFieldId = AxisFieldId + 1, - NextFieldId = AngleFieldId + 1 - }; - - static const OSG::BitVector AxisFieldMask = - (TypeTraits::One << AxisFieldId); - static const OSG::BitVector AngleFieldMask = - (TypeTraits::One << AngleFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFVec3f SFAxisType; - typedef SFReal32 SFAngleType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - - SFVec3f *editSFAxis (void); - const SFVec3f *getSFAxis (void) const; - - SFReal32 *editSFAngle (void); - const SFReal32 *getSFAngle (void) const; - - - Vec3f &editAxis (void); - const Vec3f &getAxis (void) const; - - Real32 &editAngle (void); - Real32 getAngle (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setAxis (const Vec3f &value); - void setAngle (const Real32 value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static RotationTransformationElementTransitPtr create (void); - static RotationTransformationElement *createEmpty (void); - - static RotationTransformationElementTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static RotationTransformationElement *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static RotationTransformationElementTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFVec3f _sfAxis; - SFReal32 _sfAngle; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - RotationTransformationElementBase(void); - RotationTransformationElementBase(const RotationTransformationElementBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~RotationTransformationElementBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleAxis (void) const; - EditFieldHandlePtr editHandleAxis (void); - GetFieldHandlePtr getHandleAngle (void) const; - EditFieldHandlePtr editHandleAngle (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( RotationTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const RotationTransformationElementBase &source); -}; - -typedef RotationTransformationElementBase *RotationTransformationElementBaseP; - -OSG_END_NAMESPACE - -#endif /* _OSGROTATIONTRANSFORMATIONELEMENTBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementBase.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementBase.inl deleted file mode 100644 index 1f6aea61..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementBase.inl +++ /dev/null @@ -1,156 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class RotationTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &RotationTransformationElementBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 RotationTransformationElementBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 RotationTransformationElementBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - -//! Get the value of the RotationTransformationElement::_sfAxis field. - -inline -Vec3f &RotationTransformationElementBase::editAxis(void) -{ - editSField(AxisFieldMask); - - return _sfAxis.getValue(); -} - -//! Get the value of the RotationTransformationElement::_sfAxis field. -inline -const Vec3f &RotationTransformationElementBase::getAxis(void) const -{ - return _sfAxis.getValue(); -} - -//! Set the value of the RotationTransformationElement::_sfAxis field. -inline -void RotationTransformationElementBase::setAxis(const Vec3f &value) -{ - editSField(AxisFieldMask); - - _sfAxis.setValue(value); -} -//! Get the value of the RotationTransformationElement::_sfAngle field. - -inline -Real32 &RotationTransformationElementBase::editAngle(void) -{ - editSField(AngleFieldMask); - - return _sfAngle.getValue(); -} - -//! Get the value of the RotationTransformationElement::_sfAngle field. -inline - Real32 RotationTransformationElementBase::getAngle(void) const -{ - return _sfAngle.getValue(); -} - -//! Set the value of the RotationTransformationElement::_sfAngle field. -inline -void RotationTransformationElementBase::setAngle(const Real32 value) -{ - editSField(AngleFieldMask); - - _sfAngle.setValue(value); -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void RotationTransformationElementBase::execSync ( RotationTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (AxisFieldMask & whichField)) - _sfAxis.syncWith(pFrom->_sfAxis); - - if(FieldBits::NoField != (AngleFieldMask & whichField)) - _sfAngle.syncWith(pFrom->_sfAngle); -} -#endif - - -inline -const Char8 *RotationTransformationElementBase::getClassname(void) -{ - return "RotationTransformationElement"; -} -OSG_GEN_CONTAINERPTR(RotationTransformationElement); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementFields.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementFields.h deleted file mode 100644 index a73c096c..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGRotationTransformationElementFields.h +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGROTATIONTRANSFORMATIONELEMENTFIELDS_H_ -#define _OSGROTATIONTRANSFORMATIONELEMENTFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class RotationTransformationElement; - -OSG_GEN_CONTAINERPTR(RotationTransformationElement); - -/*! \ingroup GrpGroupFieldTraits - \ingroup GrpLibOSGGroup - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFRotationTransformationElementPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFRotationTransformationElementPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecRotationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecRotationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakRotationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdRotationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecRotationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecRotationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakRotationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdRotationTransformationElementPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFRecRotationTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUnrecRotationTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFWeakRotationTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUncountedRotationTransformationElementPtr; - - -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFRecRotationTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUnrecRotationTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFWeakRotationTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUncountedRotationTransformationElementPtr; - - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFRecRotationTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUnrecRotationTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFWeakRotationTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUncountedRotationTransformationElementPtr : - public PointerSField {}; - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFRecRotationTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecRotationTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFWeakRotationTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUncountedRotationTransformationElementPtr : - public PointerMField {}; - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGROTATIONTRANSFORMATIONELEMENTFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.cpp deleted file mode 100644 index 721e9279..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include - -#include "OSGScaleTransformationElement.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGScaleTransformationElementBase.cpp file. -// To modify it, please change the .fcd file (OSGScaleTransformationElement.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void ScaleTransformationElement::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void ScaleTransformationElement::calcMatrix(Matrix &result) const -{ - result.setIdentity(); - result.setScale(getScale()); -} - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -ScaleTransformationElement::ScaleTransformationElement(void) : - Inherited() -{ -} - -ScaleTransformationElement::ScaleTransformationElement(const ScaleTransformationElement &source) : - Inherited(source) -{ -} - -ScaleTransformationElement::~ScaleTransformationElement(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void ScaleTransformationElement::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - - if(whichField & ScaleFieldMask) - { - updateParentTransform(); - } -} - -void ScaleTransformationElement::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump ScaleTransformationElement NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.fcd b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.fcd deleted file mode 100644 index 0850b678..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.fcd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.h deleted file mode 100644 index 991c774e..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.h +++ /dev/null @@ -1,129 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGSCALETRANSFORMATIONELEMENT_H_ -#define _OSGSCALETRANSFORMATIONELEMENT_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGScaleTransformationElementBase.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief ScaleTransformationElement class. See \ref - PageGroupScaleTransformationElement for a description. -*/ - -class OSG_GROUP_DLLMAPPING ScaleTransformationElement : public ScaleTransformationElementBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef ScaleTransformationElementBase Inherited; - typedef ScaleTransformationElement Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - - virtual void calcMatrix(Matrix &result) const; - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in ScaleTransformationElementBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - ScaleTransformationElement(void); - ScaleTransformationElement(const ScaleTransformationElement &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~ScaleTransformationElement(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class ScaleTransformationElementBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const ScaleTransformationElement &source); -}; - -typedef ScaleTransformationElement *ScaleTransformationElementP; - -OSG_END_NAMESPACE - -#include "OSGScaleTransformationElementBase.inl" -#include "OSGScaleTransformationElement.inl" - -#endif /* _OSGSCALETRANSFORMATIONELEMENT_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.inl deleted file mode 100644 index 5ecdb6f4..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElement.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementBase.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementBase.cpp deleted file mode 100644 index 9de125d6..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementBase.cpp +++ /dev/null @@ -1,450 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class ScaleTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - - -#include "OSGScaleTransformationElementBase.h" -#include "OSGScaleTransformationElement.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::ScaleTransformationElement - - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var Vec3f ScaleTransformationElementBase::_sfScale - -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("ScaleTransformationElementPtr", "TransformationElementPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(ScaleTransformationElement *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - ScaleTransformationElement *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - ScaleTransformationElement *, - 0); - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void ScaleTransformationElementBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFVec3f::Description( - SFVec3f::getClassType(), - "Scale", - "", - ScaleFieldId, ScaleFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&ScaleTransformationElement::editHandleScale), - static_cast(&ScaleTransformationElement::getHandleScale)); - - oType.addInitialDesc(pDesc); -} - - -ScaleTransformationElementBase::TypeObject ScaleTransformationElementBase::_type( - ScaleTransformationElementBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&ScaleTransformationElementBase::createEmptyLocal), - ScaleTransformationElement::initMethod, - ScaleTransformationElement::exitMethod, - reinterpret_cast(&ScaleTransformationElement::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - "\t\n" - "\t\n" - "\n", - "" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &ScaleTransformationElementBase::getType(void) -{ - return _type; -} - -const FieldContainerType &ScaleTransformationElementBase::getType(void) const -{ - return _type; -} - -UInt32 ScaleTransformationElementBase::getContainerSize(void) const -{ - return sizeof(ScaleTransformationElement); -} - -/*------------------------- decorator get ------------------------------*/ - - -SFVec3f *ScaleTransformationElementBase::editSFScale(void) -{ - editSField(ScaleFieldMask); - - return &_sfScale; -} - -const SFVec3f *ScaleTransformationElementBase::getSFScale(void) const -{ - return &_sfScale; -} - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 ScaleTransformationElementBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (ScaleFieldMask & whichField)) - { - returnValue += _sfScale.getBinSize(); - } - - return returnValue; -} - -void ScaleTransformationElementBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (ScaleFieldMask & whichField)) - { - _sfScale.copyToBin(pMem); - } -} - -void ScaleTransformationElementBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (ScaleFieldMask & whichField)) - { - _sfScale.copyFromBin(pMem); - } -} - -//! create a new instance of the class -ScaleTransformationElementTransitPtr ScaleTransformationElementBase::createLocal(BitVector bFlags) -{ - ScaleTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -ScaleTransformationElementTransitPtr ScaleTransformationElementBase::createDependent(BitVector bFlags) -{ - ScaleTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -ScaleTransformationElementTransitPtr ScaleTransformationElementBase::create(void) -{ - ScaleTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -ScaleTransformationElement *ScaleTransformationElementBase::createEmptyLocal(BitVector bFlags) -{ - ScaleTransformationElement *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -ScaleTransformationElement *ScaleTransformationElementBase::createEmpty(void) -{ - ScaleTransformationElement *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr ScaleTransformationElementBase::shallowCopyLocal( - BitVector bFlags) const -{ - ScaleTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr ScaleTransformationElementBase::shallowCopyDependent( - BitVector bFlags) const -{ - ScaleTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr ScaleTransformationElementBase::shallowCopy(void) const -{ - ScaleTransformationElement *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -ScaleTransformationElementBase::ScaleTransformationElementBase(void) : - Inherited(), - _sfScale (Vec3f(1.0f,1.0f,1.0f)) -{ -} - -ScaleTransformationElementBase::ScaleTransformationElementBase(const ScaleTransformationElementBase &source) : - Inherited(source), - _sfScale (source._sfScale ) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -ScaleTransformationElementBase::~ScaleTransformationElementBase(void) -{ -} - - -GetFieldHandlePtr ScaleTransformationElementBase::getHandleScale (void) const -{ - SFVec3f::GetHandlePtr returnValue( - new SFVec3f::GetHandle( - &_sfScale, - this->getType().getFieldDesc(ScaleFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr ScaleTransformationElementBase::editHandleScale (void) -{ - SFVec3f::EditHandlePtr returnValue( - new SFVec3f::EditHandle( - &_sfScale, - this->getType().getFieldDesc(ScaleFieldId), - this)); - - - editSField(ScaleFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void ScaleTransformationElementBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - ScaleTransformationElement *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *ScaleTransformationElementBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - ScaleTransformationElement *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void ScaleTransformationElementBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementBase.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementBase.h deleted file mode 100644 index d265cc77..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementBase.h +++ /dev/null @@ -1,295 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class ScaleTransformationElement - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGSCALETRANSFORMATIONELEMENTBASE_H_ -#define _OSGSCALETRANSFORMATIONELEMENTBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGTransformationElement.h" // Parent - -#include "OSGVecFields.h" // Scale type - -#include "OSGScaleTransformationElementFields.h" - -OSG_BEGIN_NAMESPACE - -class ScaleTransformationElement; - -//! \brief ScaleTransformationElement Base Class. - -class OSG_GROUP_DLLMAPPING ScaleTransformationElementBase : public TransformationElement -{ - public: - - typedef TransformationElement Inherited; - typedef TransformationElement ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(ScaleTransformationElement); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - ScaleFieldId = Inherited::NextFieldId, - NextFieldId = ScaleFieldId + 1 - }; - - static const OSG::BitVector ScaleFieldMask = - (TypeTraits::One << ScaleFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFVec3f SFScaleType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - - SFVec3f *editSFScale (void); - const SFVec3f *getSFScale (void) const; - - - Vec3f &editScale (void); - const Vec3f &getScale (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setScale (const Vec3f &value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static ScaleTransformationElementTransitPtr create (void); - static ScaleTransformationElement *createEmpty (void); - - static ScaleTransformationElementTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static ScaleTransformationElement *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static ScaleTransformationElementTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFVec3f _sfScale; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - ScaleTransformationElementBase(void); - ScaleTransformationElementBase(const ScaleTransformationElementBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~ScaleTransformationElementBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleScale (void) const; - EditFieldHandlePtr editHandleScale (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( ScaleTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const ScaleTransformationElementBase &source); -}; - -typedef ScaleTransformationElementBase *ScaleTransformationElementBaseP; - -OSG_END_NAMESPACE - -#endif /* _OSGSCALETRANSFORMATIONELEMENTBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementBase.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementBase.inl deleted file mode 100644 index 0886f95a..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementBase.inl +++ /dev/null @@ -1,128 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class ScaleTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &ScaleTransformationElementBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 ScaleTransformationElementBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 ScaleTransformationElementBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - -//! Get the value of the ScaleTransformationElement::_sfScale field. - -inline -Vec3f &ScaleTransformationElementBase::editScale(void) -{ - editSField(ScaleFieldMask); - - return _sfScale.getValue(); -} - -//! Get the value of the ScaleTransformationElement::_sfScale field. -inline -const Vec3f &ScaleTransformationElementBase::getScale(void) const -{ - return _sfScale.getValue(); -} - -//! Set the value of the ScaleTransformationElement::_sfScale field. -inline -void ScaleTransformationElementBase::setScale(const Vec3f &value) -{ - editSField(ScaleFieldMask); - - _sfScale.setValue(value); -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void ScaleTransformationElementBase::execSync ( ScaleTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (ScaleFieldMask & whichField)) - _sfScale.syncWith(pFrom->_sfScale); -} -#endif - - -inline -const Char8 *ScaleTransformationElementBase::getClassname(void) -{ - return "ScaleTransformationElement"; -} -OSG_GEN_CONTAINERPTR(ScaleTransformationElement); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementFields.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementFields.h deleted file mode 100644 index 128968ce..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGScaleTransformationElementFields.h +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGSCALETRANSFORMATIONELEMENTFIELDS_H_ -#define _OSGSCALETRANSFORMATIONELEMENTFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class ScaleTransformationElement; - -OSG_GEN_CONTAINERPTR(ScaleTransformationElement); - -/*! \ingroup GrpGroupFieldTraits - \ingroup GrpLibOSGGroup - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFScaleTransformationElementPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFScaleTransformationElementPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecScaleTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecScaleTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakScaleTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdScaleTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecScaleTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecScaleTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakScaleTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdScaleTransformationElementPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFRecScaleTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUnrecScaleTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFWeakScaleTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUncountedScaleTransformationElementPtr; - - -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFRecScaleTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUnrecScaleTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFWeakScaleTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUncountedScaleTransformationElementPtr; - - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFRecScaleTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUnrecScaleTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFWeakScaleTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUncountedScaleTransformationElementPtr : - public PointerSField {}; - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFRecScaleTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecScaleTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFWeakScaleTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUncountedScaleTransformationElementPtr : - public PointerMField {}; - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGSCALETRANSFORMATIONELEMENTFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.cpp deleted file mode 100644 index a16d29f0..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include - -#include "OSGSkewTransformationElement.h" -#include "OSGMatrixUtility.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGSkewTransformationElementBase.cpp file. -// To modify it, please change the .fcd file (OSGSkewTransformationElement.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void SkewTransformationElement::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void SkewTransformationElement::calcMatrix(Matrix &result) const -{ - MatrixSkew(result,getRotationAxis(),getTranslationAxis(),getAngle()); -} - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -SkewTransformationElement::SkewTransformationElement(void) : - Inherited() -{ -} - -SkewTransformationElement::SkewTransformationElement(const SkewTransformationElement &source) : - Inherited(source) -{ -} - -SkewTransformationElement::~SkewTransformationElement(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void SkewTransformationElement::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - - if(whichField & (RotationAxisFieldMask | - TranslationAxisFieldMask | - AngleFieldMask)) - { - updateParentTransform(); - } -} - -void SkewTransformationElement::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump SkewTransformationElement NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.fcd b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.fcd deleted file mode 100644 index da335676..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.fcd +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.h deleted file mode 100644 index d23f2d31..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.h +++ /dev/null @@ -1,129 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGSKEWTRANSFORMATIONELEMENT_H_ -#define _OSGSKEWTRANSFORMATIONELEMENT_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGSkewTransformationElementBase.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief SkewTransformationElement class. See \ref - PageGroupSkewTransformationElement for a description. -*/ - -class OSG_GROUP_DLLMAPPING SkewTransformationElement : public SkewTransformationElementBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef SkewTransformationElementBase Inherited; - typedef SkewTransformationElement Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - - virtual void calcMatrix(Matrix &result) const; - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in SkewTransformationElementBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - SkewTransformationElement(void); - SkewTransformationElement(const SkewTransformationElement &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~SkewTransformationElement(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class SkewTransformationElementBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const SkewTransformationElement &source); -}; - -typedef SkewTransformationElement *SkewTransformationElementP; - -OSG_END_NAMESPACE - -#include "OSGSkewTransformationElementBase.inl" -#include "OSGSkewTransformationElement.inl" - -#endif /* _OSGSKEWTRANSFORMATIONELEMENT_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.inl deleted file mode 100644 index 5ecdb6f4..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElement.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementBase.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementBase.cpp deleted file mode 100644 index ad7ae21d..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementBase.cpp +++ /dev/null @@ -1,606 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class SkewTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - - -#include "OSGSkewTransformationElementBase.h" -#include "OSGSkewTransformationElement.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::SkewTransformationElement - - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var Vec3f SkewTransformationElementBase::_sfRotationAxis - -*/ - -/*! \var Vec3f SkewTransformationElementBase::_sfTranslationAxis - -*/ - -/*! \var Real32 SkewTransformationElementBase::_sfAngle - -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("SkewTransformationElementPtr", "TransformationElementPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(SkewTransformationElement *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - SkewTransformationElement *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - SkewTransformationElement *, - 0); - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void SkewTransformationElementBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFVec3f::Description( - SFVec3f::getClassType(), - "RotationAxis", - "", - RotationAxisFieldId, RotationAxisFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SkewTransformationElement::editHandleRotationAxis), - static_cast(&SkewTransformationElement::getHandleRotationAxis)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFVec3f::Description( - SFVec3f::getClassType(), - "TranslationAxis", - "", - TranslationAxisFieldId, TranslationAxisFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SkewTransformationElement::editHandleTranslationAxis), - static_cast(&SkewTransformationElement::getHandleTranslationAxis)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFReal32::Description( - SFReal32::getClassType(), - "Angle", - "", - AngleFieldId, AngleFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SkewTransformationElement::editHandleAngle), - static_cast(&SkewTransformationElement::getHandleAngle)); - - oType.addInitialDesc(pDesc); -} - - -SkewTransformationElementBase::TypeObject SkewTransformationElementBase::_type( - SkewTransformationElementBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&SkewTransformationElementBase::createEmptyLocal), - SkewTransformationElement::initMethod, - SkewTransformationElement::exitMethod, - reinterpret_cast(&SkewTransformationElement::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\t\n" - "\n", - "" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &SkewTransformationElementBase::getType(void) -{ - return _type; -} - -const FieldContainerType &SkewTransformationElementBase::getType(void) const -{ - return _type; -} - -UInt32 SkewTransformationElementBase::getContainerSize(void) const -{ - return sizeof(SkewTransformationElement); -} - -/*------------------------- decorator get ------------------------------*/ - - -SFVec3f *SkewTransformationElementBase::editSFRotationAxis(void) -{ - editSField(RotationAxisFieldMask); - - return &_sfRotationAxis; -} - -const SFVec3f *SkewTransformationElementBase::getSFRotationAxis(void) const -{ - return &_sfRotationAxis; -} - - -SFVec3f *SkewTransformationElementBase::editSFTranslationAxis(void) -{ - editSField(TranslationAxisFieldMask); - - return &_sfTranslationAxis; -} - -const SFVec3f *SkewTransformationElementBase::getSFTranslationAxis(void) const -{ - return &_sfTranslationAxis; -} - - -SFReal32 *SkewTransformationElementBase::editSFAngle(void) -{ - editSField(AngleFieldMask); - - return &_sfAngle; -} - -const SFReal32 *SkewTransformationElementBase::getSFAngle(void) const -{ - return &_sfAngle; -} - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 SkewTransformationElementBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (RotationAxisFieldMask & whichField)) - { - returnValue += _sfRotationAxis.getBinSize(); - } - if(FieldBits::NoField != (TranslationAxisFieldMask & whichField)) - { - returnValue += _sfTranslationAxis.getBinSize(); - } - if(FieldBits::NoField != (AngleFieldMask & whichField)) - { - returnValue += _sfAngle.getBinSize(); - } - - return returnValue; -} - -void SkewTransformationElementBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (RotationAxisFieldMask & whichField)) - { - _sfRotationAxis.copyToBin(pMem); - } - if(FieldBits::NoField != (TranslationAxisFieldMask & whichField)) - { - _sfTranslationAxis.copyToBin(pMem); - } - if(FieldBits::NoField != (AngleFieldMask & whichField)) - { - _sfAngle.copyToBin(pMem); - } -} - -void SkewTransformationElementBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (RotationAxisFieldMask & whichField)) - { - _sfRotationAxis.copyFromBin(pMem); - } - if(FieldBits::NoField != (TranslationAxisFieldMask & whichField)) - { - _sfTranslationAxis.copyFromBin(pMem); - } - if(FieldBits::NoField != (AngleFieldMask & whichField)) - { - _sfAngle.copyFromBin(pMem); - } -} - -//! create a new instance of the class -SkewTransformationElementTransitPtr SkewTransformationElementBase::createLocal(BitVector bFlags) -{ - SkewTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -SkewTransformationElementTransitPtr SkewTransformationElementBase::createDependent(BitVector bFlags) -{ - SkewTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -SkewTransformationElementTransitPtr SkewTransformationElementBase::create(void) -{ - SkewTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -SkewTransformationElement *SkewTransformationElementBase::createEmptyLocal(BitVector bFlags) -{ - SkewTransformationElement *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -SkewTransformationElement *SkewTransformationElementBase::createEmpty(void) -{ - SkewTransformationElement *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr SkewTransformationElementBase::shallowCopyLocal( - BitVector bFlags) const -{ - SkewTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr SkewTransformationElementBase::shallowCopyDependent( - BitVector bFlags) const -{ - SkewTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr SkewTransformationElementBase::shallowCopy(void) const -{ - SkewTransformationElement *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -SkewTransformationElementBase::SkewTransformationElementBase(void) : - Inherited(), - _sfRotationAxis (Vec3f(0.0f,1.0f,0.0f)), - _sfTranslationAxis (Vec3f(1.0f,0.0f,0.0f)), - _sfAngle (Real32(0.0f)) -{ -} - -SkewTransformationElementBase::SkewTransformationElementBase(const SkewTransformationElementBase &source) : - Inherited(source), - _sfRotationAxis (source._sfRotationAxis ), - _sfTranslationAxis (source._sfTranslationAxis ), - _sfAngle (source._sfAngle ) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -SkewTransformationElementBase::~SkewTransformationElementBase(void) -{ -} - - -GetFieldHandlePtr SkewTransformationElementBase::getHandleRotationAxis (void) const -{ - SFVec3f::GetHandlePtr returnValue( - new SFVec3f::GetHandle( - &_sfRotationAxis, - this->getType().getFieldDesc(RotationAxisFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SkewTransformationElementBase::editHandleRotationAxis (void) -{ - SFVec3f::EditHandlePtr returnValue( - new SFVec3f::EditHandle( - &_sfRotationAxis, - this->getType().getFieldDesc(RotationAxisFieldId), - this)); - - - editSField(RotationAxisFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SkewTransformationElementBase::getHandleTranslationAxis (void) const -{ - SFVec3f::GetHandlePtr returnValue( - new SFVec3f::GetHandle( - &_sfTranslationAxis, - this->getType().getFieldDesc(TranslationAxisFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SkewTransformationElementBase::editHandleTranslationAxis(void) -{ - SFVec3f::EditHandlePtr returnValue( - new SFVec3f::EditHandle( - &_sfTranslationAxis, - this->getType().getFieldDesc(TranslationAxisFieldId), - this)); - - - editSField(TranslationAxisFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SkewTransformationElementBase::getHandleAngle (void) const -{ - SFReal32::GetHandlePtr returnValue( - new SFReal32::GetHandle( - &_sfAngle, - this->getType().getFieldDesc(AngleFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SkewTransformationElementBase::editHandleAngle (void) -{ - SFReal32::EditHandlePtr returnValue( - new SFReal32::EditHandle( - &_sfAngle, - this->getType().getFieldDesc(AngleFieldId), - this)); - - - editSField(AngleFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void SkewTransformationElementBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - SkewTransformationElement *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *SkewTransformationElementBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - SkewTransformationElement *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void SkewTransformationElementBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementBase.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementBase.h deleted file mode 100644 index 7b6709fb..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementBase.h +++ /dev/null @@ -1,324 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class SkewTransformationElement - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGSKEWTRANSFORMATIONELEMENTBASE_H_ -#define _OSGSKEWTRANSFORMATIONELEMENTBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGTransformationElement.h" // Parent - -#include "OSGVecFields.h" // RotationAxis type -#include "OSGSysFields.h" // Angle type - -#include "OSGSkewTransformationElementFields.h" - -OSG_BEGIN_NAMESPACE - -class SkewTransformationElement; - -//! \brief SkewTransformationElement Base Class. - -class OSG_GROUP_DLLMAPPING SkewTransformationElementBase : public TransformationElement -{ - public: - - typedef TransformationElement Inherited; - typedef TransformationElement ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(SkewTransformationElement); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - RotationAxisFieldId = Inherited::NextFieldId, - TranslationAxisFieldId = RotationAxisFieldId + 1, - AngleFieldId = TranslationAxisFieldId + 1, - NextFieldId = AngleFieldId + 1 - }; - - static const OSG::BitVector RotationAxisFieldMask = - (TypeTraits::One << RotationAxisFieldId); - static const OSG::BitVector TranslationAxisFieldMask = - (TypeTraits::One << TranslationAxisFieldId); - static const OSG::BitVector AngleFieldMask = - (TypeTraits::One << AngleFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFVec3f SFRotationAxisType; - typedef SFVec3f SFTranslationAxisType; - typedef SFReal32 SFAngleType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - - SFVec3f *editSFRotationAxis (void); - const SFVec3f *getSFRotationAxis (void) const; - - SFVec3f *editSFTranslationAxis(void); - const SFVec3f *getSFTranslationAxis (void) const; - - SFReal32 *editSFAngle (void); - const SFReal32 *getSFAngle (void) const; - - - Vec3f &editRotationAxis (void); - const Vec3f &getRotationAxis (void) const; - - Vec3f &editTranslationAxis(void); - const Vec3f &getTranslationAxis (void) const; - - Real32 &editAngle (void); - Real32 getAngle (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setRotationAxis (const Vec3f &value); - void setTranslationAxis(const Vec3f &value); - void setAngle (const Real32 value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static SkewTransformationElementTransitPtr create (void); - static SkewTransformationElement *createEmpty (void); - - static SkewTransformationElementTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static SkewTransformationElement *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static SkewTransformationElementTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFVec3f _sfRotationAxis; - SFVec3f _sfTranslationAxis; - SFReal32 _sfAngle; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - SkewTransformationElementBase(void); - SkewTransformationElementBase(const SkewTransformationElementBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~SkewTransformationElementBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleRotationAxis (void) const; - EditFieldHandlePtr editHandleRotationAxis (void); - GetFieldHandlePtr getHandleTranslationAxis (void) const; - EditFieldHandlePtr editHandleTranslationAxis(void); - GetFieldHandlePtr getHandleAngle (void) const; - EditFieldHandlePtr editHandleAngle (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( SkewTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const SkewTransformationElementBase &source); -}; - -typedef SkewTransformationElementBase *SkewTransformationElementBaseP; - -OSG_END_NAMESPACE - -#endif /* _OSGSKEWTRANSFORMATIONELEMENTBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementBase.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementBase.inl deleted file mode 100644 index 289f55ba..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementBase.inl +++ /dev/null @@ -1,184 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class SkewTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &SkewTransformationElementBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 SkewTransformationElementBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 SkewTransformationElementBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - -//! Get the value of the SkewTransformationElement::_sfRotationAxis field. - -inline -Vec3f &SkewTransformationElementBase::editRotationAxis(void) -{ - editSField(RotationAxisFieldMask); - - return _sfRotationAxis.getValue(); -} - -//! Get the value of the SkewTransformationElement::_sfRotationAxis field. -inline -const Vec3f &SkewTransformationElementBase::getRotationAxis(void) const -{ - return _sfRotationAxis.getValue(); -} - -//! Set the value of the SkewTransformationElement::_sfRotationAxis field. -inline -void SkewTransformationElementBase::setRotationAxis(const Vec3f &value) -{ - editSField(RotationAxisFieldMask); - - _sfRotationAxis.setValue(value); -} -//! Get the value of the SkewTransformationElement::_sfTranslationAxis field. - -inline -Vec3f &SkewTransformationElementBase::editTranslationAxis(void) -{ - editSField(TranslationAxisFieldMask); - - return _sfTranslationAxis.getValue(); -} - -//! Get the value of the SkewTransformationElement::_sfTranslationAxis field. -inline -const Vec3f &SkewTransformationElementBase::getTranslationAxis(void) const -{ - return _sfTranslationAxis.getValue(); -} - -//! Set the value of the SkewTransformationElement::_sfTranslationAxis field. -inline -void SkewTransformationElementBase::setTranslationAxis(const Vec3f &value) -{ - editSField(TranslationAxisFieldMask); - - _sfTranslationAxis.setValue(value); -} -//! Get the value of the SkewTransformationElement::_sfAngle field. - -inline -Real32 &SkewTransformationElementBase::editAngle(void) -{ - editSField(AngleFieldMask); - - return _sfAngle.getValue(); -} - -//! Get the value of the SkewTransformationElement::_sfAngle field. -inline - Real32 SkewTransformationElementBase::getAngle(void) const -{ - return _sfAngle.getValue(); -} - -//! Set the value of the SkewTransformationElement::_sfAngle field. -inline -void SkewTransformationElementBase::setAngle(const Real32 value) -{ - editSField(AngleFieldMask); - - _sfAngle.setValue(value); -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void SkewTransformationElementBase::execSync ( SkewTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (RotationAxisFieldMask & whichField)) - _sfRotationAxis.syncWith(pFrom->_sfRotationAxis); - - if(FieldBits::NoField != (TranslationAxisFieldMask & whichField)) - _sfTranslationAxis.syncWith(pFrom->_sfTranslationAxis); - - if(FieldBits::NoField != (AngleFieldMask & whichField)) - _sfAngle.syncWith(pFrom->_sfAngle); -} -#endif - - -inline -const Char8 *SkewTransformationElementBase::getClassname(void) -{ - return "SkewTransformationElement"; -} -OSG_GEN_CONTAINERPTR(SkewTransformationElement); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementFields.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementFields.h deleted file mode 100644 index 0df68f74..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGSkewTransformationElementFields.h +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGSKEWTRANSFORMATIONELEMENTFIELDS_H_ -#define _OSGSKEWTRANSFORMATIONELEMENTFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class SkewTransformationElement; - -OSG_GEN_CONTAINERPTR(SkewTransformationElement); - -/*! \ingroup GrpGroupFieldTraits - \ingroup GrpLibOSGGroup - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFSkewTransformationElementPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFSkewTransformationElementPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecSkewTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecSkewTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakSkewTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdSkewTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecSkewTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecSkewTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakSkewTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdSkewTransformationElementPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFRecSkewTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUnrecSkewTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFWeakSkewTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUncountedSkewTransformationElementPtr; - - -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFRecSkewTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUnrecSkewTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFWeakSkewTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUncountedSkewTransformationElementPtr; - - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFRecSkewTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUnrecSkewTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFWeakSkewTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUncountedSkewTransformationElementPtr : - public PointerSField {}; - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFRecSkewTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecSkewTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFWeakSkewTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUncountedSkewTransformationElementPtr : - public PointerMField {}; - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGSKEWTRANSFORMATIONELEMENTFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.cpp deleted file mode 100644 index 4a5c6cec..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include - -#include "OSGTransformationElement.h" -#include "OSGStackedTransform.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGTransformationElementBase.cpp file. -// To modify it, please change the .fcd file (OSGTransformationElement.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void TransformationElement::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void TransformationElement::updateParentTransform(void) -{ - if(_sfParentStack.getValue() != NULL) - { - dynamic_cast(_sfParentStack.getValue())->invalidateTransform(); - } -} - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -TransformationElement::TransformationElement(void) : - Inherited() -{ -} - -TransformationElement::TransformationElement(const TransformationElement &source) : - Inherited(source) -{ -} - -TransformationElement::~TransformationElement(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void TransformationElement::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); -} - -void TransformationElement::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump TransformationElement NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.fcd b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.fcd deleted file mode 100644 index a2153e5b..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.fcd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - The StackedTransform this TransformationElement is contained in. - - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.h deleted file mode 100644 index 7d599a22..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.h +++ /dev/null @@ -1,135 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGTRANSFORMATIONELEMENT_H_ -#define _OSGTRANSFORMATIONELEMENT_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGTransformationElementBase.h" -#include "OSGMatrix.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief TransformationElement class. See \ref - PageGroupTransformationElement for a description. -*/ - -class OSG_GROUP_DLLMAPPING TransformationElement : public TransformationElementBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef TransformationElementBase Inherited; - typedef TransformationElement Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - - void accumulateMatrix(Matrix &result) const; - - virtual void calcMatrix(Matrix &result) const = 0; - - Matrix calcMatrix(void) const; - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in TransformationElementBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - TransformationElement(void); - TransformationElement(const TransformationElement &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~TransformationElement(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - void updateParentTransform(void); - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class TransformationElementBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const TransformationElement &source); -}; - -typedef TransformationElement *TransformationElementP; - -OSG_END_NAMESPACE - -#include "OSGTransformationElementBase.inl" -#include "OSGTransformationElement.inl" - -#endif /* _OSGTRANSFORMATIONELEMENT_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.inl deleted file mode 100644 index fb69a449..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElement.inl +++ /dev/null @@ -1,59 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -inline -void TransformationElement::accumulateMatrix(Matrix &result) const -{ - result.mult(calcMatrix()); -} - -inline -Matrix TransformationElement::calcMatrix(void) const -{ - Matrix Result; - - calcMatrix(Result); - - return Result; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementBase.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementBase.cpp deleted file mode 100644 index 43dee39d..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementBase.cpp +++ /dev/null @@ -1,386 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class TransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - -#include "OSGFieldContainer.h" // ParentStack Class - -#include "OSGTransformationElementBase.h" -#include "OSGTransformationElement.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::TransformationElement - - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var FieldContainer * TransformationElementBase::_sfParentStack - The StackedTransform this TransformationElement is contained in. -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("TransformationElementPtr", "AttachmentContainerPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(TransformationElement *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - TransformationElement *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - TransformationElement *, - 0); - -DataType &FieldTraits< TransformationElement *, 1 >::getType(void) -{ - return FieldTraits::getType(); -} - - -OSG_EXPORT_PTR_MFIELD(ChildPointerMField, - TransformationElement *, - UnrecordedRefCountPolicy, - 1); - - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void TransformationElementBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFParentFieldContainerPtr::Description( - SFParentFieldContainerPtr::getClassType(), - "ParentStack", - "The StackedTransform this TransformationElement is contained in.\n", - ParentStackFieldId, ParentStackFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast (&TransformationElement::invalidEditField), - static_cast (&TransformationElement::invalidGetField)); - - oType.addInitialDesc(pDesc); -} - - -TransformationElementBase::TypeObject TransformationElementBase::_type( - TransformationElementBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - NULL, - TransformationElement::initMethod, - TransformationElement::exitMethod, - reinterpret_cast(&TransformationElement::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - "\t\n" - "\t The StackedTransform this TransformationElement is contained in.\n" - "\t\n" - "\n", - "" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &TransformationElementBase::getType(void) -{ - return _type; -} - -const FieldContainerType &TransformationElementBase::getType(void) const -{ - return _type; -} - -UInt32 TransformationElementBase::getContainerSize(void) const -{ - return sizeof(TransformationElement); -} - -/*------------------------- decorator get ------------------------------*/ - - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 TransformationElementBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (ParentStackFieldMask & whichField)) - { - returnValue += _sfParentStack.getBinSize(); - } - - return returnValue; -} - -void TransformationElementBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (ParentStackFieldMask & whichField)) - { - _sfParentStack.copyToBin(pMem); - } -} - -void TransformationElementBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (ParentStackFieldMask & whichField)) - { - _sfParentStack.copyFromBin(pMem); - } -} - - - -/*------------------------- constructors ----------------------------------*/ - -TransformationElementBase::TransformationElementBase(void) : - Inherited(), - _sfParentStack (NULL) -{ -} - -TransformationElementBase::TransformationElementBase(const TransformationElementBase &source) : - Inherited(source), - _sfParentStack (NULL) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -TransformationElementBase::~TransformationElementBase(void) -{ -} -/*-------------------------------------------------------------------------*/ -/* Parent linking */ - -bool TransformationElementBase::linkParent( - FieldContainer * const pParent, - UInt16 const childFieldId, - UInt16 const parentFieldId ) -{ - if(parentFieldId == ParentStackFieldId) - { - FieldContainer * pTypedParent = - dynamic_cast< FieldContainer * >(pParent); - - if(pTypedParent != NULL) - { - FieldContainer *pOldParent = - _sfParentStack.getValue (); - - UInt16 oldChildFieldId = - _sfParentStack.getParentFieldPos(); - - if(pOldParent != NULL) - { - pOldParent->unlinkChild(this, oldChildFieldId); - } - - editSField(ParentStackFieldMask); - - _sfParentStack.setValue(static_cast(pParent), childFieldId); - - return true; - } - - return false; - } - - return Inherited::linkParent(pParent, childFieldId, parentFieldId); -} - -bool TransformationElementBase::unlinkParent( - FieldContainer * const pParent, - UInt16 const parentFieldId) -{ - if(parentFieldId == ParentStackFieldId) - { - FieldContainer * pTypedParent = - dynamic_cast< FieldContainer * >(pParent); - - if(pTypedParent != NULL) - { - if(_sfParentStack.getValue() == pParent) - { - editSField(ParentStackFieldMask); - - _sfParentStack.setValue(NULL, 0xFFFF); - - return true; - } - - FWARNING(("TransformationElementBase::unlinkParent: " - "Child <-> Parent link inconsistent.\n")); - - return false; - } - - return false; - } - - return Inherited::unlinkParent(pParent, parentFieldId); -} - - - -GetFieldHandlePtr TransformationElementBase::getHandleParentStack (void) const -{ - SFParentFieldContainerPtr::GetHandlePtr returnValue; - - return returnValue; -} - -EditFieldHandlePtr TransformationElementBase::editHandleParentStack (void) -{ - EditFieldHandlePtr returnValue; - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void TransformationElementBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - TransformationElement *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - - -void TransformationElementBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementBase.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementBase.h deleted file mode 100644 index f843742b..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementBase.h +++ /dev/null @@ -1,249 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class TransformationElement - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGTRANSFORMATIONELEMENTBASE_H_ -#define _OSGTRANSFORMATIONELEMENTBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGAttachmentContainer.h" // Parent - -#include "OSGFieldContainerFields.h" // ParentStack type - -#include "OSGTransformationElementFields.h" - -OSG_BEGIN_NAMESPACE - -class TransformationElement; - -//! \brief TransformationElement Base Class. - -class OSG_GROUP_DLLMAPPING TransformationElementBase : public AttachmentContainer -{ - public: - - typedef AttachmentContainer Inherited; - typedef AttachmentContainer ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(TransformationElement); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - ParentStackFieldId = Inherited::NextFieldId, - NextFieldId = ParentStackFieldId + 1 - }; - - static const OSG::BitVector ParentStackFieldMask = - (TypeTraits::One << ParentStackFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFParentFieldContainerPtr SFParentStackType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFParentFieldContainerPtr _sfParentStack; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - TransformationElementBase(void); - TransformationElementBase(const TransformationElementBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~TransformationElementBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Parent linking */ - /*! \{ */ - - virtual bool linkParent (FieldContainer * const pParent, - UInt16 const childFieldId, - UInt16 const parentFieldId); - virtual bool unlinkParent(FieldContainer * const pParent, - UInt16 const parentFieldId); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleParentStack (void) const; - EditFieldHandlePtr editHandleParentStack (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( TransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const TransformationElementBase &source); -}; - -typedef TransformationElementBase *TransformationElementBaseP; - -OSG_END_NAMESPACE - -#endif /* _OSGTRANSFORMATIONELEMENTBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementBase.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementBase.inl deleted file mode 100644 index 7fbab7e7..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementBase.inl +++ /dev/null @@ -1,103 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class TransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &TransformationElementBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 TransformationElementBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 TransformationElementBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void TransformationElementBase::execSync ( TransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (ParentStackFieldMask & whichField)) - _sfParentStack.syncWith(pFrom->_sfParentStack); -} -#endif - - -inline -const Char8 *TransformationElementBase::getClassname(void) -{ - return "TransformationElement"; -} -OSG_GEN_CONTAINERPTR(TransformationElement); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementFields.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementFields.h deleted file mode 100644 index 72b0549e..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTransformationElementFields.h +++ /dev/null @@ -1,309 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGTRANSFORMATIONELEMENTFIELDS_H_ -#define _OSGTRANSFORMATIONELEMENTFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class TransformationElement; - -OSG_GEN_CONTAINERPTR(TransformationElement); - -/*! \ingroup GrpGroupFieldTraits - \ingroup GrpLibOSGGroup - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFTransformationElementPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFTransformationElementPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdTransformationElementPtr"; -} - - -/*! \ingroup GrpGroupFieldTraits - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - public: - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - - template inline - static const Char8 *getMName (void); -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecChildTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecChildTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakChildTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdChildTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecChildTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecChildTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakChildTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdChildTransformationElementPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFRecTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUnrecTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFWeakTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUncountedTransformationElementPtr; - - -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFRecTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUnrecTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFWeakTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUncountedTransformationElementPtr; - - - -/*! \ingroup GrpGroupFieldMFields */ -typedef ChildPointerMField< - TransformationElement *, - UnrecordedRefCountPolicy, - 1 > MFUnrecChildTransformationElementPtr; - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFRecTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUnrecTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFWeakTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUncountedTransformationElementPtr : - public PointerSField {}; - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFRecTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFWeakTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUncountedTransformationElementPtr : - public PointerMField {}; - - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecChildTransformationElementPtr : - public ChildPointerMField< - TransformationElement *, - UnrecordedRefCountPolicy, - 1 > {}; - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGTRANSFORMATIONELEMENTFIELDS_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.cpp deleted file mode 100644 index 773a424d..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include - -#include "OSGTranslationTransformationElement.h" - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGTranslationTransformationElementBase.cpp file. -// To modify it, please change the .fcd file (OSGTranslationTransformationElement.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void TranslationTransformationElement::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void TranslationTransformationElement::calcMatrix(Matrix &result) const -{ - result.setTransform(getTranslation()); -} - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ - -/*----------------------- constructors & destructors ----------------------*/ - -TranslationTransformationElement::TranslationTransformationElement(void) : - Inherited() -{ -} - -TranslationTransformationElement::TranslationTransformationElement(const TranslationTransformationElement &source) : - Inherited(source) -{ -} - -TranslationTransformationElement::~TranslationTransformationElement(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void TranslationTransformationElement::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - - if(whichField & TranslationFieldMask) - { - updateParentTransform(); - } -} - -void TranslationTransformationElement::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump TranslationTransformationElement NI" << std::endl; -} - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.fcd b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.fcd deleted file mode 100644 index 7581144b..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.fcd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.h deleted file mode 100644 index cd165565..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.h +++ /dev/null @@ -1,130 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGTRANSLATIONTRANSFORMATIONELEMENT_H_ -#define _OSGTRANSLATIONTRANSFORMATIONELEMENT_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGTranslationTransformationElementBase.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief TranslationTransformationElement class. See \ref - PageGroupTranslationTransformationElement for a description. -*/ - -class OSG_GROUP_DLLMAPPING TranslationTransformationElement : public TranslationTransformationElementBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef TranslationTransformationElementBase Inherited; - typedef TranslationTransformationElement Self; - - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - - virtual void calcMatrix(Matrix &result) const; - - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in TranslationTransformationElementBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - TranslationTransformationElement(void); - TranslationTransformationElement(const TranslationTransformationElement &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~TranslationTransformationElement(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - - friend class FieldContainer; - friend class TranslationTransformationElementBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const TranslationTransformationElement &source); -}; - -typedef TranslationTransformationElement *TranslationTransformationElementP; - -OSG_END_NAMESPACE - -#include "OSGTranslationTransformationElementBase.inl" -#include "OSGTranslationTransformationElement.inl" - -#endif /* _OSGTRANSLATIONTRANSFORMATIONELEMENT_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.inl deleted file mode 100644 index 5ecdb6f4..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElement.inl +++ /dev/null @@ -1,43 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementBase.cpp b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementBase.cpp deleted file mode 100644 index ee280a93..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementBase.cpp +++ /dev/null @@ -1,450 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class TranslationTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - - -#include "OSGTranslationTransformationElementBase.h" -#include "OSGTranslationTransformationElement.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::TranslationTransformationElement - - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var Vec3f TranslationTransformationElementBase::_sfTranslation - -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("TranslationTransformationElementPtr", "TransformationElementPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(TranslationTransformationElement *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - TranslationTransformationElement *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - TranslationTransformationElement *, - 0); - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void TranslationTransformationElementBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new SFVec3f::Description( - SFVec3f::getClassType(), - "Translation", - "", - TranslationFieldId, TranslationFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&TranslationTransformationElement::editHandleTranslation), - static_cast(&TranslationTransformationElement::getHandleTranslation)); - - oType.addInitialDesc(pDesc); -} - - -TranslationTransformationElementBase::TypeObject TranslationTransformationElementBase::_type( - TranslationTransformationElementBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&TranslationTransformationElementBase::createEmptyLocal), - TranslationTransformationElement::initMethod, - TranslationTransformationElement::exitMethod, - reinterpret_cast(&TranslationTransformationElement::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - "\t\n" - "\t\n" - "\n", - "" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &TranslationTransformationElementBase::getType(void) -{ - return _type; -} - -const FieldContainerType &TranslationTransformationElementBase::getType(void) const -{ - return _type; -} - -UInt32 TranslationTransformationElementBase::getContainerSize(void) const -{ - return sizeof(TranslationTransformationElement); -} - -/*------------------------- decorator get ------------------------------*/ - - -SFVec3f *TranslationTransformationElementBase::editSFTranslation(void) -{ - editSField(TranslationFieldMask); - - return &_sfTranslation; -} - -const SFVec3f *TranslationTransformationElementBase::getSFTranslation(void) const -{ - return &_sfTranslation; -} - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 TranslationTransformationElementBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (TranslationFieldMask & whichField)) - { - returnValue += _sfTranslation.getBinSize(); - } - - return returnValue; -} - -void TranslationTransformationElementBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (TranslationFieldMask & whichField)) - { - _sfTranslation.copyToBin(pMem); - } -} - -void TranslationTransformationElementBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (TranslationFieldMask & whichField)) - { - _sfTranslation.copyFromBin(pMem); - } -} - -//! create a new instance of the class -TranslationTransformationElementTransitPtr TranslationTransformationElementBase::createLocal(BitVector bFlags) -{ - TranslationTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -TranslationTransformationElementTransitPtr TranslationTransformationElementBase::createDependent(BitVector bFlags) -{ - TranslationTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -TranslationTransformationElementTransitPtr TranslationTransformationElementBase::create(void) -{ - TranslationTransformationElementTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -TranslationTransformationElement *TranslationTransformationElementBase::createEmptyLocal(BitVector bFlags) -{ - TranslationTransformationElement *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -TranslationTransformationElement *TranslationTransformationElementBase::createEmpty(void) -{ - TranslationTransformationElement *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr TranslationTransformationElementBase::shallowCopyLocal( - BitVector bFlags) const -{ - TranslationTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr TranslationTransformationElementBase::shallowCopyDependent( - BitVector bFlags) const -{ - TranslationTransformationElement *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr TranslationTransformationElementBase::shallowCopy(void) const -{ - TranslationTransformationElement *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -TranslationTransformationElementBase::TranslationTransformationElementBase(void) : - Inherited(), - _sfTranslation (Vec3f(0.0f,0.0f,0.0f)) -{ -} - -TranslationTransformationElementBase::TranslationTransformationElementBase(const TranslationTransformationElementBase &source) : - Inherited(source), - _sfTranslation (source._sfTranslation ) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -TranslationTransformationElementBase::~TranslationTransformationElementBase(void) -{ -} - - -GetFieldHandlePtr TranslationTransformationElementBase::getHandleTranslation (void) const -{ - SFVec3f::GetHandlePtr returnValue( - new SFVec3f::GetHandle( - &_sfTranslation, - this->getType().getFieldDesc(TranslationFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr TranslationTransformationElementBase::editHandleTranslation (void) -{ - SFVec3f::EditHandlePtr returnValue( - new SFVec3f::EditHandle( - &_sfTranslation, - this->getType().getFieldDesc(TranslationFieldId), - this)); - - - editSField(TranslationFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void TranslationTransformationElementBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - TranslationTransformationElement *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *TranslationTransformationElementBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - TranslationTransformationElement *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void TranslationTransformationElementBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - - -} - - -OSG_END_NAMESPACE diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementBase.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementBase.h deleted file mode 100644 index c98f6718..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementBase.h +++ /dev/null @@ -1,295 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class TranslationTransformationElement - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGTRANSLATIONTRANSFORMATIONELEMENTBASE_H_ -#define _OSGTRANSLATIONTRANSFORMATIONELEMENTBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGTransformationElement.h" // Parent - -#include "OSGVecFields.h" // Translation type - -#include "OSGTranslationTransformationElementFields.h" - -OSG_BEGIN_NAMESPACE - -class TranslationTransformationElement; - -//! \brief TranslationTransformationElement Base Class. - -class OSG_GROUP_DLLMAPPING TranslationTransformationElementBase : public TransformationElement -{ - public: - - typedef TransformationElement Inherited; - typedef TransformationElement ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(TranslationTransformationElement); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - TranslationFieldId = Inherited::NextFieldId, - NextFieldId = TranslationFieldId + 1 - }; - - static const OSG::BitVector TranslationFieldMask = - (TypeTraits::One << TranslationFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef SFVec3f SFTranslationType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - - SFVec3f *editSFTranslation (void); - const SFVec3f *getSFTranslation (void) const; - - - Vec3f &editTranslation (void); - const Vec3f &getTranslation (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setTranslation (const Vec3f &value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static TranslationTransformationElementTransitPtr create (void); - static TranslationTransformationElement *createEmpty (void); - - static TranslationTransformationElementTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static TranslationTransformationElement *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static TranslationTransformationElementTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - SFVec3f _sfTranslation; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - TranslationTransformationElementBase(void); - TranslationTransformationElementBase(const TranslationTransformationElementBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~TranslationTransformationElementBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleTranslation (void) const; - EditFieldHandlePtr editHandleTranslation (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( TranslationTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const TranslationTransformationElementBase &source); -}; - -typedef TranslationTransformationElementBase *TranslationTransformationElementBaseP; - -OSG_END_NAMESPACE - -#endif /* _OSGTRANSLATIONTRANSFORMATIONELEMENTBASE_H_ */ diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementBase.inl b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementBase.inl deleted file mode 100644 index a234e167..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementBase.inl +++ /dev/null @@ -1,128 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class TranslationTransformationElement! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &TranslationTransformationElementBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 TranslationTransformationElementBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 TranslationTransformationElementBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - -//! Get the value of the TranslationTransformationElement::_sfTranslation field. - -inline -Vec3f &TranslationTransformationElementBase::editTranslation(void) -{ - editSField(TranslationFieldMask); - - return _sfTranslation.getValue(); -} - -//! Get the value of the TranslationTransformationElement::_sfTranslation field. -inline -const Vec3f &TranslationTransformationElementBase::getTranslation(void) const -{ - return _sfTranslation.getValue(); -} - -//! Set the value of the TranslationTransformationElement::_sfTranslation field. -inline -void TranslationTransformationElementBase::setTranslation(const Vec3f &value) -{ - editSField(TranslationFieldMask); - - _sfTranslation.setValue(value); -} - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void TranslationTransformationElementBase::execSync ( TranslationTransformationElementBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (TranslationFieldMask & whichField)) - _sfTranslation.syncWith(pFrom->_sfTranslation); -} -#endif - - -inline -const Char8 *TranslationTransformationElementBase::getClassname(void) -{ - return "TranslationTransformationElement"; -} -OSG_GEN_CONTAINERPTR(TranslationTransformationElement); - -OSG_END_NAMESPACE - diff --git a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementFields.h b/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementFields.h deleted file mode 100644 index 37e8736a..00000000 --- a/Source/System/NodeCores/Groups/Misc/TransformationElements/OSGTranslationTransformationElementFields.h +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGTRANSLATIONTRANSFORMATIONELEMENTFIELDS_H_ -#define _OSGTRANSLATIONTRANSFORMATIONELEMENTFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGGroupDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class TranslationTransformationElement; - -OSG_GEN_CONTAINERPTR(TranslationTransformationElement); - -/*! \ingroup GrpGroupFieldTraits - \ingroup GrpLibOSGGroup - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_GROUP_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFTranslationTransformationElementPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFTranslationTransformationElementPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecTranslationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecTranslationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakTranslationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdTranslationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecTranslationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecTranslationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakTranslationTransformationElementPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdTranslationTransformationElementPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFRecTranslationTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUnrecTranslationTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFWeakTranslationTransformationElementPtr; -/*! \ingroup GrpGroupFieldSFields */ -typedef PointerSField SFUncountedTranslationTransformationElementPtr; - - -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFRecTranslationTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUnrecTranslationTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFWeakTranslationTransformationElementPtr; -/*! \ingroup GrpGroupFieldMFields */ -typedef PointerMField MFUncountedTranslationTransformationElementPtr; - - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFRecTranslationTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUnrecTranslationTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFWeakTranslationTransformationElementPtr : - public PointerSField {}; -/*! \ingroup GrpGroupFieldSFields \ingroup GrpLibOSGGroup */ -struct SFUncountedTranslationTransformationElementPtr : - public PointerSField {}; - - -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFRecTranslationTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUnrecTranslationTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFWeakTranslationTransformationElementPtr : - public PointerMField {}; -/*! \ingroup GrpGroupFieldMFields \ingroup GrpLibOSGGroup */ -struct MFUncountedTranslationTransformationElementPtr : - public PointerMField {}; - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGTRANSLATIONTRANSFORMATIONELEMENTFIELDS_H_ */ diff --git a/Source/System/Window/Base/OSGWindowEventProducer.cpp b/Source/System/Window/Base/OSGWindowEventProducer.cpp index 2acd6ca9..9bc22334 100644 --- a/Source/System/Window/Base/OSGWindowEventProducer.cpp +++ b/Source/System/Window/Base/OSGWindowEventProducer.cpp @@ -164,7 +164,7 @@ ViewportUnrecPtr WindowEventProducer::windowToViewport(const Pnt2f& WindowPoint, ThePort = getPort(i); if(ThePort->getEnabled()) { - ViewportPoint.setValues(WindowPoint.x() - ThePort->getPixelLeft(), WindowPoint.y() - ThePort->getPixelBottom()); + ViewportPoint.setValues(WindowPoint.x() - ThePort->calcPixelLeft(), WindowPoint.y() - ThePort->calcPixelBottom()); return ThePort; } @@ -535,4 +535,9 @@ void WindowEventProducer::dump( UInt32 , SLOG << "Dump WindowEventProducer NI" << std::endl; } +void WindowEventProducer::setSize(UInt16 width, + UInt16 height) +{ + this->setSize( Vec2us(width, height) ); +} OSG_END_NAMESPACE diff --git a/Source/System/Window/Base/OSGWindowEventProducer.h b/Source/System/Window/Base/OSGWindowEventProducer.h index 8b649a04..e856dd75 100644 --- a/Source/System/Window/Base/OSGWindowEventProducer.h +++ b/Source/System/Window/Base/OSGWindowEventProducer.h @@ -49,7 +49,6 @@ #include #include "OSGThread.h" #include "OSGRenderAction.h" -#include "OSGPathType.h" #include #include "OSGWindowEventDetails.h" @@ -157,6 +156,9 @@ class OSG_SYSTEM_DLLMAPPING WindowEventProducer : public WindowEventProducerBase //Set the Window size virtual void setSize(Vec2us Size) = 0; + virtual void setSize(UInt16 width, + UInt16 height); + //Get the Window size virtual Vec2f getSize(void) const = 0; @@ -314,7 +316,7 @@ class OSG_SYSTEM_DLLMAPPING WindowEventProducer : public WindowEventProducerBase DisplayCallbackFunc _DisplayCallbackFunc; ReshapeCallbackFunc _ReshapeCallbackFunc; - RenderAction * _RenderAction; + RenderActionRefPtr _RenderAction; void internalDraw(void); void internalReshape(Vec2f size); diff --git a/Source/System/Window/Foregrounds/OSGSimpleTextForeground.cpp b/Source/System/Window/Foregrounds/OSGSimpleTextForeground.cpp deleted file mode 100644 index 852c05e2..00000000 --- a/Source/System/Window/Foregrounds/OSGSimpleTextForeground.cpp +++ /dev/null @@ -1,637 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -#include -#include - -#include "OSGConfig.h" - -#include "OSGSimpleTextForeground.h" - -#include "OSGImage.h" - -#include "OSGViewport.h" - -#include "OSGStatisticsDefaultFont.h" - -#include "OSGTextLayoutParam.h" -#include "OSGTextLayoutResult.h" -#include "OSGTextTXFGlyph.h" -#include "OSGTextureObjChunk.h" -#include "OSGTextureEnvChunk.h" - -#include -#include - -using namespace boost::xpressive; - -OSG_BEGIN_NAMESPACE - -// Documentation for this class is emitted in the -// OSGSimpleTextForegroundBase.cpp file. -// To modify it, please change the .fcd file (OSGSimpleTextForeground.fcd) and -// regenerate the base file. - -/***************************************************************************\ - * Class variables * -\***************************************************************************/ - -/***************************************************************************\ - * Class methods * -\***************************************************************************/ - -void SimpleTextForeground::initMethod(InitPhase ePhase) -{ - Inherited::initMethod(ePhase); - - if(ePhase == TypeObject::SystemPost) - { - } -} - - -/***************************************************************************\ - * Instance methods * -\***************************************************************************/ - -void SimpleTextForeground::initText(const std::string &family, Real32 size) -{ - // Cleanup - _face = NULL; - _texchunk = NULL; - - // Create the font - if (family.empty() == false) - { - TextTXFParam param; - param.size = static_cast(size); - _face = TextTXFFace::create(family, TextFace::STYLE_PLAIN, param); - if (_face != 0) - { - _texchunk = TextureObjChunk::createLocal(); - ImageUnrecPtr texture = _face->getTexture(); - _texchunk->setImage(texture); - _texchunk->setWrapS(GL_CLAMP_TO_EDGE); - _texchunk->setWrapT(GL_CLAMP_TO_EDGE); - _texchunk->setMinFilter(GL_NEAREST); - _texchunk->setMagFilter(GL_NEAREST); - } - } - - // We failed to create the font - fallback to the default font - if (_face == 0) - { - _face = StatisticsDefaultFont::the()->getFace(); - _texchunk = StatisticsDefaultFont::the()->getTexture(); - } -} - -void SimpleTextForeground::draw(DrawEnv *pEnv) -{ - if(!getActive()) - { - return; - } - - if(_face == NULL) - { - initText(getFamily(), getSize()); - } - - //Setup the orthographic projection - UInt32 fullWidth; - UInt32 fullHeight; - beginOrthoRender(pEnv, fullWidth, fullHeight); - - glPushAttrib(GL_LIGHTING_BIT | GL_POLYGON_BIT | GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); - - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glDisable(GL_DEPTH_TEST); - glDisable(GL_COLOR_MATERIAL); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glEnable(GL_BLEND); - - //Layout the text - TextLayoutParam layoutParam; - layoutParam.spacing = 1.1f; - layoutParam.majorAlignment = TextLayoutParam::ALIGN_BEGIN; - layoutParam.minorAlignment = TextLayoutParam::ALIGN_BEGIN; - - TextLayoutResult layoutResult; - _face->layout(_PlainTextLines, layoutParam, layoutResult); - - Real32 scale = 1 / _face->getScale(); - Real32 size = _face->getParam().size; - Real32 textWidth = layoutResult.textBounds.x() * scale + size + getTextMargin().x() * 2.0f; - Real32 textHeight = layoutResult.textBounds.y() * scale + size + getTextMargin().y() * 2.0f; - - // Let's do some simple form of layout management - Real32 pw = Real32(pEnv->getPixelWidth ()); - Real32 ph = Real32(pEnv->getPixelHeight()); - - if(pw < 1 || ph < 1) - { - return; - } - - Real32 orthoX = 0, orthoY = ph; - - switch ( getHorizontalAlign() ) - { - case Right: - orthoX = pw - textWidth; - break; - case Middle: - orthoX = (pw - textWidth) * 0.5; - break; - case Left: - default: - break; - } - - switch ( getVerticalAlign() ) - { - case Bottom: - orthoY = textHeight; - break; - case Center: - orthoY = (ph - textHeight) * 0.5 + textHeight; - break; - case Top: - default: - break; - } - - glTranslatef(orthoX, orthoY, 0.0); - - // draw background - glColor4fv(static_cast(getBgColor().getValuesRGBA())); - glBegin(GL_QUADS); - glVertex2f(0, -textHeight); - glVertex2f(textWidth, -textHeight); - glVertex2f(textWidth, 0); - glVertex2f(0, 0); - glEnd(); - - // draw border - if(getBorderColor().alpha() >= 0.0f) - { - glColor4fv( - static_cast(getBorderColor().getValuesRGBA())); - - glBegin(GL_LINE_LOOP); - glVertex2f(getBorderOffset().x(), - -textHeight + 1 + getBorderOffset().y()); - glVertex2f(textWidth - 1 - getBorderOffset().x(), - -textHeight + 1 + getBorderOffset().y()); - glVertex2f(textWidth - 1 - getBorderOffset().x(), - -1 - getBorderOffset().y()); - glVertex2f(getBorderOffset().x(), -1 - getBorderOffset().y()); - glEnd(); - } - - glTranslatef( 0.5 * size + getTextMargin().x(), - -0.5 * size - getTextMargin().y(), - 0.0); - - _texchunk ->activate(pEnv); - _texenvchunk->activate(pEnv); - - // draw text shadow - glColor4fv(static_cast(getShadowColor().getValuesRGBA())); - glPushMatrix(); - glTranslatef(getShadowOffset().x(), getShadowOffset().y(), 0); - glScalef(scale, scale, 1); - drawCharacters(_face, layoutResult, false); - - // draw text - glPopMatrix(); - glScalef(scale, scale, 1); - drawCharacters(_face, layoutResult, true); - - _texchunk ->deactivate(pEnv); - _texenvchunk->deactivate(pEnv); - - glPopAttrib(); - - //reset the matrices - endOrthoRender(pEnv); -} - -/*-------------------------------------------------------------------------*\ - - private - -\*-------------------------------------------------------------------------*/ -/*! Sets up an ortho projection for rendering. It handles tiling - when a TileCameraDecorator is in use. When done you need to call - endOrthoRender to clean up changes to the OpenGL matrix stacks. - - \param pEnv DrawEnv being used for rendering - \param normX Wether x coordinates are going to be normalized. - \param normY Wether y coordinates are going to be normalized. - \param[out] fullWidth width of the viewport - \param[out] fullHeight height of the viewport - - \note When the TileCameraDecorator is in use, the width and height of the - viewport (fullWidth, fullHeight) are defined by the TileCameraDecorator. - */ -void SimpleTextForeground::beginOrthoRender(DrawEnv *pEnv, - UInt32 &fullWidth, - UInt32 &fullHeight) -{ - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - glLoadIdentity(); - - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - - UInt32 width = pEnv->getPixelWidth (); - UInt32 height = pEnv->getPixelHeight(); - - fullWidth = pEnv->getTileFullSize()[0]; - fullHeight = pEnv->getTileFullSize()[1]; - - if(fullWidth == 0 || getTile()) - { - fullWidth = width; - fullHeight = height; - } - else if(!getTile()) - { - /*! \warning: Hack! */ - glMatrixMode(GL_MODELVIEW); - glTranslatef(0.0f, fullHeight - height,0.0f); - //End Hack - - glMatrixMode(GL_PROJECTION); - Matrix sm = pEnv->calcTileDecorationMatrix(); - - glLoadMatrixf(sm.getValues()); - - } - - glOrtho(- 0.375f, - static_cast(fullWidth) - 0.375f, - - 0.375f, - static_cast(fullHeight) - 0.375f, - -1.0f, - 1.0f); - - glMatrixMode(GL_MODELVIEW); -} - -/*! Clean up changes to the OpenGL matrix stacks done by beginOrthoRender - */ -void SimpleTextForeground::endOrthoRender(DrawEnv *pEnv) -{ - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - glMatrixMode(GL_MODELVIEW); - glPopMatrix(); -} - -void SimpleTextForeground::resolveLinks(void) -{ - Inherited::resolveLinks(); - - _texchunk = NULL; - _texenvchunk = NULL; - _face = NULL; -} - -template -struct HexTo { - ElemT value; - operator ElemT() const {return value;} - friend std::istream& operator>>(std::istream& in, HexTo& out) { - in >> std::hex >> out.value; - return in; - } -}; - -bool SimpleTextForeground::isColoredRange(UInt32 Position) const -{ - for(UInt32 i(0) ; i<_ColorRanges.size() ; ++i) - { - if(_ColorRanges[i].isBounded(Position)) - { - return true; - } - } - - return false; -} - -Color4f SimpleTextForeground::getColorRange(UInt32 Position) const -{ - for(UInt32 i(0) ; i<_ColorRanges.size() ; ++i) - { - if(_ColorRanges[i].isBounded(Position)) - { - return _ColorRanges[i].getColor(); - } - } - - return Color4f(); -} - -void SimpleTextForeground::updateFormatting(void) -{ - //Clear the formatted lines - _PlainTextLines.clear(); - _ColorRanges.clear(); - - UInt32 IndexOffset(0); - for(UInt32 i(0) ; isize() ; ++i) - { - std::string Result(getLines(i)); - - //Remove all newlines that do not have another newline directly afterward - mark_tag redTag(1), - greenTag(2), - blueTag(3), - alphaTag(4), - textTag(5); - - //Matches a string similar to \color=AA00FF11 - //sregex ColorRegex = - //"\\color" - //>> *space - //>> '=' - //>> *space - //>> (redTag = repeat<2>(alnum)) - //>> (greenTag = repeat<2>(alnum)) - //>> (blueTag = repeat<2>(alnum)) - //>> !(alphaTag = repeat<2>(alnum)); - - //Matches a string similar to \{\color=AA00FF11 Some text} - sregex TaggedColorRegex = - as_xpr('\\') >> '{' - >> *space - >> "\\color" - >> *space - >> '=' - >> *space - >> (redTag = repeat<2>(alnum)) - >> (greenTag = repeat<2>(alnum)) - >> (blueTag = repeat<2>(alnum)) - >> !(alphaTag = repeat<2>(alnum)) - >> *space - >> (textTag = -*_) >> '}'; - - //Get the color - smatch what; - while(regex_search(Result, what, TaggedColorRegex)) - { - Real32 Red(0.0f), Green(0.0f), Blue(0.0f), Alpha(1.0f); - - try - { - Red = - static_cast(boost::lexical_cast - >(std::string("0x") + what[redTag])) / - TypeTraits::getMax(); - } - catch(boost::bad_lexical_cast &) - { - SWARNING << "Could not convert hex value " - << what[redTag] - << " into a 8-bit unsigned integer for the red color component." - << std::endl; - } - - try - { - Green = - static_cast(boost::lexical_cast >(std::string("0x") + what[greenTag])) / - TypeTraits::getMax(); - - } - catch(boost::bad_lexical_cast &) - { - SWARNING << "Could not convert hex value " - << what[greenTag] - << " into a 8-bit unsigned integer for the green color component." - << std::endl; - } - - try - { - Blue = static_cast(boost::lexical_cast >(std::string("0x") + what[blueTag])) / - TypeTraits::getMax(); - - } - catch(boost::bad_lexical_cast &) - { - SWARNING << "Could not convert hex value " - << what[blueTag] - << " into a 8-bit unsigned integer for the blue color component." - << std::endl; - } - - try - { - Alpha = static_cast(boost::lexical_cast >(std::string("0x") + what[alphaTag])) / - TypeTraits::getMax(); - - } - catch(boost::bad_lexical_cast &) - { - SWARNING << "Could not convert hex value " - << what[alphaTag] - << " into a 8-bit unsigned integer for the alpha color component." - << std::endl; - } - - TextColoredRange ColorRange(IndexOffset + what.position(), - IndexOffset + what.position() + what[textTag].length() -1, - Color4f(Red, Green, Blue, Alpha)); - - _ColorRanges.push_back(ColorRange); - - //Remove the tag from the plain text - Result = regex_replace( Result, - TaggedColorRegex, - "" + textTag, - regex_constants::match_default | regex_constants::format_first_only); - } - - //Push the plain text line to the lines vector - _PlainTextLines.push_back(Result); - IndexOffset += Result.size(); - } -} - -// Render the text using the layout -void SimpleTextForeground::drawCharacters(TextTXFFace* const TextFace, - const TextLayoutResult &layoutResult, - bool WithColoring) -{ - Color4f CurrentColor(getColor()); - Color4f NewColor; - - glBegin(GL_QUADS); - if(WithColoring) - { - glColor4fv(CurrentColor.getValues()); - } - - UInt32 i, numGlyphs = layoutResult.getNumGlyphs(); - for(i = 0; i < numGlyphs; ++i) - { - //Does the text color need to change - if(WithColoring) - { - if(isColoredRange(i)) - { - NewColor = getColorRange(i); - } - else - { - NewColor = getColor(); - } - - if(CurrentColor != NewColor) - { - CurrentColor = NewColor; - glColor4fv(CurrentColor.getValues()); - } - } - - const TextTXFGlyph &glyph = TextFace->getTXFGlyph(layoutResult.indices[i]); - Real32 width = glyph.getWidth(); - Real32 height = glyph.getHeight(); - // No need to draw invisible glyphs - if ((width <= 0.f) || (height <= 0.f)) - continue; - - // Calculate coordinates - const Vec2f &pos = layoutResult.positions[i]; - Real32 posLeft = pos.x(); - Real32 posTop = pos.y(); - Real32 posRight = pos.x() + width; - Real32 posBottom = pos.y() - height; - Real32 texCoordLeft = glyph.getTexCoord(TextTXFGlyph::COORD_LEFT); - Real32 texCoordTop = glyph.getTexCoord(TextTXFGlyph::COORD_TOP); - Real32 texCoordRight = glyph.getTexCoord(TextTXFGlyph::COORD_RIGHT); - Real32 texCoordBottom = glyph.getTexCoord(TextTXFGlyph::COORD_BOTTOM); - - // lower left corner - glTexCoord2f(texCoordLeft, texCoordBottom); - glVertex2f(posLeft, posBottom); - - // lower right corner - glTexCoord2f(texCoordRight, texCoordBottom); - glVertex2f(posRight, posBottom); - - // upper right corner - glTexCoord2f(texCoordRight, texCoordTop); - glVertex2f(posRight, posTop); - - // upper left corner - glTexCoord2f(texCoordLeft, texCoordTop); - glVertex2f(posLeft, posTop); - } - - glEnd(); -} - -/*----------------------- constructors & destructors ----------------------*/ - -SimpleTextForeground::SimpleTextForeground(void) : - Inherited() -{ - _texenvchunk = TextureEnvChunk::createLocal(); - _texenvchunk->setEnvMode(GL_MODULATE); -} - -SimpleTextForeground::SimpleTextForeground(const SimpleTextForeground &source) : - Inherited(source), - _face (source._face), - _texchunk (source._texchunk), - _texenvchunk(source._texenvchunk) -{ -} - -SimpleTextForeground::~SimpleTextForeground(void) -{ -} - -/*----------------------------- class specific ----------------------------*/ - -void SimpleTextForeground::changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details) -{ - Inherited::changed(whichField, origin, details); - - if(whichField & LinesFieldMask) - { - updateFormatting(); - } - - if((whichField & SizeFieldMask) || - (whichField & FamilyFieldMask)) - { - _face = NULL; - } -} - -void SimpleTextForeground::dump( UInt32 , - const BitVector ) const -{ - SLOG << "Dump SimpleTextForeground NI" << std::endl; -} - -/*---------------------------- internal classes ---------------------------*/ -//SimpleTextForeground::TextElement::TextElement(const std::string& Text, - //bool IsColored, - //const Color4f& Color) : - //_Text(Text), - //_IsColored(IsColored), - //_Color(Color) -//{ -//} - -OSG_END_NAMESPACE diff --git a/Source/System/Window/Foregrounds/OSGSimpleTextForeground.fcd b/Source/System/Window/Foregrounds/OSGSimpleTextForeground.fcd deleted file mode 100644 index 17b1b176..00000000 --- a/Source/System/Window/Foregrounds/OSGSimpleTextForeground.fcd +++ /dev/null @@ -1,153 +0,0 @@ - - - - OSG::SimpleTextForeground displays a simple list of text - lines. They are displayed using a compiled-in font that can use an arbitrary - color and that can be arbitrarily resized, with the size per line given in - pixel. - - The size and color used for all lines in _sfSize and _sfColor. - - The color of the text can be overriden by using a special tag in the text - of the lines. \{\color=FF0000FF SomeText} will draw the SomeText with a red color. - - The lines of text. - - - Height of a single line, in pixel. - - - Color of the text. - - - Color of the shadow. - - - Color of the background. - - - The font family to be used, e.g. "SANS", default if unset. - - - Offset of the shadow, in pixels. - - - Simple form of layout management, defaults to SimpleTextForeground::Left. - - - Simple form of layout management, defaults to SimpleTextForeground::Top. - - - Color of the border. - - - Offset of the border in pixels. - - - Text margin in pixels. - - - Should this foreground be tilable - - diff --git a/Source/System/Window/Foregrounds/OSGSimpleTextForeground.h b/Source/System/Window/Foregrounds/OSGSimpleTextForeground.h deleted file mode 100644 index aff7c394..00000000 --- a/Source/System/Window/Foregrounds/OSGSimpleTextForeground.h +++ /dev/null @@ -1,211 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -#ifndef _OSGSIMPLETEXTFOREGROUND_H_ -#define _OSGSIMPLETEXTFOREGROUND_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGSimpleTextForegroundBase.h" -#include "OSGTextureObjChunkFields.h" -#include "OSGTextureEnvChunkFields.h" -#include "OSGTextTXFFace.h" - -OSG_BEGIN_NAMESPACE - -/*! \brief SimpleTextForeground class. See \ref - PageUtilSimpleTextForeground for a description. -*/ - -class OSG_UTIL_DLLMAPPING SimpleTextForeground : public SimpleTextForegroundBase -{ - protected: - - /*========================== PUBLIC =================================*/ - - public: - - typedef SimpleTextForegroundBase Inherited; - typedef SimpleTextForeground Self; - - /*---------------------------------------------------------------------*/ - /*! \name Modes */ - /*! \{ */ - - enum - { - Left = 0, - Middle = 1, - Right = 2 - } HorizontalAlignE; - - enum - { - Top = 0, - Center = 1, - Bottom = 2 - } VerticalAlignE; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void changed(ConstFieldMaskArg whichField, - UInt32 origin, - BitVector details ); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Output */ - /*! \{ */ - - virtual void dump( UInt32 uiIndent = 0, - const BitVector bvFlags = 0) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Draw */ - /*! \{ */ - - virtual void draw(DrawEnv *pEnv); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Convenience Functions */ - /*! \{ */ - - void addLine(const std::string& text); - void clear (void); - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - // Variables should all be in SimpleTextForegroundBase. - - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - SimpleTextForeground(void); - SimpleTextForeground(const SimpleTextForeground &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~SimpleTextForeground(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - static void initMethod(InitPhase ePhase); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Init */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - void beginOrthoRender(DrawEnv *pEnv, - UInt32 &fullWidth, - UInt32 &fullHeight); - - void endOrthoRender(DrawEnv *pEnv); - /*========================== PRIVATE ================================*/ - - private: - class TextColoredRange - { - public: - TextColoredRange(UInt32 Start, UInt32 End, const Color4f& Color); - - bool isBounded(UInt32 Position) const; - - const Color4f& getColor(void) const; - UInt32 getStart(void) const; - UInt32 getEnd(void) const; - - private: - UInt32 _Start, - _End; - Color4f _Color; - }; - - bool isColoredRange(UInt32 Position) const; - Color4f getColorRange(UInt32 Position) const; - - void updateFormatting(void); - - void drawCharacters(TextTXFFace* const TextFace, - const TextLayoutResult &layoutResult, - bool WithColoring); - - TextTXFFaceRefPtr _face; - - TextureObjChunkUnrecPtr _texchunk; - TextureEnvChunkUnrecPtr _texenvchunk; - - std::vector _PlainTextLines; - std::vector _ColorRanges; - - void initText(const std::string &family, Real32 size); - - friend class FieldContainer; - friend class SimpleTextForegroundBase; - - // prohibit default functions (move to 'public' if you need one) - void operator =(const SimpleTextForeground &source); -}; - -typedef SimpleTextForeground *SimpleTextForegroundP; - -OSG_END_NAMESPACE - -#include "OSGSimpleTextForegroundBase.inl" -#include "OSGSimpleTextForeground.inl" - -#endif /* _OSGSIMPLETEXTFOREGROUND_H_ */ diff --git a/Source/System/Window/Foregrounds/OSGSimpleTextForeground.inl b/Source/System/Window/Foregrounds/OSGSimpleTextForeground.inl deleted file mode 100644 index f1d80ceb..00000000 --- a/Source/System/Window/Foregrounds/OSGSimpleTextForeground.inl +++ /dev/null @@ -1,91 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- - -OSG_BEGIN_NAMESPACE - -inline -void SimpleTextForeground::addLine(const std::string& text) -{ - editMFLines()->push_back(text); -} - -inline -void SimpleTextForeground::clear(void) -{ - editMFLines()->clear(); -} - -inline -bool SimpleTextForeground::TextColoredRange::isBounded(UInt32 Position) const -{ - return (Position >= _Start && - Position <= _End); -} - -inline -SimpleTextForeground::TextColoredRange::TextColoredRange(UInt32 Start, - UInt32 End, - const Color4f& Color) : - _Start(Start), - _End(End), - _Color(Color) -{ -} - -inline -const Color4f& SimpleTextForeground::TextColoredRange::getColor(void) const -{ - return _Color; -} - -inline -UInt32 SimpleTextForeground::TextColoredRange::getStart(void) const -{ - return _Start; -} - -inline -UInt32 SimpleTextForeground::TextColoredRange::getEnd(void) const -{ - return _End; -} - - -OSG_END_NAMESPACE diff --git a/Source/System/Window/Foregrounds/OSGSimpleTextForegroundBase.cpp b/Source/System/Window/Foregrounds/OSGSimpleTextForegroundBase.cpp deleted file mode 100644 index cef4bd36..00000000 --- a/Source/System/Window/Foregrounds/OSGSimpleTextForegroundBase.cpp +++ /dev/null @@ -1,1431 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class SimpleTextForeground! - ** ** - ***************************************************************************** -\*****************************************************************************/ - -#include -#include -#include - -#include "OSGConfig.h" - - - - -#include "OSGSimpleTextForegroundBase.h" -#include "OSGSimpleTextForeground.h" - -#include - -#ifdef WIN32 // turn off 'this' : used in base member initializer list warning -#pragma warning(disable:4355) -#endif - -OSG_BEGIN_NAMESPACE - -/***************************************************************************\ - * Description * -\***************************************************************************/ - -/*! \class OSG::SimpleTextForeground - OSG::SimpleTextForeground displays a simple list of text - lines. They are displayed using a compiled-in font that can use an arbitrary - color and that can be arbitrarily resized, with the size per line given in - pixel. - - The size and color used for all lines in _sfSize and _sfColor. - - The color of the text can be overriden by using a special tag in the text - of the lines. \{\color=FF0000FF SomeText} will draw the SomeText with a red color. - */ - -/***************************************************************************\ - * Field Documentation * -\***************************************************************************/ - -/*! \var std::string SimpleTextForegroundBase::_mfLines - The lines of text. -*/ - -/*! \var Real32 SimpleTextForegroundBase::_sfSize - Height of a single line, in pixel. -*/ - -/*! \var Color4f SimpleTextForegroundBase::_sfColor - Color of the text. -*/ - -/*! \var Color4f SimpleTextForegroundBase::_sfShadowColor - Color of the shadow. -*/ - -/*! \var Color4f SimpleTextForegroundBase::_sfBgColor - Color of the background. -*/ - -/*! \var std::string SimpleTextForegroundBase::_sfFamily - The font family to be used, e.g. "SANS", default if unset. -*/ - -/*! \var Vec2f SimpleTextForegroundBase::_sfShadowOffset - Offset of the shadow, in pixels. -*/ - -/*! \var UInt8 SimpleTextForegroundBase::_sfHorizontalAlign - Simple form of layout management, defaults to SimpleTextForeground::Left. -*/ - -/*! \var UInt8 SimpleTextForegroundBase::_sfVerticalAlign - Simple form of layout management, defaults to SimpleTextForeground::Top. -*/ - -/*! \var Color4f SimpleTextForegroundBase::_sfBorderColor - Color of the border. -*/ - -/*! \var Vec2f SimpleTextForegroundBase::_sfBorderOffset - Offset of the border in pixels. -*/ - -/*! \var Vec2f SimpleTextForegroundBase::_sfTextMargin - Text margin in pixels. -*/ - -/*! \var bool SimpleTextForegroundBase::_sfTile - Should this foreground be tilable -*/ - - -/***************************************************************************\ - * FieldType/FieldTrait Instantiation * -\***************************************************************************/ - -#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV) -DataType FieldTraits::_type("SimpleTextForegroundPtr", "ForegroundPtr"); -#endif - -OSG_FIELDTRAITS_GETTYPE(SimpleTextForeground *) - -OSG_EXPORT_PTR_SFIELD_FULL(PointerSField, - SimpleTextForeground *, - 0); - -OSG_EXPORT_PTR_MFIELD_FULL(PointerMField, - SimpleTextForeground *, - 0); - -/***************************************************************************\ - * Field Description * -\***************************************************************************/ - -void SimpleTextForegroundBase::classDescInserter(TypeObject &oType) -{ - FieldDescriptionBase *pDesc = NULL; - - - pDesc = new MFString::Description( - MFString::getClassType(), - "Lines", - "The lines of text.\n", - LinesFieldId, LinesFieldMask, - false, - (Field::MFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleLines), - static_cast(&SimpleTextForeground::getHandleLines)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFReal32::Description( - SFReal32::getClassType(), - "Size", - "Height of a single line, in pixel.\n", - SizeFieldId, SizeFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleSize), - static_cast(&SimpleTextForeground::getHandleSize)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFColor4f::Description( - SFColor4f::getClassType(), - "Color", - "Color of the text.\n", - ColorFieldId, ColorFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleColor), - static_cast(&SimpleTextForeground::getHandleColor)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFColor4f::Description( - SFColor4f::getClassType(), - "ShadowColor", - "Color of the shadow.\n", - ShadowColorFieldId, ShadowColorFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleShadowColor), - static_cast(&SimpleTextForeground::getHandleShadowColor)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFColor4f::Description( - SFColor4f::getClassType(), - "BgColor", - "Color of the background.\n", - BgColorFieldId, BgColorFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleBgColor), - static_cast(&SimpleTextForeground::getHandleBgColor)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFString::Description( - SFString::getClassType(), - "Family", - "The font family to be used, e.g. \"SANS\", default if unset.\n", - FamilyFieldId, FamilyFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleFamily), - static_cast(&SimpleTextForeground::getHandleFamily)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFVec2f::Description( - SFVec2f::getClassType(), - "ShadowOffset", - "Offset of the shadow, in pixels.\n", - ShadowOffsetFieldId, ShadowOffsetFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleShadowOffset), - static_cast(&SimpleTextForeground::getHandleShadowOffset)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFUInt8::Description( - SFUInt8::getClassType(), - "HorizontalAlign", - "Simple form of layout management, defaults to SimpleTextForeground::Left.\n", - HorizontalAlignFieldId, HorizontalAlignFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleHorizontalAlign), - static_cast(&SimpleTextForeground::getHandleHorizontalAlign)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFUInt8::Description( - SFUInt8::getClassType(), - "VerticalAlign", - "Simple form of layout management, defaults to SimpleTextForeground::Top.\n", - VerticalAlignFieldId, VerticalAlignFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleVerticalAlign), - static_cast(&SimpleTextForeground::getHandleVerticalAlign)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFColor4f::Description( - SFColor4f::getClassType(), - "BorderColor", - "Color of the border.\n", - BorderColorFieldId, BorderColorFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleBorderColor), - static_cast(&SimpleTextForeground::getHandleBorderColor)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFVec2f::Description( - SFVec2f::getClassType(), - "BorderOffset", - "Offset of the border in pixels.\n", - BorderOffsetFieldId, BorderOffsetFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleBorderOffset), - static_cast(&SimpleTextForeground::getHandleBorderOffset)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFVec2f::Description( - SFVec2f::getClassType(), - "TextMargin", - "Text margin in pixels.\n", - TextMarginFieldId, TextMarginFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleTextMargin), - static_cast(&SimpleTextForeground::getHandleTextMargin)); - - oType.addInitialDesc(pDesc); - - pDesc = new SFBool::Description( - SFBool::getClassType(), - "Tile", - "Should this foreground be tilable\n", - TileFieldId, TileFieldMask, - false, - (Field::SFDefaultFlags | Field::FStdAccess), - static_cast(&SimpleTextForeground::editHandleTile), - static_cast(&SimpleTextForeground::getHandleTile)); - - oType.addInitialDesc(pDesc); -} - - -SimpleTextForegroundBase::TypeObject SimpleTextForegroundBase::_type( - SimpleTextForegroundBase::getClassname(), - Inherited::getClassname(), - "NULL", - 0, - reinterpret_cast(&SimpleTextForegroundBase::createEmptyLocal), - SimpleTextForeground::initMethod, - SimpleTextForeground::exitMethod, - reinterpret_cast(&SimpleTextForeground::classDescInserter), - false, - 0, - "\n" - "\n" - "\n" - " OSG::SimpleTextForeground displays a simple list of text\n" - " lines. They are displayed using a compiled-in font that can use an arbitrary\n" - " color and that can be arbitrarily resized, with the size per line given in\n" - " pixel.\n" - "\n" - " The size and color used for all lines in _sfSize and _sfColor.\n" - "\n" - " The color of the text can be overriden by using a special tag in the text \n" - " of the lines. \\{\\color=FF0000FF SomeText} will draw the SomeText with a red color.\n" - " \n" - " The lines of text.\n" - " \n" - " \n" - " Height of a single line, in pixel.\n" - " \n" - " \n" - " Color of the text.\n" - " \n" - " \n" - " Color of the shadow.\n" - " \n" - " \n" - " Color of the background.\n" - " \n" - " \n" - " The font family to be used, e.g. \"SANS\", default if unset.\n" - " \n" - " \n" - " Offset of the shadow, in pixels.\n" - " \n" - " \n" - " Simple form of layout management, defaults to SimpleTextForeground::Left.\n" - " \n" - " \n" - " Simple form of layout management, defaults to SimpleTextForeground::Top.\n" - " \n" - " \n" - " Color of the border.\n" - " \n" - " \n" - " Offset of the border in pixels.\n" - " \n" - " \n" - " Text margin in pixels.\n" - " \n" - " \n" - " Should this foreground be tilable\n" - " \n" - "\n", - "OSG::SimpleTextForeground displays a simple list of text\n" - "lines. They are displayed using a compiled-in font that can use an arbitrary\n" - "color and that can be arbitrarily resized, with the size per line given in\n" - "pixel.\n" - "\n" - "The size and color used for all lines in _sfSize and _sfColor.\n" - "\n" - "The color of the text can be overriden by using a special tag in the text \n" - "of the lines. \\{\\color=FF0000FF SomeText} will draw the SomeText with a red color.\n" - ); - -/*------------------------------ get -----------------------------------*/ - -FieldContainerType &SimpleTextForegroundBase::getType(void) -{ - return _type; -} - -const FieldContainerType &SimpleTextForegroundBase::getType(void) const -{ - return _type; -} - -UInt32 SimpleTextForegroundBase::getContainerSize(void) const -{ - return sizeof(SimpleTextForeground); -} - -/*------------------------- decorator get ------------------------------*/ - - -MFString *SimpleTextForegroundBase::editMFLines(void) -{ - editMField(LinesFieldMask, _mfLines); - - return &_mfLines; -} - -const MFString *SimpleTextForegroundBase::getMFLines(void) const -{ - return &_mfLines; -} - - -SFReal32 *SimpleTextForegroundBase::editSFSize(void) -{ - editSField(SizeFieldMask); - - return &_sfSize; -} - -const SFReal32 *SimpleTextForegroundBase::getSFSize(void) const -{ - return &_sfSize; -} - - -SFColor4f *SimpleTextForegroundBase::editSFColor(void) -{ - editSField(ColorFieldMask); - - return &_sfColor; -} - -const SFColor4f *SimpleTextForegroundBase::getSFColor(void) const -{ - return &_sfColor; -} - - -SFColor4f *SimpleTextForegroundBase::editSFShadowColor(void) -{ - editSField(ShadowColorFieldMask); - - return &_sfShadowColor; -} - -const SFColor4f *SimpleTextForegroundBase::getSFShadowColor(void) const -{ - return &_sfShadowColor; -} - - -SFColor4f *SimpleTextForegroundBase::editSFBgColor(void) -{ - editSField(BgColorFieldMask); - - return &_sfBgColor; -} - -const SFColor4f *SimpleTextForegroundBase::getSFBgColor(void) const -{ - return &_sfBgColor; -} - - -SFString *SimpleTextForegroundBase::editSFFamily(void) -{ - editSField(FamilyFieldMask); - - return &_sfFamily; -} - -const SFString *SimpleTextForegroundBase::getSFFamily(void) const -{ - return &_sfFamily; -} - - -SFVec2f *SimpleTextForegroundBase::editSFShadowOffset(void) -{ - editSField(ShadowOffsetFieldMask); - - return &_sfShadowOffset; -} - -const SFVec2f *SimpleTextForegroundBase::getSFShadowOffset(void) const -{ - return &_sfShadowOffset; -} - - -SFUInt8 *SimpleTextForegroundBase::editSFHorizontalAlign(void) -{ - editSField(HorizontalAlignFieldMask); - - return &_sfHorizontalAlign; -} - -const SFUInt8 *SimpleTextForegroundBase::getSFHorizontalAlign(void) const -{ - return &_sfHorizontalAlign; -} - - -SFUInt8 *SimpleTextForegroundBase::editSFVerticalAlign(void) -{ - editSField(VerticalAlignFieldMask); - - return &_sfVerticalAlign; -} - -const SFUInt8 *SimpleTextForegroundBase::getSFVerticalAlign(void) const -{ - return &_sfVerticalAlign; -} - - -SFColor4f *SimpleTextForegroundBase::editSFBorderColor(void) -{ - editSField(BorderColorFieldMask); - - return &_sfBorderColor; -} - -const SFColor4f *SimpleTextForegroundBase::getSFBorderColor(void) const -{ - return &_sfBorderColor; -} - - -SFVec2f *SimpleTextForegroundBase::editSFBorderOffset(void) -{ - editSField(BorderOffsetFieldMask); - - return &_sfBorderOffset; -} - -const SFVec2f *SimpleTextForegroundBase::getSFBorderOffset(void) const -{ - return &_sfBorderOffset; -} - - -SFVec2f *SimpleTextForegroundBase::editSFTextMargin(void) -{ - editSField(TextMarginFieldMask); - - return &_sfTextMargin; -} - -const SFVec2f *SimpleTextForegroundBase::getSFTextMargin(void) const -{ - return &_sfTextMargin; -} - - -SFBool *SimpleTextForegroundBase::editSFTile(void) -{ - editSField(TileFieldMask); - - return &_sfTile; -} - -const SFBool *SimpleTextForegroundBase::getSFTile(void) const -{ - return &_sfTile; -} - - - - - - -/*------------------------------ access -----------------------------------*/ - -UInt32 SimpleTextForegroundBase::getBinSize(ConstFieldMaskArg whichField) -{ - UInt32 returnValue = Inherited::getBinSize(whichField); - - if(FieldBits::NoField != (LinesFieldMask & whichField)) - { - returnValue += _mfLines.getBinSize(); - } - if(FieldBits::NoField != (SizeFieldMask & whichField)) - { - returnValue += _sfSize.getBinSize(); - } - if(FieldBits::NoField != (ColorFieldMask & whichField)) - { - returnValue += _sfColor.getBinSize(); - } - if(FieldBits::NoField != (ShadowColorFieldMask & whichField)) - { - returnValue += _sfShadowColor.getBinSize(); - } - if(FieldBits::NoField != (BgColorFieldMask & whichField)) - { - returnValue += _sfBgColor.getBinSize(); - } - if(FieldBits::NoField != (FamilyFieldMask & whichField)) - { - returnValue += _sfFamily.getBinSize(); - } - if(FieldBits::NoField != (ShadowOffsetFieldMask & whichField)) - { - returnValue += _sfShadowOffset.getBinSize(); - } - if(FieldBits::NoField != (HorizontalAlignFieldMask & whichField)) - { - returnValue += _sfHorizontalAlign.getBinSize(); - } - if(FieldBits::NoField != (VerticalAlignFieldMask & whichField)) - { - returnValue += _sfVerticalAlign.getBinSize(); - } - if(FieldBits::NoField != (BorderColorFieldMask & whichField)) - { - returnValue += _sfBorderColor.getBinSize(); - } - if(FieldBits::NoField != (BorderOffsetFieldMask & whichField)) - { - returnValue += _sfBorderOffset.getBinSize(); - } - if(FieldBits::NoField != (TextMarginFieldMask & whichField)) - { - returnValue += _sfTextMargin.getBinSize(); - } - if(FieldBits::NoField != (TileFieldMask & whichField)) - { - returnValue += _sfTile.getBinSize(); - } - - return returnValue; -} - -void SimpleTextForegroundBase::copyToBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyToBin(pMem, whichField); - - if(FieldBits::NoField != (LinesFieldMask & whichField)) - { - _mfLines.copyToBin(pMem); - } - if(FieldBits::NoField != (SizeFieldMask & whichField)) - { - _sfSize.copyToBin(pMem); - } - if(FieldBits::NoField != (ColorFieldMask & whichField)) - { - _sfColor.copyToBin(pMem); - } - if(FieldBits::NoField != (ShadowColorFieldMask & whichField)) - { - _sfShadowColor.copyToBin(pMem); - } - if(FieldBits::NoField != (BgColorFieldMask & whichField)) - { - _sfBgColor.copyToBin(pMem); - } - if(FieldBits::NoField != (FamilyFieldMask & whichField)) - { - _sfFamily.copyToBin(pMem); - } - if(FieldBits::NoField != (ShadowOffsetFieldMask & whichField)) - { - _sfShadowOffset.copyToBin(pMem); - } - if(FieldBits::NoField != (HorizontalAlignFieldMask & whichField)) - { - _sfHorizontalAlign.copyToBin(pMem); - } - if(FieldBits::NoField != (VerticalAlignFieldMask & whichField)) - { - _sfVerticalAlign.copyToBin(pMem); - } - if(FieldBits::NoField != (BorderColorFieldMask & whichField)) - { - _sfBorderColor.copyToBin(pMem); - } - if(FieldBits::NoField != (BorderOffsetFieldMask & whichField)) - { - _sfBorderOffset.copyToBin(pMem); - } - if(FieldBits::NoField != (TextMarginFieldMask & whichField)) - { - _sfTextMargin.copyToBin(pMem); - } - if(FieldBits::NoField != (TileFieldMask & whichField)) - { - _sfTile.copyToBin(pMem); - } -} - -void SimpleTextForegroundBase::copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField) -{ - Inherited::copyFromBin(pMem, whichField); - - if(FieldBits::NoField != (LinesFieldMask & whichField)) - { - editMField(LinesFieldMask, _mfLines); - _mfLines.copyFromBin(pMem); - } - if(FieldBits::NoField != (SizeFieldMask & whichField)) - { - editSField(SizeFieldMask); - _sfSize.copyFromBin(pMem); - } - if(FieldBits::NoField != (ColorFieldMask & whichField)) - { - editSField(ColorFieldMask); - _sfColor.copyFromBin(pMem); - } - if(FieldBits::NoField != (ShadowColorFieldMask & whichField)) - { - editSField(ShadowColorFieldMask); - _sfShadowColor.copyFromBin(pMem); - } - if(FieldBits::NoField != (BgColorFieldMask & whichField)) - { - editSField(BgColorFieldMask); - _sfBgColor.copyFromBin(pMem); - } - if(FieldBits::NoField != (FamilyFieldMask & whichField)) - { - editSField(FamilyFieldMask); - _sfFamily.copyFromBin(pMem); - } - if(FieldBits::NoField != (ShadowOffsetFieldMask & whichField)) - { - editSField(ShadowOffsetFieldMask); - _sfShadowOffset.copyFromBin(pMem); - } - if(FieldBits::NoField != (HorizontalAlignFieldMask & whichField)) - { - editSField(HorizontalAlignFieldMask); - _sfHorizontalAlign.copyFromBin(pMem); - } - if(FieldBits::NoField != (VerticalAlignFieldMask & whichField)) - { - editSField(VerticalAlignFieldMask); - _sfVerticalAlign.copyFromBin(pMem); - } - if(FieldBits::NoField != (BorderColorFieldMask & whichField)) - { - editSField(BorderColorFieldMask); - _sfBorderColor.copyFromBin(pMem); - } - if(FieldBits::NoField != (BorderOffsetFieldMask & whichField)) - { - editSField(BorderOffsetFieldMask); - _sfBorderOffset.copyFromBin(pMem); - } - if(FieldBits::NoField != (TextMarginFieldMask & whichField)) - { - editSField(TextMarginFieldMask); - _sfTextMargin.copyFromBin(pMem); - } - if(FieldBits::NoField != (TileFieldMask & whichField)) - { - editSField(TileFieldMask); - _sfTile.copyFromBin(pMem); - } -} - -//! create a new instance of the class -SimpleTextForegroundTransitPtr SimpleTextForegroundBase::createLocal(BitVector bFlags) -{ - SimpleTextForegroundTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyLocal(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class, copy the container flags -SimpleTextForegroundTransitPtr SimpleTextForegroundBase::createDependent(BitVector bFlags) -{ - SimpleTextForegroundTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopyDependent(bFlags); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -//! create a new instance of the class -SimpleTextForegroundTransitPtr SimpleTextForegroundBase::create(void) -{ - SimpleTextForegroundTransitPtr fc; - - if(getClassType().getPrototype() != NULL) - { - FieldContainerTransitPtr tmpPtr = - getClassType().getPrototype()-> shallowCopy(); - - fc = dynamic_pointer_cast(tmpPtr); - } - - return fc; -} - -SimpleTextForeground *SimpleTextForegroundBase::createEmptyLocal(BitVector bFlags) -{ - SimpleTextForeground *returnValue; - - newPtr(returnValue, bFlags); - - returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -//! create an empty new instance of the class, do not copy the prototype -SimpleTextForeground *SimpleTextForegroundBase::createEmpty(void) -{ - SimpleTextForeground *returnValue; - - newPtr(returnValue, Thread::getCurrentLocalFlags()); - - returnValue->_pFieldFlags->_bNamespaceMask &= - ~Thread::getCurrentLocalFlags(); - - return returnValue; -} - -FieldContainerTransitPtr SimpleTextForegroundBase::shallowCopyLocal( - BitVector bFlags) const -{ - SimpleTextForeground *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; - - return returnValue; -} - -FieldContainerTransitPtr SimpleTextForegroundBase::shallowCopyDependent( - BitVector bFlags) const -{ - SimpleTextForeground *tmpPtr; - - newPtr(tmpPtr, dynamic_cast(this), ~bFlags); - - FieldContainerTransitPtr returnValue(tmpPtr); - - tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags; - - return returnValue; -} - -FieldContainerTransitPtr SimpleTextForegroundBase::shallowCopy(void) const -{ - SimpleTextForeground *tmpPtr; - - newPtr(tmpPtr, - dynamic_cast(this), - Thread::getCurrentLocalFlags()); - - tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); - - FieldContainerTransitPtr returnValue(tmpPtr); - - return returnValue; -} - - - -/*------------------------- constructors ----------------------------------*/ - -SimpleTextForegroundBase::SimpleTextForegroundBase(void) : - Inherited(), - _mfLines (), - _sfSize (Real32(16)), - _sfColor (Color4f(1,1,1,1)), - _sfShadowColor (Color4f(0,0,0,1)), - _sfBgColor (Color4f(0,0,0,0)), - _sfFamily (), - _sfShadowOffset (Vec2f(1,-1)), - _sfHorizontalAlign (UInt8(SimpleTextForeground::Left)), - _sfVerticalAlign (UInt8(SimpleTextForeground::Top)), - _sfBorderColor (Color4f(0,0,0,0)), - _sfBorderOffset (Vec2f(4,4)), - _sfTextMargin (Vec2f(0,0)), - _sfTile (bool(false)) -{ -} - -SimpleTextForegroundBase::SimpleTextForegroundBase(const SimpleTextForegroundBase &source) : - Inherited(source), - _mfLines (source._mfLines ), - _sfSize (source._sfSize ), - _sfColor (source._sfColor ), - _sfShadowColor (source._sfShadowColor ), - _sfBgColor (source._sfBgColor ), - _sfFamily (source._sfFamily ), - _sfShadowOffset (source._sfShadowOffset ), - _sfHorizontalAlign (source._sfHorizontalAlign ), - _sfVerticalAlign (source._sfVerticalAlign ), - _sfBorderColor (source._sfBorderColor ), - _sfBorderOffset (source._sfBorderOffset ), - _sfTextMargin (source._sfTextMargin ), - _sfTile (source._sfTile ) -{ -} - - -/*-------------------------- destructors ----------------------------------*/ - -SimpleTextForegroundBase::~SimpleTextForegroundBase(void) -{ -} - - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleLines (void) const -{ - MFString::GetHandlePtr returnValue( - new MFString::GetHandle( - &_mfLines, - this->getType().getFieldDesc(LinesFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleLines (void) -{ - MFString::EditHandlePtr returnValue( - new MFString::EditHandle( - &_mfLines, - this->getType().getFieldDesc(LinesFieldId), - this)); - - - editMField(LinesFieldMask, _mfLines); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleSize (void) const -{ - SFReal32::GetHandlePtr returnValue( - new SFReal32::GetHandle( - &_sfSize, - this->getType().getFieldDesc(SizeFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleSize (void) -{ - SFReal32::EditHandlePtr returnValue( - new SFReal32::EditHandle( - &_sfSize, - this->getType().getFieldDesc(SizeFieldId), - this)); - - - editSField(SizeFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleColor (void) const -{ - SFColor4f::GetHandlePtr returnValue( - new SFColor4f::GetHandle( - &_sfColor, - this->getType().getFieldDesc(ColorFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleColor (void) -{ - SFColor4f::EditHandlePtr returnValue( - new SFColor4f::EditHandle( - &_sfColor, - this->getType().getFieldDesc(ColorFieldId), - this)); - - - editSField(ColorFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleShadowColor (void) const -{ - SFColor4f::GetHandlePtr returnValue( - new SFColor4f::GetHandle( - &_sfShadowColor, - this->getType().getFieldDesc(ShadowColorFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleShadowColor (void) -{ - SFColor4f::EditHandlePtr returnValue( - new SFColor4f::EditHandle( - &_sfShadowColor, - this->getType().getFieldDesc(ShadowColorFieldId), - this)); - - - editSField(ShadowColorFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleBgColor (void) const -{ - SFColor4f::GetHandlePtr returnValue( - new SFColor4f::GetHandle( - &_sfBgColor, - this->getType().getFieldDesc(BgColorFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleBgColor (void) -{ - SFColor4f::EditHandlePtr returnValue( - new SFColor4f::EditHandle( - &_sfBgColor, - this->getType().getFieldDesc(BgColorFieldId), - this)); - - - editSField(BgColorFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleFamily (void) const -{ - SFString::GetHandlePtr returnValue( - new SFString::GetHandle( - &_sfFamily, - this->getType().getFieldDesc(FamilyFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleFamily (void) -{ - SFString::EditHandlePtr returnValue( - new SFString::EditHandle( - &_sfFamily, - this->getType().getFieldDesc(FamilyFieldId), - this)); - - - editSField(FamilyFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleShadowOffset (void) const -{ - SFVec2f::GetHandlePtr returnValue( - new SFVec2f::GetHandle( - &_sfShadowOffset, - this->getType().getFieldDesc(ShadowOffsetFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleShadowOffset (void) -{ - SFVec2f::EditHandlePtr returnValue( - new SFVec2f::EditHandle( - &_sfShadowOffset, - this->getType().getFieldDesc(ShadowOffsetFieldId), - this)); - - - editSField(ShadowOffsetFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleHorizontalAlign (void) const -{ - SFUInt8::GetHandlePtr returnValue( - new SFUInt8::GetHandle( - &_sfHorizontalAlign, - this->getType().getFieldDesc(HorizontalAlignFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleHorizontalAlign(void) -{ - SFUInt8::EditHandlePtr returnValue( - new SFUInt8::EditHandle( - &_sfHorizontalAlign, - this->getType().getFieldDesc(HorizontalAlignFieldId), - this)); - - - editSField(HorizontalAlignFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleVerticalAlign (void) const -{ - SFUInt8::GetHandlePtr returnValue( - new SFUInt8::GetHandle( - &_sfVerticalAlign, - this->getType().getFieldDesc(VerticalAlignFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleVerticalAlign (void) -{ - SFUInt8::EditHandlePtr returnValue( - new SFUInt8::EditHandle( - &_sfVerticalAlign, - this->getType().getFieldDesc(VerticalAlignFieldId), - this)); - - - editSField(VerticalAlignFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleBorderColor (void) const -{ - SFColor4f::GetHandlePtr returnValue( - new SFColor4f::GetHandle( - &_sfBorderColor, - this->getType().getFieldDesc(BorderColorFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleBorderColor (void) -{ - SFColor4f::EditHandlePtr returnValue( - new SFColor4f::EditHandle( - &_sfBorderColor, - this->getType().getFieldDesc(BorderColorFieldId), - this)); - - - editSField(BorderColorFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleBorderOffset (void) const -{ - SFVec2f::GetHandlePtr returnValue( - new SFVec2f::GetHandle( - &_sfBorderOffset, - this->getType().getFieldDesc(BorderOffsetFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleBorderOffset (void) -{ - SFVec2f::EditHandlePtr returnValue( - new SFVec2f::EditHandle( - &_sfBorderOffset, - this->getType().getFieldDesc(BorderOffsetFieldId), - this)); - - - editSField(BorderOffsetFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleTextMargin (void) const -{ - SFVec2f::GetHandlePtr returnValue( - new SFVec2f::GetHandle( - &_sfTextMargin, - this->getType().getFieldDesc(TextMarginFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleTextMargin (void) -{ - SFVec2f::EditHandlePtr returnValue( - new SFVec2f::EditHandle( - &_sfTextMargin, - this->getType().getFieldDesc(TextMarginFieldId), - this)); - - - editSField(TextMarginFieldMask); - - return returnValue; -} - -GetFieldHandlePtr SimpleTextForegroundBase::getHandleTile (void) const -{ - SFBool::GetHandlePtr returnValue( - new SFBool::GetHandle( - &_sfTile, - this->getType().getFieldDesc(TileFieldId), - const_cast(this))); - - return returnValue; -} - -EditFieldHandlePtr SimpleTextForegroundBase::editHandleTile (void) -{ - SFBool::EditHandlePtr returnValue( - new SFBool::EditHandle( - &_sfTile, - this->getType().getFieldDesc(TileFieldId), - this)); - - - editSField(TileFieldMask); - - return returnValue; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -void SimpleTextForegroundBase::execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - SimpleTextForeground *pThis = static_cast(this); - - pThis->execSync(static_cast(&oFrom), - whichField, - oOffsets, - syncMode, - uiSyncInfo); -} -#endif - - -#ifdef OSG_MT_CPTR_ASPECT -FieldContainer *SimpleTextForegroundBase::createAspectCopy( - const FieldContainer *pRefAspect) const -{ - SimpleTextForeground *returnValue; - - newAspectCopy(returnValue, - dynamic_cast(pRefAspect), - dynamic_cast(this)); - - return returnValue; -} -#endif - -void SimpleTextForegroundBase::resolveLinks(void) -{ - Inherited::resolveLinks(); - -#ifdef OSG_MT_CPTR_ASPECT - AspectOffsetStore oOffsets; - - _pAspectStore->fillOffsetArray(oOffsets, this); -#endif - -#ifdef OSG_MT_CPTR_ASPECT - _mfLines.terminateShare(Thread::getCurrentAspect(), - oOffsets); -#endif -} - - -OSG_END_NAMESPACE diff --git a/Source/System/Window/Foregrounds/OSGSimpleTextForegroundBase.h b/Source/System/Window/Foregrounds/OSGSimpleTextForegroundBase.h deleted file mode 100644 index c210ce88..00000000 --- a/Source/System/Window/Foregrounds/OSGSimpleTextForegroundBase.h +++ /dev/null @@ -1,464 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class SimpleTextForeground - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGSIMPLETEXTFOREGROUNDBASE_H_ -#define _OSGSIMPLETEXTFOREGROUNDBASE_H_ -#ifdef __sgi -#pragma once -#endif - - -#include "OSGConfig.h" -#include "OSGUtilDef.h" - -//#include "OSGBaseTypes.h" - -#include "OSGForeground.h" // Parent - -#include "OSGBaseFields.h" // Lines type -#include "OSGSysFields.h" // Size type -#include "OSGVecFields.h" // ShadowOffset type - -#include "OSGSimpleTextForegroundFields.h" - -OSG_BEGIN_NAMESPACE - -class SimpleTextForeground; - -//! \brief SimpleTextForeground Base Class. - -class OSG_UTIL_DLLMAPPING SimpleTextForegroundBase : public Foreground -{ - public: - - typedef Foreground Inherited; - typedef Foreground ParentContainer; - - typedef Inherited::TypeObject TypeObject; - typedef TypeObject::InitPhase InitPhase; - - OSG_GEN_INTERNALPTR(SimpleTextForeground); - - - - /*========================== PUBLIC =================================*/ - - public: - - enum - { - LinesFieldId = Inherited::NextFieldId, - SizeFieldId = LinesFieldId + 1, - ColorFieldId = SizeFieldId + 1, - ShadowColorFieldId = ColorFieldId + 1, - BgColorFieldId = ShadowColorFieldId + 1, - FamilyFieldId = BgColorFieldId + 1, - ShadowOffsetFieldId = FamilyFieldId + 1, - HorizontalAlignFieldId = ShadowOffsetFieldId + 1, - VerticalAlignFieldId = HorizontalAlignFieldId + 1, - BorderColorFieldId = VerticalAlignFieldId + 1, - BorderOffsetFieldId = BorderColorFieldId + 1, - TextMarginFieldId = BorderOffsetFieldId + 1, - TileFieldId = TextMarginFieldId + 1, - NextFieldId = TileFieldId + 1 - }; - - static const OSG::BitVector LinesFieldMask = - (TypeTraits::One << LinesFieldId); - static const OSG::BitVector SizeFieldMask = - (TypeTraits::One << SizeFieldId); - static const OSG::BitVector ColorFieldMask = - (TypeTraits::One << ColorFieldId); - static const OSG::BitVector ShadowColorFieldMask = - (TypeTraits::One << ShadowColorFieldId); - static const OSG::BitVector BgColorFieldMask = - (TypeTraits::One << BgColorFieldId); - static const OSG::BitVector FamilyFieldMask = - (TypeTraits::One << FamilyFieldId); - static const OSG::BitVector ShadowOffsetFieldMask = - (TypeTraits::One << ShadowOffsetFieldId); - static const OSG::BitVector HorizontalAlignFieldMask = - (TypeTraits::One << HorizontalAlignFieldId); - static const OSG::BitVector VerticalAlignFieldMask = - (TypeTraits::One << VerticalAlignFieldId); - static const OSG::BitVector BorderColorFieldMask = - (TypeTraits::One << BorderColorFieldId); - static const OSG::BitVector BorderOffsetFieldMask = - (TypeTraits::One << BorderOffsetFieldId); - static const OSG::BitVector TextMarginFieldMask = - (TypeTraits::One << TextMarginFieldId); - static const OSG::BitVector TileFieldMask = - (TypeTraits::One << TileFieldId); - static const OSG::BitVector NextFieldMask = - (TypeTraits::One << NextFieldId); - - typedef MFString MFLinesType; - typedef SFReal32 SFSizeType; - typedef SFColor4f SFColorType; - typedef SFColor4f SFShadowColorType; - typedef SFColor4f SFBgColorType; - typedef SFString SFFamilyType; - typedef SFVec2f SFShadowOffsetType; - typedef SFUInt8 SFHorizontalAlignType; - typedef SFUInt8 SFVerticalAlignType; - typedef SFColor4f SFBorderColorType; - typedef SFVec2f SFBorderOffsetType; - typedef SFVec2f SFTextMarginType; - typedef SFBool SFTileType; - - /*---------------------------------------------------------------------*/ - /*! \name Class Get */ - /*! \{ */ - - static FieldContainerType &getClassType (void); - static UInt32 getClassTypeId (void); - static UInt16 getClassGroupId(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name FieldContainer Get */ - /*! \{ */ - - virtual FieldContainerType &getType (void); - virtual const FieldContainerType &getType (void) const; - - virtual UInt32 getContainerSize(void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Get */ - /*! \{ */ - - - MFString *editMFLines (void); - const MFString *getMFLines (void) const; - - SFReal32 *editSFSize (void); - const SFReal32 *getSFSize (void) const; - - SFColor4f *editSFColor (void); - const SFColor4f *getSFColor (void) const; - - SFColor4f *editSFShadowColor (void); - const SFColor4f *getSFShadowColor (void) const; - - SFColor4f *editSFBgColor (void); - const SFColor4f *getSFBgColor (void) const; - - SFString *editSFFamily (void); - const SFString *getSFFamily (void) const; - - SFVec2f *editSFShadowOffset (void); - const SFVec2f *getSFShadowOffset (void) const; - - SFUInt8 *editSFHorizontalAlign(void); - const SFUInt8 *getSFHorizontalAlign (void) const; - - SFUInt8 *editSFVerticalAlign (void); - const SFUInt8 *getSFVerticalAlign (void) const; - - SFColor4f *editSFBorderColor (void); - const SFColor4f *getSFBorderColor (void) const; - - SFVec2f *editSFBorderOffset (void); - const SFVec2f *getSFBorderOffset (void) const; - - SFVec2f *editSFTextMargin (void); - const SFVec2f *getSFTextMargin (void) const; - - SFBool *editSFTile (void); - const SFBool *getSFTile (void) const; - - - std::string &editLines (const UInt32 index); - const std::string &getLines (const UInt32 index) const; - - Real32 &editSize (void); - Real32 getSize (void) const; - - Color4f &editColor (void); - const Color4f &getColor (void) const; - - Color4f &editShadowColor (void); - const Color4f &getShadowColor (void) const; - - Color4f &editBgColor (void); - const Color4f &getBgColor (void) const; - - std::string &editFamily (void); - const std::string &getFamily (void) const; - - Vec2f &editShadowOffset (void); - const Vec2f &getShadowOffset (void) const; - - UInt8 &editHorizontalAlign(void); - UInt8 getHorizontalAlign (void) const; - - UInt8 &editVerticalAlign (void); - UInt8 getVerticalAlign (void) const; - - Color4f &editBorderColor (void); - const Color4f &getBorderColor (void) const; - - Vec2f &editBorderOffset (void); - const Vec2f &getBorderOffset (void) const; - - Vec2f &editTextMargin (void); - const Vec2f &getTextMargin (void) const; - - bool &editTile (void); - bool getTile (void) const; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Field Set */ - /*! \{ */ - - void setSize (const Real32 value); - void setColor (const Color4f &value); - void setShadowColor (const Color4f &value); - void setBgColor (const Color4f &value); - void setFamily (const std::string &value); - void setShadowOffset (const Vec2f &value); - void setHorizontalAlign(const UInt8 value); - void setVerticalAlign (const UInt8 value); - void setBorderColor (const Color4f &value); - void setBorderOffset (const Vec2f &value); - void setTextMargin (const Vec2f &value); - void setTile (const bool value); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Ptr MField Set */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Binary Access */ - /*! \{ */ - - virtual UInt32 getBinSize (ConstFieldMaskArg whichField); - virtual void copyToBin (BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - virtual void copyFromBin(BinaryDataHandler &pMem, - ConstFieldMaskArg whichField); - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Construction */ - /*! \{ */ - - static SimpleTextForegroundTransitPtr create (void); - static SimpleTextForeground *createEmpty (void); - - static SimpleTextForegroundTransitPtr createLocal ( - BitVector bFlags = FCLocal::All); - - static SimpleTextForeground *createEmptyLocal( - BitVector bFlags = FCLocal::All); - - static SimpleTextForegroundTransitPtr createDependent (BitVector bFlags); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Copy */ - /*! \{ */ - - virtual FieldContainerTransitPtr shallowCopy (void) const; - virtual FieldContainerTransitPtr shallowCopyLocal( - BitVector bFlags = FCLocal::All) const; - virtual FieldContainerTransitPtr shallowCopyDependent( - BitVector bFlags) const; - - /*! \} */ - /*========================= PROTECTED ===============================*/ - - protected: - - static TypeObject _type; - - static void classDescInserter(TypeObject &oType); - static const Char8 *getClassname (void ); - - /*---------------------------------------------------------------------*/ - /*! \name Fields */ - /*! \{ */ - - MFString _mfLines; - SFReal32 _sfSize; - SFColor4f _sfColor; - SFColor4f _sfShadowColor; - SFColor4f _sfBgColor; - SFString _sfFamily; - SFVec2f _sfShadowOffset; - SFUInt8 _sfHorizontalAlign; - SFUInt8 _sfVerticalAlign; - SFColor4f _sfBorderColor; - SFVec2f _sfBorderOffset; - SFVec2f _sfTextMargin; - SFBool _sfTile; - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Constructors */ - /*! \{ */ - - SimpleTextForegroundBase(void); - SimpleTextForegroundBase(const SimpleTextForegroundBase &source); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Destructors */ - /*! \{ */ - - virtual ~SimpleTextForegroundBase(void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name onCreate */ - /*! \{ */ - - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Generic Field Access */ - /*! \{ */ - - GetFieldHandlePtr getHandleLines (void) const; - EditFieldHandlePtr editHandleLines (void); - GetFieldHandlePtr getHandleSize (void) const; - EditFieldHandlePtr editHandleSize (void); - GetFieldHandlePtr getHandleColor (void) const; - EditFieldHandlePtr editHandleColor (void); - GetFieldHandlePtr getHandleShadowColor (void) const; - EditFieldHandlePtr editHandleShadowColor (void); - GetFieldHandlePtr getHandleBgColor (void) const; - EditFieldHandlePtr editHandleBgColor (void); - GetFieldHandlePtr getHandleFamily (void) const; - EditFieldHandlePtr editHandleFamily (void); - GetFieldHandlePtr getHandleShadowOffset (void) const; - EditFieldHandlePtr editHandleShadowOffset (void); - GetFieldHandlePtr getHandleHorizontalAlign (void) const; - EditFieldHandlePtr editHandleHorizontalAlign(void); - GetFieldHandlePtr getHandleVerticalAlign (void) const; - EditFieldHandlePtr editHandleVerticalAlign (void); - GetFieldHandlePtr getHandleBorderColor (void) const; - EditFieldHandlePtr editHandleBorderColor (void); - GetFieldHandlePtr getHandleBorderOffset (void) const; - EditFieldHandlePtr editHandleBorderOffset (void); - GetFieldHandlePtr getHandleTextMargin (void) const; - EditFieldHandlePtr editHandleTextMargin (void); - GetFieldHandlePtr getHandleTile (void) const; - EditFieldHandlePtr editHandleTile (void); - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual void execSyncV( FieldContainer &oFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); - - void execSync ( SimpleTextForegroundBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode , - const UInt32 uiSyncInfo); -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Aspect Create */ - /*! \{ */ - -#ifdef OSG_MT_CPTR_ASPECT - virtual FieldContainer *createAspectCopy( - const FieldContainer *pRefAspect) const; -#endif - - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Edit */ - /*! \{ */ - /*! \} */ - /*---------------------------------------------------------------------*/ - /*! \name Sync */ - /*! \{ */ - - virtual void resolveLinks(void); - - /*! \} */ - /*========================== PRIVATE ================================*/ - - private: - /*---------------------------------------------------------------------*/ - - // prohibit default functions (move to 'public' if you need one) - void operator =(const SimpleTextForegroundBase &source); -}; - -typedef SimpleTextForegroundBase *SimpleTextForegroundBaseP; - -OSG_END_NAMESPACE - -#endif /* _OSGSIMPLETEXTFOREGROUNDBASE_H_ */ diff --git a/Source/System/Window/Foregrounds/OSGSimpleTextForegroundBase.inl b/Source/System/Window/Foregrounds/OSGSimpleTextForegroundBase.inl deleted file mode 100644 index bec2722a..00000000 --- a/Source/System/Window/Foregrounds/OSGSimpleTextForegroundBase.inl +++ /dev/null @@ -1,458 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ** Do not change this file, changes should be done in the derived ** - ** class SimpleTextForeground! - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -OSG_BEGIN_NAMESPACE - - -//! access the type of the class -inline -OSG::FieldContainerType &SimpleTextForegroundBase::getClassType(void) -{ - return _type; -} - -//! access the numerical type of the class -inline -OSG::UInt32 SimpleTextForegroundBase::getClassTypeId(void) -{ - return _type.getId(); -} - -inline -OSG::UInt16 SimpleTextForegroundBase::getClassGroupId(void) -{ - return _type.getGroupId(); -} - -/*------------------------------ get -----------------------------------*/ - -//! Get the value of the SimpleTextForeground::_sfSize field. - -inline -Real32 &SimpleTextForegroundBase::editSize(void) -{ - editSField(SizeFieldMask); - - return _sfSize.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfSize field. -inline - Real32 SimpleTextForegroundBase::getSize(void) const -{ - return _sfSize.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfSize field. -inline -void SimpleTextForegroundBase::setSize(const Real32 value) -{ - editSField(SizeFieldMask); - - _sfSize.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfColor field. - -inline -Color4f &SimpleTextForegroundBase::editColor(void) -{ - editSField(ColorFieldMask); - - return _sfColor.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfColor field. -inline -const Color4f &SimpleTextForegroundBase::getColor(void) const -{ - return _sfColor.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfColor field. -inline -void SimpleTextForegroundBase::setColor(const Color4f &value) -{ - editSField(ColorFieldMask); - - _sfColor.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfShadowColor field. - -inline -Color4f &SimpleTextForegroundBase::editShadowColor(void) -{ - editSField(ShadowColorFieldMask); - - return _sfShadowColor.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfShadowColor field. -inline -const Color4f &SimpleTextForegroundBase::getShadowColor(void) const -{ - return _sfShadowColor.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfShadowColor field. -inline -void SimpleTextForegroundBase::setShadowColor(const Color4f &value) -{ - editSField(ShadowColorFieldMask); - - _sfShadowColor.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfBgColor field. - -inline -Color4f &SimpleTextForegroundBase::editBgColor(void) -{ - editSField(BgColorFieldMask); - - return _sfBgColor.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfBgColor field. -inline -const Color4f &SimpleTextForegroundBase::getBgColor(void) const -{ - return _sfBgColor.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfBgColor field. -inline -void SimpleTextForegroundBase::setBgColor(const Color4f &value) -{ - editSField(BgColorFieldMask); - - _sfBgColor.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfFamily field. - -inline -std::string &SimpleTextForegroundBase::editFamily(void) -{ - editSField(FamilyFieldMask); - - return _sfFamily.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfFamily field. -inline -const std::string &SimpleTextForegroundBase::getFamily(void) const -{ - return _sfFamily.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfFamily field. -inline -void SimpleTextForegroundBase::setFamily(const std::string &value) -{ - editSField(FamilyFieldMask); - - _sfFamily.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfShadowOffset field. - -inline -Vec2f &SimpleTextForegroundBase::editShadowOffset(void) -{ - editSField(ShadowOffsetFieldMask); - - return _sfShadowOffset.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfShadowOffset field. -inline -const Vec2f &SimpleTextForegroundBase::getShadowOffset(void) const -{ - return _sfShadowOffset.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfShadowOffset field. -inline -void SimpleTextForegroundBase::setShadowOffset(const Vec2f &value) -{ - editSField(ShadowOffsetFieldMask); - - _sfShadowOffset.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfHorizontalAlign field. - -inline -UInt8 &SimpleTextForegroundBase::editHorizontalAlign(void) -{ - editSField(HorizontalAlignFieldMask); - - return _sfHorizontalAlign.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfHorizontalAlign field. -inline - UInt8 SimpleTextForegroundBase::getHorizontalAlign(void) const -{ - return _sfHorizontalAlign.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfHorizontalAlign field. -inline -void SimpleTextForegroundBase::setHorizontalAlign(const UInt8 value) -{ - editSField(HorizontalAlignFieldMask); - - _sfHorizontalAlign.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfVerticalAlign field. - -inline -UInt8 &SimpleTextForegroundBase::editVerticalAlign(void) -{ - editSField(VerticalAlignFieldMask); - - return _sfVerticalAlign.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfVerticalAlign field. -inline - UInt8 SimpleTextForegroundBase::getVerticalAlign(void) const -{ - return _sfVerticalAlign.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfVerticalAlign field. -inline -void SimpleTextForegroundBase::setVerticalAlign(const UInt8 value) -{ - editSField(VerticalAlignFieldMask); - - _sfVerticalAlign.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfBorderColor field. - -inline -Color4f &SimpleTextForegroundBase::editBorderColor(void) -{ - editSField(BorderColorFieldMask); - - return _sfBorderColor.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfBorderColor field. -inline -const Color4f &SimpleTextForegroundBase::getBorderColor(void) const -{ - return _sfBorderColor.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfBorderColor field. -inline -void SimpleTextForegroundBase::setBorderColor(const Color4f &value) -{ - editSField(BorderColorFieldMask); - - _sfBorderColor.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfBorderOffset field. - -inline -Vec2f &SimpleTextForegroundBase::editBorderOffset(void) -{ - editSField(BorderOffsetFieldMask); - - return _sfBorderOffset.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfBorderOffset field. -inline -const Vec2f &SimpleTextForegroundBase::getBorderOffset(void) const -{ - return _sfBorderOffset.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfBorderOffset field. -inline -void SimpleTextForegroundBase::setBorderOffset(const Vec2f &value) -{ - editSField(BorderOffsetFieldMask); - - _sfBorderOffset.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfTextMargin field. - -inline -Vec2f &SimpleTextForegroundBase::editTextMargin(void) -{ - editSField(TextMarginFieldMask); - - return _sfTextMargin.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfTextMargin field. -inline -const Vec2f &SimpleTextForegroundBase::getTextMargin(void) const -{ - return _sfTextMargin.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfTextMargin field. -inline -void SimpleTextForegroundBase::setTextMargin(const Vec2f &value) -{ - editSField(TextMarginFieldMask); - - _sfTextMargin.setValue(value); -} -//! Get the value of the SimpleTextForeground::_sfTile field. - -inline -bool &SimpleTextForegroundBase::editTile(void) -{ - editSField(TileFieldMask); - - return _sfTile.getValue(); -} - -//! Get the value of the SimpleTextForeground::_sfTile field. -inline - bool SimpleTextForegroundBase::getTile(void) const -{ - return _sfTile.getValue(); -} - -//! Set the value of the SimpleTextForeground::_sfTile field. -inline -void SimpleTextForegroundBase::setTile(const bool value) -{ - editSField(TileFieldMask); - - _sfTile.setValue(value); -} - -//! Get the value of the \a index element the SimpleTextForeground::_mfLines field. -inline -const std::string &SimpleTextForegroundBase::getLines(const UInt32 index) const -{ - return _mfLines[index]; -} - -inline -std::string &SimpleTextForegroundBase::editLines(const UInt32 index) -{ - editMField(LinesFieldMask, _mfLines); - - return _mfLines[index]; -} - - - -#ifdef OSG_MT_CPTR_ASPECT -inline -void SimpleTextForegroundBase::execSync ( SimpleTextForegroundBase *pFrom, - ConstFieldMaskArg whichField, - AspectOffsetStore &oOffsets, - ConstFieldMaskArg syncMode, - const UInt32 uiSyncInfo) -{ - Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); - - if(FieldBits::NoField != (LinesFieldMask & whichField)) - _mfLines.syncWith(pFrom->_mfLines, - syncMode, - uiSyncInfo, - oOffsets); - - if(FieldBits::NoField != (SizeFieldMask & whichField)) - _sfSize.syncWith(pFrom->_sfSize); - - if(FieldBits::NoField != (ColorFieldMask & whichField)) - _sfColor.syncWith(pFrom->_sfColor); - - if(FieldBits::NoField != (ShadowColorFieldMask & whichField)) - _sfShadowColor.syncWith(pFrom->_sfShadowColor); - - if(FieldBits::NoField != (BgColorFieldMask & whichField)) - _sfBgColor.syncWith(pFrom->_sfBgColor); - - if(FieldBits::NoField != (FamilyFieldMask & whichField)) - _sfFamily.syncWith(pFrom->_sfFamily); - - if(FieldBits::NoField != (ShadowOffsetFieldMask & whichField)) - _sfShadowOffset.syncWith(pFrom->_sfShadowOffset); - - if(FieldBits::NoField != (HorizontalAlignFieldMask & whichField)) - _sfHorizontalAlign.syncWith(pFrom->_sfHorizontalAlign); - - if(FieldBits::NoField != (VerticalAlignFieldMask & whichField)) - _sfVerticalAlign.syncWith(pFrom->_sfVerticalAlign); - - if(FieldBits::NoField != (BorderColorFieldMask & whichField)) - _sfBorderColor.syncWith(pFrom->_sfBorderColor); - - if(FieldBits::NoField != (BorderOffsetFieldMask & whichField)) - _sfBorderOffset.syncWith(pFrom->_sfBorderOffset); - - if(FieldBits::NoField != (TextMarginFieldMask & whichField)) - _sfTextMargin.syncWith(pFrom->_sfTextMargin); - - if(FieldBits::NoField != (TileFieldMask & whichField)) - _sfTile.syncWith(pFrom->_sfTile); -} -#endif - - -inline -const Char8 *SimpleTextForegroundBase::getClassname(void) -{ - return "SimpleTextForeground"; -} -OSG_GEN_CONTAINERPTR(SimpleTextForeground); - -OSG_END_NAMESPACE - diff --git a/Source/System/Window/Foregrounds/OSGSimpleTextForegroundFields.h b/Source/System/Window/Foregrounds/OSGSimpleTextForegroundFields.h deleted file mode 100644 index 1d7a774f..00000000 --- a/Source/System/Window/Foregrounds/OSGSimpleTextForegroundFields.h +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - * OpenSG * - * * - * * - * Copyright (C) 2000-2006 by the OpenSG Forum * - * * - * www.opensg.org * - * * - * contact: David Kabala (djkabala@gmail.com) * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * License * - * * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Library General Public License as published * - * by the Free Software Foundation, version 2. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * -\*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*\ - * Changes * - * * - * * - * * - * * - * * - * * -\*---------------------------------------------------------------------------*/ - -/*****************************************************************************\ - ***************************************************************************** - ** ** - ** This file is automatically generated. ** - ** ** - ** Any changes made to this file WILL be lost when it is ** - ** regenerated, which can become necessary at any time. ** - ** ** - ***************************************************************************** -\*****************************************************************************/ - - -#ifndef _OSGSIMPLETEXTFOREGROUNDFIELDS_H_ -#define _OSGSIMPLETEXTFOREGROUNDFIELDS_H_ -#ifdef __sgi -#pragma once -#endif - -#include "OSGConfig.h" -#include "OSGUtilDef.h" - -#include "OSGFieldContainerFields.h" -#include "OSGPointerSField.h" -#include "OSGPointerMField.h" - - -OSG_BEGIN_NAMESPACE - -class SimpleTextForeground; - -OSG_GEN_CONTAINERPTR(SimpleTextForeground); - -/*! \ingroup GrpUtilFieldTraits - \ingroup GrpLibOSGUtil - */ -template <> -struct FieldTraits : - public FieldTraitsFCPtrBase -{ - private: - - static DataType _type; - - public: - - typedef FieldTraits Self; - - enum { Convertible = NotConvertible }; - - static OSG_UTIL_DLLMAPPING DataType &getType(void); - - template inline - static const Char8 *getSName (void); - -// static const char *getSName(void) { return "SFSimpleTextForegroundPtr"; } - template inline - static const Char8 *getMName (void); - -// static const char *getMName(void) { return "MFSimpleTextForegroundPtr"; } -}; - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFRecSimpleTextForegroundPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrecSimpleTextForegroundPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFWeakSimpleTextForegroundPtr"; -} - -template<> inline -const Char8 *FieldTraits::getSName(void) -{ - return "SFUnrefdSimpleTextForegroundPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFRecSimpleTextForegroundPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrecSimpleTextForegroundPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFWeakSimpleTextForegroundPtr"; -} - -template<> inline -const Char8 *FieldTraits::getMName(void) -{ - return "MFUnrefdSimpleTextForegroundPtr"; -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -/*! \ingroup GrpUtilFieldSFields */ -typedef PointerSField SFRecSimpleTextForegroundPtr; -/*! \ingroup GrpUtilFieldSFields */ -typedef PointerSField SFUnrecSimpleTextForegroundPtr; -/*! \ingroup GrpUtilFieldSFields */ -typedef PointerSField SFWeakSimpleTextForegroundPtr; -/*! \ingroup GrpUtilFieldSFields */ -typedef PointerSField SFUncountedSimpleTextForegroundPtr; - - -/*! \ingroup GrpUtilFieldMFields */ -typedef PointerMField MFRecSimpleTextForegroundPtr; -/*! \ingroup GrpUtilFieldMFields */ -typedef PointerMField MFUnrecSimpleTextForegroundPtr; -/*! \ingroup GrpUtilFieldMFields */ -typedef PointerMField MFWeakSimpleTextForegroundPtr; -/*! \ingroup GrpUtilFieldMFields */ -typedef PointerMField MFUncountedSimpleTextForegroundPtr; - - - - -#else // these are the doxygen hacks - -/*! \ingroup GrpUtilFieldSFields \ingroup GrpLibOSGUtil */ -struct SFRecSimpleTextForegroundPtr : - public PointerSField {}; -/*! \ingroup GrpUtilFieldSFields \ingroup GrpLibOSGUtil */ -struct SFUnrecSimpleTextForegroundPtr : - public PointerSField {}; -/*! \ingroup GrpUtilFieldSFields \ingroup GrpLibOSGUtil */ -struct SFWeakSimpleTextForegroundPtr : - public PointerSField {}; -/*! \ingroup GrpUtilFieldSFields \ingroup GrpLibOSGUtil */ -struct SFUncountedSimpleTextForegroundPtr : - public PointerSField {}; - - -/*! \ingroup GrpUtilFieldMFields \ingroup GrpLibOSGUtil */ -struct MFRecSimpleTextForegroundPtr : - public PointerMField {}; -/*! \ingroup GrpUtilFieldMFields \ingroup GrpLibOSGUtil */ -struct MFUnrecSimpleTextForegroundPtr : - public PointerMField {}; -/*! \ingroup GrpUtilFieldMFields \ingroup GrpLibOSGUtil */ -struct MFWeakSimpleTextForegroundPtr : - public PointerMField {}; -/*! \ingroup GrpUtilFieldMFields \ingroup GrpLibOSGUtil */ -struct MFUncountedSimpleTextForegroundPtr : - public PointerMField {}; - - - -#endif // these are the doxygen hacks - -OSG_END_NAMESPACE - -#endif /* _OSGSIMPLETEXTFOREGROUNDFIELDS_H_ */