Rhino C++ API
8.10
|
#include <opennurbs_ipoint.h>
Public Member Functions | |
ON_2iPoint ()=default | |
ON_2iPoint (const ON_2iPoint &)=default | |
ON_2iPoint (int x, int y) | |
~ON_2iPoint ()=default | |
bool | IsOrigin () const |
bool | IsSet () const |
ON_2iPoint & | operator+= (const class ON_2iVector &) |
ON_2iPoint & | operator-= (const class ON_2iVector &) |
ON_2iPoint & | operator= (const ON_2iPoint &)=default |
Static Public Member Functions | |
static int | Compare (const ON_2iPoint &lhs, const ON_2iPoint &rhs) |
static const ON_2iPoint | From2dex (const class ON_2dex &src) |
static const ON_2iPoint | FromVector (const class ON_2iVector &v) |
Public Attributes | |
ON__INT32 | x |
ON__INT32 | y |
Static Public Attributes | |
static const ON_2iPoint | Origin |
(0,0) More... | |
static const ON_2iPoint | Unset |
(ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX) More... | |
Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete openNURBS copyright information see http://www.opennurbs.org. A 2 dimensional point 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_2iPoint pt(1,2); or ON_2iPoint pt = ON_2iPoint::Origin; when you need an initialized ON_2iPoint.
|
default |
|
default |
ON_2iPoint::ON_2iPoint | ( | int | x, |
int | y | ||
) |
|
static |
Dictionary order compare.
|
static |
|
static |
It is intentional that points are not added to points to encourage code that is clear about what is a location and what is displacement. For those times when a location was incorrectly represented by a vector. It is intentional that there is not an ON_2iPoint constructor from an ON_2iVector.
bool ON_2iPoint::IsOrigin | ( | ) | const |
Returns: (0 == x && 0 == y)
bool ON_2iPoint::IsSet | ( | ) | const |
Returns: (ON_UNSET_INT_INDEX == x || ON_UNSET_INT_INDEX ==y)
ON_2iPoint& ON_2iPoint::operator+= | ( | const class ON_2iVector & | ) |
ON_2iPoint& ON_2iPoint::operator-= | ( | const class ON_2iVector & | ) |
|
default |
|
static |
(0,0)
|
static |
(ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX)
ON__INT32 ON_2iPoint::x |
ON__INT32 ON_2iPoint::y |