Skip to content
Robert Bragg edited this page Aug 24, 2013 · 7 revisions

The code for Rig is divided between the "Rig Utility Library" (Rut) and Rig proper

Although we don't have any plans to use Rut for anything other than Rig we feel that it is good practice to consider what code is conceptually re-usable (perhaps by multiple tools we could provide) vs code that is strictly only meaningful to Rig itself.

Rut

Core

  • rut.h: A top level header that's included by Rig code to access any of the Rut apis
  • rut-private.h: Rut APIs that aren't considered worth exposing to Rig but needed internally to Rut
  • rut-context.h: A top-level application context, required to use many of the Rut apis (The context is usually associated with a RutShell)
  • rut-global.h: A few global variables available for convenience (such as a global CoglContext). Actually most code avoids using these, and we might look to remove these at some point.
  • rut-types.h: Common primitive types widely used throughout Rut.

Types, Interfaces & Properties

  • rut-type.h: Instead of following an object oriented paradigm we use a very light weight interface based type system provided here.
  • rut-property.h
  • rut-property-types.h
  • rut-object.h

Core Types & Interfaces

  • rut-interfaces.h: A collection of important but small interfaces including:
  1. Refable: Adds ref-counting to an object
  2. Graphable: A simple way to manage objects into an acyclic graph
  3. Introspectable: An interface for introspecting the properties of an object
  4. SimpleIntrospectable: To simplify handling introspection objects implementing this interface can use a default implementation of the introspectable interface.
  5. Sizeable: Implemented by most widgets this provides a standard way of handling size negotiation including being able to querying the preferred width-for-height or preferred height-for-width of child widgets
  6. Pickable: A generalized way to enable objects in a graph to be input pickable using a triangle mesh.
  7. Inputable: A generalized way enable objects in a graph to capture input with a specified region
  • rut-paintable.h: A generalized way to give widgets a paint method. Note: This is only used for 2D widgets not for the UI rendering engine which is based around a Components & Entities system.
  • rut-inspector.h
  • rut-timeline.h:

Platform Integration

  • rut-keysyms.h
  • rut-sdl-keysyms.h
  • rut-shell.h

Utilities

  • color-table.h: A mapping from human readable colour names to RGB colours
  • rut-color.h: Apis for manipulating colours
  • rut-bitmask.h: An api for manipulating arbitrarily long bitfields - based on code from Cogl
  • rut-closure.h: A generalized way of letting code register callbacks, and invoking all those callbacks. Used in various places for signalling events within Rig rut-color-button.h:
  • rut-display-list.h
  • rut-flags.h
  • rut-geometry.h
  • rut-list.h
  • rut-memory-stack.h
  • rut-planes.h
  • rut-planes-private.h
  • rut-util.h
  • rut-volume.h
  • rut-volume-private.h

Widgets

See the Traditional UI Widgets page for a detailed write up of the widgets currently used to create the Rig editor.

Components & Entities

  • rut-entity.h
  • rut-camera-private.h:
  • rut-components.h

Effects

  • rut-downsampler.h: A utility for maintaining a texture that is downsampled from another texture
  • rut-dof-effect.h
  • rut-gaussian-blurrer.h

Assets

  • rply.h: We use the upstream Rply project to load ply models http://w3.impa.br/~diego/software/rply/
  • rut-asset.h: Examples of Assets are things like images or ply models (think of content created by designers) or also it could be logic scripts. RutAsset is an object and api for tracking such an item
  • rut-mesh.h
  • rut-mesh-ply.h

Editing

  • rut-tool.h
  • rut-arcball.h: Arcball is a standard 3D input technique devised by Ken Shoemake that we have implemented in Rig for scene navigation