API Documentation
Loading...
Searching...
No Matches
CoordinateConverter.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Design
28File: CoordinateConverter
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/SoftwareService.h>
34#include <NDEVR/CoordinateProjection.h>
35#include "DLLInfo.h"
36namespace NDEVR
37{
38 class File;
39
40 /**--------------------------------------------------------------------------------------------------
41 \brief Stores different projections and then converts data from one projection into another.
42 *-----------------------------------------------------------------------------------------------**/
44 {
45 public:
46 CoordinateConverter(const CoordinateProjection& to_projection, const CoordinateProjection& from_projection)
47 : m_from_projection(from_projection)
48 , m_to_projection(to_projection)
49 {
50 }
53 virtual void setSourceProjection(const CoordinateProjection& from_projection) = 0;
54 virtual void setDestinationProjection(const CoordinateProjection& to_projection) = 0;
55 virtual Vertex<3, fltp08> convert(const Vertex<3, fltp08>& location, bool inverse = false) const = 0;
56 virtual Vertex<2, fltp08> convert(const Vertex<2, fltp08>& location, bool inverse = false) const = 0;
57 virtual Bounds<3, fltp08> convert(const Bounds<3, fltp08>& location, bool inverse = false) const = 0;
58 virtual Bounds<2, fltp08> convert(const Bounds<2, fltp08>& location, bool inverse = false) const = 0;
59 virtual Matrix<fltp08> convert(const Matrix<fltp08>& location, bool inverse = false) const = 0;
60 protected:
63 };
64
65 /**--------------------------------------------------------------------------------------------------
66 \brief Allows for the creation of Coordinate spaces
67 *-----------------------------------------------------------------------------------------------**/
76}
77
78
79
#define NDEVR_DESIGN_API
Definition DLLInfo.h:77
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:52
Allows for the creation of Coordinate spaces.
Definition CoordinateConverter.h:69
static CoordinateConverterFactory * DefaultFactory()
Definition CoordinateConverter.h:72
static NDEVR_DESIGN_API CoordinateConverterFactory * s_converter
Definition CoordinateConverter.h:74
virtual CoordinateConverter * createConverter(const CoordinateProjection &to_projection, const CoordinateProjection &from_projection)=0
Stores different projections and then converts data from one projection into another.
Definition CoordinateConverter.h:44
CoordinateProjection fromProjection()
Definition CoordinateConverter.h:51
virtual void setDestinationProjection(const CoordinateProjection &to_projection)=0
CoordinateProjection toProjection()
Definition CoordinateConverter.h:52
virtual Bounds< 3, fltp08 > convert(const Bounds< 3, fltp08 > &location, bool inverse=false) const =0
virtual Matrix< fltp08 > convert(const Matrix< fltp08 > &location, bool inverse=false) const =0
virtual Bounds< 2, fltp08 > convert(const Bounds< 2, fltp08 > &location, bool inverse=false) const =0
CoordinateConverter(const CoordinateProjection &to_projection, const CoordinateProjection &from_projection)
Definition CoordinateConverter.h:46
virtual void setSourceProjection(const CoordinateProjection &from_projection)=0
CoordinateProjection m_from_projection
Definition CoordinateConverter.h:61
CoordinateProjection m_to_projection
Definition CoordinateConverter.h:62
virtual Vertex< 3, fltp08 > convert(const Vertex< 3, fltp08 > &location, bool inverse=false) const =0
virtual Vertex< 2, fltp08 > convert(const Vertex< 2, fltp08 > &location, bool inverse=false) const =0
Definition Matrix.hpp:176
Software Services provide an interface for adding to or changing the software behavior.
Definition SoftwareService.h:9
Software Service Managers take a Software service to modify the behavior of the software.
Definition SoftwareService.h:15
A vertex or point. A specific type of Vector used primarily for spacial location information.
Definition Vertex.hpp:48
Definition ACIColor.h:37
Basic data about a particular coordinate projection. See https://ndevr.org/coordinate-projection/.
Definition CoordinateProjection.h:44