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

Geometric class. More...

#include <ilviews/base/geometry.h>

Public Member Functions

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

Detailed Description

Geometric class.

Library: xviews or winviews or mviews (mutually exclusive)

The IlvFloatPoint class deals with floating point coordinate values. We call these "floating points".

See also
IlvPoint, IlvDoublePoint.

Constructor & Destructor Documentation

◆ IlvFloatPoint()

IlvFloatPoint::IlvFloatPoint ( IlFloat  x = (IlFloat)0,
IlFloat  y = (IlFloat)0 
)

Constructor.

Initializes a new IlvFloatPoint with the indicated coordinates. point. Its parameters represent the x_and _y coordinates of the floating point.

Member Function Documentation

◆ getX()

IlFloat IlvFloatPoint::getX ( ) const

Gets the x floating point coordinate.

Returns
The x floating point coordinate.

◆ getY()

IlFloat IlvFloatPoint::getY ( ) const

Gets the y floating point coordinate.

Returns
The y floating point coordinate.

◆ move()

void IlvFloatPoint::move ( IlFloat  x,
IlFloat  y 
)

Sets x and y floating point coordinates.

Parameters
xThe x floating point coordinate.
yThe y floating point coordinate.

◆ operator!=()

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

Tests floating points for inequality.

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

◆ operator=()

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

Copies a floating point.

Copies p to the current object.

Parameters
pThe source point.

◆ operator==()

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

Tests floating points for equality.

Returns
0 if p is different from the current object.

◆ set()

void IlvFloatPoint::set ( IlFloat  newX,
IlFloat  newY 
)

Sets the floating point coordinates.

Parameters
newXThe x floating point coordinate.
newYThe y floating point coordinate.

◆ setX()

void IlvFloatPoint::setX ( IlFloat  newX)

Sets the x floating point coordinate.

Parameters
newXThe x floating point coordinate.

◆ setY()

void IlvFloatPoint::setY ( IlFloat  newY)

Sets the y floating point coordinate.

Parameters
newYThe y floating point coordinate.

◆ translate()

void IlvFloatPoint::translate ( IlFloat  dx,
IlFloat  dy 
)

Moves the object by relative translation.

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

Parameters
dxThe x offset.
dyThe y offset.