www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: AGP on June 18, 2012, 01:59:38 am

Title: More Parent/Child Comments on the Docs
Post by: AGP on June 18, 2012, 01:59:38 am
I wish you would include more comments on what different methods did to an object's children.

Does compileAndStrip() and compile and strip its children? Does enableLazyTransformations() optimize children? Does setCollisionMode() set the collision mode of children? Thanks in advance.
Title: Re: More Parent/Child Comments on the Docs
Post by: EgonOlsen on June 18, 2012, 08:16:27 am
None of those. Transformations are affected, nothing else. In that way, enableLazy... somehow affects it, because it makes the child imune to changes of the parent, but that's just the way it's supposed to work and not really related to the fact that parents are being used or not.
Title: Re: More Parent/Child Comments on the Docs
Post by: AGP on June 18, 2012, 08:56:19 am
Would you add those notes to the docs?
Title: Re: More Parent/Child Comments on the Docs
Post by: EgonOlsen on June 18, 2012, 09:58:19 am
No, because i would have add a phrase to almost every method then that says "This doesn't affect parent/child relations". I don't see the need for this. The docs for addParent clearly state:

Quote
Defines an object as a parent of this. this will inherit all transformations from its parent.

That's all there is about it. It doesn't say that any other attributes might be inherited.
Title: Re: More Parent/Child Comments on the Docs
Post by: AGP on June 18, 2012, 10:06:20 am
Then perhaps explicitly state that no other attributes are inherited. And I do think that the comment about enableLazyTransformations() is appropriate.
Title: Re: More Parent/Child Comments on the Docs
Post by: EgonOlsen on June 18, 2012, 10:08:55 am
Ok, i'll try to make this more clear.
Title: Re: More Parent/Child Comments on the Docs
Post by: AGP on June 18, 2012, 10:14:42 am
Thanks a lot.