Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvPoint Class Reference

Geometric class. More...

#include <ilviews/base/geometry/IlvBaseGeometry.h>

Inheritance diagram for IlvPoint:
IlvWindowsPoint

Public Member Functions

 IlvPoint (IlvPos x=0, IlvPos y=0)
 Constructor. More...
 
IlvPos getX () const
 Retrieves the current x coordinate. More...
 
IlvPos getY () const
 Retrieves the current y coordinate. More...
 
void move (IlvPos x, IlvPos y)
 Sets the new position. More...
 
int operator!= (const IlvPoint &p) const
 Inequality operator. More...
 
IlvPointoperator= (const IlvPoint &p)
 Assignment operator. More...
 
int operator== (const IlvPoint &p) const
 Equality operator. More...
 
void set (IlvPos x, IlvPos y)
 Sets the new position. More...
 
void setX (IlvPos newX)
 Sets the x coordinate. More...
 
void setY (IlvPos yy)
 Sets the y coordinate. More...
 
void translate (const IlvPoint &delta)
 Translates to a new position. More...
 
void translate (IlvPos dx, IlvPos dy)
 Translates to a new position. More...
 
IlvPos x () const
 Retrieves the current x coordinate. More...
 
void x (IlvPos newX)
 Sets the x coordinate. More...
 
IlvPos y () const
 Retrieves the current y coordinate. More...
 
void y (IlvPos newY)
 Sets the y coordinate. More...
 

Detailed Description

Geometric class.

Library: xviews or winviews or mviews (mutually exclusive)

The IlvPoint class is used to create a point.

See also
IlvDeltaPoint, IlvFloatPoint, IlvDoublePoint.

Accessors\nAccessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods <tt>IlvValueInterface::queryValue()</tt>, <tt>IlvValueInterface::queryValues()</tt>, <tt>IlvValueInterface::changeValue()</tt>, <tt>IlvValueInterface::changeValues()</tt>.\n\nThis class defines the following accessors:

Data accessors

Name Type Equivalent methods
x Int x(), setX()
y Int y(), setY()

Method accessors

Name Return type Equivalent methods
IlvPoint(Int x, Int y) IlvPoint See [Constructor note] below.

[Constructor note]: using this accessor allows to create an instance of IlvPoint from a script. For example :

mypoint = new IlvPoint(100, 200);

This is equivalent to the following C++ code :

new IlvPoint(100, 200);

Constructor & Destructor Documentation

◆ IlvPoint()

IlvPoint::IlvPoint ( IlvPos  x = 0,
IlvPos  y = 0 
)

Constructor.

Initializes a point with defined coordinates.

Parameters
xThe x coordinate of the new point.
yThe y coordinate of the new point.

Member Function Documentation

◆ getX()

IlvPos IlvPoint::getX ( ) const

Retrieves the current x coordinate.

Returns
The current x coordinate of this object.

◆ getY()

IlvPos IlvPoint::getY ( ) const

Retrieves the current y coordinate.

Returns
The current y coordinate of this object.

◆ move()

void IlvPoint::move ( IlvPos  x,
IlvPos  y 
)

Sets the new position.

Parameters
xThe new x coordinate of this object.
yThe new y coordinate of this object.

◆ operator!=()

int IlvPoint::operator!= ( const IlvPoint p) const

Inequality operator.

Parameters
pThe point to compare to.
Returns
1 if p is different than the current object.

◆ operator=()

IlvPoint& IlvPoint::operator= ( const IlvPoint p)

Assignment operator.

Parameters
pThe point that is copied to the current object.

◆ operator==()

int IlvPoint::operator== ( const IlvPoint p) const

Equality operator.

Parameters
pThe point to compare to.
Returns
0 if p is different than the current object.

◆ set()

void IlvPoint::set ( IlvPos  x,
IlvPos  y 
)

Sets the new position.

Parameters
xThe new x coordinate of this object.
yThe new y coordinate of this object.

◆ setX()

void IlvPoint::setX ( IlvPos  newX)

Sets the x coordinate.

Parameters
newXThe new x coordinate of this object.

◆ setY()

void IlvPoint::setY ( IlvPos  yy)

Sets the y coordinate.

Parameters
yyThe new y coordinate of this object.

◆ translate() [1/2]

void IlvPoint::translate ( const IlvPoint delta)

Translates to a new position.

Shifts an existing point to another location by means of a vector. You indicate the x and y translation values that represent the distance between the current position of the point and the target future position.

Parameters
deltaThe translation vector that is applied.

◆ translate() [2/2]

void IlvPoint::translate ( IlvPos  dx,
IlvPos  dy 
)

Translates to a new position.

Shifts an existing point to another location by means of a vector. You indicate the x and y translation values that represent the distance between the current position of the point and the target future position.

Parameters
dxThe x translation to be applied to the object.
dyThe y translation to be applied to the object.

◆ x() [1/2]

IlvPos IlvPoint::x ( ) const

Retrieves the current x coordinate.

Returns
The current x coordinate of this object.

◆ x() [2/2]

void IlvPoint::x ( IlvPos  newX)

Sets the x coordinate.

Parameters
newXThe new x coordinate of this object.

◆ y() [1/2]

IlvPos IlvPoint::y ( ) const

Retrieves the current y coordinate.

Returns
The current y coordinate of this object.

◆ y() [2/2]

void IlvPoint::y ( IlvPos  newY)

Sets the y coordinate.

Parameters
newYThe new y coordinate of this object.
IlvPoint::IlvPoint
IlvPoint(IlvPos x=0, IlvPos y=0)
Constructor.
Definition: IlvBaseGeometry.h:196