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
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()
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)
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
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
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)
def __init__(self, height): Object.__init__(self, self.get_points(height)) self.height = height
def __init__(self): Object.__init__(self, self.get_points())
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
def __init__(self,height,sectorCount,radius): Object.__init__(self,self.get_points(height,sectorCount,radius)) self.height=height self.radius=radius self.sectorCount=sectorCount
def __init__(self, length): Object.__init__(self, self.get_points(length))
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