Author Topic: More Parent/Child Comments on the Docs  (Read 2411 times)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
More Parent/Child Comments on the Docs
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: More Parent/Child Comments on the Docs
« Reply #1 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.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: More Parent/Child Comments on the Docs
« Reply #2 on: June 18, 2012, 08:56:19 am »
Would you add those notes to the docs?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: More Parent/Child Comments on the Docs
« Reply #3 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.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: More Parent/Child Comments on the Docs
« Reply #4 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: More Parent/Child Comments on the Docs
« Reply #5 on: June 18, 2012, 10:08:55 am »
Ok, i'll try to make this more clear.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: More Parent/Child Comments on the Docs
« Reply #6 on: June 18, 2012, 10:14:42 am »
Thanks a lot.