Click or drag to resize

Visual Methods

The Visual type exposes the following members.

Methods
  NameDescription
Public methodCode exampleAddAspect(Object)
Adds an aspect instance created outside the Visual.
Public methodAddAspect(Object, Boolean) Obsolete.
Public methodCode exampleAddAspectT(T)
Add an aspect instance.
Public methodAddAspectT(T, Boolean) Obsolete.
Public methodCode exampleAddCustomProperty(String, Object, String)
Add a custom property to the visual. If the custom property already exists, then this call will update its value and description.
Public methodCode exampleAddCustomProperty(String, Type, Object, String)
Add a custom property to the visual. If the custom property already exists, then this call will update its value, type and description.

Note: For most uses, AddCustomProperty(String, Object, String) or AddSimpleProperty(String, Object, String) is more suitable, because there is no need to pass the type parameter; it is taken automatically from the value. The only exception is if the value passed in is null, since we can't extract the type.

Public methodAddSimpleProperty(String, Object, String)
Add a custom property and also add a PropertyAlias for that new customer property making it appear as a Simple Property.
Public methodAddSimpleProperty(String, Type, Object, String)
Add a custom property and also add a PropertyAlias for that new customer property making it appear as a Simple Property.
Public methodAddTemporaryProperty(String, Object)
Create a temporary custom property that won't persistent on disk when saved. The property will also be hidden in the user interface.
Public methodAddTemporaryProperty(String, Object, String)
Create a temporary custom property that won't persistent on disk when saved. The property will also be hidden in the user interface.
Public methodAddTemporaryProperty(String, Type, Object)
Create a temporary custom property that won't persistent on disk when saved. The property will also be hidden in the user interface.
Public methodAddTemporaryProperty(String, Type, Object, String)
Create a temporary custom property that won't persistent on disk when saved. The property will also be hidden in the user interface.
Public methodCode exampleAlignToFloor
Align the mesh bounding box of the Visual to the default FloorVisual of the Scene.
Public methodCode exampleAlignToFloor(Visual)
Align the mesh bounding box of the Visual to the specified FloorVisual. Pass 'null' or the SceneVisual to align to the default FloorVisual of the Scene.
Public methodCancelAnimators
Cancel any animations that are currently in progress.
Public methodChildrenAsList
Return a List<Visual> representing all the children of this visual
Public methodCode exampleClone
Create a copy of a visual and its children placed in the top level scene.
Public methodConnectedVisual
Find the visual that is attached to the supplied connectorName.
Public methodCode exampleConnectTo(String, Visual, String)
Connect the visual to another visual with the corresponding connector names. This connection replaces any existing connections on this or the other visual's connector.
Public methodCode exampleConnectTo(String, Visual, String, Boolean)
Connect the visual to another visual with the corresponding connector names. This connection replaces any existing connections on this or the other visual's connector, unless allowMultiple is true, in which case this connection is added to existing connections.
Public methodContains
Is the visual contained by the visual tree from this point down?
Public methodContainsChild
Is the child a direct child of the visual.
Public methodCustomPropertyDefined

DEPRECATED: USE HasCustomProperty(String) INSTEAD.

Determines whether a custom property has been defined or not.
Public methodDelete
Delete this visual. If it is in a Document, it is removed from the document as well.
Public methodCode exampleDisconnect
Disconnect any connections on the supplied connector name.
Public methodFadeToColorDeep
Animate the primary color of a visual and all its descendants in a given time.
Public methodFadeToTransparencyDeep
Animate the transparency of a visual and all its descendants in a given time.
Public methodFilteredChildren
Return the collection of child Visuals that match the given predicate.
Public methodFilteredDescendants
Return all visuals below this point in the Visual hierarchy that match the given predicate.
Public methodFindAncestorsAspectT
Find the first aspect of type T on one of the visuals ancestors (parent, grand-parent, etc.).
Public methodFindAncestorsAspectsT
Finds all aspects of type T on any of this visual's ancestors.
Public methodCode exampleFindAspectsT
Find all aspects that can be cast to the given type.
Public methodFindChild
Look through children and their children to find the first visual of a given name. Breadth first search.
Public methodFindConnector
Find a named connector on a conveyor object, e.g. "Start"
Public methodCode exampleFindCreateAspect(Type)
Finds an aspect if it exists or Adds a new one if it doesn't exist.
Public methodCode exampleFindCreateAspectT
Finds an aspect if it exists or adds a new one if it doesn't exist.
Public methodFindCreateConnector
Find or create a connector of the supplied name.
Public methodFindCreateManagedAspectT
Public methodFindCustomProperty
Find a custom property by name if it exists. Otherwise return null.
Public methodFindDotNetType
Public methodFindFirstOfType
Like FindType except it return the first instance of that type.
Public methodFindImmediateChild
Look through children to find a named visual.
Public methodFindImmediateChildren
Look through children to find all immediate children with a given name.
Public methodFindImmediateType(Type)
Find all the objects in the Children of type Type (immediate children only)
Public methodFindImmediateType(Type, IList)
Find all the objects in the Children of type Type (immediate children only)
Public methodFindParent(PredicateVisual)
Go back up through the parents of visuals to find a particular parent that matches the supplied predicate.
Public methodFindParent(Type)
Go back up through the parents of visuals to find a particular parent type.
Public methodFindType(Type)
Find all the objects in the Descendants of type Type (all descendants)
Public methodFindType(Type, IList)
Find all the objects in the Descendants of type Type (all descendants)
Public methodCode exampleFindVisualAndAncestorsAspectT
Find the first aspect of type T on this visual or one of its ancestors (parents, grand-parents, etc.).
Public methodCode exampleFindVisualAndAncestorsAspectsT
Finds all aspects of type T on this visual or its ancestors.
Public methodCode exampleFindVisualAndDescendantsAspectT
Find the first aspect of type T on this visual or one of its descendents (children recursively)
Public methodCode exampleFindVisualAndDescendantsAspectsT
Find all aspects of type T on this visual or one of its descendents (children recursively)
Public methodFindVisualType
Find all the visuals that have their Type field set to 'type'.
Public methodFreeze
Hold the load in one position by making it kinematic.
Public methodGetCustomProperty
Get the container class for a custom property, or null if it doesn't exist.
Public methodGetCustomPropertyValue(String)
Get the value of a custom property, or null if it doesn't exist.
Public methodGetCustomPropertyValueT(String, T)
Get the value of a custom property, or a defaultValue if it doesn't exist.
Public methodGoToInitialPosition
Set the Location and Rotation of the Visual to be the same as the InitialLocation and InitialRotation.
Public methodGoToInitialRotation
Set the Rotation of the Visual to be the same as the InitialRotation. The Location remains unchanged.
Public methodCode exampleHasAspectT
Returns whether an aspect of a given type can be found on the visual.
Public methodCode exampleHasCustomProperty
Determines whether a custom property has been defined or not.
Public methodInitializeDefault
Public methodIsAncestorOf
Is this Visual a parent, grandparent, great grandparent etc. of the potentialChild.
Public methodIsDeleted
Determine if the Visual been deleted.
Public methodMenuSetInitialPosition
Public methodCode exampleMoveTo(Matrix)
Move to a new matrix location instantly.
Public methodCode exampleMoveTo(Vector3)
Move to a new location instantly.
Public methodCode exampleMoveTo(Matrix, SpeedProfile)
Move to a new matrix location using a speed profile.
Public methodCode exampleMoveTo(Matrix, Double)
Move to a new matrix location at a given speed.
Public methodCode exampleMoveTo(Vector3, SpeedProfile)
Move to a new location given a speed profile.
Public methodCode exampleMoveTo(Vector3, Double)
Move to a new location given a speed.
Public methodCode exampleMoveTo(Matrix, Double, Double)
Move to a new matrix location at a given speed and acceleration.
Public methodCode exampleMoveTo(Vector3, Double, Double)
Move to a new location given a speed and acceleration.
Public methodCode exampleMoveTo(Visual, Matrix, SpeedProfile)
Move to a new matrix location relative to another visual.
Public methodCode exampleMoveTo(Visual, Matrix, Double)
Move to a new matrix location relative to another visual.
Public methodCode exampleMoveTo(Visual, Vector3, SpeedProfile)
Move to a new location relative to another visual.
Public methodCode exampleMoveTo(Visual, Vector3, Double)
Move to a new location relative to another visual.
Public methodCode exampleMoveTo(Matrix, Double, Double, Double)
Move to a new matrix location at a given speed, acceleration and deceleration.
Public methodCode exampleMoveTo(Vector3, Double, Double, Double)
Move to a new location given a speed, acceleration, and deceleration.
Public methodCode exampleMoveTo(Visual, Matrix, Double, Double)
Move to a new matrix location relative to another visual.
Public methodCode exampleMoveTo(Visual, Vector3, Double, Double)
Move to a new location relative to another visual.
Public methodCode exampleMoveTo(Visual, Matrix, Double, Double, Double)
Move to a new matrix location relative to another visual.
Public methodCode exampleMoveTo(Visual, Vector3, Double, Double, Double)
Move to a new location relative to another visual.
Public methodMoveToInitialPosition
Move to the InitialPosition and InitialRotation.
Protected methodNotifyMeshChanged
Public methodNotifyOnMouseUp
Public methodPopRoutingTarget
Pop a routing target from the current routing target stack, making the next target down the stack the new current routing target. Remove this visual from the previous target's custom property called "RoutingTargetAllocators".
Public methodPushRoutingTarget
Push a new routing target onto the stack of routing targets, making this the new current routing target. Add this visual to a custom property on the target called "RoutingTargetAllocators". This is normally called for loads.
Public methodRecalculateConnections
Attach or detach connectors and accessories to or from valid connections on this visual and all children.
Public methodCode exampleRemoveAspect(Object)
Removes an aspect instance.
Public methodCode exampleRemoveAspect(Type)
Removes an aspect of a given type.
Public methodRemoveAspect(Object, Boolean) Obsolete.
Public methodCode exampleRemoveAspectT
Removes an aspect.
Public methodRemoveAspectT(T)
Removes an aspect instance.
Public methodRemoveAspectT(T, Boolean) Obsolete.
Public methodRemoveConnector
Remove a connector with a certain name.
Public methodRemoveCustomProperty
Remove a custom property from the Visual.
Public methodReparent
Remove this visual from the current parent's list of children (if current parent is not null), and add it to the new parent's list of children (if new parent is not null). The visual's matrix is adjusted accordingly, such that its top-level world location and orientation is preserved.
Public methodCode exampleRotate(Axis, SpeedProfile)
Set the visual rotating.
Public methodCode exampleRotate(Axis, Double)
Set the visual rotating.
Public methodCode exampleRotate(Axis, Double, Double)
Set the visual rotating.
Public methodCode exampleRotate(Visual, Axis, SpeedProfile)
Set the visual rotating.
Public methodCode exampleRotate(Visual, Axis, SpeedProfile, RotationDirection)
Set the visual rotating.
Public methodRotateByImmediate
Public methodCode exampleRotateToImmediate
Rotate immediately around a given local axis to a given angle relative to the visual's initial position.
Public methodCode exampleRotateToLocalX
Rotate around the local X axis a given amount at a given speed.
Public methodCode exampleRotateToLocalY
Rotate around the local Y axis a given amount at a given speed.
Public methodCode exampleRotateToLocalZ
Rotate around the local Z axis a given amount at a given speed.
Public methodSetCustomPropertyValueT
Set the value of a custom property or do nothing if it doesn't exist.
Public methodSetInitialPosition
Set InitialLocation to be the current Location and InitialRotation to be the current Rotation.
Public methodSetIsStaticDeep
Set the IsStatic property for this Visual and all children recursively.
Public methodCode exampleSetNativeObject
Set the native C# scripting class instance for this visual
Public methodSetScriptNativeTypeName
Atomically set the Script and NativeTypeName together but only create the NativeObject once.
Public methodSimulateLoad
Indicates that this Visual should now be in control of simulating the supplied load.
Public methodSortChildrenAscendingT
Public methodSortChildrenAscendingDeepT
Public methodStick
Reparents this visual to a specified parents and disables physics. This is intended for use with loads, where parent is generally a vehicle or some visual that will be moving the load.
Public methodStickKinematic
Reparents this visual to a specified parents and sets visual to be kinematic This is intended for use with loads, where parent is generally a vehicle or some visual that will be moving the load.
Public methodToStream
Convert a visual to a stream containing XML. Use Document.CreateVisual to turn it back into a copy of the original visual.
Public methodToXml
Convert a visual to XML. Use Document.CreateVisual to turn it back into a copy of the original visual.
Public methodTransformFromWorld
Transform a world coordinate to a local coordinate
Public methodTransformFromWorldNormal
Transform a world normal to a local normal
Public methodTransformFromWorldRotationDegrees
Transform a world rotation (in degrees) to a local rotation (in degrees).
Public methodTransformFromWorldRotationRadians
Transform a world rotation (in radians) to a local rotation (in radians).
Public methodTransformToParent
Transform a local coordinate to coordinate local to parent.
Public methodTransformToParentNormal
Transform a local normal to normal local to parent
Public methodTransformToWorld
Transform a local coordinate to a world coordinate.
Public methodTransformToWorldNormal
Transform a local normal to a world normal.
Public methodTransformToWorldRotationDegrees
Transform a local rotation (in radians) to a world rotation (in radians).
Public methodTransformToWorldRotationRadians
Transform a local rotation (in radians) to a world rotation (in radians).
Public methodTranslateLocalX(Double)
Instantly move the visual along its local X axis by xOffset units
Public methodTranslateLocalX(Double, Double)
Move the visual along its local X axis by xOffset units, at the given speed.
Public methodTranslateLocalX(Double, Double, Double, Double)
Move the visual along its local X axis by xOffset units, at the given speed and acceleration
Public methodTranslateLocalY(Double)
Instantly move the visual along its local Y axis by yOffset units
Public methodTranslateLocalY(Double, Double)
Move the visual along its local Y axis by yOffset units, at the given speed.
Public methodTranslateLocalY(Double, Double, Double, Double)
Move the visual along its local Y axis by yOffset units, at the given speed and acceleration
Public methodTranslateLocalZ(Double)
Instantly move the visual along its local Z axis by zOffset units
Public methodTranslateLocalZ(Double, Double)
Move the visual along its local Z axis by zOffset units, at the given speed.
Public methodTranslateLocalZ(Double, Double, Double, Double)
Move the visual along its local Z axis by zOffset units, at the given speed and acceleration
Public methodTranslateX(Double)
Instantly move the visual along the model's X axis by xOffset units
Public methodTranslateX(Double, Double)
Move the visual along the model's X axis by xOffset units, at the given speed.
Public methodTranslateX(Double, Double, Double, Double)
Move the visual along the model's X axis by xOffset units, at the given speed and acceleration
Public methodTranslateY(Double)
Instantly move the visual along the model's Y axis by yOffset units
Public methodTranslateY(Double, Double)
Move the visual along the model's Y axis by yOffset units, at the given speed.
Public methodTranslateY(Double, Double, Double, Double)
Move the visual along the model's Y axis by yOffset units, at the given speed and acceleration.
Public methodTranslateZ(Double)
Instantly move the visual along the model's Z axis by zOffset units
Public methodTranslateZ(Double, Double)
Move the visual along the model's Z axis by zOffset units, at the given speed.
Public methodTranslateZ(Double, Double, Double, Double)
Move the visual along the model's Z axis by zOffset units, at the given speed and acceleration.
Public methodCode exampleTurnTo(Matrix)
Immediate Matrix TurnTo
Public methodCode exampleTurnTo(Vector3)
Turn to a new yaw pitch roll instantly.
Public methodCode exampleTurnTo(Matrix, SpeedProfile)
Main Matrix TurnTo method
Public methodCode exampleTurnTo(Matrix, Double)
Matrix TurnTo method
Public methodCode exampleTurnTo(Vector3, Double)
Turn to a new yaw pitch roll in a fixed time.
Public methodCode exampleTurnTo(Axis, Double, SpeedProfile)
Turns to a target rotation.
Public methodCode exampleTurnTo(Axis, Double, Double)
Turns to a target rotation.
Public methodCode exampleTurnTo(Matrix, Double, Double)
Matrix TurnTo method
Public methodCode exampleTurnTo(Visual, Matrix, SpeedProfile)
Main Matrix TurnTo method
Public methodCode exampleTurnTo(Visual, Matrix, Double)
Matrix TurnTo method
Public methodCode exampleTurnTo(Axis, Double, SpeedProfile, RotationDirection)
Turns to a target rotation.
Public methodCode exampleTurnTo(Axis, Double, Double, Double)
Turns to a target rotation.
Public methodCode exampleTurnTo(Matrix, Double, Double, Double)
Matrix TurnTo method
Public methodCode exampleTurnTo(Visual, Axis, Double, SpeedProfile)
Turns to a target rotation.
Public methodCode exampleTurnTo(Visual, Axis, Double, Double)
Turns to a target rotation.
Public methodCode exampleTurnTo(Visual, Matrix, Double, Double)
Matrix TurnTo method
Public methodCode exampleTurnTo(Axis, Double, Double, Double, Double)
Turns to a target rotation.
Public methodCode exampleTurnTo(Visual, Axis, Double, SpeedProfile, RotationDirection)
Turns to a target rotation.
Public methodCode exampleTurnTo(Visual, Axis, Double, Double, Double)
Turns to a target rotation.
Public methodCode exampleTurnTo(Visual, Matrix, Double, Double, Double)
Matrix TurnTo method
Public methodCode exampleTurnTo(Visual, Axis, Double, Double, Double, Double)
Turns to a target rotation.
Public methodUnfreeze
Release the load in one position by making it dynamic.
Public methodUnstick
Reparents this (stuck) visual to the scene and restores its physics state.
Public methodWaitForAnimator
Public methodWakeUpSurroundingVisuals
Wake up any surrounding loads that might have been disabled so they don't remain in midair.
Top
See Also