def rezero(self):
        """
        Move the current scene so that the AABB of the whole
        scene is centered at the origin.

        Does this by changing the base frame to a new, offset
        base frame.
        """
        if self.is_empty or np.allclose(self.centroid, 0.0):
            # early exit since what we want already exists
            return

        # the transformation to move the overall scene to AABB centroid
        matrix = np.eye(4)
        matrix[:3, 3] = -self.centroid

        # we are going to change the base frame
        new_base = str(self.graph.base_frame) + '_I'
        self.graph.update(frame_from=new_base,
                          frame_to=self.graph.base_frame,
                          matrix=matrix)
        self.graph.base_frame = new_base
def rezero ( self ) : if self . is_empty or np . allclose ( self . centroid , 0.0 ) : return matrix = np . eye ( 4 ) matrix [ : 3 , 3 ] = - self . centroid new_base = str ( self . graph . base_frame ) + '_I' self . graph . update ( frame_from = new_base , frame_to = self . graph . base_frame , matrix = matrix ) self . graph . base_frame = new_base
Move the current scene so that the AABB of the whole
        scene is centered at the origin.

        Does this by changing the base frame to a new, offset
        base frame.