#231 Isolating rendering + other patches

closed-rejected
Nathan Koenig
Gazebo (98)
5
2007-12-18
2007-12-16
Jordi Polo
No

I am making a big change in the structure of Gazebo code.

Previously each class deals with it's own rendering calling Ogre's methods.

I have moved most of these calls to a RenderEntity object.
This object is a pointer of Entity and Body, Geom Joint and Model inherits from Entity.

Entity retuns its RenderEntity pointer with the Rendering() method. So for instance move any object in the scene has one general method:
object->Rendering()->SetPosition()

From this:
grep -r "Ogre.h" *

Body.cc:#include <Ogre.h>
BoxGeom.cc:#include <Ogre.h>
CylinderGeom.cc:#include <Ogre.h>
Geom.cc:#include <Ogre.h>
Geom.hh:#include <Ogre.h>
HeightmapGeom.cc:#include <Ogre.h>
HeightmapGeom.hh:#include <Ogre.h>
Joint.cc:#include <Ogre.h>
PlaneGeom.cc:#include <Ogre.h>
RayGeom.cc:#include <Ogre.h>
SphereGeom.cc:#include <Ogre.h>
TrimeshGeom.cc:#include <Ogre.h>

Now we have:
HeightmapGeom.hh:#include <Ogre.h>
PlaneGeom.cc:#include <Ogre.h>
TrimeshGeom.cc:#include <Ogre.h>

So now __potentially__ any object has the same rendering capabilities. Meshes and bounding boxes can be applied to any degree, for instance several geoms can be used to make a complex physical body and only need to create a mesh for this complexity.

Future changes to complement this work will be create a Renderer class that will be an interface, the implementation being OgreAdapter.
Maybe divide HeightmapGeom in two...

Also some new options on RenderEntity will avoid children to modify their scenenode directly.

The rest of this patch are all the patches that I have been posting here this week (also include the patches by nobody). Now it is too difficult to make separate patches. And some potencial bug killing, code comment and the like.

Discussion

  • Jordi Polo
    Jordi Polo
    2007-12-16

    the PATCH

     
    Attachments
  • Jordi Polo
    Jordi Polo
    2007-12-16

    Logged In: YES
    user_id=1514795
    Originator: YES

    I forgot to say that RenderEntity is a SceneNode + any optional attached objects.
    This is also a work in progress. Take it as a first step.
    If you apply the other patches in some extend I can make this patch smaller.
    Also I will continue to work on Gazebo so the sooner the better.

     
  • Nathan Koenig
    Nathan Koenig
    2007-12-18

    • status: open --> closed-rejected
     
  • Nathan Koenig
    Nathan Koenig
    2007-12-18

    Logged In: YES
    user_id=761920
    Originator: NO

    Mostly duplicate work. I did take out the mesh tutorial documentation.