Skip to main content
History: BloodyMess Code Snippets
View published page
Source of version: 3
(current)
{INCLUDE(page="BloodyMess tpl")}{INCLUDE} %help%~hs~__Help:__ For any problems you encounter while working with these code snippets, as well as for detailed questions and propositions, please visit the [http://www.ogre3d.org/addonforums/viewforum.php?f=6|NxOgre OgreAddons-Forum]. {maketoc} !!{img src="img/wiki_up/NxOgreCube.png" alt="NxOgreCube.png"} General !!!{img src="img/wiki_up/NxOgreCube.png" alt="NxOgreCube.png"} Converting Ogre::Vector3 (or any Vector3-like class) to NxOgre::Vec3 Converting an Ogre vector or any other class (that has three floats named x, y, z) to a NxOgre one is something, you probably have to do quite often. This is how to do it: {CODE(wrap="1", colors="c++")} Ogre::Vector3 myOgreVector(1, 2, 3); NxOgre::Vec3 myNxOgreVector(myOgreVector);{CODE} Or; {CODE(wrap="1", colors="c++")}Ogre::Vector3 myOgreVector3(1, 2, 3); NxOgre::Vec3 myNxOgreVector3; myNxOgreVector3.from<Ogre::Vector3>(myOgreVector3);{CODE} If you need it the other way round...: {CODE(wrap="1", colors="c++")}Ogre::Vector3 myOgreVector3(myNxOgreVector3.as<Ogre::Vector3>());{CODE} Or: {CODE(wrap="1", colors="c++")}Ogre::Vector3 myOgreVector3 = myNxOgreVector3.as<Ogre::Vector3>();{CODE} !!!{img src="img/wiki_up/NxOgreCube.png" alt="NxOgreCube.png"} Toggle physics simulation If you want to toggle whether BloodyMess should go on simulating physics or should pause it, this code snippet offers you the needed functionalty. Just put it in the input handler function for the respective key, you want to use for toggling. {CODE(wrap="1", colors="c++")}if(m_pTimeController->isPaused()) m_pTimeController->resume(); else m_pTimeController->pause();{CODE} !!{img src="img/wiki_up/NxOgreCube.png" alt="NxOgreCube.png"} Particles !!{img src="img/wiki_up/NxOgreCube.png" alt="NxOgreCube.png"} MeshCooking !!{img src="img/wiki_up/NxOgreCube.png" alt="NxOgreCube.png"} Cloths {INCLUDE(page="NxOgre tpl")}{INCLUDE}
Search by Tags
Search Wiki by Freetags
Latest Changes
Compiled API Reference
Overlay Editor
Introduction - JaJDoo Shader Guide - Basics
RT Shader System
RapidXML Dotscene Loader
One Function Ogre
One Function Ogre
...more
Search
Find
Online Users
140 online users
OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username
Password
CapsLock is on.
Remember me (for 1 year)
Log in