Create your own awesome maps

Even on the go

with our free apps for iPhone, iPad and Android

Get Started

Already have an account?
Log In

RVIP by Mind Map: RVIP
0.0 stars - 0 reviews range from 0 to 5

RVIP

OpenCV

Acquisition vidéo

Repérage balle

Tracking damier

Cours

Documents autorisés

Graphes de scene

OpenSG

Graphe de scene, SimpleSceneManager *mgr = new SimpleSceneManager;, Creation de la scene, mgr->setRoot (scene);, mgr->showAll(); // Affichage, NodePtr scene = [...];

Transformations, Noeud de transformation, NodePtr transNode = Node::create();, NodePtr transNode = makeCoredNode<Transform>(&transCore);, "Core" de transformation appliqué à ce noeud, souvent déclaré en global pour être modifié au cours de l'application, TransformPtr transCore = Tansform::create();, Matrix m; m.setIdentity(); m.setRotate(Quaternion(Vec3f(0,1,0), time/1000.f)); m.setTranslate(0,1,0); [...], Noeuds fils de la transformation, NodePtr child = [...];, Matrice de transformation, Application de la matrice de transformation, beginEditCP(transCore); transCore->setMatrix(m); endEditCP(transCore);, Assignation du core au noeud de transformation et ajout de child comme noeud fils, beginEditCP(transNode); transNode->setCore(transCore); transNode->addChild(child); endEditCP(transNode);

Matériaux, SimpleMaterialPtr material = SimpleMaterial::create();, Couleurs, beginEditCP(material); material->setDiffuse(Color3f(...)); material->setAmbient(Color3f(...)); endEditCP(material);, ClipPlaneChunk, Création, ClipPlaneChunkPtr xClip = ClipPlaneChunk::create();, beginEditCP(xClip); xClip->setEquation(Vec4f(1,0,0,0)); xClip->setEnable(true); xClip->setBeacon(torusNode); endEditCP(xClip);, Application, material->addChunk(xClip);, Configuration et application

Camera, Geree par OpenSG qui récupere les évenements, void mouse(int button, int state, int x, int y) {...}, Possibilité de changer par rapport à la caméra par défaut :, Trackball : Mode par défaut, Fly, Perspective, PerspectiveCameraPtr camera = PerspectiveCamera::create(); beginEditCP(camera); camera->setBeacon( some_node ); camera->setFov( deg2rad( 60 ) ); camera->setNear( 0.5 ); camera->setFar( 8000 ); endEditCP(camera);, Stéréoscopie : utilise un décorateur, cameraDecorator = ShearedStereoCameraDecorator::create(); beginEditCP(cameraDecorator); cameraDecorator->setLeftEye(false); cameraDecorator->setEyeSeparation(6); cameraDecorator->setDecoratee(some_camera); cameraDecorator->setZeroParallaxDistance(200); rightViewport = OSG::Viewport::create(); beginEditCP(rightViewport); rightViewport->setCamera ( cameraDecorator ); rightViewport->setBackground( some_background ); rightViewport->setRoot ( root ); rightViewport->setSize ( .5,0,1,1 ); endEditCP(rightViewport); endEditCP(cameraDecorator);, osg::FlyNavigator, osg::TrackballNavigator, Acquisition du clavier, forward(); right();, mgr->setNavigationMode(mode);, Modes : TRACKBALL FLY WALK NONE, Création du viewport et association à la camera :, viewport = OSG::Viewport::create(); beginEditCP(viewport); viewport->setCamera ( camera ); endEditCP(viewport);, Assignation du viewport à la scene, beginEditCP(scene); scene->setViewport(viewport); endEditCP(scene);

Manipulation, Permet de manipuler une partie des noeuds du graphe à la souris ou au clavier, Création et choix du type de transformation à effectuer, ManipulatorManager* mama; mama->createManipulator(const ManipulatorType type);, types : ROTATE SCALE TRANSLATE, mama->setTarget(TargetNode); mama->setViewport(mgr->getWindow()->getPort()[0]);, Application au node choisi

VRML

Description simplifiée d'un graphe de scène, Transformations, Transform { translation ... rotation ... children [...] }, Formes, Shape { geometry [...] appearance [...] #Matériau }, Matériaux, appearance Appearance { material Material { diffuseColor ... [...] } }

Affichage, Parsing (OpenSG), SceneFileHandler, NodePtr n = SceneFileHandler::the().read("filename");, Programme associé