2021-10-11 19:41:50 +08:00
|
|
|
from PikaObj import *
|
|
|
|
|
|
|
|
|
2022-05-25 13:46:48 +08:00
|
|
|
class Operator(TinyObj):
|
|
|
|
def plusInt(self, num1: int, num2: int) -> int: ...
|
|
|
|
def plusFloat(self, num1: float, num2: float) -> float: ...
|
|
|
|
def minusInt(self, num1: int, num2: int) -> int: ...
|
|
|
|
def minusFloat(self, num1: float, num2: float) -> float: ...
|
|
|
|
def equalInt(self, num1: int, num2: int) -> int: ...
|
|
|
|
def equalFloat(self, num1: float, num2: float) -> int: ...
|
|
|
|
def graterThanInt(self, num1: int, num2: int) -> int: ...
|
|
|
|
def graterThanFloat(self, num1: float, num2: float) -> int: ...
|
|
|
|
def lessThanInt(self, num1: int, num2: int) -> int: ...
|
|
|
|
def lessThanFloat(self, num1: float, num2: float) -> int: ...
|
|
|
|
def AND(self, flag1: int, flag2: int) -> int: ...
|
|
|
|
def OR(self, flag1: int, flag2: int) -> int: ...
|
|
|
|
def NOT(self, flag: int) -> int: ...
|
|
|
|
def __str__(self) -> str: ...
|
2022-06-12 10:44:32 +08:00
|
|
|
def __del__(self): ...
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
|
2022-06-12 10:44:32 +08:00
|
|
|
class Math(TinyObj):
|
2022-06-21 09:16:38 +00:00
|
|
|
pi: float
|
|
|
|
e: float
|
|
|
|
|
2022-06-12 10:44:32 +08:00
|
|
|
def __init__(self):
|
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def ceil(self, x: float) -> int:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
2022-06-21 09:16:38 +00:00
|
|
|
|
|
|
|
def fabs(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def floor(self, x: float) -> int:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def fmod(self, x: float, y: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def remainder(self, x: float, y: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def trunc(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
# 幂函数和对数函数
|
2022-06-12 10:44:32 +08:00
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def exp(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
2022-06-21 09:16:38 +00:00
|
|
|
|
|
|
|
def log(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
2022-06-21 09:16:38 +00:00
|
|
|
|
|
|
|
def log2(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def log10(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def pow(self, x: float, y: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def sqrt(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
# 三角函数
|
|
|
|
def acos(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
2022-06-21 09:16:38 +00:00
|
|
|
|
|
|
|
def asin(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def atan(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def atan2(self, x: float, y: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
2022-06-21 09:16:38 +00:00
|
|
|
|
|
|
|
def cos(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def sin(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
2022-06-21 09:16:38 +00:00
|
|
|
|
|
|
|
def tan(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
2022-06-21 09:16:38 +00:00
|
|
|
|
|
|
|
# 角度转换
|
|
|
|
def degrees(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def radians(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
# 双曲函数
|
|
|
|
def cosh(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def sinh(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
|
|
|
|
2022-06-21 09:16:38 +00:00
|
|
|
def tanh(self, x: float) -> float:
|
2022-06-12 10:44:32 +08:00
|
|
|
pass
|
2022-07-14 18:00:31 +08:00
|
|
|
|
2022-07-30 18:26:58 +08:00
|
|
|
|
2022-07-14 18:00:31 +08:00
|
|
|
class Quaternion(TinyObj):
|
|
|
|
def __init__(self):
|
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
|
|
|
def set(self, x: float, y: float, z: float, w: float):
|
2022-07-14 18:00:31 +08:00
|
|
|
"xi+yj+zk+w"
|
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
|
|
|
def get(self, key: int) -> float:
|
|
|
|
pass
|
|
|
|
|
|
|
|
def add(self, quat: Quaternion):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def sub(self, quat: Quaternion):
|
2022-07-14 18:00:31 +08:00
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
|
|
|
def mul(self, quat: Quaternion):
|
2022-07-14 18:00:31 +08:00
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
|
|
|
def magnituded(self) -> float:
|
2022-07-14 18:00:31 +08:00
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
|
|
|
def magnitudedsquare(self) -> float:
|
2022-07-14 18:00:31 +08:00
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
2022-07-14 18:00:31 +08:00
|
|
|
def reverse(self):
|
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
2022-07-14 18:00:31 +08:00
|
|
|
def inverse(self):
|
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
2022-07-14 18:00:31 +08:00
|
|
|
def normalize(self):
|
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
2022-07-14 18:00:31 +08:00
|
|
|
def isnormalize(self) -> int:
|
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
|
|
|
def dot(self, quat: Quaternion) -> float:
|
2022-07-14 18:00:31 +08:00
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
|
|
|
def crossproduct(self, quat: Quaternion):
|
2022-07-14 18:00:31 +08:00
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
|
|
|
def fromEuler(self, yaw: float, pitch: float, roll: float, mode: int):
|
2022-07-14 18:00:31 +08:00
|
|
|
"mode=1 is deg and mode=0 is rad"
|
|
|
|
pass
|
2022-07-30 18:26:58 +08:00
|
|
|
|
2022-08-01 00:19:53 +08:00
|
|
|
def toEuler(self) -> list:
|
2022-07-14 18:00:31 +08:00
|
|
|
"Z-Y-X"
|
2022-07-30 18:26:58 +08:00
|
|
|
pass
|