Body::Body(const NxOgre::ShapeDescriptions& shapes, const NxOgre::Matrix44& pose, const BodyDescription& description, RenderSystem* rendersystem) : Actor(rendersystem->getScene()), // Take notice of the constructor we are using, it's designed for // classes that inherit from Actor. mSceneNodeDestructorBehaviour(description.mSceneNodeDestructorBehaviour), mRenderPriority(description.mRenderPriority), mRenderSystem(rendersystem) { // Set the name and hash. mName = description.mName; mNameHash = NxOgre::Strings::hash(mName); // Create a dynamic RigidBody with the pose, description and shapes. // We can pass on the BodyDescription as a RigidBodyDescription because it inherits from it, createDynamic(pose, description, shapes); mAlphaPose = pose; // Obviously NxOgre won't know about the Ogre bits, so this is what the next lines are for: mSceneManager = rendersystem->getSceneManager(); mNode = description.mNode; // And let the Scene know we want this renderered. So it will call the advance function when it's // time to render. mScene->addRenderListener(this, mRenderPriority); }
model::Element* createTree(glow::Dispatcher* dispatcher) { auto root = model::Element::createRoot(); auto router = new model::Node(1, root, "router"); createIdentity(router, 0); createOneToN(router, 1, dispatcher); createNToN(router, 2, dispatcher); createDynamic(router, 3, dispatcher); createFunctions(router, 4, dispatcher); return root; }
void vleSmDT::xCreateDom() { if (not mDocSm) { mDocSm = new QDomDocument("vle_project_metadata"); QDomProcessingInstruction pi; pi = mDocSm->createProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\" "); mDocSm->appendChild(pi); QDomElement vpmRoot = mDocSm->createElement("vle_project_metadata"); // Save VPZ file revision vpmRoot.setAttribute("version", "1.x"); // Save the author name (if known) vpmRoot.setAttribute("author", "meto"); QDomElement xCondPlug = mDocSm->createElement("variables"); vpmRoot.appendChild(xCondPlug); xCondPlug = mDocSm->createElement("compute"); vpmRoot.appendChild(xCondPlug); xCondPlug = mDocSm->createElement("srcPlugin"); xCondPlug.setAttribute("name", mpluginName); vpmRoot.appendChild(xCondPlug); QDomElement elem = createDynamic(); vpmRoot.appendChild(elem); elem = createObservable(); vpmRoot.appendChild(elem); elem = createCondition(); vpmRoot.appendChild(elem); elem = createIn(); vpmRoot.appendChild(elem); elem = createOut(); vpmRoot.appendChild(elem); mDocSm->appendChild(vpmRoot); } }