Hello osg-users,
Am 23.08.2006 um 11:02 schrieb Marcus Lindblom:
> For NodePtr getChild(index), it's pretty obvious that you get a
> null ptr
> if the index is out of range, since that is common engineering
> practise.
> (If getChild returned a reference, then you'd need some documentation
> saying if an exception gets thrown or whatever.)
Well, for me it is common engineering practise to let the application
crash, because checking the index every time I try to access an
element of a vector is a performance killer. And that is actually
what happens when you call Node::getChild, have a look at the
implementation (which, btw, is not in OSGNode.h, but in OSGNodeImpl.h
- I found this implementation by using grep - yet another problem
which makes understanding OpenSG extremly difficult):
inline
NodePtr Node::getChild(UInt32 childIndex)
{
OSG_ASSERT((childIndex < _mfChildren.size()));
return _mfChildren[childIndex];
}
Pretty obvious, isn't it?
So, as a conclusion, we can see that even for such a simple function
like getChild there is a lot of room for misinterpretation. I
completly agree to Antonio that there should be documentation for all
functions. The documentation of the whole project currently is a
complete mess, and it is hard to believe that the core developers (as
we read in the last eMails) do not feel able to document their own
code, something which is matter of course at least for me. The only
useful documentation from my point of view currently is the tutorial
- written by a person which is not involved in the coding of OpenSG.
Bye,
Patrick
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users