Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave 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)
 Moves the object. 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.

This member function returns the x coordinate of a floating point.

Returns
The x floating point coordinate.

§ getY()

IlFloat IlvFloatPoint::getY ( ) const

Gets the y floating point coordinate.

This member function returns the y coordinate of a floating point.

Returns
The y floating point coordinate.

§ move()

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

Moves the object.

Takes an existing IlvFloatPoint object and moves it to another position.

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.

This member function sets the two coordinates of a floating point.

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

§ setX()

void IlvFloatPoint::setX ( IlFloat  newX)

Sets the x floating point coordinate.

This member function sets the x coordinate of a floating point.

Parameters
newXThe x floating point coordinate.

§ setY()

void IlvFloatPoint::setY ( IlFloat  newY)

Sets the y floating point coordinate.

This member function sets the y coordinate of a floating point.

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 means of a delta-distance approach. That is, you indicate the dx and dy values that represent the distance between the current position of the point and the target future position.

Parameters
dxThe x delta offset.
dyThe y delta offset.

© Copyright 2017, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.