Contents - Index - Previous - Next
Behind a Scene
To work effectively with Shadow Analyzer, it is enough to understand clearly some simple basic notions and the relationships between them. Let us discuss the relationships between a scene, its document, and its views. An analogy between a scene record and a text record will help us.
Analogy between a scene and a text
Let us compare a scene that you create with Shadow Analyzer and a text, which you are writing with any word processor like "Notepad" or "Word". However, both a "scene" and a "text" are general notions that have many meanings, which we need to distinguish.
Working with a text displayed in a window of a word processor, we can consider it as a place where we can put characters, add words and write sentences. We can write a word as a sequence of individual characters using the alphabetical keys of the keyboard, or we can insert an entire word taking it from a dictionary.
Working with a scene displayed in one or multiple 3D view windows of Shadow Analyzer, we can consider it as a place where we can put some objects of the predefined types using the combo box NEW and the button "N" of the toolbar Factory. The Factory plays a role of a dictionary. After an object is created and added to the scene, we can edit its attributes: parameters, location, colors, etc. Unlike the case of a text, we combine a rather simple "object dictionary" (that declares only the types of objects) with the advanced parametric editing of objects' attributes to compose rather complex scenes.
Inner representation of a document, a scene, and scene objects
The greatest feature of a word processor is that it provides an illusion that we deal with a single entity like a sheet of paper. A sheet of paper with written words is all in one: a collection of words organized in sentences, a document, and a display. Actually, we deal simultaneously with different entities. Our actions are stored somewhere in the computer memory. We never see this inner representation of a text directly. We do not see it, but it exists and predefines all what we can do with a text. This inner representation of a text is something other than a file on a hard disc or an image of the text lines in the editor window. Files and views are other entities. However usually we use one word "text" to name all of them.
Shadow Analyzer works in the same way. It has a few kinds of inner representations: one for a document, another for a scene, and yet one for an object. A document (in its inner representation) is something like a manager that keeps and transforms the scene data. A scene (in its inner representation) does not contain objects themselves. It contains only a list of object addresses. The objects (in their inner representation) are pieces of the computer memory -- the records that hold the objects' parameters and attributes. All these entities exist dynamically in the computer memory.
The objects (as a set of the records) exist independently besides the scene. The scene is a list of object addresses but not a container of objects. However, for the simplicity, we are speaking about a scene that contains some objects.
When you create a blank scene, Shadow Analyzer creates a new inner representation for a document. One can say that the document "knows" about the scene objects but does not "contain" them. The scene is a list of the objects' addresses. Initially, this list is empty. When you select an object type in the combo box NEW and click on the button "N", Shadow Analyzer creates dynamically a place for the object record in the computer memory, fills the record by the default data according to the object type, and add the address of this record to the scene.
When you delete an object clicking on the button "D", Shadow Analyzer removes both the object record from the computer memory and its address from the inner representation of the scene.
After the consideration above, it is logically to put some question: What is a document in the sense of its inner representation? What a role does it play? Why we name it "document" while it (as well as the inner representation of a scene) does not contain any objects?
Really, the usual meaning of the word "document" does not corresponds precisely to what the inner representation of a document is and what it does. However, it is the most suitable word, because the inner representation of a document is responsible for the writing of the scene data into a file, as well as for the reading of that data from a file.
When you save a scene in a file, all the object records are stored in a file on the hard disc of your PC. When you open a file, the Shadow Analyzer dynamically reconstructs the corresponding scene, creating, filling, and connecting all the necessary structures in the computer memory.
In this sense, the usual meaning of the word "document" corresponds more precisely to its file form. As to the inner representation of the document, it means something that connects and organizes different parts of the information associated with a scene. Both the forms are equivalent but are structured differently, because a scene as a correspondent collection of its objects is differently represented inside a file and inside the memory structures created dynamically by Shadow Analyzer.
A copy of an object
When you copy an object, Shadow Analyzer creates a copy and keeps it in the unbound state until you past it in any scene. This copy is not linked to any scene until you click on the button "Paste Object(s)". When you click on the button "Paste Object(s)", the active scene accepts the address of the object record and adds it to the list of the objects' addresses.
Shadow Analyzer holds only one copy. Therefore, if you copied an object but did not link it to any scene, next time when you copy another object the old copy is automatically deleted as an obsolete unused one. The unlinked copy is also deleted automatically when you end your session with Shadow Analyzer.
Unlike the Clipboard of the Windows system, this mechanism does not keep the copy of an object (in a separate storage) after the copy is linked to a scene. Therefore, you cannot paste any copy twice.
Once again, the common metaphoric terminology is not precise enough. Actually, in the case of Clipboard, we duplicate an object to keep its copy in Clipboard, and then duplicate it again each time when we "paste" it somewhere. In the contrast, Shadow Analyzer duplicates an object only once and then links the created copy to a scene. In other words, there is nothing to paste second time, you need to create a new copy to be able to paste it.
The scene and its views
We have discussed the relationship between a scene and its document stored in a file. Now we come to a view. Which features of a 3D view are stored in a file?
In essence, Shadow Analyzer stores in a file only the scene data, but not the 3D view properties like the Date, Time, the position of the viewpoint, and the zoom ratio. However, it stores all the settings of the appearance filters. The information stored in a file contains the geographical latitude of the scene, the list of all objects, the description of objects' parameters, attributes, and coordinates, as well as the tree of the object families (the relationships between parent objects and their children).
Because the file does not contain some details of a 3D view, you always start from 12:00 of March 21, the default viewpoint and the zoom ratio, when you open the file.
For what purpose you can use multiple views of the same scene? Initially this option was designed to compare shadows in different moments of different days. However, this option has also a more general sense, because it is always useful to be able to observe 3D objects from several viewpoints simultaneously.
You can manage the Date/Time and the viewpoint of each 3D view independently. These data belong to the view. Each 3D view window keeps them individually. They exist dynamically until you close the 3D view window. Other 3D views do not know about them.
In the contrast, when you change the combination of filters in the toolbar Show, all the views change their appearance synchronously, because the filter settings belong to the entire scene, but not to a separate view.
The simplified terminology
In spite of all these inner details, we mostly use the simplified terminology, speaking about documents, scenes, and collections of objects as if all these different entities are the same like a sheet of paper with a picture drawn on it.