Package pyffi :: Package formats :: Package nif :: Class NifFormat :: Class NiTriStripsData
[hide private]
[frames] | no frames]

Class NiTriStripsData

source code

                  object --+                                        
                           |                                        
      utils.graph.DetailNode --+                                    
                               |                                    
          utils.graph.GlobalNode --+                                
                                   |                                
object_models.xml.struct_.StructBase --+                            
                                       |                            
                     NifFormat._NiObject --+                        
                                           |                        
                          NifFormat.NiObject --+                    
                                               |                    
                       NifFormat._NiGeometryData --+                
                                                   |                
                            NifFormat.NiGeometryData --+            
                                                       |            
                           NifFormat._NiTriBasedGeomData --+        
                                                           |        
                                NifFormat.NiTriBasedGeomData --+    
                                                               |    
                                      NifFormat._NiTriStripsData --+
                                                                   |
                                                                  NifFormat.NiTriStripsData

Example usage:

>>> from pyffi.formats.nif import NifFormat
>>> block = NifFormat.NiTriStripsData()
>>> block.set_triangles([(0,1,2),(2,1,3),(2,3,4)])
>>> block.get_strips()
[[0, 1, 2, 3, 4]]
>>> block.get_triangles()
[(0, 1, 2), (1, 3, 2), (2, 3, 4)]
>>> block.set_strips([[1,0,1,2,3,4]])
>>> block.get_strips()
[[1, 0, 1, 2, 3, 4]]
>>> block.get_triangles()
[(0, 2, 1), (1, 2, 3), (2, 4, 3)]
Nested Classes [hide private]

Inherited from object_models.xml.struct_.StructBase: __metaclass__

Instance Methods [hide private]
 
get_triangles(self) source code
 
set_triangles(self, triangles, stitchstrips=False) source code
 
get_strips(self) source code
 
set_strips(self, strips) source code

Inherited from NiTriBasedGeomData: get_triangle_indices, is_interchangeable

Inherited from NiGeometryData: apply_scale, get_vertex_hash_generator, update_center_radius

Inherited from NiObject: find, find_chain, tree

Inherited from NiObject (private): _validateTree

Inherited from object_models.xml.struct_.StructBase: __init__, __str__, deepcopy, fix_links, get_attribute, get_basic_attribute, get_detail_child_names, get_detail_child_nodes, get_global_child_nodes, get_global_display, get_hash, get_links, get_refs, get_size, get_strings, get_template_attribute, read, replace_global_node, set_attribute, set_basic_attribute, set_template_attribute, write

Inherited from utils.graph.GlobalNode: get_global_child_edge_types, get_global_iterator

Inherited from utils.graph.DetailNode: get_detail_child_edge_types, get_detail_display, get_detail_iterator

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from object_models.xml.struct_.StructBase: get_games, get_versions

Class Variables [hide private]
  _attribute_list = [<pyffi.object_models.xml.StructAttribute ob...

Inherited from _NiTriStripsData (private): _attrs, _games, _is_template, _names

Inherited from _NiGeometryData (private): _has_links, _has_refs

Inherited from object_models.xml.struct_.StructBase: arg

Properties [hide private]

Inherited from _NiTriStripsData: has_points, num_strips, points, strip_lengths

Inherited from _NiTriBasedGeomData: num_triangles

Inherited from _NiGeometryData: additional_data, bitangents, bs_num_uv_sets, center, compress_flags, consistency_flags, has_normals, has_uv, has_vertex_colors, has_vertices, keep_flags, normals, num_uv_sets, num_vertices, radius, tangents, unknown_13_shorts, unknown_int, uv_sets, vertex_colors, vertices

Inherited from object: __class__

Class Variable Details [hide private]

_attribute_list

Value:
[<pyffi.object_models.xml.StructAttribute object at 0x2dd11d0>,
 <pyffi.object_models.xml.StructAttribute object at 0x2dd1f10>,
 <pyffi.object_models.xml.StructAttribute object at 0x2dcce50>,
 <pyffi.object_models.xml.StructAttribute object at 0x2dcccd0>,
 <pyffi.object_models.xml.StructAttribute object at 0x2dd9610>,
 <pyffi.object_models.xml.StructAttribute object at 0x2dd9650>,
 <pyffi.object_models.xml.StructAttribute object at 0x2dd9750>,
 <pyffi.object_models.xml.StructAttribute object at 0x2dd9a90>,
...