MPhysicsConstraint

From MaratisWiki
Revision as of 14:53, 7 February 2014 by Dahnielson (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

For detailed explanations on how to manipulate physics via code see Creating and updating physics objects.


MPhysicsConstraint is a struct used by MPhysicsProperties.

The struct is defined in the MOEntity source code.

The constraints can also be edited from the Maratis Editor.

The constraints are mere value holders for the physics engine. This means that editing them when the game is already started will have no effect at all. The constraints take effect only when the scene prepares the physics (MScene::preparePhysics).

However you can apply the new values using these methods of MPhysicsContext:

createConstraint, to set some of the variables (e.g. the pivot)

setLinearLimit

setAngularLimit

Another option is to use MScene::prepareConstraints.


Contents

Source code

MOEntity.h

MOEntity.cpp


API

It's just a struct, you can freely edit the values.

Constructors

MPhysicsConstraint(void)

MPhysicsConstraint(const MPhysicsConstraint & constraint)

Variables

constraintId

Type: unsigned int

The ID of the actual constraint "object" used by the physics engine. See the introduction of this page.


parentObjectId

Type: unsigned int


parentName

Type: MString


pivot

Type: MVector3


lowerLinearLimit

Type: MVector3


upperLinearLimit

Type: MVector3


lowerAngularLimit

Type: MVector3


upperAngularLimit

Type: MVector3


disableParentCollision

Type: bool

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox