def __read_vertices(self, fo): self.vertnum = read_long(fo) self.vertices = [] for i in range(self.vertnum): vertex = Vec3(*read_float3(fo)) self.vertices.append(vertex) for i in range(self.vertnum): self.vertids.append(read_short(fo))
def _read(self, fo, version): if version >= 9: self.coltype = coltype(read_long(fo)) self.__read_faces(fo) self.__read_vertices(fo) self.__read_bounds(fo) self.__read_ydata(fo) self.__read_zdata(fo) if version >= 10: self.__read_adata(fo)
def _read(self, fo): self.u1 = read_float(fo) self.u2 = read_short(fo) self.u3 = read_short(fo) self.u4 = read_long(fo) self.u5 = read_long(fo)
def _read_geomnum(self, fo): self._read_header(fo) self.geomnum = read_long(fo)
def _read_header(self, fo, position=0): self.u1 = read_long(fo) self.version = read_long(fo)
def _read(self, fo, version): self.subgeomnum = read_long(fo) self.subgeoms = [bf2colsubgeom() for i in range(self.subgeomnum)] for subgeom in self.subgeoms: subgeom._read(fo, version)
def _read(self, fo, version): self.lodnum = read_long(fo) self.lods = [bf2collod() for i in range(self.lodnum)] for lod in self.lods: lod._read(fo, version)
def __read_adata(self, fo): self.anum = read_long(fo) self.adata = [read_long(fo) for i in range(self.anum)]
def __read_zdata(self, fo): self.znum = read_long(fo) self.zdata = [read_short(fo) for i in range(self.znum)]
def __read_ydata(self, fo): self.ynum = read_long(fo) self.ydata = [ystruct() for i in range(self.ynum)] for ydata in self.ydata: ydata._read(fo)
def __read_faces(self, fo): self.facenum = read_long(fo) self.faces = [bf2colface() for i in range(self.facenum)] for colface in self.faces: colface._read(fo)