本文整理汇总了C++中BodySW类的典型用法代码示例。如果您正苦于以下问题:C++ BodySW类的具体用法?C++ BodySW怎么用?C++ BodySW使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BodySW类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: body_set_shape_disabled
void PhysicsServerSW::body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled) {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
ERR_FAIL_INDEX(p_shape_idx, body->get_shape_count());
body->set_shape_as_disabled(p_shape_idx, p_disabled);
}
示例2: body_get_shape_count
int PhysicsServerSW::body_get_shape_count(RID p_body) const {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body, -1);
return body->get_shape_count();
}
示例3: body_get_shape_transform
Transform PhysicsServerSW::body_get_shape_transform(RID p_body, int p_shape_idx) const {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body,Transform());
return body->get_shape_transform(p_shape_idx);
}
示例4: body_is_ray_pickable
bool PhysicsServerSW::body_is_ray_pickable(RID p_body) const{
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body,false);
return body->is_ray_pickable();
}
示例5: body_is_continuous_collision_detection_enabled
bool PhysicsServerSW::body_is_continuous_collision_detection_enabled(RID p_body) const {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body,false);
return body->is_continuous_collision_detection_enabled();
}
示例6: body_add_torque
void PhysicsServerSW::body_add_torque(RID p_body, const Vector3 &p_torque) {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
body->add_torque(p_torque);
body->wakeup();
};
示例7: body_set_state
void PhysicsServerSW::body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
body->set_state(p_state, p_variant);
};
示例8: body_remove_shape
void PhysicsServerSW::body_remove_shape(RID p_body, int p_shape_idx) {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
body->remove_shape(p_shape_idx);
}
示例9: body_set_omit_force_integration
void PhysicsServerSW::body_set_omit_force_integration(RID p_body,bool p_omit) {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
body->set_omit_force_integration(p_omit);
};
示例10: body_get_mode
PhysicsServer::BodyMode PhysicsServerSW::body_get_mode(RID p_body) const {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body,BODY_MODE_STATIC);
return body->get_mode();
};
示例11: body_set_shape_transform
void PhysicsServerSW::body_set_shape_transform(RID p_body, int p_shape_idx, const Transform& p_transform) {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
body->set_shape_transform(p_shape_idx,p_transform);
}
示例12: body_set_mode
void PhysicsServerSW::body_set_mode(RID p_body, BodyMode p_mode) {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
body->set_mode(p_mode);
};
示例13: body_attach_object_instance_id
void PhysicsServerSW::body_attach_object_instance_id(RID p_body, uint32_t p_ID) {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
body->set_instance_id(p_ID);
};
示例14: body_get_object_instance_ID
uint32_t PhysicsServerSW::body_get_object_instance_ID(RID p_body) const {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body,0);
return body->get_instance_id();
};
示例15: body_get_applied_torque
Vector3 PhysicsServerSW::body_get_applied_torque(RID p_body) const {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body,Vector3());
return body->get_applied_torque();
};