Example #1
0
 def __init__(self,longs,lats,radius,bigRadius):
     Object.__init__(self,self.get_points(longs,lats,radius,bigRadius))
     
     self.longs=longs
     self.lats=lats
     self.radius=radius
     self.bigRadius=bigRadius
Example #2
0
    def __init__(self, height_x, height_y, height_z):
        Object.__init__(self, self.get_points_quad(height_x, height_y,
                                                   height_z))

        self.height_x = height_x
        self.height_y = height_y
        self.height_z = height_z

        self.shader_loader = ShaderLoader()
Example #3
0
    def rotate_x(self, center_of_rotation_point, Q):

        cam = Object([self.position])
        cam.rotate_point_x(Q, center_of_rotation_point)
        self.position = cam.points[0]

        direction = center_of_rotation_point.substract(self.position)
        direction = direction.get_unit_vector()
        #self.front=direction
        self.setFrontX(direction, Q)
Example #4
0
    def remove(self):
        """Removes object. Considers inventory and equipment."""
        if self.is_equipped:
            self.inside.remove_equipment(self)

        else:
            if self.inside:
                self.inside.remove_item(self)
            else:
                Object.remove(self)
    def __init__(self, filename):
        self.parser = ObjParser(
            filename)  #instantiate parser with the filename

        Object.__init__(self, self.parser.get_points())
        self.cornerNumber = len(
            self.parser.get_faces()
            [0])  #how many vertices in one face (we need this for drawing)

        self.vertexTable = self.parser.vertexTable
        self.faceTable = self.parser.faceTable
        self.edgeTable = self.parser.edgeTable
Example #6
0
 def __init__(self,points):
     
     
     Object.__init__(self,points)
    
     #self.cornerNumber=len(self.parser.get_faces()[0]) #how many vertices in one face (we need this for drawing)
     self.cornerNumber=3
     self.rgbColor=[]
     
     self.isRgbColorSet=False
     
     
     self.isMaterialSet=False
Example #7
0
    def rotate_y(self, center_of_rotation_point, Q):
        #        cam=Object([self.front])
        #        cam.rotate_y(0.3)
        #        front=cam.points[0]
        #        self.front=front.get_unit_vector()

        cam = Object([self.position])
        cam.rotate_point_y(Q, center_of_rotation_point)
        self.position = cam.points[0]

        direction = center_of_rotation_point.substract(self.position)
        direction = direction.get_unit_vector()
        #self.front=direction
        self.setFrontY(direction)
Example #8
0
    def __init__(self, height):
        Object.__init__(self, self.get_points(height))

        self.height = height
Example #9
0
 def __init__(self):
     Object.__init__(self, self.get_points())
Example #10
0
    def __init__(self, square_height, half_pyramid_height):
        Object.__init__(self,
                        self.get_points(square_height, half_pyramid_height))

        self.square_height = square_height
        self.half_pyramid_height = half_pyramid_height
Example #11
0
 def __init__(self,height,sectorCount,radius):
     Object.__init__(self,self.get_points(height,sectorCount,radius))
     
     self.height=height
     self.radius=radius
     self.sectorCount=sectorCount
Example #12
0
 def __init__(self, length):
     Object.__init__(self, self.get_points(length))
Example #13
0
    def __init__(self, height_x, height_y, height_z):
        Object.__init__(self, self.get_points(height_x, height_y, height_z))

        self.height_x = height_x
        self.height_y = height_y
        self.height_z = height_z