Click or drag to resize

Document Class

The Document class is the root for the currently loaded document.
Inheritance Hierarchy
SystemObject
  Demo3D.VisualsDocument

Namespace:  Demo3D.Visuals
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 10.0.0.6737
Syntax
C#
public class Document : IDisposable

The Document type exposes the following members.

Properties
  NameDescription
Public propertyApp
The application hosting the document.
Public propertyCameras
The collection of views in the model. This is a mapping of string names to Camera objects.
Public propertyConnections
Tag Server connections (if available).
Public propertyDefaultCamera
The name of the default View when loading or saving (looked up in Cameras).
Public propertyDocumentEdition
The edition that the document was last saved in.
Public propertyEventLogPath
Log events to this file, if null don't log events.
Public propertyEventQueue
The simulation dispatcher for scheduling asynchronous or future actions.
Public propertyExperiments
The collection of experiments in Sim3D that can be run in batch.
Public propertyIsExperimentRunning
Is an experiment currently running?
Public propertyIsResetting
Is the document currently being reset.
Public propertyLights
Find all the LightVisual visuals in the Scene.
Public propertyLoadedHeader
This will only be set for documents that have been loaded from disk
Public propertyName
The file name of the document without the extension.
Public propertyNeedsSave
Whether the current document has been modified and needs saving.
Public propertyScene
The top level SceneVisual.
Public propertyTime
The current simulation time.
Public propertyUserVars
Temporary place for scripting to place variables, that will survive across resets. These values are *not* to be serialized.
Public propertyVisual
Top-level visual for the document
Public propertyVisuals
Use an enumerator to walk the scene tree as keeping a List<Visual> or ArrayList has poor removal performance for large models
Top
Methods
  NameDescription
Public methodCreateVisual(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.
Public methodCreateVisual(XmlDocument)
Create a single visual from an XmlDocument.
Public methodCreateVisual(VisualFactory)
Create a visual given a visual factory. This is mostly used to create specific visuals from catalogs.
Public methodCreateVisualT
Create a new visual of a given type such as BoxVisual.
Public methodCreateVisualFromSerialized
Create a single visual from a serialized version of the visual.
Public methodCreateVisuals
Create all visuals from an XML Document.
Public methodDestroyVisual
Delete this visual and remove it from the document.
Public methodError
Log an error message.
Public methodFindAnyVisual
Find Visual by name, return one of them if there are multiple visuals, but do not warn if there are more than one.
Public methodFindLayer
Find a layer by name.
Public methodFindType(Type)
Enumerate all visuals of a specified type.
Public methodFindType(Type, Boolean)
Enumerate all visuals of a specified type.
Public methodFindTypeT
Enumerate all visuals of a specified type.
Public methodFindUserResource(String)
Gets the UserResource instance with the specified path within this document's user resources.
Public methodFindUserResource(UserResourceReference)
Gets the UserResource instance with the specified UserResourceReference within this document's user resources.
Public methodFindVisualByName
Find the first visual in the document scene with a given name.
Public methodFindVisualsByName
Find all the visuals in the document scene with a given name.
Public methodGetLayer
Find or create a layer by name.
Public methodInfo
Log an info message.
Public methodLogEvent
Output event diagnostics to the current EventLogPath if not null.
Public methodLook(Vector3, Vector3)
Find the first visual from a location and in a direction.
Public methodLook(Vector3, Vector3, DocumentLookOptions)
Find the first visual from a location and in a direction with given DocumentLookOptions.
Public methodLook(Vector3, Vector3, Int32)
Find the first visual from a location and in a direction with given DocumentLookOptions.
Public methodLookDown(Vector3)
Find the first visual below the lookFrom world location.
Public methodLookDown(Visual)
Find the first visual below the lookFrom visual.
Public methodLookDown(Vector3, DocumentLookOptions)
Find the first visual below the lookFrom world location with the given DocumentLookOptions.
Public methodLookDown(Vector3, Int32)
Find the first visual below the lookFrom world location with the given DocumentLookOptions.
Public methodLookDown(Visual, DocumentLookOptions)
Find the first visual below the lookFrom visual with the given DocumentLookOptions.
Public methodLookDown(Visual, Int32)
Find the first visual below the lookFrom visual with the given DocumentLookOptions.
Public methodPurgeLayers
Remove all unused layers from the document.
Public methodPurgeScripts
Remove all unused scripts from the document.
Public methodSave
Save the current document to disk with a thumbnail based on the Default view.
Public methodSave(Image)
Save the current document to disk with a custom thumbnail.
Public methodStart
Schedule a coroutine to be called in the current time-step.
Public methodWarning
Log a warning message.
Top
Events
  NameDescription
Public eventResetListeners
Occurs when the document is reset.
Top
Fields
  NameDescription
Public fieldStatic memberFileExtension
The file extension to be used for documents including the '.'/period.
Public fieldStatic memberFileExtensionXml
The file extension to be used for documents in source control format including the '.'/period.
Public fieldPath
Filename for this document, empty for a new or unsaved document.
Top
See Also