Preface

This book provides information about creating and animating GLG drawings, using the Glg Graphics Builder and editing Glg objects. It contains the following chapters:

GLG User's Manual and Builder Reference

Introduction to GLG
An overview of the GLG Toolkit and its components.

Structure of a GLG Drawing
A description of the internal structure of a GLG drawing. The material in this and the next chapter are important for anybody who wants to edit or create a GLG drawing.

GLG Objects
A description of each of the objects that make up a GLG drawing.

Integrated Features of the GLG Drawing
A description of the integrated features of the GLG drawing such as zooming and panning, object tooltips, custom events and others.

Input Objects
A description of the interaction handlers and input objects.

Using the GLG Graphics Builder
An introduction to the use of the GLG Graphics Builder. This program is used to create, edit, and test GLG drawings.

GLG Graphics Builder Menus
A reference for the GLG Graphics Builder menus and dialogs.

Index

This guide assumes that you are conversant with the basic concepts of computer graphics programming. For a comprehensive discussion of three dimensional computer graphics, we recommend Computer Graphics: Principles and Practice , Foley, Van Dam, Feiner, and Hughes. Second edition, 1990; Addison-Wesley, Reading MA.

Please note that although the illustrations in this document represent the UNIX version of the GLG Graphics Builder, the information it contains is equally relevant to Microsoft Windows users. The two versions present the same functionality in equivalent user interfaces, with minimal, cosmetic differences caused by the different platforms.

 

 

 

GLG User's Manual and Builder Reference

 

Chapter 1 Introduction to GLG 15

Overview 15

The GLG Graphics Builder 16

OpenGL or Native Windowing System Renderer 16

The Application Program Interface 18

Displaying a Drawing 18

Animating a Drawing 18

Creating a Drawing 19

The GLG Graph and Control Widget Library 19

Programming Tools 19

Chapter 2 Structure of a GLG Drawing 21

Objects 21

Resources and Objects 22

The Attribute Object 22

Resources and Attributes 23

Supplying Data for Animation 24

Hierarchy of Objects 24

Hierarchy of Resources 24

Tags for Database Connectivity 27

Constraints 28

Graphical Objects 29

Attributes 29

Control points 30

Transformations 30

Transformations as Objects 31

Static Transformations 33

Transforming Object Points 34

Dynamic Transformations 34

The View 35

Coordinate Systems 35

Lighting 38

Input Handlers 38

Integrated Features of the GLG Drawing 39

Integrated Zooming and Panning 40

Integrated Tooltips 40

MouseOver Highlight 40

MouseClick Feedback and Toggle 40

Custom Selection Events 41

Object Selection Events 41

Input Object Events 41

Chapter 3 GLG Objects 43

Common Attributes 45

Simple Graphical Objects 47

Polygon 47

Parallelogram 49

Arc 49

Spline 50

Text 50

Marker 53

Image 54

GIS Object 55

Viewport 58

Screen 63

Advanced Graphical Objects 67

Group 67

Series 68

Square Series 70

Reference 70

Polyline 75

Polysurface 76

Connector 77

Frame 78

Non-Graphical Objects 78

Data 79

Attribute 80

Tag 81

History 81

Alias 83

Rendering 83

BoxAttributes 85

Colortable 86

Font Table 88

Font 89

Light Object 90

Transformation Object 91

Geometrical Transformations 91

Scalar Transformations 96

String Transformations 99

Common Attribute Transformations 100

Chapter 4 Integrated Features of the GLG Drawing 103

Integrated Zooming and Panning 103

Integrated GIS Object, GIS Rendering and GIS Editing Mode 104

Integrated Tooltips 104

MouseOver Highlight 105

MouseClick Feedback and Toggle 106

Custom Selection Events 107

Internationalization and Localization Support 108

I18N Support 108

Localization Support 108

Data Connectivity Features 110

Resource-Based Data Access 110

Tag-Based Data Access and Database Connectivity 110

Tag Export and Import Features for Run-Time Tag Mapping 112

Custom Properties 113

Chapter 5 Input Objects 115

Input Handlers 115

Installing an Input Handler 117

Common Input Handler Resources 118

GlgSlider 118

GlgNSlider 121

GlgKnob 122

GlgButton 124

GlgNButton 125

GlgText 126

GlgNText 126

GlgSpinner 127

GlgNList 128

GlgNOption 130

GlgMenu 131

GlgBrowser and GlgFontBrowser 133

GlgPalette 134

GlgClock 134

GlgTimer 135

Native Widgets 136

Chapter 6 Using the GLG Graphics Builder 139

Creating a Drawing 139

Viewing a GLG Drawing 139

Viewing the Object Hierarchy 140

Starting and Stopping the Builder 140

GLG Graphics Builder Features 141

Stopping the GLG Graphics Builder 142

Creating a Viewport 142

Saving a Drawing 142

Drawing an Object 143

Selecting an Object 144

Editing Objects 146

Editing Attributes 147

Editing Control Points 150

Object Layout and Alignment 151

Creating Constraints 152

Constraining Similar Attributes 153

Constraining Different Attributes 154

Constraining Control Points 155

Defining Transformations 155

Transforming an Object 155

Transforming an Attribute 157

Editing Transformations 158

Deleting Transformations 158

Traversing Transformed Objects (advanced) 159

Using View and Screen Transformations of the Viewport (advanced) 159

Using Resources 160

Guidelines for Naming Resources 161

Adding and Deleting Resources 162

Using Tags 164

Adding and Deleting Tags 166

Animating a Drawing 167

Reusing Objects, Attributes, and Transformations 168

Reusing an Object 168

Marking and Replicating Transformations and Other Objects 170

Controlling the View 174

Changing the View Projection 175

Customizing the View Projection 175

Viewing Using Different Coordinate Systems 175

Changing the Viewing Area 175

Using Advanced Objects 176

Associating Objects Together 177

Generating Objects from a Template 178

Creating Animated Lines and Surfaces 181

Attaching Objects to a Frame 181

Connecting Objects with a Path 182

Defining Extended Set of Rendering and Text Box Attributes 182

Scrolling Attributes of Objects with Index-based Names 183

Rendering GIS Map Data 184

Adding Custom Properties to Objects 184

Defining Logical Names using Aliases 185

Drawing a Simple Example 185

Attribute Animation 186

Geometrical Transformation Animation 187

Creating Copies and Animating Them 188

Constraining Attributes 189

Builder Setup and Customization 190

Environment Variables 190

Builder Configuration File 191

Chapter 7 GLG Graphics Builder Menus 193

File 193

New 193

Reset Drawing 195

Open 195

Open URL 195

Recent Drawings 195

Save 196

SaveAs 196

Load Object 196

Recent Objects 197

Save Object 197

Print 197

Export PostScript 197

Print Configuration 197

Save Image 198

Save Image Full 198

Save Direct OpenGL Image 199

Export Strings 199

Import Strings 199

Export Tags 199

Import Tags 199

Exit 199

Palettes 199

Custom Objects 200

Read Palette 200

Read Directory 200

Naming Conventions for Palette Drawings 201

Palette Description File Format 201

Adding Custom Palettes to the Builder 202

Edit 203

Undo 203

Undo History 203

Select Multiple Objects 203

Select Rectangular Area 203

Select All 203

Cut 204

Copy 204

Paste 204

Delete 204

Define Clone Offset 204

Define Clone Transformation 205

Full Clone 205

Weak Clone 205

Strong Clone 206

Constrained Clone 206

Add Marked Object 206

View 207

Set View 207

Adjust View 207

Load View Transformation 208

Save View Transformation 208

Coordinate System 208

Zooming 209

Pan To 210

Scroll by Dragging 210

Traverse 210

Hierarchy Down 210

Transformation Down 210

Up 211

Set Focus 211

Main Focus 211

Select Next 211

Select Bottom 212

Edit All (First) 212

Edit All (Select) 213

Replace Parent's Template 213

Reset Scaling Xform 214

Arrange 214

Create Permanent Group 214

Create Temporary Group 214

Select Multiple Objects 214

Add Object to Group 214

Delete Object from Group 215

Add or Delete Object from Group 215

Select Next 216

Select Bottom 216

Edit All (First) 216

EditAll (Select) 216

Permanent Group 216

Explode 216

Reorder 217

Inverse Polygon Points 218

Add Polygon Points 218

Set as Parent Viewport's GIS Object 219

Unset GIS Object 219

Layout 219

Layout Toolbox 219

Align 219

Make Same Size 220

Distribute 220

Space Evenly 220

Distribute Evenly 221

Select Anchor 221

Align Points 221

More 221

Object 221

Create 221

Edit Toolbox 232

Properties 232

Object Resources 234

All Resources 234

Tags 235

Add Dynamics 235

Edit Dynamics 236

Delete Dynamics 236

Transform Points 237

Add Static Transformation 237

Add Tooltip 238

Add MouseClick Event 238

Add MouseOver Event 239

Edit/Delete Tooltip Or Event 239

Custom Properties 239

Add Custom Property 239

Edit Custom Properties 240

Delete All Custom Properties 240

Mark Custom Properties 240

Add Marked Properties 241

Aliases 241

Add Alias 241

Edit Aliases 241

Delete All Aliases 241

Mark Aliases 241

Add Marked Aliases 241

History 242

Add History 242

Edit History 242

Delete All Histories 243

Run 243

Start 243

Stop 243

Restore Values on Stop 244

Store Run Command 244

Options 244

Draw Grid 244

Snap To 244

Save Format 245

Save Compressed 245

Show Axis 245

Selection Display 245

Attribute Clone Type 246

Paste Clone Type 246

Reference Resizing 246

Control Points Display 246

Detach Palettes 247

Scrollbars 247

Toolbar 247

Show Frame Points 247

Toolbar Print PostScript 247

Modal Dialogs 247

Display OpenGL Info 248

Save Layout 248

Introduction to GLG

Structure of a GLG Drawing

GLG Objects

Integrated Features of the GLG Drawing

Input Objects

Using the GLG Graphics Builder

GLG Graphics Builder Menus

Index