当前位置: 首页>>代码示例>>C++>>正文


C++ BodySW::get_space方法代码示例

本文整理汇总了C++中BodySW::get_space方法的典型用法代码示例。如果您正苦于以下问题:C++ BodySW::get_space方法的具体用法?C++ BodySW::get_space怎么用?C++ BodySW::get_space使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BodySW的用法示例。


在下文中一共展示了BodySW::get_space方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: body_test_motion

bool PhysicsServerSW::body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, MotionResult *r_result) {

	BodySW *body = body_owner.get(p_body);
	ERR_FAIL_COND_V(!body, false);
	ERR_FAIL_COND_V(!body->get_space(), false);
	ERR_FAIL_COND_V(body->get_space()->is_locked(), false);

	_update_shapes();

	return body->get_space()->test_body_motion(body, p_from, p_motion, body->get_kinematic_margin(), r_result);
}
开发者ID:KelinciFX,项目名称:godot,代码行数:11,代码来源:physics_server_sw.cpp

示例2: body_test_ray_separation

int PhysicsServerSW::body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin) {

	BodySW *body = body_owner.get(p_body);
	ERR_FAIL_COND_V(!body, false);
	ERR_FAIL_COND_V(!body->get_space(), false);
	ERR_FAIL_COND_V(body->get_space()->is_locked(), false);

	_update_shapes();

	return body->get_space()->test_body_ray_separation(body, p_transform, p_infinite_inertia, r_recover_motion, r_results, p_result_max, p_margin);
}
开发者ID:timoschwarzer,项目名称:godot,代码行数:11,代码来源:physics_server_sw.cpp

示例3: body_get_space

RID PhysicsServerSW::body_get_space(RID p_body) const {

	BodySW *body = body_owner.get(p_body);
	ERR_FAIL_COND_V(!body,RID());

	SpaceSW *space = body->get_space();
	if (!space)
		return RID();
	return space->get_self();
};
开发者ID:03050903,项目名称:godot,代码行数:10,代码来源:physics_server_sw.cpp

示例4:

PhysicsDirectBodyState *PhysicsServerSW::body_get_direct_state(RID p_body) {

	BodySW *body = body_owner.get(p_body);
	ERR_FAIL_COND_V(!body, NULL);

	if (!doing_sync || body->get_space()->is_locked()) {

		ERR_EXPLAIN("Body state is inaccessible right now, wait for iteration or physics process notification.");
		ERR_FAIL_V(NULL);
	}

	direct_state->body = body;
	return direct_state;
}
开发者ID:KelinciFX,项目名称:godot,代码行数:14,代码来源:physics_server_sw.cpp

示例5: body_set_space

void PhysicsServerSW::body_set_space(RID p_body, RID p_space) {

	BodySW *body = body_owner.get(p_body);
	ERR_FAIL_COND(!body);
	SpaceSW *space=NULL;

	if (p_space.is_valid()) {
		space = space_owner.get(p_space);
		ERR_FAIL_COND(!space);
	}

	if (body->get_space()==space)
		return; //pointles

	body->set_space(space);

};
开发者ID:03050903,项目名称:godot,代码行数:17,代码来源:physics_server_sw.cpp


注:本文中的BodySW::get_space方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。