Wormhole2D
A Wormhole (in this context) is an entity that "connects" two worlds: the "environment" and the "view". Above all it provides services to convert coordinates from the "environment-space" to the "view-space". IWormhole2D
is the type of a wormhole whose both environment and view are bi-dimensional spaces. Terminology: - "Environment" is the 'rectangle' we need to render ON the view. - "View" is a 'window' that let us see the environment. - "Environment-space" is the algebraic space on which 'lies' the environment. - "View-space" is the algebraic space on which 'lies' the view. - "Env" before a point's name => it refers to a point into the environment-space. - "View" before a point's name => it refers to a point into the view-space. - "Position" is the point of the view-space every transformation applied to the environment refers to: e.g. if I want to move the environment, I have to change the position; it is also the point the environment rotates around. - "EnvOffset" is the vector from (0; 0) into env-space to the left-bottom corner of the part of the environment we want to render. E.g. if I am representing a map with Earth-coordinates (16; 48), the intersection between the prime meridian and the equator is (0; 0), so I have to set the envOffset to (16; 48) in order to see the "beginning" of the map on the left-bottom corner of the view.
Parameters
position type
Inheritors
Functions
envPoint
.viewPoint
.