SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

GEDIT - A 3-D object editor

Copyright(c) 1993-1998, Riley Rainey, rainey@netcom.com

Permission to use, copy, modify and distribute (without charge) this software, documentation, images, etc. is granted, provided that this comment and the author's name is retained.

This software is provided by the author as is, and without any expressed or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. In no event shall the author be liable for any direct, indirect, incidental, or consequential damages arising in any way out of the use of this software.

WHAT IS GEDIT?

Well, this can be considered "work in progress", but it works. GEDIT can be used to build displayable objects for ACM. It requires Motif 1.1 or later.

Generating three dimensional objects on a two dimensional screen is a bit of a challenge. GEDIT solves the problem by displaying two views of the same object simultaneously.

The main GEDIT window displays a top and side view of an area used to build an object out of planar polygons. As an experiment, press the Polygon button on the left-hand side of the display. You must then define the three points that will determine the polygon's plane.

You do that by clicking the mouse in one of the two view windows -- hold mouse button one down and move the mouse. See how the point in the opposite window moves up and down when you move the mouse up and down?

What you're doing is defining a point in 3-space -- the first two coordinates are determined from where you clicked the mouse in the first window. The remaining coordinate is determined by the location of the point in the other window when you're finished dragging and you release the mouse button. Do that three times and you've defined three points that define a plane -- more mouse clicks immediately define a point on the polygon since the polygon's plane has already been determined by the location of the first three points.

How is that useful? Picture this: take your favorite airplane book that contains three-views (top, left, front view) of a given aircraft. Now take the book over to a copier and copy those diagrams onto an overhead slide (the clear paper ;-)). Now cut out each view. You can then fire up GEDIT on your workstation, and tape the side view in the top window and the top view over the bottom one (I usually have enough static electricity around to hold it up without any tape) (make sure the two diagrams line up correctly). Now start defining wings, tails, etc ... cute, no? You can then change views (see the Layout menu) and do a similar thing with the front view.

In the SaveAs dialog, you can output a file in V format. If you want the object to be revisable, save a copy under another filename in GEDIT (GDF) format.

-- RBR

BUILDING GEDIT

GEDIT uses the ACM V graphics library. You must have the ACM sources available in order to build GEDIT. You will need to edit GEDIT's Makefile to set the "ACM" variable to point to the top-level ACM source directory (i.e. the directory that contains ACM's README file).

The GEDIT File Format

Unfortunately, I was in a rush when I defined this graphics file format. It stores information in your platform's binary form (with its definition of structure alignment and floating point values) -- this is likely to be incompatible with the binary format of someone else's machine. So, until someone defines a "PGDF" (portable GDF) file format and a converter between "PGDF" and GDF, you are limited in the sharing that you'll be able to do with raw GDF files.

A gdf directory that includes several files that I created (on a Sun-4) have been provided for you to examine.

OTHER NOTES

This software is designed to run on paletted visuals. It will run, but produce undesireable results in DirectColor visual.


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.