LibreOffice Module slideshow (master) 1
|
Class that manages the Box2D World. More...
#include <box2dtools.hxx>
Public Member Functions | |
box2DWorld (const ::basegfx::B2DVector &rSlideSize) | |
~box2DWorld () | |
bool | initiateWorld (const ::basegfx::B2DVector &rSlideSize) |
double | stepAmount (const double fPassedTime, const float fTimeStep=1.0f/100.0f, const int nVelocityIterations=6, const int nPositionIterations=2) |
Simulate and step through a given amount of time in the Box2D World. More... | |
bool | shapesInitialized () |
bool | isInitialized () const |
Box2DBodySharedPtr | makeShapeDynamic (const css::uno::Reference< css::drawing::XShape > &xShape, const basegfx::B2DVector &rStartVelocity, const double fDensity, const double fBounciness) |
Make the shape's corresponding box2D body a dynamic one. More... | |
Box2DBodySharedPtr | makeShapeStatic (const slideshow::internal::ShapeSharedPtr &pShape) |
Make the Box2D body corresponding to the given shape a static one. More... | |
Box2DBodySharedPtr | createStaticBody (const slideshow::internal::ShapeSharedPtr &rShape, const float fDensity=1.0f, const float fFriction=0.3f) |
Create a static body that is represented by the shape's geometry. More... | |
void | initiateAllShapesAsStaticBodies (const slideshow::internal::ShapeManagerSharedPtr &pShapeManager) |
Initiate all the shapes in the current slide in the box2DWorld as static ones. More... | |
bool | hasWorldStepper () const |
void | setHasWorldStepper (const bool bHasWorldStepper) |
Set the flag for whether the box2DWorld has a stepper or not. More... | |
void | queueDynamicPositionUpdate (const css::uno::Reference< css::drawing::XShape > &xShape, const ::basegfx::B2DPoint &rOutPos) |
Queue a position update that is simulated as if shape's corresponding box2D body moved to given position when processed. More... | |
void | queueLinearVelocityUpdate (const css::uno::Reference< css::drawing::XShape > &xShape, const ::basegfx::B2DVector &rVelocity, const int nDelayForSteps=0) |
Queue a update that sets the corresponding box2D body's linear velocity to the given value when processed. More... | |
void | queueShapeAnimationUpdate (const css::uno::Reference< css::drawing::XShape > &xShape, const slideshow::internal::ShapeAttributeLayerSharedPtr &pAttrLayer, const slideshow::internal::AttributeType eAttrType, const bool bIsFirstUpdate) |
Queue an appropriate update for the animation effect that is in parallel with a physics animation. More... | |
void | queueShapePathAnimationUpdate (const css::uno::Reference< com::sun::star::drawing::XShape > &xShape, const slideshow::internal::ShapeAttributeLayerSharedPtr &pAttrLayer, const bool bIsFirstUpdate) |
Queue an appropriate update for a path animation that is in parallel with a physics animation. More... | |
void | queueShapeAnimationEndUpdate (const css::uno::Reference< css::drawing::XShape > &xShape, const slideshow::internal::AttributeType eAttrType) |
Queue an appropriate update for the animation effect that just ended. More... | |
void | alertPhysicsAnimationEnd (const slideshow::internal::ShapeSharedPtr &pShape) |
Alert that a physics animation effect has ended. More... | |
void | alertPhysicsAnimationStart (const ::basegfx::B2DVector &rSlideSize, const slideshow::internal::ShapeManagerSharedPtr &pShapeManager) |
Alert that a physics animation effect has started. More... | |
Private Member Functions | |
void | createStaticFrameAroundSlide (const ::basegfx::B2DVector &rSlideSize) |
Creates a static frame in Box2D world that corresponds to the slide borders. More... | |
void | setShapePosition (const css::uno::Reference< css::drawing::XShape > xShape, const ::basegfx::B2DPoint &rOutPos) |
Sets shape's corresponding Box2D body to the specified position. More... | |
void | setShapePositionByLinearVelocity (const css::uno::Reference< css::drawing::XShape > xShape, const ::basegfx::B2DPoint &rOutPos, const double fPassedTime) |
Moves shape's corresponding Box2D body to specified position. More... | |
void | setShapeLinearVelocity (const css::uno::Reference< com::sun::star::drawing::XShape > xShape, const basegfx::B2DVector &rVelocity) |
Sets linear velocity of the shape's corresponding Box2D body. More... | |
void | setShapeAngle (const css::uno::Reference< com::sun::star::drawing::XShape > xShape, const double fAngle) |
Sets rotation angle of the shape's corresponding Box2D body. More... | |
void | setShapeAngleByAngularVelocity (const css::uno::Reference< com::sun::star::drawing::XShape > xShape, const double fAngle, const double fPassedTime) |
Rotates shape's corresponding Box2D body to specified angle. More... | |
void | setShapeAngularVelocity (const css::uno::Reference< com::sun::star::drawing::XShape > xShape, const double fAngularVelocity) |
Sets angular velocity of the shape's corresponding Box2D body. More... | |
void | setShapeCollision (const css::uno::Reference< com::sun::star::drawing::XShape > xShape, const bool bCanCollide) |
Sets whether a shape's corresponding Box2D body has collision in the Box2D World or not. More... | |
void | processUpdateQueue (const double fPassedTime) |
Process the updates queued in the maShapeParallelUpdateQueue. More... | |
void | step (const float fTimeStep=1.0f/100.0f, const int nVelocityIterations=6, const int nPositionIterations=2) |
Simulate and step through time in the Box2D World. More... | |
void | queueDynamicRotationUpdate (const css::uno::Reference< com::sun::star::drawing::XShape > &xShape, const double fAngle) |
Queue a rotation update that is simulated as if shape's corresponding box2D body rotated to given angle when processed. More... | |
void | queueAngularVelocityUpdate (const css::uno::Reference< com::sun::star::drawing::XShape > &xShape, const double fAngularVelocity, const int nDelayForSteps=0) |
Queue an angular velocity update that sets the shape's corresponding box2D body angular velocity to the given value when processed. More... | |
void | queueShapeVisibilityUpdate (const css::uno::Reference< css::drawing::XShape > &xShape, const bool bVisibility) |
Queue an collision update that sets the collision of shape's corresponding box2D body when processed. More... | |
void | queueShapePositionUpdate (const css::uno::Reference< css::drawing::XShape > &xShape, const ::basegfx::B2DPoint &rOutPos) |
Private Attributes | |
std::unique_ptr< b2World > | mpBox2DWorld |
Pointer to the real Box2D World that this class manages. More... | |
double | mfScaleFactor |
Scale factor for conversions between LO user space coordinates to Box2D World coordinates. More... | |
bool | mbShapesInitialized |
bool | mbHasWorldStepper |
Holds whether or not there is a PhysicsAnimation that is stepping the Box2D World. More... | |
bool | mbAlreadyStepped |
Flag used to stop overstepping that occurs when a physics animation effect transfers step-lock to another one. More... | |
int | mnPhysicsAnimationCounter |
Number of Physics Animations going on. More... | |
std::unordered_map< css::uno::Reference< css::drawing::XShape >, Box2DBodySharedPtr > | mpXShapeToBodyMap |
std::queue< Box2DDynamicUpdateInformation > | maShapeParallelUpdateQueue |
Queue that holds any required information to keep LO animation effects and Box2DWorld in sync. More... | |
Class that manages the Box2D World.
This class is used when there's a physics animation going on, it handles the stepping through the box2d world, updating the shapes in the box2d world if they were changed by ongoing animations.
Definition at line 76 of file box2dtools.hxx.
box2d::utils::box2DWorld::box2DWorld | ( | const ::basegfx::B2DVector & | rSlideSize | ) |
Definition at line 224 of file box2dtools.cxx.
|
default |
void box2d::utils::box2DWorld::alertPhysicsAnimationEnd | ( | const slideshow::internal::ShapeSharedPtr & | pShape | ) |
Alert that a physics animation effect has ended.
Makes the given shape static, if this was the last physics animation effect that was in parallel, box2d bodies that are owned by the mpXShapeToBodyMap are dumped and potentially destroyed.
Definition at line 564 of file box2dtools.cxx.
References fDefaultStaticBodyBounciness(), box2d::utils::makeBodyStatic(), maShapeParallelUpdateQueue, mbAlreadyStepped, mbShapesInitialized, mnPhysicsAnimationCounter, and mpXShapeToBodyMap.
void box2d::utils::box2DWorld::alertPhysicsAnimationStart | ( | const ::basegfx::B2DVector & | rSlideSize, |
const slideshow::internal::ShapeManagerSharedPtr & | pShapeManager | ||
) |
Alert that a physics animation effect has started.
Initiates the box2D world if it is not initiated yet, and likewise constructs box2d bodies for the shapes in the current slide if they are not constructed.
Definition at line 588 of file box2dtools.cxx.
References initiateAllShapesAsStaticBodies(), initiateWorld(), mbShapesInitialized, mnPhysicsAnimationCounter, and mpBox2DWorld.
Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody | ( | const slideshow::internal::ShapeSharedPtr & | rShape, |
const float | fDensity = 1.0f , |
||
const float | fFriction = 0.3f |
||
) |
Create a static body that is represented by the shape's geometry.
Definition at line 685 of file box2dtools.cxx.
References basegfx::utils::adaptiveSubdivideByAngle(), basegfx::B2DPolyPolygon::areControlPointsUsed(), basegfx::utils::distort(), fDefaultStaticBodyBounciness(), basegfx::B2DPolyPolygon::getB2DRange(), basegfx::B2DRange::getCenter(), SdrObject::getSdrObjectFromXShape(), SdrObject::HasFillStyle(), SdrObject::IsClosedObj(), SdrObject::IsEdgeObj(), mfScaleFactor, mpBox2DWorld, basegfx::B2DPolyPolygon::removeDoublePoints(), SdrObject::TakeXorPoly(), and basegfx::triangulator::triangulate().
Referenced by initiateAllShapesAsStaticBodies().
|
private |
Creates a static frame in Box2D world that corresponds to the slide borders.
Definition at line 252 of file box2dtools.cxx.
References mfScaleFactor, and mpBox2DWorld.
Referenced by initiateWorld().
bool box2d::utils::box2DWorld::hasWorldStepper | ( | ) | const |
Definition at line 447 of file box2dtools.cxx.
References mbHasWorldStepper.
void box2d::utils::box2DWorld::initiateAllShapesAsStaticBodies | ( | const slideshow::internal::ShapeManagerSharedPtr & | pShapeManager | ) |
Initiate all the shapes in the current slide in the box2DWorld as static ones.
Definition at line 391 of file box2dtools.cxx.
References aObjList, createStaticBody(), SdrObject::getSdrObjectFromXShape(), SdrObject::GetSubList(), GetXShapeForSdrObject(), SdrObject::IsGroupObject(), mbShapesInitialized, mpBox2DWorld, mpXShapeToBodyMap, and queueShapeVisibilityUpdate().
Referenced by alertPhysicsAnimationStart().
bool box2d::utils::box2DWorld::initiateWorld | ( | const ::basegfx::B2DVector & | rSlideSize | ) |
Definition at line 238 of file box2dtools.cxx.
References createStaticFrameAroundSlide(), and mpBox2DWorld.
Referenced by alertPhysicsAnimationStart().
bool box2d::utils::box2DWorld::isInitialized | ( | ) | const |
Definition at line 640 of file box2dtools.cxx.
References mpBox2DWorld.
Box2DBodySharedPtr box2d::utils::box2DWorld::makeShapeDynamic | ( | const css::uno::Reference< css::drawing::XShape > & | xShape, |
const basegfx::B2DVector & | rStartVelocity, | ||
const double | fDensity, | ||
const double | fBounciness | ||
) |
Make the shape's corresponding box2D body a dynamic one.
A dynamic body will be affected by other bodies and the gravity.
xShape | Shape reference |
rStartVelocity | Velocity of the shape after making it dynamic |
fDensity | Density of the body that is in kg/m^2 |
fBounciness | Bounciness of the body that is usually in between [0,1]. Even though it could take values that are >1, it is way too chaotic. |
Definition at line 649 of file box2dtools.cxx.
References box2d::utils::makeBodyDynamic(), mpBox2DWorld, mpXShapeToBodyMap, and queueLinearVelocityUpdate().
Box2DBodySharedPtr box2d::utils::box2DWorld::makeShapeStatic | ( | const slideshow::internal::ShapeSharedPtr & | pShape | ) |
Make the Box2D body corresponding to the given shape a static one.
A static body will not be affected by other bodies and the gravity. But will affect other bodies that are dynamic (will still collide with them but won't move etc.)
pShape | Pointer to the shape to alter the corresponding Box2D body of |
Definition at line 669 of file box2dtools.cxx.
References box2d::utils::makeBodyStatic(), mpBox2DWorld, and mpXShapeToBodyMap.
|
private |
Process the updates queued in the maShapeParallelUpdateQueue.
Called on each step of the box2DWorld.
fPassedTime | Time frame to process the updates accordingly (needed for proper simulations) |
Definition at line 348 of file box2dtools.cxx.
References box2d::utils::BOX2D_UPDATE_ANGLE, box2d::utils::BOX2D_UPDATE_ANGULAR_VELOCITY, box2d::utils::BOX2D_UPDATE_LINEAR_VELOCITY, box2d::utils::BOX2D_UPDATE_POSITION, box2d::utils::BOX2D_UPDATE_POSITION_CHANGE, box2d::utils::BOX2D_UPDATE_SIZE, box2d::utils::BOX2D_UPDATE_VISIBILITY, box2d::utils::Box2DDynamicUpdateInformation::maPosition, maShapeParallelUpdateQueue, box2d::utils::Box2DDynamicUpdateInformation::maVelocity, box2d::utils::Box2DDynamicUpdateInformation::mbVisibility, box2d::utils::Box2DDynamicUpdateInformation::meUpdateType, box2d::utils::Box2DDynamicUpdateInformation::mfAngle, box2d::utils::Box2DDynamicUpdateInformation::mfAngularVelocity, box2d::utils::Box2DDynamicUpdateInformation::mnDelayForSteps, box2d::utils::Box2DDynamicUpdateInformation::mxShape, setShapeAngleByAngularVelocity(), setShapeAngularVelocity(), setShapeCollision(), setShapeLinearVelocity(), setShapePosition(), and setShapePositionByLinearVelocity().
Referenced by stepAmount().
|
private |
Queue an angular velocity update that sets the shape's corresponding box2D body angular velocity to the given value when processed.
Definition at line 481 of file box2dtools.cxx.
References box2d::utils::BOX2D_UPDATE_ANGULAR_VELOCITY, maShapeParallelUpdateQueue, and box2d::utils::Box2DDynamicUpdateInformation::mfAngularVelocity.
Referenced by queueShapeAnimationEndUpdate().
void box2d::utils::box2DWorld::queueDynamicPositionUpdate | ( | const css::uno::Reference< css::drawing::XShape > & | xShape, |
const ::basegfx::B2DPoint & | rOutPos | ||
) |
Queue a position update that is simulated as if shape's corresponding box2D body moved to given position when processed.
Definition at line 454 of file box2dtools.cxx.
References box2d::utils::BOX2D_UPDATE_POSITION_CHANGE, box2d::utils::Box2DDynamicUpdateInformation::maPosition, and maShapeParallelUpdateQueue.
Referenced by queueShapeAnimationUpdate().
|
private |
Queue a rotation update that is simulated as if shape's corresponding box2D body rotated to given angle when processed.
Definition at line 473 of file box2dtools.cxx.
References box2d::utils::BOX2D_UPDATE_ANGLE, maShapeParallelUpdateQueue, and box2d::utils::Box2DDynamicUpdateInformation::mfAngle.
Referenced by queueShapeAnimationUpdate().
void box2d::utils::box2DWorld::queueLinearVelocityUpdate | ( | const css::uno::Reference< css::drawing::XShape > & | xShape, |
const ::basegfx::B2DVector & | rVelocity, | ||
const int | nDelayForSteps = 0 |
||
) |
Queue a update that sets the corresponding box2D body's linear velocity to the given value when processed.
Definition at line 463 of file box2dtools.cxx.
References box2d::utils::BOX2D_UPDATE_LINEAR_VELOCITY, maShapeParallelUpdateQueue, and box2d::utils::Box2DDynamicUpdateInformation::maVelocity.
Referenced by makeShapeDynamic(), and queueShapeAnimationEndUpdate().
void box2d::utils::box2DWorld::queueShapeAnimationEndUpdate | ( | const css::uno::Reference< css::drawing::XShape > & | xShape, |
const slideshow::internal::AttributeType | eAttrType | ||
) |
Queue an appropriate update for the animation effect that just ended.
Definition at line 544 of file box2dtools.cxx.
References slideshow::internal::PosX, slideshow::internal::PosY, queueAngularVelocityUpdate(), queueLinearVelocityUpdate(), and slideshow::internal::Rotate.
void box2d::utils::box2DWorld::queueShapeAnimationUpdate | ( | const css::uno::Reference< css::drawing::XShape > & | xShape, |
const slideshow::internal::ShapeAttributeLayerSharedPtr & | pAttrLayer, | ||
const slideshow::internal::AttributeType | eAttrType, | ||
const bool | bIsFirstUpdate | ||
) |
Queue an appropriate update for the animation effect that is in parallel with a physics animation.
Definition at line 518 of file box2dtools.cxx.
References slideshow::internal::PosX, slideshow::internal::PosY, queueDynamicPositionUpdate(), queueDynamicRotationUpdate(), queueShapePositionUpdate(), queueShapeVisibilityUpdate(), slideshow::internal::Rotate, and slideshow::internal::Visibility.
Referenced by queueShapePathAnimationUpdate().
void box2d::utils::box2DWorld::queueShapePathAnimationUpdate | ( | const css::uno::Reference< com::sun::star::drawing::XShape > & | xShape, |
const slideshow::internal::ShapeAttributeLayerSharedPtr & | pAttrLayer, | ||
const bool | bIsFirstUpdate | ||
) |
Queue an appropriate update for a path animation that is in parallel with a physics animation.
Definition at line 508 of file box2dtools.cxx.
References slideshow::internal::PosX, and queueShapeAnimationUpdate().
|
private |
Definition at line 499 of file box2dtools.cxx.
References box2d::utils::BOX2D_UPDATE_POSITION, box2d::utils::Box2DDynamicUpdateInformation::maPosition, and maShapeParallelUpdateQueue.
Referenced by queueShapeAnimationUpdate().
|
private |
Queue an collision update that sets the collision of shape's corresponding box2D body when processed.
Definition at line 491 of file box2dtools.cxx.
References box2d::utils::BOX2D_UPDATE_VISIBILITY, maShapeParallelUpdateQueue, and box2d::utils::Box2DDynamicUpdateInformation::mbVisibility.
Referenced by initiateAllShapesAsStaticBodies(), and queueShapeAnimationUpdate().
void box2d::utils::box2DWorld::setHasWorldStepper | ( | const bool | bHasWorldStepper | ) |
Set the flag for whether the box2DWorld has a stepper or not.
Definition at line 449 of file box2dtools.cxx.
References mbHasWorldStepper.
|
private |
Sets rotation angle of the shape's corresponding Box2D body.
xShape | Shape reference |
fAngle | Angle of rotation in degrees. |
Definition at line 312 of file box2dtools.cxx.
References mpXShapeToBodyMap.
|
private |
Rotates shape's corresponding Box2D body to specified angle.
Rotates the Box2D body to specified angle as if the body had exact angular velocity to reach that point in given time frame
xShape | Shape reference |
fAngle | Angle of rotation in degrees. |
fPassedTime | Time frame which the Box2D body should rotate to the specified angle. |
Definition at line 319 of file box2dtools.cxx.
References mpBox2DWorld, and mpXShapeToBodyMap.
Referenced by processUpdateQueue().
|
private |
Sets angular velocity of the shape's corresponding Box2D body.
xShape | Shape reference |
fAngularVelocity | Angular velocity in degrees per second. |
Definition at line 331 of file box2dtools.cxx.
References mpBox2DWorld, and mpXShapeToBodyMap.
Referenced by processUpdateQueue().
|
private |
Sets whether a shape's corresponding Box2D body has collision in the Box2D World or not.
Used for animations that change the visibility of the shape.
xShape | Shape reference |
bCanCollide | true if collisions should be enabled for the corresponding Box2D body of this shape and false if it should be disabled. |
Definition at line 340 of file box2dtools.cxx.
References mpBox2DWorld, and mpXShapeToBodyMap.
Referenced by processUpdateQueue().
|
private |
Sets linear velocity of the shape's corresponding Box2D body.
Moves shape's corresponding Box2D body to specified position as if the body had velocity to reach that point in given time frame.
xShape | Shape reference |
rVelocity | Velocity vector in LO user space coordinates. |
Definition at line 303 of file box2dtools.cxx.
References mpBox2DWorld, and mpXShapeToBodyMap.
Referenced by processUpdateQueue().
|
private |
Sets shape's corresponding Box2D body to the specified position.
Body is teleported to the specified position, not moved
xShape | Shape reference |
rOutPos | Position in LO user space coordinates |
Definition at line 284 of file box2dtools.cxx.
References mpXShapeToBodyMap.
Referenced by processUpdateQueue().
|
private |
Moves shape's corresponding Box2D body to specified position.
Moves shape's corresponding Box2D body to specified position as if the body had velocity to reach that point in given time frame.
xShape | Shape reference |
rOutPos | Position in LO user space coordinates |
fPassedTime | Time frame which the Box2D body should move to the specified position. |
Definition at line 291 of file box2dtools.cxx.
References mpBox2DWorld, and mpXShapeToBodyMap.
Referenced by processUpdateQueue().
bool box2d::utils::box2DWorld::shapesInitialized | ( | ) |
Definition at line 638 of file box2dtools.cxx.
References mbShapesInitialized.
|
private |
Simulate and step through time in the Box2D World.
Used in stepAmount
Definition at line 601 of file box2dtools.cxx.
References mpBox2DWorld.
Referenced by stepAmount().
double box2d::utils::box2DWorld::stepAmount | ( | const double | fPassedTime, |
const float | fTimeStep = 1.0f / 100.0f , |
||
const int | nVelocityIterations = 6 , |
||
const int | nPositionIterations = 2 |
||
) |
Simulate and step through a given amount of time in the Box2D World.
fPassedTime | Amount of time to step through |
Definition at line 608 of file box2dtools.cxx.
References mbAlreadyStepped, mpBox2DWorld, processUpdateQueue(), and step().
|
private |
Queue that holds any required information to keep LO animation effects and Box2DWorld in sync.
Is processed before every step of the box2d world by processUpdateQueue. Holds position, rotation, visibility etc. changes and associated values.
Definition at line 101 of file box2dtools.hxx.
Referenced by alertPhysicsAnimationEnd(), processUpdateQueue(), queueAngularVelocityUpdate(), queueDynamicPositionUpdate(), queueDynamicRotationUpdate(), queueLinearVelocityUpdate(), queueShapePositionUpdate(), and queueShapeVisibilityUpdate().
|
private |
Flag used to stop overstepping that occurs when a physics animation effect transfers step-lock to another one.
Definition at line 89 of file box2dtools.hxx.
Referenced by alertPhysicsAnimationEnd(), and stepAmount().
|
private |
Holds whether or not there is a PhysicsAnimation that is stepping the Box2D World.
Used to create a lock mechanism
Definition at line 86 of file box2dtools.hxx.
Referenced by hasWorldStepper(), and setHasWorldStepper().
|
private |
Definition at line 83 of file box2dtools.hxx.
Referenced by alertPhysicsAnimationEnd(), alertPhysicsAnimationStart(), initiateAllShapesAsStaticBodies(), and shapesInitialized().
|
private |
Scale factor for conversions between LO user space coordinates to Box2D World coordinates.
Definition at line 82 of file box2dtools.hxx.
Referenced by createStaticBody(), and createStaticFrameAroundSlide().
|
private |
Number of Physics Animations going on.
Definition at line 91 of file box2dtools.hxx.
Referenced by alertPhysicsAnimationEnd(), and alertPhysicsAnimationStart().
|
private |
Pointer to the real Box2D World that this class manages.
Definition at line 80 of file box2dtools.hxx.
Referenced by alertPhysicsAnimationStart(), createStaticBody(), createStaticFrameAroundSlide(), initiateAllShapesAsStaticBodies(), initiateWorld(), isInitialized(), makeShapeDynamic(), makeShapeStatic(), setShapeAngleByAngularVelocity(), setShapeAngularVelocity(), setShapeCollision(), setShapeLinearVelocity(), setShapePositionByLinearVelocity(), step(), and stepAmount().
|
private |
Definition at line 93 of file box2dtools.hxx.
Referenced by alertPhysicsAnimationEnd(), initiateAllShapesAsStaticBodies(), makeShapeDynamic(), makeShapeStatic(), setShapeAngle(), setShapeAngleByAngularVelocity(), setShapeAngularVelocity(), setShapeCollision(), setShapeLinearVelocity(), setShapePosition(), and setShapePositionByLinearVelocity().