Document Class |
Namespace: Demo3D.Visuals
public class Document : IDisposable
The Document type exposes the following members.
| Name | Description | |
|---|---|---|
| App | The application hosting the document. | |
| Cameras |
The collection of views in the model.
This is a mapping of string names to Camera objects.
| |
| Connections |
Tag Server connections (if available).
| |
| DefaultCamera |
The name of the default View when loading or saving (looked up in Cameras).
| |
| DocumentEdition |
The edition that the document was last saved in.
| |
| EventLogPath |
Log events to this file, if null don't log events.
| |
| EventQueue |
The simulation dispatcher for scheduling asynchronous or future actions.
| |
| Experiments |
The collection of experiments in Sim3D that can be run in batch.
| |
| IsExperimentRunning |
Is an experiment currently running?
| |
| IsResetting |
Is the document currently being reset.
| |
| Lights |
Find all the LightVisual visuals in the Scene.
| |
| LoadedHeader | This will only be set for documents that have been loaded from disk | |
| Name |
The file name of the document without the extension.
| |
| NeedsSave |
Whether the current document has been modified and needs saving.
| |
| Scene |
The top level SceneVisual.
| |
| Time |
The current simulation time.
| |
| UserVars |
Temporary place for scripting to place variables, that will survive across resets. These values
are *not* to be serialized.
| |
| Visual |
Top-level visual for the document
| |
| Visuals |
Use an enumerator to walk the scene tree as keeping a List<Visual>
or ArrayList has poor removal performance for large models
|
| Name | Description | |
|---|---|---|
| CreateVisual(String) |
Create a visual given a visual factory name.
This can be a type such as "BoxVisual" or a name of a catalog component loaded into the current application.
| |
| CreateVisual(XmlDocument) |
Create a single visual from an XmlDocument.
| |
| CreateVisual(VisualFactory) |
Create a visual given a visual factory.
This is mostly used to create specific visuals from catalogs.
| |
| CreateVisualT |
Create a new visual of a given type such as BoxVisual.
| |
| CreateVisualFromSerialized |
Create a single visual from a serialized version of the visual.
| |
| CreateVisuals |
Create all visuals from an XML Document.
| |
| DestroyVisual |
Delete this visual and remove it from the document.
| |
| Error |
Log an error message.
| |
| FindAnyVisual |
Find Visual by name, return one of them if there are multiple visuals,
but do not warn if there are more than one.
| |
| FindLayer |
Find a layer by name.
| |
| FindType(Type) |
Enumerate all visuals of a specified type.
| |
| FindType(Type, Boolean) |
Enumerate all visuals of a specified type.
| |
| FindTypeT |
Enumerate all visuals of a specified type.
| |
| FindUserResource(String) |
Gets the UserResource instance with the specified path within this document's user resources.
| |
| FindUserResource(UserResourceReference) |
Gets the UserResource instance with the specified UserResourceReference within this document's user resources.
| |
| FindVisualByName |
Find the first visual in the document scene with a given name.
| |
| FindVisualsByName |
Find all the visuals in the document scene with a given name.
| |
| GetLayer |
Find or create a layer by name.
| |
| Info |
Log an info message.
| |
| LogEvent |
Output event diagnostics to the current EventLogPath if not null.
| |
| Look(Vector3, Vector3) |
Find the first visual from a location and in a direction.
| |
| Look(Vector3, Vector3, DocumentLookOptions) |
Find the first visual from a location and in a direction with given DocumentLookOptions.
| |
| Look(Vector3, Vector3, Int32) |
Find the first visual from a location and in a direction with given DocumentLookOptions.
| |
| LookDown(Vector3) |
Find the first visual below the lookFrom world location.
| |
| LookDown(Visual) |
Find the first visual below the lookFrom visual.
| |
| LookDown(Vector3, DocumentLookOptions) |
Find the first visual below the lookFrom world location with the given DocumentLookOptions.
| |
| LookDown(Vector3, Int32) |
Find the first visual below the lookFrom world location with the given DocumentLookOptions.
| |
| LookDown(Visual, DocumentLookOptions) |
Find the first visual below the lookFrom visual with the given DocumentLookOptions.
| |
| LookDown(Visual, Int32) |
Find the first visual below the lookFrom visual with the given DocumentLookOptions.
| |
| PurgeLayers |
Remove all unused layers from the document.
| |
| PurgeScripts |
Remove all unused scripts from the document.
| |
| Save |
Save the current document to disk with a thumbnail based on the Default view.
| |
| Save(Image) |
Save the current document to disk with a custom thumbnail.
| |
| Start |
Schedule a coroutine to be called in the current time-step.
| |
| Warning |
Log a warning message.
|
| Name | Description | |
|---|---|---|
| ResetListeners |
Occurs when the document is reset.
|
| Name | Description | |
|---|---|---|
| FileExtension | The file extension to be used for documents including the '.'/period. | |
| FileExtensionXml | The file extension to be used for documents in source control format including the '.'/period. | |
| Path | Filename for this document, empty for a new or unsaved document. |