Click or drag to resize

RhinoViewport Methods

The RhinoViewport type exposes the following members.

Methods
  NameDescription
Public methodChangeToParallelProjection
Use this function to change projections of valid viewports from perspective to parallel. It will make common additional adjustments to the frustum so the resulting views are similar. The camera location and direction will not be changed.
Public methodChangeToPerspectiveProjection(Boolean, Double)
Use this function to change projections of valid viewports from parallel to perspective. It will make common additional adjustments to the frustum and camera location so the resulting views are similar. The camera direction and target point are not be changed.
Public methodChangeToPerspectiveProjection(Double, Boolean, Double)
Use this function to change projections of valid viewports from parallel to perspective. It will make common additional adjustments to the frustum and camera location so the resulting views are similar. The camera direction and target point are not be changed.
Public methodChangeToTwoPointPerspectiveProjection(Double)
Use this function to change projections of valid viewports to a two point perspective. It will make common additional adjustments to the frustum and camera location and direction so the resulting views are similar.
Public methodChangeToTwoPointPerspectiveProjection(Double, Vector3d, Double)
Use this function to change projections of valid viewports to a two point perspective. It will make common additional adjustments to the frustum and camera location and direction so the resulting views are similar.
Public methodClearTraceImage
Remove trace image (background bitmap) for this viewport if one exists.
Public methodClientToScreen(Point)
Public methodClientToScreen(Point2d)
Public methodClientToWorld(Point)
Public methodClientToWorld(Point2d)
Public methodCode exampleConstructionPlane
Simple plane information for this viewport's construction plane. If you want detailed construction plane information, use GetConstructionPlane.
Public methodDeleteAllUserStrings
Public methodDeleteUserString
Public methodDispose
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize (Overrides ObjectFinalize.)
Public methodStatic memberFromId
Call this method to get the viewport with the specified Id.
Public methodGetCameraAngle
Public methodGetCameraExtents
Public methodGetCameraFrame
Gets the camera plane.
Public methodGetConstructionPlane
Public methodGetDepth(Point3d, Double)
Gets clipping distance of a point.
Public methodGetDepth(BoundingBox, Double, Double)
Gets near and far clipping distances of a bounding box.
Public methodGetDepth(Sphere, Double, Double)
Gets near and far clipping distances of a sphere.
Public methodGetFarRect
Get corners of far clipping plane rectangle.
Public methodGetFrustum
Gets the view frustum.
Public methodGetFrustumBottomPlane
Get bottom world frustum clipping plane.
Public methodGetFrustumBoundingBox
Public methodGetFrustumCenter
Returns world coordinates of frustum's center.
Public methodGetFrustumFarPlane
Get far clipping plane.
Public methodGetFrustumLeftPlane
Get left world frustum clipping plane.
Public methodGetFrustumLine
Gets the world coordinate line in the view frustum that projects to a point on the screen.
Public methodGetFrustumNearPlane
Get near clipping plane.
Public methodGetFrustumRightPlane
Get right world frustum clipping plane.
Public methodGetFrustumTopPlane
Get top world frustum clipping plane.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNearRect
Get corners of near clipping plane rectangle.
Public methodGetPickTransform(Point)
Takes a rectangle in screen coordinates and returns a transformation that maps the 3d frustum defined by the rectangle to a -1/+1 clipping coordinate box. This takes a single point and inflates it by Rhino.ApplicationSettings.ModelAidSettings.MousePickBoxRadius to define the screen rectangle.
Public methodGetPickTransform(Rectangle)
Takes a rectangle in screen coordinates and returns a transformation that maps the 3d frustum defined by the rectangle to a -1/+1 clipping coordinate box.
Public methodGetPickTransform(Int32, Int32)
Takes a rectangle in screen coordinates and returns a transformation that maps the 3d frustum defined by the rectangle to a -1/+1 clipping coordinate box. This takes a single point and inflates it by Rhino.ApplicationSettings.ModelAidSettings.MousePickBoxRadius to define the screen rectangle.
Public methodGetScreenPort
Location of viewport in pixels. These are provided so you can set the port you are using and get the appropriate transformations to and from screen space.
Public methodCode exampleGetTransform
Gets a transform from origin coordinate system to a target coordinate system.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUserString
Gets a user string.
Public methodGetUserStrings
Gets an independent copy of the collection of (user text key, user text value) pairs attached to this object.
Public methodGetViewScale
Get Scale transform applied to the viewport
Public methodGetWorldToScreenScale
Gets the world to screen size scaling factor at a point in frustum.
Public methodIsVisible(BoundingBox)
Returns true if some portion of a world coordinate bounding box is potentially visible in the viewing frustum.
Public methodIsVisible(Point3d)
Determines if a world coordinate point is visible in the viewing frustum.
Public methodKeyboardDolly
Emulates the keyboard arrow key in terms of interaction.
Public methodKeyboardDollyInOut
Emulates the keyboard arrow key in terms of interaction.
Public methodKeyboardRotate
Emulates the keyboard arrow key in terms of interaction.
Public methodMagnify(Double, Boolean)
Zooms or dollies in order to scale the viewport projection of observed objects.
Public methodMagnify(Double, Boolean, Point)
Zooms or dollies in order to scale the viewport projection of observed objects.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMouseAdjustLensLength
Adjusts the camera lens length.
Public methodMouseDollyZoom
Zooms lens (thus adjusting the field of view) while moving the camera.
Public methodMouseInOutDolly
Moves the camera towards or away from the view maintaining focus on the view.
Public methodMouseLateralDolly
Pans the camera
Public methodMouseMagnify
Moves the camera towards or away from the view.
Public methodMouseRotateAroundTarget
Rotates the viewport around target.
Public methodMouseRotateCamera
Rotates the view around the camera location.
Public methodMouseTilt
Tilts the camera view.
Public methodNextConstructionPlane
Sets the construction plane to the plane that was active before the last call to PreviousConstructionPlane.
Public methodNextViewProjection
Sets the view projection and target to the settings that were active before the last call to PrevView.
Public methodPopConstructionPlane
Sets the construction plane to the plane that was active before the last call to PushConstructionPlane.
Public methodCode examplePopViewProjection
Sets the view projection and target to the settings at the top of the view stack and removes those settings from the view stack.
Public methodPreviousConstructionPlane
Sets the construction plane to the plane that was active before the last call to NextConstructionPlane or SetConstructionPlane.
Public methodPreviousViewProjection
Sets the view projection and target to the settings that were active before the last call to NextViewProjection.
Public methodPushConstructionPlane
Pushes the current construction plane on the viewport's construction plane stack and sets the construction plane to cplane.
Public methodPushViewInfo
Public methodCode examplePushViewProjection
Appends the current view projection and target to the viewport's view stack.
Public methodRotate
Rotates about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
Public methodScreenToClient
Public methodCode exampleSetCameraDirection
Set viewport camera direction. By default the target location is changed so that the vector from the camera location to the target is parallel to the camera direction.
Public methodCode exampleSetCameraLocation
Set viewport camera location. By default the target location is changed so that the vector from the camera location to the target is parallel to the camera direction vector.
Public methodSetCameraLocations
Set viewport camera location and target location. The camera direction vector is changed so that it is parallel to the vector from the camera location to the target location.
Public methodSetCameraTarget
Set viewport target point. By default the camera location is translated so that the camera direction vector is parallel to the vector from the camera location to the target location.
Public methodSetClippingPlanes
Sets optimal clipping planes to view objects in a world coordinate 3d bounding box.
Public methodSetConstructionPlane(ConstructionPlane)
Sets the construction plane to cplane.
Public methodSetConstructionPlane(Plane)
Public methodSetProjection
Set viewport to a defined projection.
Public methodSetToPlanView
Public methodCode exampleSetTraceImage
Set trace image (background bitmap) for this viewport.
Public methodSetUserString
Attach a user string (key,value combination) to this geometry.
Public methodSetViewProjection
Sets the viewport camera projection.
Public methodSetWallpaper(String, Boolean)
Public methodSetWallpaper(String, Boolean, Boolean)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWorldToClient
Convert a point from world coordinates in the viewport to a 2d screen point in the local coordinates of the viewport (X/Y of point is relative to top left corner of viewport on screen)
Public methodZoomBoundingBox
Zooms the viewport to the given bounding box.
Public methodCode exampleZoomExtents
Dollies the camera location and so that the view frustum contains all of the selected document objects that can be seen in view. If the projection is perspective, the camera angle is not changed.
Public methodZoomExtentsSelected
Dollies the camera location and so that the view frustum contains all of the selected document objects that can be seen in view. If the projection is perspective, the camera angle is not changed.
Public methodZoomWindow
Zooms the viewport to the given rectangle.
Top
See Also