ThreeSpace
DESIGN DOCUMENT
Adam Chodorowski & John Nilsson
June 28, 2001
The purpose of this software design specification is to provide an
design view of ThreeSpace. It shall provide sufficient information
on structural organisation and component composition. It shall not
specify implementation-specific information.
This document is based on the standard IEEE 1016-1998.
ThreeSpace is a 3D drawing program. Its design is driven to allow
easy scaling by allowing external plugins access its 3D scene and
objects through well-defined interfaces.
- Object - An object is a collection of polygons that is handled
as a single entity. An object has a shape in 3D.
- Shape - The shape of an object is the way an object looks.
The shape of an object is specified by its polygons and their orientation.
- Scene - The scene is the 3D space in which all objects are created.
It encompasses all currently visible and not visible objects that have been added
to the 3D space by the user.
Please see the Requirements Document for the full list of definitions.
- IEEE Std 1016-1998 ``IEEE Recomended Practice for Software Design Descriptions.''
- Java 2 SDK API Documentation, Sun Microsystems
http://java.sun.com/j2se/1.3/docs/api/
- Java3D API Documentation, Sun Microsystems
http://java.sun.com/products/java-media/3D/releases.html
- Java3D API Tutorial, Sun Microsystems
http://java.sun.com/products/java-media/3D/collateral/
- ''Debugging Java'', Will David Mitchell
The Scene component handles:
- The adding, deleting, selecting, hiding, showing of objects visible in the Scene.
- The properties of the 3D-view, its background color and the visibility of its axis.
- The rendering mode (ie. Shaded, Shaded withoug Gouraud shading, Wireframe, Dotted)
- The receiving of Mouse & Keyboard events and passing it along to registered listeners.
The Scene component depends on the Shape component.
The Shape component handles:
- Positioning, rotation, color and modification of visual properties.
- The filter lists for Colorfilters, Structurefilters, Rotationfilters and Positionfilters.
It does not change the structure of the scene object but does provide a reference to the Geometry.
The Shape component depends on the Geometry component.
A component which handles the structural composition of the geometry of an object. It
handles the vertices that make up the scene object and their attributes, ie. color and
position. It calculates the normals for the polygons, which is used for shading, and
provides the Java3D Geometry object which is later inserted to the Java3D components.
Generally it handles:
- The getting and setting of Vertex data
- The getting and setting of Vertex attributes
The component does not depend on any other component.
A component which adds the Java3D view component received from the Scene component.
A component which handles the layout of the Property Panel in Camera state and
Object state. The Camera state provide controls for changing:
- Camera rotation, position
- Adding, removing and selecting Camera bookmarks
The Object state provide controls for changing:
- Object name, position, rotation and color
- Filter lists for color, structure, rotation and position
A component which provide buttons for the most important actions in the program.
There exist buttons for the following actions:
- New scene
- Load scene
- Save scene
- Save scene as
- Switch to Camera State
- Switch to Object State
- Switch to rendering mode 1, Gouraud Shading
- Switch to rendering mode 2, Flat Shading
- Switch to rendering mode 3, Wireframe mode
- Switch to rendering mode 4, Point mode
A component which provides a menu for:
- Loading, Saving, and Exporting the current View
- Creating, Loading, Saving, Hiding and Showing objects
- Adding filters of Color,Structure,Position and Rotation type
- Setting background color and adding/removing the axis
A component which handles the loading and creation of Plugin-objects. It provides
lists which the application can use to populate the menu and some parts of the
Property Panel. The PluginManager loads classes from directories and
recognises their implemented interfaces.
A component with a clear interface so that third-party developers can create plugins. The
component shall provide dialogs for user interaction and should modify objects and object
geometry according to user selection. A plugin can also create an entirely new object based
on dialog-interaction from the user.
The Plugin interface provides:
- Getting the name of the plugin
- Getting the version of the plugin
- Getting a brief description of the plugin
The ShapeCreator provides an interface to:
- Get a panel in which the user can enter properties for the ShapeCreator.
- A method which creates an actual shape which later becomes the SceneObject.
- A method which returns the preferred name of the object created.
The Filter provides an interface to:
- Get a panel with filter properties.
- Apply the filter to a specified shape.
The SceneLoader provides an interface to:
- Loading the entire scene from a given filename with a specific protocol.
The SceneSaver provides an interface to:
- Saving the entire scene to a given filename with a specific protocol.
The ObjectLoader provides an interface to:
- Loading Shapes from a given filename with a specific protocol.
The ObjectSaver provides an interface to:
- Saving Shapes to a given filename with a specific protocol.
The ViewExporter provides an interface to:
- Exporting the current view to a given filename with a specific protocol
This is a general overview of the actions available to the user.
Adam Chodorowski
2001-06-28