Module Mathutils :: Class Vector
[frames | no frames]

Class Vector


The Vector object

This object gives access to Vectors in Blender.
Method Summary
Vector object. __init__(list)
Create a new Vector object from a list.
  negate()
Set all values to their negative.
  normalize()
Normalize the vector.
  resize2D()
Resize the vector to 2d.
  resize3D()
Resize the vector to 3d.
  resize4D()
Resize the vector to 4d.
  zero()
Set all values to zero.

Class Variable Summary
  length: The magnitude of the vector.
  w: The w value (if any).
  x: The x value.
  y: The y value.
  z: The z value (if any).

Method Details

__init__(list=None)
(Constructor)

Create a new Vector object from a list.

Example:
 v = Blender.Mathutils.Vector([1,0,0])
Parameters:
list - The list of values for the Vector object. Must be 2, 3, or 4 values.
           (type=PyList of float or int)
Returns:
It depends wheter a parameter was passed:
  • (list): Vector object initialized with the given values;
  • (): An empty 3 dimensional vector.

           (type=Vector object.)

negate()

Set all values to their negative.

normalize()

Normalize the vector.

resize2D()

Resize the vector to 2d.

resize3D()

Resize the vector to 3d.

resize4D()

Resize the vector to 4d.

zero()

Set all values to zero.

Class Variable Details

length

The magnitude of the vector.

w

The w value (if any).

x

The x value.

y

The y value.

z

The z value (if any).

Generated by Epydoc 2.1 on Thu Aug 12 21:47:29 2004 http://epydoc.sf.net