本文整理汇总了C++中AreaBullet类的典型用法代码示例。如果您正苦于以下问题:C++ AreaBullet类的具体用法?C++ AreaBullet怎么用?C++ AreaBullet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AreaBullet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: area_clear_shapes
void BulletPhysicsServer::area_clear_shapes(RID p_area) {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
for (int i = area->get_shape_count(); 0 < i; --i)
area->remove_shape(0);
}
示例2: area_get_object_instance_id
ObjectID BulletPhysicsServer::area_get_object_instance_id(RID p_area) const {
if (space_owner.owns(p_area)) {
return 0;
}
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND_V(!area, ObjectID());
return area->get_instance_id();
}
示例3: area_attach_object_instance_id
void BulletPhysicsServer::area_attach_object_instance_id(RID p_area, ObjectID p_ID) {
if (space_owner.owns(p_area)) {
return;
}
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
area->set_instance_id(p_ID);
}
示例4: area_set_shape
void BulletPhysicsServer::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
ShapeBullet *shape = shape_owner.get(p_shape);
ERR_FAIL_COND(!shape);
area->set_shape(p_shape_idx, shape);
}
示例5: area_add_shape
void BulletPhysicsServer::area_add_shape(RID p_area, RID p_shape, const Transform &p_transform) {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
ShapeBullet *shape = shape_owner.get(p_shape);
ERR_FAIL_COND(!shape);
area->add_shape(shape, p_transform);
}
示例6: area_set_space
void BulletPhysicsServer::area_set_space(RID p_area, RID p_space) {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
SpaceBullet *space = NULL;
if (p_space.is_valid()) {
space = space_owner.get(p_space);
ERR_FAIL_COND(!space);
}
area->set_space(space);
}
示例7: area_get_param
Variant BulletPhysicsServer::area_get_param(RID p_area, AreaParameter p_param) const {
if (space_owner.owns(p_area)) {
SpaceBullet *space = space_owner.get(p_area);
return space->get_param(p_param);
} else {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND_V(!area, Variant());
return area->get_param(p_param);
}
}
示例8: area_set_param
void BulletPhysicsServer::area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value) {
if (space_owner.owns(p_area)) {
SpaceBullet *space = space_owner.get(p_area);
if (space) {
space->set_param(p_param, p_value);
}
} else {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
area->set_param(p_param, p_value);
}
}
示例9: bulletnew
RID BulletPhysicsServer::area_create() {
AreaBullet *area = bulletnew(AreaBullet);
area->set_collision_layer(1);
area->set_collision_mask(1);
CreateThenReturnRID(area_owner, area)
}
示例10: area_is_ray_pickable
bool BulletPhysicsServer::area_is_ray_pickable(RID p_area) const {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND_V(!area, false);
return area->is_ray_pickable();
}
示例11: area_set_area_monitor_callback
void BulletPhysicsServer::area_set_area_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
area->set_event_callback(CollisionObjectBullet::TYPE_AREA, p_receiver ? p_receiver->get_instance_id() : 0, p_method);
}
示例12: area_get_transform
Transform BulletPhysicsServer::area_get_transform(RID p_area) const {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND_V(!area, Transform());
return area->get_transform();
}
示例13: area_get_shape_count
int BulletPhysicsServer::area_get_shape_count(RID p_area) const {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND_V(!area, 0);
return area->get_shape_count();
}
示例14: area_get_space_override_mode
PhysicsServer::AreaSpaceOverrideMode BulletPhysicsServer::area_get_space_override_mode(RID p_area) const {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND_V(!area, PhysicsServer::AREA_SPACE_OVERRIDE_DISABLED);
return area->get_spOv_mode();
}
示例15: area_set_space_override_mode
void BulletPhysicsServer::area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND(!area)
area->set_spOv_mode(p_mode);
}