| Trees | Index | Help |
|
|---|
| Package svs_simulation :: Package numdata :: Module vectors |
|
2 dimensional vectors and vector functions.
Some of the classes and functions are based on theVector2D class outlined in Mat Buckland, 2005, Programming
Game AI by Example, Wordware:Plano, see http://www.wordware.com/files/ai,
and http://www.ai-junkie.com.
Author: Simon Yuill
Contact: simon@lipparosa.org
Copyright: 2005 Simon Yuill
License: GNU GPL version 2 or any later version
| Classes | |
|---|---|
Vector2D |
Represents a vector in 2D space. |
| Function Summary | |
|---|---|
Returns true if the point is inside the defined region. | |
Returns true if the target position is in the field of view of the entity positioned at posFirst facing in facingFirst. | |
Returns true if the point is NOT inside the defined region. | |
Vector2D
|
Converts point to vector. |
| float |
Returns distance between two vectors. |
| float |
Returns distance squared between two vectors. |
| float |
Returns length of vector. |
| float |
Returns length of vector squared. |
Vector2D
|
Normalizes specified vector. |
svs_core.numdata.geomlib.Point2D
|
Converts vector to point. |
| Function Details |
|---|
insideBounds2D(point, top_left=None, bottom_right=None, left=None, top=None, right=None, bottom=None)Returns true if the point is inside the defined region. The region can either be defined by two points or vectors, or by four coordinates. |
isSecondInFOVOfFirst(posFirst, facingFirst, posSecond, fov)Returns true if the target position is in the field of view of the entity positioned at posFirst facing in facingFirst. @type posFirst:Vector2D @type facingFirst:Vector2D @type posSecond:Vector2D @type fov:float
|
notInsideBounds2D(point, top_left=None, bottom_right=None, left=None, top=None, right=None, bottom=None)Returns true if the point is NOT inside the defined region. The region can either be defined by two points or vectors, or by four coordinates. |
pointToVector(point)Converts point to vector.
|
vec2DDistance(vector1, vector2)Returns distance between two vectors. |
vec2DDistanceSq(vector1, vector2)Returns distance squared between two vectors. |
vec2DLength(vector)Returns length of vector.
|
vec2DLengthSq(vector)Returns length of vector squared.
|
vec2DNormalize(vector)Normalizes specified vector. |
vectorToPoint(vector)Converts vector to point.
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 20 15:30:28 2005 | http://epydoc.sf.net |