MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / setTransform

Method setTransform

src/body/Body.cpp:393–403  ·  view source on GitHub ↗

Set the current position and orientation * @param transform The transformation of the body that transforms the local-space * of the body into world-space */

Source from the content-addressed store, hash-verified

391 * of the body into world-space
392 */
393void Body::setTransform(const Transform& transform) {
394
395 // Update the transform of the body
396 mWorld.mTransformComponents.setTransform(mEntity, transform);
397
398 // Update the broad-phase state of the body
399 updateBroadPhaseState();
400
401 RP3D_LOG(mWorld.mConfig.worldName, Logger::Level::Information, Logger::Category::Body,
402 "Body " + std::to_string(mEntity.id) + ": Set transform=" + transform.to_string(), __FILE__, __LINE__);
403}
404
405// Return true if the body is active
406/**

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.45

Tested by

no test coverage detected