HyperRogue  11.3d
game/visualization engine based on non-Euclidean geometry
Public Member Functions | Friends | List of all members
hr::hyperpoint Struct Reference

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...

Inheritance diagram for hr::hyperpoint:

Public Member Functions

constexpr hyperpoint (ld x, ld y, ld z, ld w)
 
hyperpointoperator*= (ld d)
 
hyperpointoperator/= (ld d)
 
hyperpointoperator+= (const hyperpoint h2)
 
hyperpointoperator-= (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)
 

Detailed Description

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).


The documentation for this struct was generated from the following file: