Windows & Real World Coordinates

Windows & Real World Coordinates

Post by Trevor Johns » Thu, 26 May 1994 02:05:27



Hi,

I am developing an application where I would like to use real world
coordinates (Latitude/Longitude in Dec.Deg.) instead of screen
coordinates.  However, I am having trouble figuring out how to do
this using the Gpi function calls.

In reading the online documentation I have found the description for
GpiSetViewingLimits but I am not sure how to use it and it's related
functions.

Perhaps somebody out there might be able to put me on the right path
with a brief explanation (just a few lines or so) or by pointing out
some examples that I might be able to download and study.

Thanks in advance to those of you who can respond.

Trevor Johnson

 
 
 

Windows & Real World Coordinates

Post by Richard Gil » Sat, 28 May 1994 00:29:42



>Hi,

>I am developing an application where I would like to use real world
>coordinates (Latitude/Longitude in Dec.Deg.) instead of screen
>coordinates.  However, I am having trouble figuring out how to do
>this using the Gpi function calls.

>In reading the online documentation I have found the description for
>GpiSetViewingLimits but I am not sure how to use it and it's related
>functions.

>Perhaps somebody out there might be able to put me on the right path
>with a brief explanation (just a few lines or so) or by pointing out
>some examples that I might be able to download and study.

>Thanks in advance to those of you who can respond.

>Trevor Johnson


This may sound harsh but if you want to really get the most out of the
Gpi you need the technical library. It has an entire volumn devoted to it.

Having said that, here's a brief description.

The Gpi works in 4 coordinate spaces. These are:

World->Model->Presentation->Device (device doesn't really apply to windows)

You can define a transform to be used between each coordinate space.
When you draw, you actually draw into the world space. You can use what
ever coordinate ranges you like (independant of screen or printer etc.).
For specific types of units the Gpi supports metric, imperial and a couple of
others. You can then scale your own coordinate space into the model space
and then into presentation space.
It's all rather too complicated to describe in full, but the functions
to look at for the various transforms are:

GpiSetModelTransformMatrix
GpiSetViewingTransformMatrix
GpiSetDefaultViewMatrix - for scaling model space into presentation space
GpiCallSegmentMatrix - for playing segments in world space in model space

Oh, yes - I am sort of assuming that you are using retained graphics. Otherwise
the DefaultView Matrix is only one a great interest.

p.s. An understanding of vector graphics doesn't go a miss either because the
manuals assume you understand matrix transformations and the link.

--
------------------------------------------
Richard Giles - VG Scientific (Fisons Plc)

CompuServ: 100065,132

 
 
 

Windows & Real World Coordinates

Post by Dominique Beaucha » Sun, 29 May 1994 00:41:48


Hi programmers!

If I make a program with, say the C/Set++, and I use dynamic link library, I can
reduce the size of the code.  But does the program use the system libraries or
libraries included with the set? If it is with libraries included with the set, I
cannot distribute them, so where is the power of this? I think I don't understand
something...

Could you give me some light please?!

Dominique Beauchamp

 
 
 

Windows & Real World Coordinates

Post by PeterKob » Wed, 01 Jun 1994 06:15:08



Quote:(Dominique Beauchamp) writes:
> If I make a program with, say the C/Set++, and I use dynamic link
library, I can
> reduce the size of the code.  But does the program use the system
libraries or
> libraries included with the set?

All normal programs use system libraries distributed with OS/2. In
addition, If you use a DLL version of the CSet library, you will need
to have a CSet DLL library file.

Quote:> If it is with libraries included with the set, I cannot distribute

them, so where is the power of this?

You can make your own C library DLL and distribute it with your
program. The big advantage comes if you have multiple EXEs or DLLs,
you only use one C library DLL, resulting in quite a bit of file and
memory savings; a single library DLL is also important for proper
handling of exceptions. If you're only writing to a single EXE with
no DLLs, there's not much of an advantage in using a DLL C library,
besides slightly smaller link times during development.

 
 
 

1. World Coordinates/GPI

Hi,

I have read in Gpi manuals that we can work in World coordinates of any
measure, such as feet, yards, meters, miles, etc.  I believe this, but
I can't see how to do it.  I only can find info on the settings
like PU_HIMETRIC, PU_HIENGLISH, etc. for GpiCreatePS.

How do I specify that I want my coordinates to be something like feet or
meters?

Thanks for any help or pointers.

--
Chris Lanciani
UF '91

2. Motorola Power 288

3. GCC & Real World Programming

4. PCMCIA Ethernet Cards.

5. DDE4MBM.LIB & Real World Programming

6. A2000, DCTV, PYTHON 2 GIG

7. Changing window's coordinate system

8. New tutorial .. who will proof or test it, please?

9. Remapping plot coordinates in a PM window

10. Converting dialogue co-ordinates between Windows and PM

11. Window coordinate hiccups..

12. Real-world benchmark of systems in action!