C++ | Python |
---|---|
Cvector2DT<Cprecision> | Cvector2D, CfVector2D |
Template class that describes a 2D vector.
Typedefs
Type | Definition | ||||||
| Cvector2D | ||||||
| Cfvector2D | ||||||
| Cpoint2D (only C++) | ||||||
| CfPoint2D (only C++) |
Properties
Type | Name | Description |
---|---|---|
Cprecision | x, r, u | 1st element of the vector (only C++). |
Cprecision | y, g, v | 2nd element of the vector (only C++). |
Cprecision[2] | pValues | Vector containing all values (only C++). |
Cprecision[2] | pChannels | Vector containing all values (only C++). |
Methods
Name | Description |
---|---|
Cvector2DT | Class constructor |
x, u, r | Gets the 1st element (only Python) |
y, g, v | Gets the 2nd element (only Python) |
[] | Gets the vector element by index [0-1] (only Python). |
isZero | Checks all elements are zero. |
setZero | Sets all elements to zero. |
assign | Initializes the vector. |
operator < | |
operator > | |
operator == | |
isEqual | |
abs | |
negate | |
+= | |
add | |
-= | |
substract | |
*= | |
scale | |
scaleAdd | |
scaleSubstract | |
midPoint | |
midPoint | |
product | |
invert | |
dot | |
norm | |
squareNorm | |
normalize |