def write_texture_coordinate(self, UV): """Writes a UV to the file. UV is list of 2 floats""" newline = "vt " newline += sanitize_float(UV[0]) newline += " " newline += sanitize_float(UV[1]) self._writeline(newline)
def write_normal(self, normal): """Writes a normal to the file. normal is list of 3 floats""" newline = "vn " for index in range(len(normal)): newline += sanitize_float(normal[self.AxisOrdering[index]]) newline += " " newline.strip() self._writeline(newline)
def write_vertex(self, vertex): """Writes a vertex to the file. Vertex is list of 3 floats""" newline = "v " for index in range(len(vertex)): newline += sanitize_float(vertex[self.AxisOrdering[index]]) newline += " " newline.strip() self._writeline(newline)