Logo Search packages:      
Sourcecode: blender version File versions  Download package

Mathutils::Vector Class Reference

List of all members.


Detailed Description

The Vector object
=================
  This object gives access to Vectors in Blender.
@group Axises: x, y, z, w
@ivar x: The x value.
@ivar y: The y value.
@ivar z: The z value (if any).
@ivar w: The w value (if any).
@ivar length: The magnitude of the vector.
@ivar magnitude: This is a synonym for length.
@ivar wrapped: Whether or not this item is wrapped data
@note: Comparison operators can be done on Vector classes:
    - >, >=, <, <= test the vector magnitude
    - ==, != test vector values e.g. 1,2,3 != 1,2,4 even if they are the same length
@note: Math can be performed on Vector classes
    - vec + vec
    - vec - vec
    - vec * float/int
    - vec * matrix
    - vec * vec
    - vec * quat
    - -vec
@note: You can access a vector object like a sequence
    - x = vector[0]
    - vec_a[:] vec_b
    - vec2d[:] vec3d[:2]
@note: Vectors support 'swizzle' operations
    - vec.xyz = vec.zyx
    - vec.xy = vec.zw
    - vec.xxy = vec.wzz
    - vec.yzyz = vec.yxyx

    See U{http://en.wikipedia.org/wiki/Swizzling_(computer_graphics)}

@attention: Vector data can be wrapped or non-wrapped. When a object is wrapped it
means that the object will give you direct access to the data inside of blender. Modification
of this object will directly change the data inside of blender. To copy a wrapped object
you need to use the object's constructor. If you copy and object by assignment you will not get
a second copy but a second reference to the same data. Only certain functions will return 
wrapped data. This will be indicated in the method description.
Example::
    wrappedObject = Object.getAttribute() #this is wrapped data
    print wrappedObject.wrapped #prints 'True'
    copyOfObject = wrappedObject.copy() #creates a copy of the object
    secondPointer = wrappedObject #creates a second pointer to the same data
    print wrappedObject.attribute #prints '5'
    secondPointer.attribute = 10
    print wrappedObject.attribute #prints '10'
    print copyOfObject.attribute #prints '5'

Definition at line 404 of file Mathutils.py.


Public Member Functions

def __init__
def copy
def cross
def dot
def negate
def normalize
def reflect
def resize2D
def resize3D
def resize4D
def toTrackQuat
def zero

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index