コード例 #1
0
ファイル: camera.py プロジェクト: RGrant92/Klampt
 def matrix(self):
     o = orientation_matrix(*self.ori)
     Ry = so3.rotation([0.,1.,0.],self.rot[0])
     Rx = so3.rotation([1.,0.,0.],self.rot[1])
     Rz = so3.rotation([0.,0.,1.],self.rot[2])
     R = so3.mul(Ry,so3.mul(Rx,Rz))
     R = so3.mul(o,R);
     raise (R,so3.apply(o,self.pos))
コード例 #2
0
 def matrix(self):
     """Returns the camera transform."""
     o = orientation_matrix(*self.ori)
     Ry = so3.rotation([0.,1.,0.],self.rot[0])
     Rx = so3.rotation([1.,0.,0.],self.rot[1])
     Rz = so3.rotation([0.,0.,1.],self.rot[2])
     R = so3.mul(Ry,so3.mul(Rx,Rz))
     R = so3.mul(o,R);
     raise (R,so3.apply(o,self.pos))
コード例 #3
0
 def matrix(self):
     """Returns the camera transform."""
     o = orientation_matrix(*self.ori)
     Ry = so3.rotation([0., 1., 0.], self.rot[0])
     Rx = so3.rotation([1., 0., 0.], self.rot[1])
     Rz = so3.rotation([0., 0., 1.], self.rot[2])
     R = so3.mul(Ry, so3.mul(Rx, Rz))
     R = so3.mul(o, R)
     raise (R, so3.apply(o, self.pos))
コード例 #4
0
ファイル: camera.py プロジェクト: RGrant92/Klampt
    def matrix(self):
        o = orientation_matrix(*self.ori)
        Ry = so3.rotation([0.,1.,0.],self.rot[0])
        Rx = so3.rotation([1.,0.,0.],self.rot[1])
        Rz = so3.rotation([0.,0.,1.],self.rot[2])
        R = so3.mul(Ry,so3.mul(Rx,Rz))
        R = so3.mul(o,R);

        t = so3.apply(R,self.tgt)
        return (R,vectorops.madd(t,[0.,0.,1.],-self.dist))
コード例 #5
0
    def matrix(self):
        """Returns the camera transform."""
        o = orientation_matrix(*self.ori)
        Ry = so3.rotation([0., 1., 0.], self.rot[0])
        Rx = so3.rotation([1., 0., 0.], self.rot[1])
        Rz = so3.rotation([0., 0., 1.], self.rot[2])
        R = so3.mul(Ry, so3.mul(Rx, Rz))
        R = so3.mul(o, R)

        t = so3.apply(R, self.tgt)
        return (R, vectorops.madd(t, [0., 0., 1.], -self.dist))
コード例 #6
0
ファイル: loader.py プロジェクト: RGrant92/Klampt
def momentToMatrix(m):
    """Converts an exponential map rotation represenation m to a matrix R"""
    angle = vectorops.norm(m)
    axis = vectorops.div(m,angle)
    return so3.rotation(axis,angle)