def __init__(self): """ Creates a fmod geometry and sets its position to default (0, 0, 0) """ super() self._geometry = FMOD.createGeometry() self.setPosition(self.getPosition()) pygame.mouse.set_cursor( *pygame.cursors.broken_x ) # changes cursor to mark geometry is being created
def addGeometry(self): """ Creates a fmod geometry with the amount of vertex in numVertex Sets its position to default (0, 0, 0) """ if self._numVertex > 1: numPolygon = self._numVertex - 1 self._geometry = FMOD.createGeometry(numPolygon + 1, (numPolygon + 2) * 4) self.setPosition((0, 0)) for v in range( numPolygon ): # Loop through the number of polygons, creating them vert = (VECTOR(self._vertexes[v][0], self._vertexes[v][1], 1), VECTOR(self._vertexes[v + 1][0], self._vertexes[v + 1][1], 1), VECTOR(self._vertexes[v + 1][0], self._vertexes[v + 1][1], -1), VECTOR(self._vertexes[v][0], self._vertexes[v][1], -1)) FMOD.addPolygonsToGeometry(self._geometry, vert)