SbViewportRegion Structure |
This class represents the active viewport region in a display window. It contains the screen-space size of the window as well as the origin and size of the viewport within the window. By default, the viewport is the same as the full window. Methods allow the viewport to be set either in terms of screen-space pixels or as normalized coordinates, where (0,0) is the lower-left corner of the window and (1,1) is the upper-right corner.
Namespace: OIV.Inventor
The SbViewportRegion type exposes the following members.
Name | Description | |
---|---|---|
SbViewportRegion(SbVec2i32) |
Constructor that takes a window size.
| |
SbViewportRegion(SbVec2s) |
Constructor that takes a window size.
| |
SbViewportRegion(Int16, Int16) |
Constructor that takes a width and a height.
| |
SbViewportRegion(SbVec2i32, Single) |
Constructor that takes a window size and a scale.
Use for remote rendering.
| |
SbViewportRegion(SbVec2s, Single) |
Constructor that takes a window size and a scale.
Use for remote rendering.
| |
SbViewportRegion(Int16, Int16, Single) |
Constructor that takes a width and a height and a scale.
Used for remote rendering.
|
Name | Description | |
---|---|---|
Equals |
Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object).) | |
GetHashCode |
Returns the hash code for the value of this instance.
(Overrides ValueTypeGetHashCode.) | |
GetPixelsPerInch |
Returns the pixel-per-inch ratio for the display device the viewport is
part of.
| |
GetPixelsPerPoint |
Convenience function that returns number of pixels per printer's point.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetViewportAspectRatio | Obsolete.
Use ViewportAspectRatio property instead.
| |
GetViewportOrigin | Obsolete.
Use ViewportOrigin property instead.
| |
GetViewportOriginPixels_i32 | Obsolete.
Use ViewportOriginPixelsI32 property instead.
| |
GetViewportSize | Obsolete.
Use ViewportSize property instead.
| |
GetViewportSizePixels | Obsolete.
Use ViewportSizePixels property instead.
| |
GetViewportSizePixels_i32 | Obsolete.
Use ViewportSizePixelsI32 property instead.
| |
GetWindowSize | Obsolete.
Use WindowSize property instead.
| |
GetWindowSize_i32 | Obsolete.
Use WindowSizeI32 property instead.
| |
Normalize |
Compute the normalized coordinates of the specified position, relative to
this viewport region.
| |
ScaleHeight |
Scales viewport within window to be the given ratio of its current
height, leaving the resulting viewport centered about the same point as the
current one.
| |
ScaleWidth |
Scales viewport within window to be the given ratio of its current width,
leaving the resulting viewport centered about the same point as the current one.
| |
SetPixelsPerInch |
Sets the pixel-per-inch ratio for the display device the viewport is
part of. The default value is 72 (1 pixel per printer's point).
| |
SetViewport(SbVec2f, SbVec2f) |
Sets viewport to region with given origin (lower-left corner)
and size, given as normalized coordinate vectors.
| |
SetViewport(SbVec2f, SbVec2f) |
Sets viewport to region with given origin (lower-left corner)
and size, given as normalized coordinate vectors.
| |
SetViewport(Single, Single, Single, Single) |
Sets viewport to given region, specified as normalized window coordinates: (0,0)
is the lower-left corner, (1,1) is the upper-right.
| |
SetViewportPixels(SbVec2i32, SbVec2i32) |
Sets viewport to region with given origin (lower-left corner)
and size, given as pixel coordinates.
| |
SetViewportPixels(SbVec2i32, SbVec2i32) |
Sets viewport to region with given origin (lower-left corner)
and size, given as pixel coordinates.
| |
SetViewportPixels(SbVec2s, SbVec2s) |
Sets viewport to region with given origin (lower-left corner)
and size, given as pixel coordinates.
| |
SetViewportPixels(SbVec2s, SbVec2s) |
Sets viewport to region with given origin (lower-left corner)
and size, given as pixel coordinates.
| |
SetViewportPixels(Int16, Int16, Int16, Int16) |
Sets viewport to given region, specified as pixel coordinates
in window: (0,0) is the lower-left corner.
| |
SetWindowSize(SbVec2i32) |
Changes window size to given width and height in pixels, given as SbVec2i32.
| |
SetWindowSize(SbVec2i32) |
Changes window size to given width and height in pixels, given as SbVec2i32.
| |
SetWindowSize(SbVec2s) |
Changes window size to given width and height in pixels, given as SbVec2s.
| |
SetWindowSize(SbVec2s) |
Changes window size to given width and height in pixels, given as SbVec2s.
| |
SetWindowSize(Int16, Int16) |
Changes window size to given width and height in pixels.
| |
ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType.) |
Name | Description | |
---|---|---|
Equality |
The equality operator.
| |
Inequality |
The inequality operator.
|
Name | Description | |
---|---|---|
Default |
Provide a default viewport region equivalent to new SbViewportRegion(100,100,1) Remarks Note to developper who comes from C++. As .NET framework does not
allow to define a parameterless constructor for struct, use this field to keep
the same behavior. When you write SbViewportRegion viewport = new SbViewportRegion() SbViewportRegion viewport = SbViewportRegion.Default |
Name | Description | |
---|---|---|
ViewportAspectRatio |
Aspect ratio (width/height) of viewport.
| |
ViewportOrigin |
Viewport origin in normalized coordinates.
| |
ViewportOriginPixelsI32 |
Viewport origin in pixels (int values).
| |
ViewportSize |
Viewport size in normalized coordinates.
| |
ViewportSizePixels |
Viewport size in pixels (short values).
| |
ViewportSizePixelsI32 |
Viewport size in pixels (int values).
| |
WindowSize |
Window size in pixels (short values).
| |
WindowSizeI32 |
Window size in pixels (int values).
|