Yesterday, I was probing for 2D implementation along with 3D in Ogre. And I was in the vicinity of overlays, manual objects and so many other things. But was this required yet? No. Chase two rabbits and both will escape!
Got a better clear insight today on how to take the next steps. So I started looking for what basic primitives are facilitated by Ogre. What operations could be performed on the various primtives, that were provided by Ogre? Simultaneously, I implemented point on Qt’s scene, though was not a priority, but that segmentation fault had tested much of my patience and it was done! Also, I just worked out on adding a predefined(or static) point and line to Ogre’s scene. Was not tough though and no mouse clicks yet.
Ha! Then finally I greeted Ogre Procedural Geometry Library. This library provides basic primitives like box, sphere, torus, cylinder, cone, circle, ellipse, spline, bezier curve and yet a few more. It also supports 2D transformations namely rotation, scaling, translation and also equips operations like union, intersection, extrusion.
- Clone it from bitbucket using-
hg clone https://code.google.com/p/ogre-procedural/ ogre-proceduralTo clone from bitbucket, you must install mercurial using –
sudo apt-get install mercurial
- I used cmake-gui for building it. Choose source and build directories.
- Click on ‘Add Entry’ and set a variable ‘OGRE_HOME’ with its ‘PATH’ referring to your Ogre source directory
- Hit ‘Configure’ and then ‘Generate’. You are done.
By this moment, I have just added a sphere using it in my scene. No material is associated with it yet. To be able to perform operations is significant. Continuing the same.