本文整理汇总了C++中SPtr::_setOwner方法的典型用法代码示例。如果您正苦于以下问题:C++ SPtr::_setOwner方法的具体用法?C++ SPtr::_setOwner怎么用?C++ SPtr::_setOwner使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SPtr
的用法示例。
在下文中一共展示了SPtr::_setOwner方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: internal_CreateInstance
void ScriptPlaneCollider::internal_CreateInstance(MonoObject* instance)
{
SPtr<PlaneCollider> collider = PlaneCollider::create();
collider->_setOwner(PhysicsOwnerType::Script, instance);
new (bs_alloc<ScriptPlaneCollider>()) ScriptPlaneCollider(instance, collider);
}
示例2:
SPtr<Joint> CSliderJoint::createInternal()
{
SPtr<Joint> joint = SliderJoint::create(mDesc);
joint->_setOwner(PhysicsOwnerType::Component, this);
return joint;
}
示例3: internal_CreateInstance
void ScriptCharacterController::internal_CreateInstance(MonoObject* instance, CHAR_CONTROLLER_DESC* initData)
{
SPtr<CharacterController> charController = CharacterController::create(*initData);
charController->_setOwner(PhysicsOwnerType::Script, instance);
new (bs_alloc<ScriptCharacterController>()) ScriptCharacterController(instance, charController);
}
示例4: SO
SPtr<Collider> CBoxCollider::createInternal()
{
const Transform& tfrm = SO()->getTransform();
SPtr<Collider> collider = BoxCollider::create(mExtents, tfrm.getPosition(), tfrm.getRotation());
collider->_setOwner(PhysicsOwnerType::Component, this);
return collider;
}
示例5: internal_CreateInstance
void ScriptRigidbody::internal_CreateInstance(MonoObject* instance, ScriptSceneObject* linkedSO)
{
HSceneObject so;
if (linkedSO != nullptr)
so = linkedSO->getNativeSceneObject();
SPtr<Rigidbody> rigidbody = Rigidbody::create(so);
rigidbody->_setOwner(PhysicsOwnerType::Script, instance);
new (bs_alloc<ScriptRigidbody>()) ScriptRigidbody(instance, rigidbody);
}
示例6: internal_CreateInstance
void ScriptHingeJoint::internal_CreateInstance(MonoObject* instance, ScriptCommonJointData* commonData, ScriptHingeJointData* data)
{
HINGE_JOINT_DESC desc;
commonData->toDesc(desc);
data->toDesc(desc);
SPtr<HingeJoint> joint = HingeJoint::create(desc);
joint->_setOwner(PhysicsOwnerType::Script, instance);
new (bs_alloc<ScriptHingeJoint>()) ScriptHingeJoint(instance, joint);
}