Public Member Functions | Public Attributes

rotation Class Reference

math3d.rotation 四元数 More...

List of all members.

Public Member Functions

def __cmp__
def __init__
def __repr__
def __str__
def get_forward
def get_right
def get_up
def set
def slerp
def __new__

Public Attributes

 w
 float 读写 w分量
 x
 float 读写 x分量
 y
 float 读写 y分量
 z
 float 读写 z分量

Detailed Description

math3d.rotation 四元数


Constructor & Destructor Documentation

def __init__ (   self )
math3d.rotation 四元素

__init__(x, y, z, w)
参数 :
  x : float  x分量
  y : float  y分量
  z : float  z分量
  w : float  w分量

Member Function Documentation

def __cmp__ (   self )
x.__cmp__(y) <==> cmp(x,y)
def __repr__ (   self )
x.__repr__() <==> repr(x)
def __str__ (   self )
x.__str__() <==> str(x)
def get_forward (   self )
获取前向量

get_forward()
返回值 :
  math3d.vector  前向量
def get_right (   self )
获取右向量

get_right()
返回值:
  math3d.vector  右向量
def get_up (   self )
获取上向量

get_up()
返回值 :
  math3d.vector  上向量
def set (   self )
设置各分量

set(x, y, z, w)
参数 :
  x : float  x分量
  y : float  y分量
  z : float  z分量
  w : float  w分量
def slerp (   self )
计算四元数插值,结果放到self

slerp(r1, r2, u)
参数 :
  r1 : math3d.rotation  四元数r1
  r2 : math3d.rotation  四元数r2
  u : float  系数u
def __new__ (   self )
T.__new__(S, ...) -> a new object with type S, a subtype of T
 All Classes Namespaces Functions Variables Properties