当前位置: 首页>>代码示例>>Python>>正文


Python StreamReader.tgi方法代码示例

本文整理汇总了Python中s3py.io.StreamReader.tgi方法的典型用法代码示例。如果您正苦于以下问题:Python StreamReader.tgi方法的具体用法?Python StreamReader.tgi怎么用?Python StreamReader.tgi使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在s3py.io.StreamReader的用法示例。


在下文中一共展示了StreamReader.tgi方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: read_rcol

# 需要导入模块: from s3py.io import StreamReader [as 别名]
# 或者: from s3py.io.StreamReader import tgi [as 别名]
 def read_rcol(self, stream, rcol):
     self.read_tag(stream)
     s = StreamReader(stream)
     self.version = s.u32()
     self.rig.key = s.tgi('ITG')
     self.unknown = s.f32()
     for i in range(self.RESERVED_COUNT): self.reserved[i] = s.u8()
     cValues = s.u32()
     self.bone_weights = [0.0] * cValues
     for i in range(cValues): self.bone_weights[i] = s.f32()
开发者ID:markmanching,项目名称:s3py,代码行数:12,代码来源:__init__.py

示例2: read_rcol

# 需要导入模块: from s3py.io import StreamReader [as 别名]
# 或者: from s3py.io.StreamReader import tgi [as 别名]
 def read_rcol(self, stream, rcol):
     s = StreamReader(stream)
     self.read_tag(stream)
     self.version = s.u32()
     self.actor = rcol.get_block(s.u32(), ActorDefinition)
     self.parameter = s.u32()
     self.prop = s.tgi('ITG')
     for i in range(4):
         assert s.u32() == 0
     MulticastDecisionGraphNode.read(self, stream, rcol)
开发者ID:markmanching,项目名称:s3py,代码行数:12,代码来源:jazz.py

示例3: read_data

# 需要导入模块: from s3py.io import StreamReader [as 别名]
# 或者: from s3py.io.StreamReader import tgi [as 别名]
 def read_data(self, stream, keys=None):
     s = StreamReader(stream)
     if self.type_code == self.TYPE.FLOAT:
         return s.f32() if self.size32 == 1 else [s.f32() for i in range(self.size32)]
     if self.type_code == self.TYPE.INT:
         return s.i32() if self.size32 == 1 else[s.i32() for i in range(self.size32)]
     if self.type_code == self.TYPE.TEXTURE:
         if self.size32 == 4:
             val = keys.get_resource(s.u32())
             stream.seek(12, SEEK_CUR)
             return val
         elif self.size32 == 5:
             key = s.tgi('ITG')
             stream.seek(4, SEEK_CUR)
             return key
开发者ID:markmanching,项目名称:s3py,代码行数:17,代码来源:material.py

示例4: read

# 需要导入模块: from s3py.io import StreamReader [as 别名]
# 或者: from s3py.io.StreamReader import tgi [as 别名]
 def read(self, stream, resource=None):
     s = StreamReader(stream)
     self.version = s.u32()
     tgi = TGIList(use_length=self.version >= 7, add_eight=True)
     tgi.begin_read(stream)
     self.part_name = s.s7(16, '>')
     self.blend_type = s.u32()
     if self.version >= 8:
         key = s.tgi()
         bgeo = ExternalResource(key=key)
         self.blend_geometry = bgeo
     cEntries = s.i32()
     for i in range(cEntries):
         entry = self.RegionEntry()
         entry.region_flags = s.u32()
         entry.geom_entries = [self.GeomEntry(stream, tgi) for i in range(s.i32())]
         entry.bone_entries = [self.BoneEntry(stream, tgi) for i in range(s.i32())]
         self.entries.append(entry)
     tgi.end_read(stream)
开发者ID:markmanching,项目名称:s3py,代码行数:21,代码来源:catalog.py


注:本文中的s3py.io.StreamReader.tgi方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。