Click or drag to resize

Visual Methods

The Visual type exposes the following members.

Methods
  NameDescription
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. <p> <strong>Note</strong>: For most uses, <code>AddCustomProperty(name,value,description)</code> or <code>AddSimpleProperty(name,value,description)</code> is more suitable, because there is no need to pass the type parameter; it is taken automatically from the value.
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.
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
Determine whether a given custom property name is defined.
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 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 methodFindCreateConnector
Find or create a connector of the supplied name.
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(Type)
Go back up through the parents of visuals to find a particular parent type.
Public methodFindParent(PredicateVisual)
Go back up through the parents of visuals to find a particular parent that matches the supplied predicate.
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 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 exampleHasCustomProperty
Determines whether a custom property has been defined or not.
Public methodIsAncestorOf
Is this Visual a parent, grandparent, great grandparent etc. of the potentialChild.
Public methodIsDeleted
Determine if the Visual been deleted.
Public methodMoveToInitialPosition
Move to the InitialPosition and InitialRotation.
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 methodRemoveAspectT
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 methodRotate(Axis, SpeedProfile)
Public methodRotate(Axis, Double)
Public methodRotate(Axis, Double, Double)
Public methodRotate(Visual, Axis, SpeedProfile)
Public methodRotate(Visual, Axis, SpeedProfile, RotationDirection)
Public methodRotateByImmediate
Public methodRotateToImmediate
Public methodRotateToLocalX
Public methodRotateToLocalY
Public methodRotateToLocalZ
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 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 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 methodTurnTo(Matrix)
Immediate Matrix TurnTo
Public methodTurnTo(Vector3)
Turn to a new yaw pitch roll instantly.
Public methodTurnTo(Matrix, SpeedProfile)
Public methodTurnTo(Matrix, Double)
Public methodTurnTo(Vector3, Double)
Turn to a new yaw pitch roll in a fixed time.
Public methodTurnTo(Axis, Double, SpeedProfile)
Public methodTurnTo(Axis, Double, Double)
Public methodTurnTo(Matrix, Double, Double)
Public methodTurnTo(Visual, Matrix, SpeedProfile)
Main Matrix TurnTo method
Public methodTurnTo(Visual, Matrix, Double)
Public methodTurnTo(Axis, Double, SpeedProfile, RotationDirection)
Public methodTurnTo(Axis, Double, Double, Double)
Public methodTurnTo(Matrix, Double, Double, Double)
Public methodTurnTo(Visual, Axis, Double, SpeedProfile)
Public methodTurnTo(Visual, Axis, Double, Double)
Public methodTurnTo(Visual, Matrix, Double, Double)
Public methodTurnTo(Axis, Double, Double, Double, Double)
Public methodTurnTo(Visual, Axis, Double, SpeedProfile, RotationDirection)
Public methodTurnTo(Visual, Axis, Double, Double, Double)
Public methodTurnTo(Visual, Matrix, Double, Double, Double)
Public methodTurnTo(Visual, Axis, Double, Double, Double, Double)
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
Extension Methods
  NameDescription
Public Extension MethodAddToComponent(String, IEnumerableVisual)Overloaded.
Add a list of visuals to a component (or create a component).
(Defined by VisualComponent.)
Public Extension MethodAddToComponent(String, Visual)Overloaded.
Add a list of visuals to a component (or create a component).
(Defined by VisualComponent.)
Public Extension MethodAddToComponent(Visual, String, Boolean)Overloaded.
Mark this visual as a member of the component. Component must be the root of an existing component, or null. If deep is set, then this visual and all its descendants will be added to the component. If deep is not set but this visual is already a member of a component, then it and all its child visuals within the current component, will be moved to the new component.
(Defined by VisualComponent.)
Public Extension MethodBelongsToComponent
Returns true if this visual belongs to a specific component.
(Defined by VisualComponent.)
Public Extension MethodCommonComponentTypes
Returns the component types common between this visual and a list of other visuals.
(Defined by VisualComponent.)
Public Extension MethodComponent(String)Overloaded.
Returns the component root for this visual.
(Defined by VisualComponent.)
Public Extension MethodComponent(VisualComponentSearchCriteria)Overloaded.
Returns the component root for this visual.
(Defined by VisualComponent.)
Public Extension MethodComponentChildren(String)Overloaded.
Returns all children of this component.
(Defined by VisualComponent.)
Public Extension MethodComponentChildren(VisualComponentSearchCriteria)Overloaded.
Returns all children of this component.
(Defined by VisualComponent.)
Public Extension MethodComponentDescendants(String)Overloaded.
Returns all descendants of this component.
(Defined by VisualComponent.)
Public Extension MethodComponentDescendants(VisualComponentSearchCriteria)Overloaded.
Returns all descendants of this component.
(Defined by VisualComponent.)
Public Extension MethodComponents
Returns all the components to which this visual belongs.
(Defined by VisualComponent.)
Public Extension MethodComponentTypes
Returns an ordered list of all the component types to which this visual belongs.
(Defined by VisualComponent.)
Public Extension MethodComponentVisuals(String)Overloaded.
Returns all the visuals belonging to this component.
(Defined by VisualComponent.)
Public Extension MethodComponentVisuals(VisualComponentComponentType)Overloaded.
Returns all the visuals belonging to this component.
(Defined by VisualComponent.)
Public Extension MethodComponentVisuals(VisualComponentSearchCriteria)Overloaded.
Returns all the visuals belonging to this component.
(Defined by VisualComponent.)
Public Extension MethodCreateComponent
Mark this visual as a component.
(Defined by VisualComponent.)
Public Extension MethodFindComponentType(String)Overloaded.
Returns a component type for this visual.
(Defined by VisualComponent.)
Public Extension MethodFindComponentType(VisualComponentSearchCriteria)Overloaded.
Returns a component type for this visual.
(Defined by VisualComponent.)
Public Extension MethodIsComponentRoot(String)Overloaded.
Returns true if this visual is the root of its component.
(Defined by VisualComponent.)
Public Extension MethodIsComponentRoot(VisualComponentSearchCriteria)Overloaded.
Returns true if this visual is the root of its component.
(Defined by VisualComponent.)
Public Extension MethodIsComponentType
Returns true if this visual is a component member of componentType.
(Defined by VisualComponent.)
Public Extension MethodRemoveFromComponent
Remove this visual from component.
(Defined by VisualComponent.)
Top
See Also