Example #1
0
 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))
Example #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))
 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))
Example #4
0
    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))
    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))
Example #6
0
 def rotationCoordinates(self):
     """Returns the SO(3) coordinates that rotate elements from the source
     to the destination Frame"""
     if self._destination == None:
         return self._source.worldRotation()
     return so3.mul(so3.inv(self._destination.worldRotation()),
                    self._source.worldRotation())
Example #7
0
	def preTransform(self,R):
		"""Premultiplies every rotation in here by the so3 element
		R. In other words, if R rotates a local frame F to frame F',
		this method converts this SO3Trajectory from coordinates in F
		to coordinates in F'"""
		for i,m in enumerate(self.milestones):
			self.milestones[i] = so3.mul(R,m)
Example #8
0
def mul(T1, T2):
    """Composes two transformations."""
    (R1, t1) = T1
    (R2, t2) = T2
    R = so3.mul(R1, R2)
    t = apply(T1, t2)
    return (R, t)
Example #9
0
def mul(T1,T2):
    """Composes two transformations."""
    (R1,t1) = T1
    (R2,t2) = T2
    R = so3.mul(R1,R2)
    t = vectorops.add(so3.apply(R1,t2),t1)
    return (R,t)
Example #10
0
def mul(T1,T2):
    """Composes two transformations."""
    (R1,t1) = T1
    (R2,t2) = T2
    R = so3.mul(R1,R2)
    t = vectorops.add(so3.apply(R1,t2),t1)
    return (R,t)
Example #11
0
def mul(T1,T2):
    """Composes two transformations."""
    (R1,t1) = T1
    (R2,t2) = T2
    R = so3.mul(R1,R2)
    t = apply(T1,t2)
    return (R,t)
Example #12
0
 def integrate(self,x,d):
     w = [d[0],d[4],d[8]]
     return so3.mul(x,so3.from_moment(w))
Example #13
0
 def rotationCoordinates(self):
     """Returns the SO(3) coordinates that rotate elements from the source
     to the destination Frame"""
     if self._destination==None:
         return self._source.worldRotation()
     return so3.mul(so3.inv(self._destination.worldRotation()),self._source.worldRotation())
Example #14
0
 def integrate(self, x, d):
     w = [d[0], d[4], d[8]]
     return so3.mul(x, so3.from_moment(w))