Re: [gluon] GluonGraphics and physics |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/gluon Archives
]
- To: gluon@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [gluon] GluonGraphics and physics
- From: "Arjen-Wander Hiemstra" <djfreestyler@xxxxxxxxx>
- Date: Sun, 10 Jan 2010 14:29:37 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=d7PCrygoDQPCTPPBeNVV2tOziJCjtBDkR8jih6EOnsQ=; b=Bk3+P44OWiHBMiYoXC2k/mhWFEQMLkEdreSOnqSy7I4sPHc4ED80GyihaxEVuRRNYk eLHyHjtBffcWmYzUrDZz7gFTSHvxOU0Z+ZuFUGxwBYNhQ+UeLEoMXs3OWkvRxTTdyg3C x/bqlGsV5IbEIQXHW326FSLniYFc1XVbupJlI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=rylwouXj9qDFksBvNwpPSU870M6q4MuVrGJJ26uJKSlhSq3I76zhlhRHKhygjMYmI6 QuN8vT0gLac/dcCf4nxGYpL6jUm2L8DB/SuiQm02esyf3/6KIgZwDxTITPMzs1y9d2Z8 vSIFxTZ4exuuz/GAbyRp/5wXTgVfsZw/oqAA8=
On Sunday 10 January 2010 04:43:06 idk wrote:
> So, what do you plan for physics api ?
>
The plan was to have it component-based only. I think we may still need some
glue-code but that is something to look into for whoever will work on the
components.
> So, I have done some work on gluon qt only. Currently we have some class
> like :
>
> GluonGraphics::GLWidget , and GluonGraphics::Engine
>
> It works like this :
>
> GluonGraphics::Item * item ...
> engine->addItem(item);
> view->setEngine(engine);
>
Hmm, no offense, but why?
If Engine is a singleton (like we discussed on the meeting) then you can
remove the last two lines as both Item and Widget, because those can be
handled internally.
So instead of:
GluonGraphics::Item * item ...
engine->addItem(item);
You get:
GluonGraphics::Item *item
Item::Item() // Item ctor
{
... init code ...
Engine::instance()->addItem(this);
}
Making the actual usage API cleaner.
Also, might it be an idea to remove the "GL" from GLWidget"? Library users
really shouldn't care too much about such implementation details.
> So, now how do you want to use physics ? Would you like to give me a shema
> about it ?
Basically, we need some components like PhysicsBodyComponent,
CircleCollisionComponent and others.
---
+----------------------------------------------+
Gluon is a high-level game development library for the KDE desktop enviornment.
http://gluon.tuxfamily.org/
http://gitorious.org/gluon