|
Rhino C++ API
8.24
|
#include <opennurbs_ipoint.h>
Public Member Functions | |
| ON_2iVector ()=default | |
| ON_2iVector (const ON_2iVector &)=default | |
| ON_2iVector (int x, int y) | |
| ~ON_2iVector ()=default | |
| bool | IsNotZero () const |
| bool | IsSet () const |
| bool | IsZero () const |
| ON_2iVector & | operator*= (int) |
| ON_2iVector & | operator+= (const class ON_2iVector &) |
| ON_2iVector | operator- () const |
| ON_2iVector & | operator-= (const class ON_2iVector &) |
| ON_2iVector & | operator= (const ON_2iVector &)=default |
Static Public Member Functions | |
| static int | Compare (const ON_2iVector &lhs, const ON_2iVector &rhs) |
| static const ON_2iVector | From2dex (const class ON_2dex &src) |
| static const ON_2iVector | FromPoint (const class ON_2iPoint &p) |
Public Attributes | |
| ON__INT32 | x |
| ON__INT32 | y |
Static Public Attributes | |
| static const ON_2iVector | UnitX |
| (1,0) More... | |
| static const ON_2iVector | UnitY |
| (0,1) More... | |
| static const ON_2iVector | Unset |
| (ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX) More... | |
| static const ON_2iVector | Zero |
| (0,0) More... | |
A 2 dimensional vector with integer coordinates. Clear code will distinguish between situation where (x,y) is a location (ON_2iPoint) or a direction (ON_2iVector) and use the appropriate class.
|
default |
Default construction intentionally leaves x and y uninitialized. Use something like ON_2iVector pt(1,2); or ON_2iVector pt = ON_2iVector::Zero; when you need an initialized ON_2iVector.
|
default |
|
default |
| ON_2iVector::ON_2iVector | ( | int | x, |
| int | y | ||
| ) |
|
static |
Dictionary order compare.
|
static |
|
static |
For those times when a direction was incorrectly represented by a point. It is intentional that there is not an ON_2iVector constructor from an ON_2iPoint.
| bool ON_2iVector::IsNotZero | ( | ) | const |
Returns: IsSet() && (0 != x || 0 != y)
| bool ON_2iVector::IsSet | ( | ) | const |
Returns: (ON_UNSET_INT_INDEX == x || ON_UNSET_INT_INDEX ==y)
| bool ON_2iVector::IsZero | ( | ) | const |
Returns: (0 == x && 0 == y)
| ON_2iVector& ON_2iVector::operator*= | ( | int | ) |
| ON_2iVector& ON_2iVector::operator+= | ( | const class ON_2iVector & | ) |
| ON_2iVector ON_2iVector::operator- | ( | ) | const |
| ON_2iVector& ON_2iVector::operator-= | ( | const class ON_2iVector & | ) |
|
default |
|
static |
(1,0)
|
static |
(0,1)
|
static |
(ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX)
| ON__INT32 ON_2iVector::x |
| ON__INT32 ON_2iVector::y |
|
static |
(0,0)
1.8.17