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

Class Vector4

source code

                  object --+                
                           |                
      utils.graph.DetailNode --+            
                               |            
          utils.graph.GlobalNode --+        
                                   |        
object_models.xml.struct_.StructBase --+    
                                       |    
                      NifFormat._Vector4 --+
                                           |
                                          NifFormat.Vector4

>>> from pyffi.formats.nif import NifFormat
>>> vec = NifFormat.Vector4()
>>> vec.x = 1.0
>>> vec.y = 2.0
>>> vec.z = 3.0
>>> vec.w = 4.0
>>> print(vec)
[  1.000  2.000  3.000  4.000 ]
>>> vec.as_list()
[1.0, 2.0, 3.0, 4.0]
>>> vec.as_tuple()
(1.0, 2.0, 3.0, 4.0)
>>> print(vec.get_vector_3())
[  1.000  2.000  3.000 ]
>>> vec2 = NifFormat.Vector4()
>>> vec == vec2
False
>>> vec2.x = 1.0
>>> vec2.y = 2.0
>>> vec2.z = 3.0
>>> vec2.w = 4.0
>>> vec == vec2
True
Nested Classes [hide private]

Inherited from object_models.xml.struct_.StructBase: __metaclass__

Instance Methods [hide private]
 
as_list(self) source code
 
as_tuple(self) source code
 
get_copy(self) source code
 
get_vector_3(self) source code
 
__str__(self)
str(x)
source code
 
__eq__(self, rhs) source code
 
__ne__(self, rhs) source code

Inherited from object_models.xml.struct_.StructBase: __init__, 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, tree, 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 _Vector4 (private): _attrs, _names

Inherited from object_models.xml.struct_.StructBase: arg

Properties [hide private]

Inherited from _Vector4: w, x, y, z

Inherited from object: __class__

Method Details [hide private]

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

Class Variable Details [hide private]

_attribute_list

Value:
[<pyffi.object_models.xml.StructAttribute object at 0x2c0bf10>,
 <pyffi.object_models.xml.StructAttribute object at 0x2c0bf90>,
 <pyffi.object_models.xml.StructAttribute object at 0x2c10050>,
 <pyffi.object_models.xml.StructAttribute object at 0x2c10090>,
 <pyffi.object_models.xml.StructAttribute object at 0x2c0bf10>,
 <pyffi.object_models.xml.StructAttribute object at 0x2c0bf90>,
 <pyffi.object_models.xml.StructAttribute object at 0x2c10050>,
 <pyffi.object_models.xml.StructAttribute object at 0x2c10090>]