Base Module  VST 3.6.6
SDK for developing VST Plug-in
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Data Fields
Point Class Reference

Point Representation. More...

#include <fpoint.h>

Public Member Functions

 Point (UCoord h=0, UCoord v=0)
 Construct a Point from (h, v). More...
 
bool inside (const Rect &rect) const
 Checks if point is inside rect. More...
 
double distance (const Point &other) const
 Distance from the other to this point. More...
 
double angle (const Point &other) const
 Angle from other to this Point. More...
 
double length () const
 Calculate length (absolute value) of vector. More...
 
Point projection (const Point &other) const
 Orthogonal vector projection of "this" on "other". More...
 
bool isLocated (Direction dir, const Point &from)
 
Querying and Setting Values.
UCoord getH () const
 Return the X value of this Point. More...
 
UCoord getV () const
 Return the Y value of this Point. More...
 
void setH (UCoord h)
 Set the X value of this Point. More...
 
void setV (UCoord v)
 Set the Y value of this Point. More...
 
void offset (UCoord h, UCoord v=0)
 Offset this Point by (x, y). More...
 
void offset (const Point &p)
 Offset this Point by Point p. More...
 
bool bound (const Rect &rect)
 Set this to the intersection of this and rect. More...
 
Operations on Point.
Pointoperator() (UCoord h, UCoord v)
 Reinitialize to given coordinates. More...
 
Point operator+ (const Point &p) const
 Return p + this Point as a Point. More...
 
Point operator- (const Point &p) const
 Return this Point minus p as a Point. More...
 
Point operator/ (int32 n) const
 Return this Point divided by n as a Point (scalar divide). More...
 
Point operator* (int32 n) const
 Return this Point times n as a Point (scalar multiply). More...
 
Pointoperator+= (const Point &p)
 Add p to this Point. More...
 
Pointoperator-= (const Point &p)
 Subtract p from this Point. More...
 
Pointoperator*= (int32 n)
 Scalar multiply n times this Point. More...
 
Pointoperator/= (int32 n)
 Scalar divide this Point by n. More...
 
int32 operator* (const Point &p) const
 Scalar multiply this point with p. More...
 
bool operator!= (const Point &p) const
 Not equal. More...
 
Pointoperator= (const Point &p)
 Assignment. More...
 
Point operator- () const
 Reinitialize to given coordinates. More...
 

Data Fields

UCoord h
 
UCoord v
 

Detailed Description

Point Representation.

See also
Rect, UCoord

Constructor & Destructor Documentation

Point ( UCoord  h = 0,
UCoord  v = 0 
)
inline

Construct a Point from (h, v).

Member Function Documentation

UCoord getH ( ) const
inline

Return the X value of this Point.

UCoord getV ( ) const
inline

Return the Y value of this Point.

void setH ( UCoord  h)
inline

Set the X value of this Point.

void setV ( UCoord  v)
inline

Set the Y value of this Point.

void offset ( UCoord  h,
UCoord  v = 0 
)
inline

Offset this Point by (x, y).

void offset ( const Point p)
inline

Offset this Point by Point p.

bool bound ( const Rect rect)

Set this to the intersection of this and rect.

Point & operator() ( UCoord  h,
UCoord  v 
)
inline

Reinitialize to given coordinates.

Point operator+ ( const Point p) const
inline

Return p + this Point as a Point.

Point operator- ( const Point p) const
inline

Return this Point minus p as a Point.

Point operator/ ( int32  n) const
inline

Return this Point divided by n as a Point (scalar divide).

Point operator* ( int32  n) const
inline

Return this Point times n as a Point (scalar multiply).

Point & operator+= ( const Point p)
inline

Add p to this Point.

Point & operator-= ( const Point p)
inline

Subtract p from this Point.

Point & operator*= ( int32  n)
inline

Scalar multiply n times this Point.

Point & operator/= ( int32  n)
inline

Scalar divide this Point by n.

int32 operator* ( const Point p) const
inline

Scalar multiply this point with p.

bool operator!= ( const Point p) const
inline

Not equal.

Point & operator= ( const Point p)
inline

Assignment.

Point operator- ( ) const
inline

Reinitialize to given coordinates.

bool inside ( const Rect rect) const

Checks if point is inside rect.

double distance ( const Point other) const

Distance from the other to this point.

double angle ( const Point other) const

Angle from other to this Point.

double length ( ) const

Calculate length (absolute value) of vector.

Point projection ( const Point other) const

Orthogonal vector projection of "this" on "other".

bool isLocated ( Direction  dir,
const Point from 
)

Field Documentation

UCoord h
UCoord v
Empty

Copyright ©2016 Steinberg Media Technologies GmbH. All Rights Reserved.