[gluon] Re: qt physics 2d |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/gluon Archives
]
- To: va7mje@xxxxxxxxx
- Subject: [gluon] Re: qt physics 2d
- From: idk <istdasklar@xxxxxxxxx>
- Date: Mon, 7 Jun 2010 10:45:00 +0200
- Cc: gluon <gluon@xxxxxxxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=Xv0Yah3PRABhD91P1Y6PAQeGRlUL+A/1aX93byzNW4E=; b=e1roX2iPVybMaZJhugphBRIQKxZA07/iREG7X0ssaVhhlSb8y8l6LPiwbjQpcws/xq br8yOxiGnhBP4XtZ4zzmgI09gUga5Z2ALpURtdNAfL1O27A4OOwxHU/AMCaz8sIijkcS AlOzjUl3Db0WtDPXmYfNLPSWBeKiNeFu10gu4=
- 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 :cc:content-type; b=mFVHzK3iWbGoKL4RT+yEydhGI3vMCm4645ZoGlQWB9p/SIekuqjMZPAecgBQ0lpkWd LndL8M/KCRixwSH8mcE+9yqec1piTF/r1a87Vy7lug5qKxTWdGmTJDLgz/I+HohAdjqc dAl4pwN8wVE3JW3r0cHBJCC9+wlPqgL/cFsP8=
I will not be on the channel often. But You can ask leinir about it.About your library, I was thinking something like this :
- Create a qphysics core library ( c++ class wrapping of box2d)
- Create class to use QGraphicsView and QPhysics .
The library should be like this :
Box2d -> Qt/C++ class Physics -> Render
it would be nice if the render can be switch with different render system. For example QGraphicsView or OpenGL. So that's why I suggest to create wrapping c++ class around Box2d like you started already.
As i see on your code, you didnt proceed like this. You created directly the render on the top of box2d : Box2d -> Render
Class file name in lowercase : qphysicsworld.cpp and not QPhysicsWorld.cpp
a class definition is like this :
class QPhysicsWorld : public QObject
{
Q_OBJECT
public:
QPhysicsWorld(QObject * parent);
void setConstantGravity(int value);
int constantGravity();
Q_SLOTS:
void setGravity(QVector2d vector);
private:
int mConstantGravity;
QVector2d mGravity;
}
We can use a namespace or a prefix class:
namespace : QPhysics::World or QPhysicsWorld.
QPhysicsWorld
QPhysicsShape
QPhysicsBody
QPhysicsJoint
QPhysicsDistanceJoint
QPhysicsRevoluteJoint
etc....
Here some example about render class using QGraphicsView
QPhysicsItem
- QSolidItem ....
like you already done...
So, I will get more time after my exam in 2 week. Then I will start codding with you, if you want. be free to ask questions.
Sorry for my english, I m french.
See you !!
2010/6/7 Jon
<jon.e.mundall@xxxxxxxxx>
Oh Hey! Wow! Glad to see some interest in the project! Sorry to be so bad
about getting back to you, I just got back from a weekend hike! :) fun stuff!
I'll get on the freenode channel sometime and discuss details with you.
Thanks,
Jon
On June 5, 2010 05:49:17 am you wrote:
> you are welcome on irc :
irc.freenode.net channel : #gluon to talk about
>
> 2010/6/5 idk <
istdasklar@xxxxxxxxx>
>
> > More information :
> >
> > We are using libbox2d into KDE/gluon.
> > It would be greate to have a qt library wrapping box2d.
> > As I see, you start a C++/Qt port. We want to do the same .
> >
> > If you are interesting, please create an account on gitorious. And then
> > you will be welcome as a gluon member as developpers of qphysics.
> >
> > 2010/6/5 idk <
istdasklar@xxxxxxxxx>
> >
> > Hello,
> >
> >> Could you put your qt physics lib on gitorious ?
> >> I would be happy to help you with my team, to improve it.
> >>
> >> DrIDK from Kde / Gluon team