Board  0.9.5
Classes | Functions
Point.h File Reference

The Point structure. @copyright This source code is part of the Board project, a C++ library whose purpose is to allow simple drawings in EPS, FIG or SVG files. Copyright (C) 2007 Sebastien Fourey http://foureys.users.greyc.fr/ More...

#include <cmath>
#include <iostream>
#include <limits>
#include <vector>
#include "board/Tools.h"

Go to the source code of this file.

Classes

struct  LibBoard::Point
 Struct representing a 2D point. More...
 

Functions

Point LibBoard::mid (const Point &a, const Point &b, double t)
 Return an interpolated point between two points at 'time' t. More...
 
bool LibBoard::orthogonal (const Point &a, const Point &b)
 
Point LibBoard::operator+ (const Point &a, const Point &b)
 
Point LibBoard::operator- (const Point &a, const Point &b)
 
double LibBoard::operator* (const Point &a, const Point &b)
 
Point LibBoard::operator* (const Point &p, double s)
 
Point LibBoard::operator* (double s, const Point &p)
 
Point LibBoard::operator/ (const Point &p, double s)
 
bool LibBoard::operator== (const Point &a, const Point &b)
 
bool LibBoard::operator!= (const Point &a, const Point &b)
 
bool LibBoard::almostEqual (const Point &a, const Point &b)
 
std::ostream & operator<< (std::ostream &out, const LibBoard::Point &)
 
std::ostream & operator<< (std::ostream &out, const std::vector< LibBoard::Point > &)
 

Detailed Description

The Point structure. @copyright This source code is part of the Board project, a C++ library whose purpose is to allow simple drawings in EPS, FIG or SVG files. Copyright (C) 2007 Sebastien Fourey http://foureys.users.greyc.fr/

Author
Sebastien Fourey (GREYC)
Date
Aug 2007

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Function Documentation

◆ mid()

Point LibBoard::mid ( const Point a,
const Point b,
double  t 
)

Return an interpolated point between two points at 'time' t.

Parameters
aFirst point.
bSecond point.
tInterpolation time in [0,1]. 0 is a, 1 is b.
Returns
The interpolated point.

References LibBoard::mid().