Hermes
|
Geometric point classes. More...
Go to the source code of this file.
Classes | |
class | hermes::Point2< T > |
Geometric 2-dimensional point (x, y) More... | |
class | hermes::Point3< T > |
Geometric 3-dimensional vector (x, y, z) More... | |
struct | std::hash< hermes::Point2< T > > |
struct | std::hash< hermes::Point3< T > > |
Macros | |
#define | ARITHMETIC_OP(OP) |
#define | RELATIONAL_OP(OP, CO) |
#define | ARITHMETIC_OP(OP) |
#define | RELATIONAL_OP(OP, CO) |
#define | MATH_OP(NAME, OP) |
Typedefs | |
using | hermes::point2 = Point2< real_t > |
using | hermes::point2f = Point2< float > |
using | hermes::point2d = Point2< double > |
using | hermes::point3 = Point3< real_t > |
using | hermes::point3f = Point3< float > |
using | hermes::point3d = Point3< double > |
using | hermes::point2i = Point2< Interval< real_t > > |
using | hermes::point3i = Point3< Interval< real_t > > |
Functions | |
template<typename T > | |
HERMES_DEVICE_CALLABLE Point2< T > | hermes::operator* (real_t f, const Point2< T > &a) |
Scalar multiplication operator. More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE real_t | hermes::distance (const Point2< T > &a, const Point2< T > &b) |
Computes the Euclidean distance between two points. More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE real_t | hermes::distance2 (const Point2< T > &a, const Point2< T > &b) |
Computes the squared Euclidean distance between two points. More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE real_t | hermes::distance (const Point3< T > &a, const Point3< T > &b) |
Computes the Euclidean distance between two points. More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE real_t | hermes::distance2 (const Point3< T > &a, const Point3< T > &b) |
Computes the squared Euclidean distance between two points. More... | |
template<typename T > | |
std::ostream & | hermes::operator<< (std::ostream &os, const Point2< T > &p) |
template<typename T > | |
std::ostream & | hermes::operator<< (std::ostream &os, const Point3< T > &p) |
Geometric point classes.
Copyright (c) 2017, FilipeCN.
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define ARITHMETIC_OP | ( | OP | ) |
#define ARITHMETIC_OP | ( | OP | ) |
#define MATH_OP | ( | NAME, | |
OP | |||
) |
#define RELATIONAL_OP | ( | OP, | |
CO | |||
) |
#define RELATIONAL_OP | ( | OP, | |
CO | |||
) |
HERMES_DEVICE_CALLABLE real_t hermes::distance | ( | const Point2< T > & | a, |
const Point2< T > & | b | ||
) |
Computes the Euclidean distance between two points.
T |
a | |
b |
HERMES_DEVICE_CALLABLE real_t hermes::distance | ( | const Point3< T > & | a, |
const Point3< T > & | b | ||
) |
Computes the Euclidean distance between two points.
T |
a | |
b |
HERMES_DEVICE_CALLABLE real_t hermes::distance2 | ( | const Point2< T > & | a, |
const Point2< T > & | b | ||
) |
Computes the squared Euclidean distance between two points.
T |
a | |
b |
HERMES_DEVICE_CALLABLE real_t hermes::distance2 | ( | const Point3< T > & | a, |
const Point3< T > & | b | ||
) |
Computes the squared Euclidean distance between two points.
T |
a | |
b |
HERMES_DEVICE_CALLABLE Point2<T> hermes::operator* | ( | real_t | f, |
const Point2< T > & | a | ||
) |
Scalar multiplication operator.
T |
f | |
a |