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: idk <istdasklar@xxxxxxxxx>
- Date: Sun, 10 Jan 2010 15:33:48 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=50ZpalHgFv6oRzSpMzBfKlLTbYtoefjQV9o+L+HTeVM=; b=f3OB19aGkHkQCQNzJu961TdNPFzGp7T8zFMBQAUuPB/KDNNwL3Zh9HYeYk3+i8G4Dm pr3p8y4HKikmB5xqYmIN+jTxnQmq/l/zHkCuezhC9xXrEc3Q3atcuS3EOVl5CnK8I97M B1ANRw97lZpC0/Dp6cj/PKYi377oW76ucoejs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Md+BEixjB/8uWCO+N/P1BxOb9vpUTcrZf8hBzJLMf7zHufDGF1j0jHuGVaPB3r/o9I Xeh1dQ+2jJqLJb1qfVToxNMiHuocyxeYUo3/hefSfPqfypwDuyZOwxcmjPHzCmZHaavF AyByZjq8B1Xzgm/jpmZ3jzVwo61aMs8yGATY8=
About Engine, Imagine you want to create a 2d games with a 2d map. Imagine the nintendo DS with 2 screen. Then I imagine gameEngine and mapEngine. But maybe I m wrong...Purpose for physics class usable as component in Gluon Creator:
GluonPhysics::Body
GluonPhysics::World
But I don't understand how a developpers will use physics in a qt only application.
Currently it's very simple :
KGLPhysicsItem * item;
KGLPhysicsEngine->add(item)..
So what do you suggest now if you would like to have physics engine separated from gluonGraphics?
About the renaming , this is my purpose for common class:
GluonGraphics
KGLPoint -> GluonGraphics::Vertex
KGLPointList -> GluonGraphics::VertexList
KGLPainter->GluonGraphics::GLPainter // Or only Painter
KGLWidget -> GluonGraphics::GLWidget // or only Widget
KGLBaseItem->GluonGraphics::BaseItem
KGLItem->GluonGraphics::Item
KGLProgram->GluonGraphics::Program // will be replaced by QGLProgram
KGLShader->GluonGraphics::Shader // will be replaced by QGLShader
KGLFx->GluonGraphics::Fx
KGLEngine->GluonGraphics::Engine
KGLTexture->GluonGraphics::Texture
{too many class?
GluonGraphics::Resolution
GluonGraphics::Screen
GluonGraphics::Display
}
extra class:
GluonGraphics::LineItem
GluonGraphics::RectItem
GluonGraphics::CircleItem
GluonGraphics::PolygonItem
GluonGraphics::PixmapItem
GluonGraphics::ShadowItem
GluonGraphics::AnimationItem
GluonGraphics::VertexGridItem
GluonGraphics::ParticlesItem
PhysicsItem ??
extra widget :
GluonGraphics::SettingsWidget
GluonAudio:
KALBuffer -> GluonAudio::Buffer
new : GluonAudio::Source wrap of alSource
KALSound->GluonAudio::Sound
KALDevice->GluonAudio::Device
KALMusic->GluonAudio::Music
KALCapture->GluonAudio::Capture
KALEngine->GluonAudio::Init
KALSoundReader->GluonAudio::SoundReader
extra widget :
GluonAudio::SettingsWidget
GluonAudio::PlayerWidget
GluonInput:
GluonInput::DetectAbstract {GluonInput::DetectWin, GluonInput::DetectLinux, GluonInput::DetectMac}
GluonInput::Input {GluonInput::InputWin,GluonInput::InputLinux,GluonInput::InputMac}
KCLCode -> GluonInput::KeyCode
KCLCustomInput -> GluonInput::CustomInput
GluonInput::Keyboard
GluonInput::Mouse
GluonInput::Joystick
GluonInput::Tablet
GluonInput::Acelerometer for maemo
extra widget:
GluonInput::SettingsWidget
GluonInput::DeviceListWidget
GluonInput::InputButton
2010/1/10 Arjen-Wander Hiemstra
<djfreestyler@xxxxxxxxx>
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