ViewportInfo Methods |
The ViewportInfo type exposes the following members.
Name | Description | |
---|---|---|
CalculateCameraRotationAngle |
Calculates the camera rotation angle.
| |
CalculateCameraUpDirection |
Calculates the camera up direction.
| |
ChangeToParallelProjection |
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.
If the current projection is parallel and symmetricFrustum,
FrustumIsLeftRightSymmetric() and FrustumIsTopBottomSymmetric()
are all equal, then no changes are made and true is returned.
| |
ChangeToPerspectiveProjection |
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 changed.
If the current projection is perspective and symmetricFrustum,
IsFrustumIsLeftRightSymmetric, and IsFrustumIsTopBottomSymmetric
are all equal, then no changes are made and true is returned.
| |
ChangeToSymmetricFrustum |
If needed, adjusts the current frustum so it has the
specified symmetries and adjust the camera location
so the target plane remains visible.
| |
ChangeToTwoPointPerspectiveProjection |
Changes 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.
If the current projection is perspective and
IsFrustumIsLeftRightSymmetric is true and
IsFrustumIsTopBottomSymmetric is false, then no changes are
made and true is returned.
| |
Dispose |
Actively reclaims unmanaged resources that this instance uses.
(Inherited from CommonObject.) | |
DollyCamera |
DollyCamera() does not update the frustum's clipping planes.
To update the frustum's clipping planes call DollyFrustum(d)
with d = dollyVector o cameraFrameZ. To convert screen locations
into a dolly vector, use GetDollyCameraVector().
Does not update frustum. To update frustum use DollyFrustum(d) with d = dollyVector o cameraFrameZ.
| |
DollyExtents(BoundingBox, Double) |
Dolly the camera location and so that the view frustum contains
all of the document objects that can be seen in view.
If the projection is perspective, the camera angle is not changed.
| |
DollyExtents(IEnumerableGeometryBase, Double) |
Dolly the camera location and so that the view frustum contains
all of the document objects that can be seen in view.
If the projection is perspective, the camera angle is not changed.
| |
DollyFrustum |
Moves the frustum clipping planes.
| |
EnsurePrivateCopy |
If you want to keep a copy of this class around by holding onto it in a variable after a command
completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can
call this function as many times as you want.
(Inherited from CommonObject.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Extents(Double, BoundingBox) |
Extends this viewport view to include a bounding box.
Use Extents() as a quick way to set a viewport to so that bounding volume is inside of a viewports frustum. The view angle is used to determine the position of the camera. | |
Extents(Double, Sphere) |
Extends this viewport view to include a sphere.
Use Extents() as a quick way to set a viewport to so that bounding volume is inside of a viewports frustum. The view angle is used to determine the position of the camera. | |
FrustumCenterPoint |
Return a point on the central axis of the view frustum.
This point is a good choice for a general purpose target point.
| |
GetBoundingBoxDepth |
Gets near and far clipping distances of a bounding box.
This function ignores the current value of the viewport's
near and far settings. If the viewport is a perspective
projection, the it intersects the semi infinite frustum
volume with the bounding box and returns the near and far
distances of the intersection. If the viewport is a parallel
projection, it intersects the infinite view region with the
bounding box and returns the near and far distances of the
projection.
| |
GetCameraAngles |
Gets the field of view angles.
| |
GetCameraFrame |
Gets location and vectors of this camera.
| |
GetDollyCameraVector(Point, Point, Double) |
Gets a world coordinate dolly vector that can be passed to DollyCamera().
| |
GetDollyCameraVector(Int32, Int32, Int32, Int32, Double) |
Gets a world coordinate dolly vector that can be passed to DollyCamera().
| |
GetFarPlaneCorners |
Gets the corners of far clipping plane rectangle.
4 points are returned in the order of bottom left, bottom right,
top left, top right.
| |
GetFramePlaneCorners |
Gets the corners of the frame plane rectangle at specified depth.
4 points are returned in the order of bottom left, bottom right,
top left, top right.
| |
GetFrustum |
Gets the view frustum.
| |
GetFrustumLine(Point) |
Gets the world coordinate line in the view frustum
that projects to a point on the screen.
| |
GetFrustumLine(PointF) |
Gets the world coordinate line in the view frustum
that projects to a point on the screen.
| |
GetFrustumLine(Double, Double) |
Gets the world coordinate line in the view frustum
that projects to a point on the screen.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetNearPlaneCorners |
Gets the corners of near clipping plane rectangle.
4 points are returned in the order of bottom left, bottom right,
top left, top right.
| |
GetObjectData |
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
(Inherited from CommonObject.) | |
GetPointDepth |
Gets the clipping distance of a point. This function ignores the
current value of the viewport's near and far settings. If
the viewport is a perspective projection, then it intersects
the semi infinite frustum volume with the bounding box and
returns the near and far distances of the intersection.
If the viewport is a parallel projection, it intersects the
infinite view region with the bounding box and returns the
near and far distances of the projection.
| |
GetScreenPort |
Gets the location of viewport in pixels.
See documentation for SetScreenPort.
| |
GetScreenPort(Int32, Int32) |
Gets the location of viewport in pixels.
See value meanings in SetScreenPort. | |
GetScreenPortLocation |
Get the location of viewport in pixels (non System.Drawing version of GetScreenPort)
| |
GetSphereDepth |
Gets near and far clipping distances of a bounding sphere.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetViewScale |
Get scaling applied to this viewport projection. Reflected ceiling projections
will return the values 1,1,-1
| |
GetWorldToScreenScale |
Gets the scale factor from point in frustum to screen scale.
| |
GetXform |
Computes a transform from a coordinate system to another.
| |
IsValidWithLog |
Determines if an object is valid. Also provides a report on errors if this
object happens not to be valid.
(Inherited from CommonObject.) | |
RotateCamera |
Rotates the view camera.
| |
SetCameraDirection |
Sets the direction that the camera faces.
| |
SetCameraLocation |
Sets the camera location (position) point.
| |
SetCameraUp |
Sets the camera up vector.
| |
SetFrustum |
Sets the view frustum. If FrustumSymmetryIsLocked() is true
and left != -right or bottom != -top, then they will be
adjusted so the resulting frustum is symmetric.
| |
SetFrustumNearFar(BoundingBox) |
Sets the frustum near and far using a bounding box.
| |
SetFrustumNearFar(Double, Double) |
Sets the frustum near and far distances using two values.
| |
SetFrustumNearFar(Point3d, Double) |
Sets the frustum near and far using a center point and radius.
| |
SetFrustumNearFar(Double, Double, Double, Double, Double) |
Sets near and far clipping distance subject to constraints.
| |
SetScreenPort(Rectangle) |
Gets the location of viewport in pixels.
See value meanings in SetScreenPort. | |
SetScreenPort(Rectangle, Int32, Int32) |
Gets the location of viewport in pixels.
See value meanings in SetScreenPort. | |
SetScreenPort(Int32, Int32, Int32, Int32, Int32, Int32) |
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.
// For a Windows window
/ int width = width of window client area in pixels;
/ int height = height of window client area in pixels;
/ port_left = 0;
/ port_right = width;
/ port_top = 0;
/ port_bottom = height;
/ port_near = 0;
/ port_far = 1;
/ SetScreenPort( port_left, port_right,
/ port_bottom, port_top,
/ port_near, port_far );
| |
SetViewScale |
Set scaling applied for this viewport projection. For reflected
projections, call with values 1,1,-1
| |
TargetDistance |
Gets the distance from the target point to the camera plane.
Note that if the frustum is not symmetric, then this distance
is shorter than the distance from the target to the camera location.
| |
ToJSON |
Create a JSON string representation of this object
(Inherited from CommonObject.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TransformCamera |
Transforms the view camera location, direction, and up.
| |
UnlockCamera |
Unlocks the camera vectors and location.
| |
UnlockFrustumSymmetry |
Unlocks frustum horizontal and vertical symmetries.
| |
ZoomToScreenRect(Rectangle) |
Zooms to a screen zone.
View changing from screen input points. Handy for using a mouse to manipulate a view. ZoomToScreenRect() may change camera and frustum settings. | |
ZoomToScreenRect(Int32, Int32, Int32, Int32) |
Zooms to a screen zone.
View changing from screen input points. Handy for using a mouse to manipulate a view. ZoomToScreenRect() may change camera and frustum settings. |