[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu3dkit-dev] 3D file formats
From: |
Matt Brandt |
Subject: |
Re: [Gnu3dkit-dev] 3D file formats |
Date: |
Mon, 7 Oct 2002 22:11:42 -0500 |
On Monday, October 7, 2002, at 09:19 PM, Brent Gulanowski wrote:
I'm personally of the idea that everything not a leaf is a group, and
moreover that a leaf is really just a group of one. I'd be interested
in your thoughts on whether there could simply be one G3DScene class,
which would be a node, a group, and a world all in one, depending on
what attributes were present. Then the propagation of recursive calls
down the tree would involve a message to the node followed by a
message to the appropriate attribute. No attribute of that type means
no message is sent, but the general call is still propagated to the
child nodes. Even a pile of geometry is just another attribute.
This makes perfect sense to me. I think the more the model can be
simplified the more useful it is. I also think that an elegantly
simplistic design is easier to do great optimizations with.
Of course I'm afraid of how slow this might be. But if it's workable,
every node would in fact be a sort of dictionary. Maybe even a
standard NSDictionary. It would be sent a message asking if it had a
key matching the attribute. If so, work with the attribute. If not,
ask for the children attribute and do the same with them, if they
exist. Do you think that that would just be impossibly slow and too
generic to be workable? I mean, the attributes would have unique
classes, and they would be optimized.
I think that if you just implement this in the straightforward way,
where you actually send the message to each child, without cached
knowledge of whether or not they are acting on the messages, you will
get very slow results very quickly. (did that make sense?)
On the other hand, it is pretty easy to have a child return a status to
each message that indicates whether it, or any of it's children, acted
on the message, and have the parent cache this status to keep from
sending messages that aren't needed. That will quickly prune the
message tree so that it won't get too busy. This requires that a child
send a message up the parent chain when something enables a message
(like adding an attribute).
I am fascinated by the dynamism of Objective-C, and I am very curious
how far it can be taken before it runs away with itself.
I really like Objective C. It is easier to write good code in it than
in most other languages. Of course, it is easier still to write bad
code in any language :)
Matt
- Re: [Gnu3dkit-dev] 3D file formats, Philippe C . D . Robert, 2002/10/03
- Re: [Gnu3dkit-dev] 3D file formats, Brent Gulanowski, 2002/10/03
- Re: [Gnu3dkit-dev] 3D file formats, Philippe C . D . Robert, 2002/10/07
- Re: [Gnu3dkit-dev] 3D file formats, Brent Gulanowski, 2002/10/07
- Re: [Gnu3dkit-dev] 3D file formats,
Matt Brandt <=
- Re: [Gnu3dkit-dev] 3D file formats, Brent Gulanowski, 2002/10/08
- Re: [Gnu3dkit-dev] 3D file formats, Philippe C . D . Robert, 2002/10/10
- [Gnu3dkit-dev] Documentation Project, Matt Brandt, 2002/10/10
- Re: [Gnu3dkit-dev] Documentation Project, Philippe C . D . Robert, 2002/10/11
- Re: [Gnu3dkit-dev] Documentation Project, Brent Gulanowski, 2002/10/11
- Re: [Gnu3dkit-dev] Documentation Project, Philippe C . D . Robert, 2002/10/13
- [Gnu3dkit-dev] General goals and strategies?, Brent Gulanowski, 2002/10/14
- Re: [Gnu3dkit-dev] 3D file formats, Brent Gulanowski, 2002/10/11
- Re: [Gnu3dkit-dev] 3D file formats, Philippe C . D . Robert, 2002/10/11
- Re: [Gnu3dkit-dev] 3D file formats, Philippe C . D . Robert, 2002/10/09