示例#1
0
def toaxisangle(q):
	tw = math.acos(q[3])
	scale = math.sin(tw)
	angle = tw * 2.0

	try:
		axis = vec3.divN(q[:3], scale)
	except ZeroDivisionError:
		axis = (1.0, 0.0, 0.0)

	return axis, angle
示例#2
0
文件: quat.py 项目: Eelis/klee
def toaxisangle(q):
	tw= math.acos(q[3])
	scale= math.sin(tw)
	angle= tw*2.0

	try:
		axis= vec3.divN(q[:3], scale)
	except ZeroDivisionError:
		axis= (1.0,0.0,0.0)

	return axis,angle
示例#3
0
文件: vec4.py 项目: ArashAll/klee
def tovec3(a):
	return vec3.divN(a, a[3])
示例#4
0
def tovec3(a):
	return vec3.divN(a, a[3])