Question about setModelBound

I am not specifically new to OpenGL and 3D graphics but I am new to the whole scenegraph scene. I started with Xith3D the other day and it worked. I then ran across jME and I liked the looks of it better. So I started going through the Starter.pdf.



I was reading about what setModelBound was for and how it worked and I think it’s great that this has been implemented into the API. I was discussing this with a friend of mine and he asked an interesting question.



What happens when only part of the object is visible? Does the whole object then get rendered or does only the visible part of the object get drawn? If it is the former, is there a way to change this in the jME API and how complex would that be?



Thanks.



Gregg

If the model bound is visible then every part that the model bound contains will be sent to the renderer. So typically, you’ll have an object that is made up of multiple trimeshes, each having their own model bounds. The parent Node of these trimeshes makes up the overall model. This has a World bound that contains all the model nodes (contains is in all the model bounds fit in the world bound).



So, lets say part of the overall model (Node) is visible. There is further processing to determine if the bounds contained in the model are visible, if they are, then they are sent to the renderer, if not, then they are ignored.



So you can have a situation where you have a model made up of 5 TriMeshes (2 legs, 2 feet, torso head). If you are looking at the model from the waist up the legs won’t render, if you are looking at the model on the right hand side, only the torso, right leg and right arm are rendered.

Awesome! Thanks for the info.