WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
GTran.h
1#ifndef _WINC_GTRAN
2#define _WINC_GTRAN
3
4#include <WXP/Coords.h>
5#include <WXP/Point.h>
6#include <WXP/Points.h>
7#include <WXP/Rect.h>
8
9namespace WXP {
10 class GTran {
11 Coords plt; /* The plot coordinates */
12 Coords ndc; /* The normalized device coordinates */
13 Point wn_vp; /* Transformation from window to viewport */
14 Point vp_plt; /* Transformation from viewport to plot */
15 Coords wn; /* The transformation window */
16 Coords vp; /* The transformation window */
17 Rect clip_rect; /* Transformation from viewport to plot */
18
19 public:
20 GTran();
21 GTran(Rect rect);
22 ~GTran();
23 int set(Rect rect);
24 int resize(Rect rect);
25 float tranWindowNdcX( float x );
26 float tranWindowNdcY( float y );
27 float tranWindowPlotX( float x );
28 float tranWindowPlotY( float y );
29 float tranPlotNdcX( float x );
30 float tranPlotNdcY( float y );
31 float tranPlotWindowX( float x );
32 float tranPlotWindowY( float y );
33 float tranNdcPlotX( float x );
34 float tranNdcPlotY( float y );
36 bool isPointsInWindow( int num, Point *pts );
37 bool isPointsInWindow( Points &pts );
38 int getWindow( Rect &rect );
40 int getViewport( Rect &rect );
42 int getNdc( Rect &rect );
43 Rect getNdc();
44 int setWindow( Rect rect );
45 int setViewport( Rect rect );
46 int print();
47
48 static float tranWindowX( GTran gtran1, GTran gtran2, float x);
49 static float tranWindowY( GTran gtran1, GTran gtran2, float y);
50 };
51}
52#endif
This class creates device independent coordinate systems.
Definition GTran.h:10
~GTran()
Definition GTran.cc:34
float tranNdcPlotY(float y)
Definition GTran.cc:333
int setViewport(Rect rect)
Definition GTran.cc:519
float tranWindowNdcX(float x)
Definition GTran.cc:178
float tranPlotNdcX(float x)
Definition GTran.cc:237
float tranPlotWindowY(float y)
Definition GTran.cc:269
float tranWindowPlotX(float x)
Definition GTran.cc:202
Rect getClipRect()
Definition GTran.cc:346
static float tranWindowY(GTran gtran1, GTran gtran2, float y)
Definition GTran.cc:303
float tranWindowNdcY(float y)
Definition GTran.cc:190
GTran()
Definition GTran.cc:18
static float tranWindowX(GTran gtran1, GTran gtran2, float x)
Definition GTran.cc:285
float tranPlotWindowX(float x)
Definition GTran.cc:255
int setWindow(Rect rect)
Definition GTran.cc:503
Rect getWindow()
Definition GTran.cc:437
bool isPointsInWindow(int num, Point *pts)
Definition GTran.cc:362
float tranNdcPlotX(float x)
Definition GTran.cc:319
float tranPlotNdcY(float y)
Definition GTran.cc:246
float tranWindowPlotY(float y)
Definition GTran.cc:219
Rect getViewport()
Definition GTran.cc:463
int resize(Rect rect)
Definition GTran.cc:109
Rect getNdc()
Definition GTran.cc:489
int set(Rect rect)
Definition GTran.cc:41
This class creates an array a 2D points (x, y)
Definition Points.h:8
All WXP classes fall under the WXP namespace.
Definition Angle.h:4
This struct defines a set of parameters for rectangular regions.
Definition Coords.h:5
This struct sets a 3D point (x, y, z)
Definition Point.h:5
This structure defines rectangle coordinates.
Definition Rect.h:5