Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def genearte_camera_quaternion(yaw, pitch):
quaternion_yaw = pyrender.quaternion.from_yaw(yaw)
quaternion_pitch = pyrender.quaternion.from_pitch(pitch)
quaternion = pyrender.quaternion.multiply(quaternion_pitch, quaternion_yaw)
quaternion = quaternion / np.linalg.norm(quaternion)
return quaternion
def genearte_camera_quaternion(yaw, pitch):
quaternion_yaw = pyrender.quaternion.from_yaw(yaw)
quaternion_pitch = pyrender.quaternion.from_pitch(pitch)
quaternion = pyrender.quaternion.multiply(quaternion_pitch, quaternion_yaw)
quaternion = quaternion / np.linalg.norm(quaternion)
return quaternion
def genearte_camera_quaternion(yaw, pitch):
quaternion_yaw = pyrender.quaternion.from_yaw(yaw)
quaternion_pitch = pyrender.quaternion.from_pitch(pitch)
quaternion = pyrender.quaternion.multiply(quaternion_pitch, quaternion_yaw)
quaternion = quaternion / np.linalg.norm(quaternion)
return quaternion
def genearte_camera_quaternion(yaw, pitch):
quaternion_yaw = pyrender.quaternion.from_yaw(yaw)
quaternion_pitch = pyrender.quaternion.from_pitch(pitch)
quaternion = pyrender.quaternion.multiply(quaternion_pitch, quaternion_yaw)
quaternion = quaternion / np.linalg.norm(quaternion)
return quaternion
def genearte_camera_quaternion(yaw, pitch):
quaternion_yaw = pyrender.quaternion.from_yaw(yaw)
quaternion_pitch = pyrender.quaternion.from_pitch(pitch)
quaternion = pyrender.quaternion.multiply(quaternion_pitch, quaternion_yaw)
quaternion = quaternion / np.linalg.norm(quaternion)
return quaternion
def genearte_camera_quaternion(yaw, pitch):
quaternion_yaw = pyrender.quaternion.from_yaw(yaw)
quaternion_pitch = pyrender.quaternion.from_pitch(pitch)
quaternion = pyrender.quaternion.multiply(quaternion_pitch, quaternion_yaw)
quaternion = quaternion / np.linalg.norm(quaternion)
return quaternion
def genearte_camera_quaternion(yaw, pitch):
quaternion_yaw = pyrender.quaternion.from_yaw(yaw)
quaternion_pitch = pyrender.quaternion.from_pitch(pitch)
quaternion = pyrender.quaternion.multiply(quaternion_pitch, quaternion_yaw)
quaternion = quaternion / np.linalg.norm(quaternion)
return quaternion
def genearte_camera_quaternion(yaw, pitch):
quaternion_yaw = pyrender.quaternion.from_yaw(yaw)
quaternion_pitch = pyrender.quaternion.from_pitch(pitch)
quaternion = pyrender.quaternion.multiply(quaternion_pitch, quaternion_yaw)
quaternion = quaternion / np.linalg.norm(quaternion)
return quaternion
def genearte_camera_quaternion(yaw, pitch):
quaternion_yaw = pyrender.quaternion.from_yaw(yaw)
quaternion_pitch = pyrender.quaternion.from_pitch(pitch)
quaternion = pyrender.quaternion.multiply(quaternion_pitch, quaternion_yaw)
quaternion = quaternion / np.linalg.norm(quaternion)
return quaternion
def Capsule():
sphere = trimesh.creation.capsule(radius=0.25, height=0.5)
mesh = Mesh.from_trimesh(sphere, smooth=True)
node = Node(
mesh=mesh,
rotation=quaternion.from_pitch(math.pi / 2),
translation=np.array([0, 0.5, 0]))
return node