ILNumerics Ultimate VS

Tripod Class

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
The tripod class adds support for rotation displays to arbitrary scenes.

[ILNumerics Visualization Engine]

Inheritance Hierarchy

SystemObject
  ILNumerics.DrawingNode
    ILNumerics.DrawingGroup
      ILNumerics.DrawingCamera
        ILNumerics.DrawingTripod

Namespace:  ILNumerics.Drawing
Assembly:  ILNumerics.Drawing (in ILNumerics.Drawing.dll) Version: ILNumerics Ultimate VS 4
Syntax

public class Tripod : Camera

The Tripod type exposes the following members.

Constructors

  NameDescription
Protected methodTripod(Tripod)
Initializes a new instance of the Tripod class
Public methodTripod(Object, TripodStyle, CameraQuadrant, Single)
Create a new tripod to be added to a camera

[ILNumerics Visualization Engine]

Top
Properties

  NameDescription
Public propertyAllowPan
Enable or disable the ability to move the camera content with right mouse dragging. Default: true (enabled)

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyAllowRotation
Enable or disable the ability to rotate the camera content. Default: true (enabled)

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyAllowZoom
Enable or disable the ability to zoom the camera content. Default: true (enabled)

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyAlpha
Alpha value, range [0...1], if set, this value modifies the alpha values for ALL nodes of this subtree. Use for blend effects only!

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public propertyAnimations (Inherited from Group.)
Public propertyAspectRatioMode
Determines, if objects keep their shape, regardless from the windows aspect ratio or rotation context. Default: maintain ratios.

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyChildren
Collection of child for this group

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public propertyClipping
Gets all 6 available clipping planes for the group or sets it. Null: derive clipping from parent node (default)

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public propertyColorOverride
If set, this color will override all individual colors in this subtree

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public propertyFieldOfView
Determines the field of view for perspective projection. Small: more fish eye effect, large: more overview. Default: 10

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyID
Unique ID for the node within the scene

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public propertyIs2DView
True, when looking from top on the un-rotated scene (common for 2D plots)

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyIsGlobal
Determine if this camera is acting on the global scene. Changes made to one driver will affect all instances of the same camera/scene for all drivers.

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Protected propertyIsSynchedNode (Inherited from Node.)
Public propertyLookAt
Point, the camera is aiming at (world coords)

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyMarkable
Determines, if this node can be marked by the user

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public propertyMarked
Marked state for the node

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public propertyParent
Get the parent of this node or null, if this node is a root node

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public propertyPickingID
If set to a valid shape ID, that shape will be marked in picking operations insted of this shape.

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public propertyPolar
Spherical coordinates relative to the look at point

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyPosition
Get/set camera position, absolute cartesian coordinates

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyPositionTransform
Get position transform matrix (readonly)

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyProjection
Get the type of projection (orthographic/ perspective) or sets it

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyProjectionTransform
Get projection transform matrix (readonly)

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyRotationCenter
The 3D coordinate of the current center for (interactive) rotation operations.

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyScreenRect
Screen rectangle identifying the area this object is using inside its container (0..1/0..1, get/set)

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Protected propertySynchedVersion
The version of the sync source from the last synchronization.

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public propertyTag
Object tag used to identify the node within the scene

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public propertyTarget
If set, determines the target for rendering: world (3D) or screen (2D) on top. Default: not set (derive from parent)

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public propertyTimeoutAware
Sets if this group and all children are sensible for timeouts during rendering or gets that flag. Default: null -> derive from parent

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public propertyTop
Orientation of the camera, normalized, readonly

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyTransform
[4x4] matrix with the affine transforms which this node applies to all children

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public propertyVersion
Modification version of this node, gets incremented at every change

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public propertyViewTransform
Gets the view transformation matrix mapping the rendering area for this camera (ScreenRect) to clip coordinates (readonly).

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyVisible
Determines, if this node is visible or sets the visible state

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public propertyXArrow
Gets the group implementing the content which is specific for the X axis

[ILNumerics Visualization Engine]

Public propertyYArrow
Gets the group implementing the content which is specific for the Y axis

[ILNumerics Visualization Engine]

Public propertyZArrow
Gets the group implementing the content which is specific for the Z axis

[ILNumerics Visualization Engine]

Public propertyZFar
Far clipping limit (Z axis)

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyZNear
Near clipping limit (Z axis)

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public propertyZoomFactor
Gets the zoom factor for this camera or sets it

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Top
Methods

  NameDescription
Public methodAdd(Node)
Add a node to the end of this groups child collection

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodAddT(T, Object, Boolean)
Add a node to the end of this groups child collection

[ILNumerics Visualization Engine]

(Inherited from Group.)
Protected methodBeginVisit (Overrides CameraBeginVisit(RenderParameter).)
Public methodConfigure
Configure the subtree after changes to any buffer

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodCopy
Create a shallow copy of this object

[ILNumerics Visualization Engine]

(Overrides CameraCopy.)
Public methodCopyFrom (Inherited from Camera.)
Protected methodCreateSynchedCopy (Overrides CameraCreateSynchedCopy(Node).)
Public methodDetach
Detach all shapes from this subtree for individual configurations

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodDispose
Dispose the complete subtree (this is rarely needed)

[ILNumerics Visualization Engine]

(Inherited from Group.)
Protected methodEndVisit
In a derived class allows to implement custom logic for reacting on the end of visiting this node.

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public methodFind(Object, NullablePrimitives)
Searches the subtree for nodes with matching tag and (optional) primitive type

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodFindT(Object, PredicateT)
Searches the subtree for all nodes with matching criteria

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodFindByIdT
Finds a typed node in this subtree, filter by ID

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodFirstT
Gets first node with matching criteria from subtree

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodFirstUpT
Finds a group node on the path up to root

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodGetEnumerator (Inherited from Group.)
Public methodGetLimits
Compute the 3D limits (extent) of this subtree

[ILNumerics Visualization Engine]

(Inherited from Group.)
Protected methodgetLimitsInternal (Inherited from Group.)
Public methodInsertT
Insert a node into the child collection at predefined index

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodMove
Move the camera position according to a distance given in clip coordinates

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Protected methodOnDisposing (Inherited from Node.)
Protected methodOnMouseClick (Inherited from Node.)
Protected methodOnMouseDoubleClick (Inherited from Camera.)
Protected methodOnMouseDown (Inherited from Camera.)
Protected methodOnMouseEnter (Inherited from Node.)
Protected methodOnMouseLeave (Inherited from Node.)
Protected methodOnMouseMove (Overrides CameraOnMouseMove(MouseEventArgs).)
Protected methodOnMouseUp (Inherited from Node.)
Protected methodOnMouseWheel (Overrides CameraOnMouseWheel(MouseEventArgs).)
Protected methodOnPropertyChanged
Fires a Changed event

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Protected methodRaiseMouseClick (Inherited from Node.)
Protected methodRaiseMouseDoubleClick (Inherited from Node.)
Protected methodRaiseMouseDown (Inherited from Node.)
Protected methodRaiseMouseEnter (Inherited from Node.)
Protected methodRaiseMouseLeave (Inherited from Node.)
Protected methodRaiseMouseMove (Inherited from Node.)
Protected methodRaiseMouseUp (Inherited from Node.)
Protected methodRaiseMouseWheel (Inherited from Node.)
Public methodRemove
Remove a node from this subtree

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodReset
Resets Camera.

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public methodRotate(Quaternion)
Rotate the camera position based on the rotation stored in a quarternion

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public methodRotate(Vector3, Double)
Rotate this subtree by rotation axis and angle

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodRotate(Double, Double, Double, Double)
Rotate this subtree by rotation axis and angle

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodRotateX
Move the camera position forward around the look at point, keep the same distance.

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public methodRotateY
Rotate the camera position to the left / rigth around the look at point, keep the same distance.

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public methodRotateZ
Rotate the camera around the vector connecting the camera position with the center of rotation.

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public methodScale(Vector3)
Scales this subtree

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodScale(Double, Double, Double)
Scales this subtree

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodSynchronize
Synchronizes Camera.

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Protected methodSynchronizeChildren (Inherited from Group.)
Public methodToString
Convert all camera parameter to string

[ILNumerics Visualization Engine]

(Inherited from Camera.)
Public methodTranslate(Vector3)
Translates this subtree

[ILNumerics Visualization Engine]

(Inherited from Group.)
Public methodTranslate(Double, Double, Double)
Translates this subtree

[ILNumerics Visualization Engine]

(Inherited from Group.)
Protected methodVisitInternal (Inherited from Group.)
Top
Events

  NameDescription
Public eventDisposing
Fires, before the node is getting disposed

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public eventMouseClick
Fires when the object is clicked

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public eventMouseDoubleClick
Fires when the object was double clicked

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public eventMouseDown
Fires when a mouse button was pressed over the object

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public eventMouseEnter
Fires when the mouse enters the object region

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public eventMouseLeave
Fires when the mouse leaves the object region

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public eventMouseMove
Fires when the mouse was moved over the object

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public eventMouseUp
Fires when a mouse button was released over the object

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public eventMouseWheel
Fires when the mouse wheel was moved over the object

[ILNumerics Visualization Engine]

(Inherited from Node.)
Public eventPropertyChanged
Fires on any property state changes

[ILNumerics Visualization Engine]

(Inherited from Node.)
Top
Fields

  NameDescription
Public fieldStatic memberDefaultTag
The tag used to identify the tripod within a scene.
Protected fieldm_allowPan
Boolean variable that is true, if panning is allowed, defautl: true.
(Inherited from Camera.)
Protected fieldm_allowRotation
Boolean variable that is true, if rotating is allowed, default: true:
(Inherited from Camera.)
Protected fieldm_allowZoom
Boolean variable that is true, if zooming is allowed, default: true.
(Inherited from Camera.)
Protected fieldm_animations (Inherited from Group.)
Protected fieldm_aspectRatioMode
The current aspect ratio mode.
(Inherited from Camera.)
Protected fieldm_children (Inherited from Group.)
Protected fieldm_isGlobal
Flag identifying the visibility scope of this camera.
(Inherited from Camera.)
Protected fieldm_mouseStartF
The coordinates where the mouse started a dragging operation.
(Inherited from Camera.)
Protected fieldm_timeoutAware (Inherited from Group.)
Protected fieldm_zoomFactor
Zoom factor, default: 1.
(Inherited from Camera.)
Public fieldStatic memberXArrowDefaultTag
The tag used to identify the X axis specific content of the tripod.
Public fieldStatic memberYArrowDefaultTag
The tag used to identify the Y axis specific content of the tripod.
Public fieldStatic memberZArrowDefaultTag
The tag used to identify the Z axis specific content of the tripod.
Top
Remarks

A tripod visualizes the state of rotation of a subscene. The camera rotation is visualized by a small tripod, showing the current direction of X, Y and Z axes. The tripod rotation automatically follows the rotation of the main camera. Any translational or scaling /zoom transforms happening on the corresponding subscene are ignored.

The tripod is attached to a main camera by adding the Tripod class as a child to that camera. From now on the tripod will follow its rotation. Note that the tripod does not need to be a direct child of the camera. The tripod will recognize the rotation of the first camera which it finds on the path up to the root of the scene.

Tripod allows the full configuration flexibility of regular cameras: ScreenRect is used to define the screen rectangle the tripod is occupying. AspectRatio, Projection and even arbitrary Transforms can be configured as well.

Tripod provides some interactive capabilities: It allows to zoom in / out with the mouse wheel when the mouse is over the tripod. When the user drags the mouse with the left mouse button, the corresponding scene is rotated. If the dragging starts on one of the three axis identifier (the X-, Y- or Z-arrow with the Arrow3D style or the X-,Y- or Z label for the simple style) the rotation will become restricted to that specific axis only. When the Shift key is down, all interactions are greatly slowed down by a factor of 10. The interaction can be disabled for the end user by setting the AllowZoom and AllowRotation properties of the base class to false.

One can use Tripod as starting point for own custom tripod implementation. The constructor parameter Tripod(Object, TripodStyle, CameraQuadrant, Single) 'style' is used to define the style of the tripod. Set this to Empty in order to get an empty tripod group, keeping its functionality: It will rotate its (arbitrary) content according to the parent camera transformation. The example below demonstrates how this could be used to get an interactive thumbnail of a scene or parts of it. Another example is found in the Tripod_Configuration example.

[ILNumerics Visualization Engine]

Examples

Default Tripod
private void ilPanel1_Load(object sender, EventArgs e) {
    // some simple scene
    ilPanel1.Scene.Camera.Add(new Sphere());
    // add a tripod to the scene, following the main scenes rotation
    ilPanel1.Scene.Camera.Add(new Tripod()); 
}
Custom Tripod - create a shrinked copy of the main scene
private void ilPanel1_Load(object sender, EventArgs e) {
    // Create and add some scene content. We wrap it into a group just to 
    // have the scene available for easier copying later. 
    var group = ilPanel1.Scene.Camera.Add(new Group() {
        Shapes.Sphere2, Shapes.Gear25, Shapes.Gear25Wireframe
    }); 

    // Create and add a tripod right to the main camera. It could be added to any other camera as well.
    // Set the tripod style empty in order to prevent the standard (Arrow3D based) tripod to show up. 
    ilPanel1.Scene.Camera.Add(new Tripod(style: TripodStyle.TripodEmpty) {

        // place the tripod to upper left corner
        ScreenRect = new RectangleF(0.05f, 0.05f, 0.1f, 0.1f),

        // the tripod could be configured independently
        //AspectRatioMode = ILNumerics.Drawing.AspectRatioMode.StretchToFill,

        // Add custom content to the tripod: a scaled copy of the above scene
        Children = { 
            new Group(scale: new Vector3(.5,0.5,0.5)) { group }
        }
    }); 
}
See Also

Reference