The examiner tool allows users to highlight an object. A copy of the object can then be brought to the location of the examiner or a node in the scene. The following command creates an Examiner object:
Command |
Description |
examiner.Examiner(reelTime=60 sizeOfCopy=0.5 autoScale=True stand=None highlightMode=highlighter.MODE_OUTLINE) |
reelTime: The length of time to bring in the copy sizeOfCopy: The size of the copy's bounding sphere in meters. AutoScale must be enabled. autoScale: Specifies whether or not the model will be scaled. stand: A node to which the copy is moved. When set to None, the copy is moved to the tool's location. highlightMode: Can be highlighter.MODE_ARROW, highlighter.MODE_OUTLINE, highlighter.MODE_BOX |
The following methods are available on the Examiner object:
Method |
Description |
<Examiner>.setStand(stand) |
stand: A node to move the copy to. |
<Examiner>.getStand() |
Returns the node set as the stand. |
<Examiner>.setHighlightMode(highlightMode) |
Sets the highlight mode. highlightMode: Can be highlighter.MODE_ARROW, highlighter.MODE_OUTLINE, highlighter.MODE_BOX |
<Examiner>.getHighlightMode() |
Returns the highlight mode. |
<Examiner>.setItems() |
Sets the objects that can examined. items: a list of Vizard nodes. |
<Examiner>.highlight() |
Draws a ray and highlights the intersecting object. An object must be highlighted before it is examined. |
<Examiner>.examine() |
Creates a copy of the highlighted object and reels it in for examination. |
<Examiner>.release() |
Deletes the object copy and clears the highlight on the original object. |
<Examiner>.remove() |
Removes the examiner tool. |
<Highlighter>.setUpdateFunction(updateFunction) |
Sets the update function that gets called every frame. The update function calls methods on the tool based on the state of input devices. |
The following event is triggered when the object highlighted by the examiner changes:
Event |
Description |
highlighter.HIGHLIGHT_EVENT |
This event is generated when the object highlighted by the examiner is updated. It provides a single event structure e with the following attributes: e.new: The object currently highlighted by the highlighter. Returns None if there is no object. e.old: The object that was previously highlighted by the highlighter. Returns None if there was no object. |