MCPcopy Create free account
hub / github.com/axmolengine/axmol / create

Method create

core/physics3d/Physics3DComponent.cpp:53–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53Physics3DComponent* Physics3DComponent::create(Physics3DObject* physicsObj,
54 const ax::Vec3& translateInPhysics,
55 const ax::Quaternion& rotInPhsyics)
56{
57 auto ret = new Physics3DComponent();
58 if (ret->init())
59 {
60 ret->setPhysics3DObject(physicsObj);
61 ret->setTransformInPhysics(translateInPhysics, rotInPhsyics);
62 ret->autorelease();
63 return ret;
64 }
65 AX_SAFE_DELETE(ret);
66 return nullptr;
67}
68
69void Physics3DComponent::setPhysics3DObject(Physics3DObject* physicsObj)
70{

Callers

nothing calls this directly

Calls 4

setPhysics3DObjectMethod · 0.80
setTransformInPhysicsMethod · 0.80
autoreleaseMethod · 0.80
initMethod · 0.45

Tested by

no test coverage detected