Mathutils Module -- Blender Game Engine 2.49b


Class index  __

Method index  __

Mathutils index  __

Euler index  __

Matrix index  __

Quaternion index  __

Vector index  __


 



QuadNormal

QuadNormal(vec1, vec2, vec3, vec4)

Returns the normal of the 3D quad defined.

Return Type:  Vector

vec1:
Type:   3D Vector  
    (the 1st vertex of the quad)
vec2
Type:   3D  Vector
    (the 2nd vertex of the quad)
vec3:
Type:   3D Vector  
    (the 3rd vertex of the quad)
vec4
Type:   3D  Vector
    (the 4thvertex of the quad)

Sample Code

# import Mathutils
import Mathutils

# create 1st Vector for the vertex
vec1= Mathutils.Vector(0.0, 0.0, 0.0)

# create 2nd Vector for 2nd vertex
vec2= Mathutils.Vector(1.0, 0.0, 0.0)

# create 3rd Vector for the 3rd vertex
vec3= Mathutils.Vector(1.0, 0.0, 1.0)

# create 4th Vector for 4th vertex
vec4= Mathutils.Vector(0.0, 0.0, 1.0)

# use QuadNormal
quadNormal = Mathutils.QuadNormal(vec1, vec2, vec3, vec4)

 
The Blender Game engine uses the Python programming language to extent the capabilities of the game engine.  The Python programming language is open source and free to use, even for commercial products.  Python is a multi-platform programing language that runs on Windows, Linux/Unix and Mac OS X operating systems.  A general-purpose programming language, Python is a high-level, dynamic, object-oriented language that beginners find easy to learn.