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

Geometric class. More...

#include <ilviews/base/geometry.h>

Public Member Functions

 IlvDoublePoint (IlDouble x=(IlDouble) 0, IlDouble y=(IlDouble) 0)
 Constructor. More...
 
IlDouble getX () const
 Gets the x coordinate. More...
 
IlDouble getY () const
 Gets the y coordinate. More...
 
void move (IlDouble newX, IlDouble newY)
 Moves the point. More...
 
int operator!= (const IlvDoublePoint &p) const
 Tests points for inequality. More...
 
IlvDoublePointoperator= (const IlvDoublePoint &p)
 Copies a point. More...
 
int operator== (const IlvDoublePoint &p) const
 Tests points for equality. More...
 
void set (IlDouble newX, IlDouble newY)
 Sets the point coordinates. More...
 
void setX (IlDouble newX)
 Sets the x coordinate. More...
 
void setY (IlDouble newY)
 Sets the y coordinate. More...
 
void translate (IlDouble dx, IlDouble dy)
 Moves the object by relative translation. More...
 

Detailed Description

Geometric class.

Library: xviews or winviews or mviews (mutually exclusive)

The IlvDoublePoint class deals with floating point coordinate values coded on a double-precision floating number.

See also
IlvPoint, IlvFloatPoint.

Constructor & Destructor Documentation

◆ IlvDoublePoint()

IlvDoublePoint::IlvDoublePoint ( IlDouble  x = (IlDouble)0,
IlDouble  y = (IlDouble)0 
)

Constructor.

Initializes a new IlvDoublePoint with the indicated coordinates. point. Its parameters represent the x and y coordinates of the floating point.

Member Function Documentation

◆ getX()

IlDouble IlvDoublePoint::getX ( ) const

Gets the x coordinate.

Returns
The x coordinate.

◆ getY()

IlDouble IlvDoublePoint::getY ( ) const

Gets the y coordinate.

Returns
The y coordinate.

◆ move()

void IlvDoublePoint::move ( IlDouble  newX,
IlDouble  newY 
)

Moves the point.

Parameters
newXThe new x coordinate.
newYThe new y coordinate.

◆ operator!=()

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

Tests points for inequality.

Returns
0 if p is the same as the current object.

◆ operator=()

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

Copies a point.

Copies p to the current object.

Parameters
pThe source point.

◆ operator==()

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

Tests points for equality.

Returns
0 if p is different from the current object.

◆ set()

void IlvDoublePoint::set ( IlDouble  newX,
IlDouble  newY 
)

Sets the point coordinates.

Parameters
newXThe new x coordinate.
newYThe new y coordinate.

◆ setX()

void IlvDoublePoint::setX ( IlDouble  newX)

Sets the x coordinate.

Parameters
newXThe new x coordinate.

◆ setY()

void IlvDoublePoint::setY ( IlDouble  newY)

Sets the y coordinate.

Parameters
newYThe new y coordinate.

◆ translate()

void IlvDoublePoint::translate ( IlDouble  dx,
IlDouble  dy 
)

Moves the object by relative translation.

Shifts an existing point to another location by a relative offset, that is, dx and dy are respectively added to x and y coordinates.

Parameters
dxThe x offset.
dyThe y offset.