Change Log:
--------------------
v33
- fixed a bug where the coordinate conversion would not work when leaving and re-visiting a zone.
v32
- updated to standalone version.
Description:
--------------------
This library offers utility functions for the 3D control API, such as
converting between 3D API coordinates and 2D map coordinates
converting 2D map distances and "real" distances in meters
functions to obtain the player's 3D position
How To Use:
Add Lib3D as DependsOn library, i.e. in your addon's manifest you should write
## DependsOn: Lib3D
And either install this library directly, or include it in your addon.
Note that this library depends on LibGPS, so you need to install/include LibGPS as well.
Coordinate Systems
There exist 4 different coordinate systems:
Local:
The coordinates with respect to the currently open 2D map (see LibGPS)
(0,0) is the top left corner and (1,1) is the bottom right corner of the current 2D map.
Global:
The coordinates with respect to the Tamriel 2D map (see LibGPS)
(0,0) is the top left corner and (1,1) is the bottom right corner of the Tamriel 2D map.
Note that these coords can be negative for zones such as Coldharbor.
GUI (also called 3DRenderSpace):
The coordinates used by ZOS' 3D controls API. 1 unit is 1 meter, but the origin of the coordinate system changes over time.
E.g. when moving 1km away from the GUI origin, the current player position becomes the new origin.
(0,y,0) is a point at the current world origin and at height y.
(1,y,0) is 1 meter to the east, while (0,y,1) is 1 meter to the south.
When the origin moves, ZOS' 3D control API will automatically move all 3D-TopLevelControls as well, so the controls are still visible at the correct locations. Just something I want to point out, because this means the result of TopLevelControl:Get3DRenderSpaceOrigin() can change without you calling TopLevelControl:Set3DRenderSpaceOrigin(x,y,z) !
World (ZOS):[/C...
--------------------
v33
- fixed a bug where the coordinate conversion would not work when leaving and re-visiting a zone.
v32
- updated to standalone version.
Description:
--------------------
This library offers utility functions for the 3D control API, such as
converting between 3D API coordinates and 2D map coordinates
converting 2D map distances and "real" distances in meters
functions to obtain the player's 3D position
How To Use:
Add Lib3D as DependsOn library, i.e. in your addon's manifest you should write
## DependsOn: Lib3D
And either install this library directly, or include it in your addon.
Note that this library depends on LibGPS, so you need to install/include LibGPS as well.
Coordinate Systems
There exist 4 different coordinate systems:
Local:
The coordinates with respect to the currently open 2D map (see LibGPS)
(0,0) is the top left corner and (1,1) is the bottom right corner of the current 2D map.
Global:
The coordinates with respect to the Tamriel 2D map (see LibGPS)
(0,0) is the top left corner and (1,1) is the bottom right corner of the Tamriel 2D map.
Note that these coords can be negative for zones such as Coldharbor.
GUI (also called 3DRenderSpace):
The coordinates used by ZOS' 3D controls API. 1 unit is 1 meter, but the origin of the coordinate system changes over time.
E.g. when moving 1km away from the GUI origin, the current player position becomes the new origin.
(0,y,0) is a point at the current world origin and at height y.
(1,y,0) is 1 meter to the east, while (0,y,1) is 1 meter to the south.
When the origin moves, ZOS' 3D control API will automatically move all 3D-TopLevelControls as well, so the controls are still visible at the correct locations. Just something I want to point out, because this means the result of TopLevelControl:Get3DRenderSpaceOrigin() can change without you calling TopLevelControl:Set3DRenderSpaceOrigin(x,y,z) !
World (ZOS):[/C...