![]() |
HyperRogue
11.3d
game/visualization engine based on non-Euclidean geometry
|
A point in our continuous space Originally used for representing points in the hyperbolic plane. Currently used for all kinds of supported spaces, as well as for all vector spaces (up to 4 dimensions). We are using the normalized homogeneous coordinates, which allows us to work with most geometries in HyperRogue in a uniform way. More...
Public Member Functions | |
constexpr | hyperpoint (ld x, ld y, ld z, ld w) |
hyperpoint & | operator*= (ld d) |
hyperpoint & | operator/= (ld d) |
hyperpoint & | operator+= (const hyperpoint h2) |
hyperpoint & | operator-= (const hyperpoint h2) |
Friends | |
hyperpoint | operator* (ld d, hyperpoint h) |
hyperpoint | operator* (hyperpoint h, ld d) |
hyperpoint | operator/ (hyperpoint h, ld d) |
hyperpoint | operator+ (hyperpoint h, hyperpoint h2) |
hyperpoint | operator- (hyperpoint h, hyperpoint h2) |
hyperpoint | operator- (hyperpoint h) |
hyperpoint | operator^ (hyperpoint h1, hyperpoint h2) |
ld | operator| (hyperpoint h1, hyperpoint h2) |
A point in our continuous space Originally used for representing points in the hyperbolic plane. Currently used for all kinds of supported spaces, as well as for all vector spaces (up to 4 dimensions). We are using the normalized homogeneous coordinates, which allows us to work with most geometries in HyperRogue in a uniform way.
In the hyperbolic plane, this is the Minkowski hyperboloid model: (x,y,z) such that x*x+y*y-z*z == -1 and z > 0.
In spherical geometry, we have x*x+y*y+z*z == 1.
In Euclidean geometry, we have z = 1.
In isotropic 3D geometries an extra coordinate is added.
In nonisotropic coordinates h[3] == 1.
In product geometries the 'z' coordinate is modelled by multiplying all three coordinates with exp(z).