Home | Trees | Index | Help |
|
---|
Module Mathutils :: Class Vector |
|
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 = Object(wrappedObject) #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'
Notes:
Method Summary | |
---|---|
Vector object. |
Create a new 2d, 3d, or 4d Vector object from a list of floating point numbers. |
Set all values to their negative. | |
Normalize the vector, making the length of the vector always 1.0 | |
Resize the vector to 2d. | |
Resize the vector to 3d. | |
Resize the vector to 4d. | |
Quaternion |
Return a quaternion rotation from the vector and the track and up axis. |
Set all values to zero. |
Instance Variable Summary | |
---|---|
length : The magnitude of the vector. | |
magnitude : This is a synonym for length. | |
w : The w value (if any). | |
wrapped : Whether or not this item is wrapped data | |
x : The x value. | |
y : The y value. | |
z : The z value (if any). |
Method Details |
---|
__init__(list=None)
Create a new 2d, 3d, or 4d Vector object from a list of floating
point numbers.
|
negate()Set all values to their negative.
|
normalize()Normalize the vector, making the length of the vector always 1.0
|
resize2D()Resize the vector to 2d.
|
resize3D()Resize the vector to 3d. New axis will be 0.0.
|
resize4D()Resize the vector to 4d. New axis will be 0.0.
|
toTrackQuat(track, up)Return a quaternion rotation from the vector and the track and up axis.
|
zero()Set all values to zero.
|
Instance Variable Details |
---|
lengthThe magnitude of the vector. |
magnitudeThis is a synonym for length. |
wThe w value (if any). |
wrappedWhether or not this item is wrapped data |
xThe x value. |
yThe y value. |
zThe z value (if any). |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Dec 22 22:38:11 2005 | http://epydoc.sf.net |