可碰撞物体的基类,不需要直接创建,通过col_sphere/col_box创建后可以访问其公有属性 More...
Public Member Functions | |
def | destroy |
销毁函数,将碰撞体销毁,销毁后碰撞体不可用. | |
def | add_to_layer |
把碰撞体添加到某一个场景中 | |
def | remove_from_layer |
将碰撞体从已加入的场景中移除。注意:被碰撞体从碰撞场景中移除后,不会参与 该碰撞场景的碰撞检测。如果碰撞体为源碰撞物体,不受该函数影响。 | |
def | add_to_scene3d |
把碰撞体添加到当前的全3D场景中. | |
def | remove_from_scene3d |
将碰撞体从已加入全3D的场景中移除。注意:被碰撞体从碰撞场景中移除后,不会参与 该碰撞场景的碰撞检测。如果碰撞体为源碰撞物体,不受该函数影响。 | |
Properties | |
pos = property(_get_pos, _set_pos) | |
位置坐标. | |
position = property(_get_position, _set_position) | |
位置坐标. | |
rotation_matrix = property(_get_rotation_matrix, _set_rotation_matrix) | |
方向矩阵 . | |
mask = property(_get_mask, _set_mask) | |
接受碰撞的类别,范围[0, 0xFFFF]. | |
category = property(_get_category, _set_category) | |
碰撞类别. |
可碰撞物体的基类,不需要直接创建,通过col_sphere/col_box创建后可以访问其公有属性
def destroy | ( | self ) |
销毁函数,将碰撞体销毁,销毁后碰撞体不可用.
def add_to_layer | ( | self, | |
layer_id | |||
) |
把碰撞体添加到某一个场景中
layer_id | : int iworld2d对应的layer_id,用于指示哪个3D场景。 如果用iworld3d.create_scene3d_ui创建出来的场景,则这里的layer_id对应scene3d_ui的get_ui_id() |
def remove_from_layer | ( | self ) |
将碰撞体从已加入的场景中移除。注意:被碰撞体从碰撞场景中移除后,不会参与 该碰撞场景的碰撞检测。如果碰撞体为源碰撞物体,不受该函数影响。
bool:成功返回True,失败返回False,如果碰撞体不属于该层则返回False |
def add_to_scene3d | ( | self ) |
把碰撞体添加到当前的全3D场景中.
def remove_from_scene3d | ( | self ) |
将碰撞体从已加入全3D的场景中移除。注意:被碰撞体从碰撞场景中移除后,不会参与 该碰撞场景的碰撞检测。如果碰撞体为源碰撞物体,不受该函数影响。
bool:成功返回True,失败返回False |
pos = property(_get_pos, _set_pos) [static] |
位置坐标.
(x, y, z) 读写.
position = property(_get_position, _set_position) [static] |
位置坐标.
math3d.vector 读写.
rotation_matrix = property(_get_rotation_matrix, _set_rotation_matrix) [static] |
方向矩阵 .
math3d.matrix 读写.
mask = property(_get_mask, _set_mask) [static] |
接受碰撞的类别,范围[0, 0xFFFF].
16位int,范围[0, 0xFFFF]
category = property(_get_category, _set_category) [static] |
碰撞类别.
16位int,范围[0, 0xFFFF].