Public Member Functions | Properties

obj3d Class Reference

3D可见对象基类 More...

Inheritance diagram for obj3d:
camera3d fx3d model3d space_movie avatar3d

List of all members.

Public Member Functions

def leave_scene
 脱离当前场景.
def join_scene
 leave_scene之后的obj3d可以重新加入场景.
def show
def hide
def is_hide
def slide
 特效局部平移
def rotate_to_xyz
 以初始模型的方向为基准,绕x轴转xangle,绕y轴转yangle,绕x轴转zangle.

Properties

 pos = property(_get_pos, _set_pos)
 位置坐标.
 position = property(_get_position, _set_position)
 位置坐标.
 rotation_matrix = property(_get_rotation_matrix, _set_rotation_matrix)
 方向矩阵 .
 scale = property(_get_scale, _set_scale)
 相对缩放比例.
 type = property(lambda self: self._get_obj_type())
 类型.

Detailed Description

3D可见对象基类


Member Function Documentation

def leave_scene (   self )

脱离当前场景.


未绑定到别的model3d的model3d对象,在bind/bind_bone操作前必须调用此函数.

def join_scene (   self )

leave_scene之后的obj3d可以重新加入场景.

def show (   self )
显示3D对象

Reimplemented in camera3d.

def hide (   self )
隐藏3D对象。

此函数慎用,3D对象虽然隐藏了,但动作/特效依然会每帧更新的,所以即使隐藏了,会有性能问题。
建议对不用的3D对象,使用destroy或者leave_scen函数。

Reimplemented in camera3d.

def is_hide (   self )
3D对象是否隐藏

返回值:
        True:隐藏
        False:显示

Reimplemented in camera3d.

def slide (   self,
  slide_pos 
)

特效局部平移

Parameters:
slide_pos: math3d.vector 局部平移的相对位置
def rotate_to_xyz (   self,
  x = 0,
  y = 0,
  z = 0 
)

以初始模型的方向为基准,绕x轴转xangle,绕y轴转yangle,绕x轴转zangle.

Parameters:
x: float 绕x轴旋转的弧度值
y: float 绕y轴旋转的弧度值(一般情况只需要用到y轴的旋转)
z: float 绕z轴旋转的弧度值

Property Documentation

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 读写.

scale = property(_get_scale, _set_scale) [static]

相对缩放比例.

(x, y, z) 读写.

Reimplemented in camera3d.

type = property(lambda self: self._get_obj_type()) [static]

类型.

int 只读.

 All Classes Namespaces Functions Variables Properties