Getting started

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
jbosch
Posts: 43
Joined: Sat May 29, 2010 4:42 pm
Contact:

Getting started

Post by jbosch »

Hi everyone,

I started today using bepu engine. I was looking for a XNA physcs engine available to windows Phone and I think this has been the 1st one to be ported, so I'm there now :-)

My surprise has been that the framework seems to ve very powerful, and I didn't know anything about it until today!

I'm trying to get the general idea about whow the framework works. I supose we have "entities" in the "space", those entities by default are conceptual, to render them it is suposed to use user defined models, is that correct? Then the models have to be positioned in the place that the space is positioning each entity. Is that correct?

Congratulations to the creators!
Jesús Bosch
XNA BLOG: http://geeks.ms/blogs/jbosch
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Getting started

Post by Norbo »

Thanks and welcome!
I supose we have "entities" in the "space", those entities by default are conceptual, to render them it is suposed to use user defined models, is that correct? Then the models have to be positioned in the place that the space is positioning each entity. Is that correct?
That's correct. An Entity is a physical object that inhabits the Space. It will move according to the applicable laws of physics (see dynamic/kinematic description below). Entities have a variety of properties that can be used to access their current state (like centerPosition, linearVelocity, centerOfMass, worldTransform, etc.).

The worldTransform property represents the rigid transformation that includes the entity's orientation and translation and can be used as the world matrix of a rendered object. The translation it uses is the center of the entity's shape, so if your graphic is offset from the origin, it will need an extra transformation applied to match the shape. It's also possible to use the entity's centerPosition and orientationQuaternion directly, but the worldTransform is a convenient shortcut.

There's two different modes that Entities can be in: dynamic, or kinematic. Dynamic entities will move according to impulses, gravity, and forces. They represent normal interactive objects. Kinematic entities, on the other hand, have infinite inertia. Their velocity cannot change unless you tell it to do so directly. This makes them great for static environment objects (the StaticTriangleGroup uses them) or moving platforms that should move according to some defined velocity and not fall due to gravity. As a side effect of having infinite inertia, they will happily ram their way through any other entity, expecting the other entity to get out of the way. If two kinematic entities collide, the collision is just ignored.

To create a kinematic entity, you can just leave the mass parameter off the entity's constructor or later use the becomeKinematic method (and vice versa for dynamic entities).
Post Reply