Rhino C++ API
8.13
|
#include <rhinoSdkViewport.h>
Public Member Functions | |
CRhinoViewport () | |
~CRhinoViewport () | |
CRhinoDisplayPipeline * | AttachPipeline (CRhinoDisplayPipeline *) |
unsigned int | ChangeCounter () const |
void | ClearUndoInformation (bool bClearProjections=true, bool bClearCPlanes=true) |
bool | ClientToScreenPort (ON_2iPoint &pt) const |
const ON_3dmConstructionPlane & | ConstructionPlane () const |
void | CopyFrom (const CRhinoViewport &src, bool copy_id, bool copy_parent_view) |
void | CopyFrom (const CRhinoViewport &src, bool copy_id=false) |
bool | DisplayModeIsShaded (void) const |
CRhinoDisplayPipeline * | DisplayPipeline (void) const |
unsigned int | DocumentRuntimeSerialNumber () const |
bool | DollyExtents (ON_BoundingBox bbox, ON::coordinate_system cs) |
bool | DownUpDolly (double) |
down < 0 < up More... | |
bool | DownUpRotate (double) |
down < 0 < up More... | |
void | DrawActivePoint (const ON_3dPoint &) |
void | DrawArc (const ON_Arc &) |
void | DrawBezier (const ON_BezierCurve &) |
void | DrawBezierCage (const ON_BezierSurface &, int display_density=1) |
void | DrawBezierSurface (const ON_BezierSurface &, int display_density=1) |
void | DrawBoundingBox (const ON_BoundingBox &) |
void | DrawBox (const ON_3dPoint *box_corners) |
void | DrawBrep (const ON_Brep &, int display_density=1) |
void | DrawCircle (const ON_Circle &) |
ON_Color | DrawColor () const |
void | DrawCone (const ON_Cone &cone) |
void | DrawConstructionPlane (const ON_3dmConstructionPlane &cplane, BOOL32 bShowConstructionGrid, BOOL32 bShowConstructionAxes, BOOL32 bShowConstructionZAxis, COLORREF thin_line_color=ON_UNSET_COLOR, COLORREF thick_line_color=ON_UNSET_COLOR, COLORREF grid_x_axis_color=ON_UNSET_COLOR, COLORREF grid_y_axis_color=ON_UNSET_COLOR) |
void | DrawCurve (const ON_Curve &curve) |
void | DrawCylinder (const ON_Cylinder &cylinder) |
void | DrawDirectionArrow (const ON_3dPoint &, const ON_3dVector &, ON_3dPoint *head_point=NULL) |
void | DrawDot (int screen_x, int screen_y, const wchar_t *text=NULL, COLORREF dot_color=RGB(0, 0, 0), COLORREF text_color=ON_UNSET_COLOR) |
void | DrawDot (ON_3dPoint point, const wchar_t *text=NULL, COLORREF dot_color=RGB(0, 0, 0), COLORREF text_color=ON_UNSET_COLOR) |
void | DrawDottedLine (const ON_3dPoint &, const ON_3dPoint &) |
void | DrawExtrusion (const ON_Extrusion &) |
void | DrawFalseColorMesh (const ON_Mesh *, bool bCullCW, COLORREF edge_color=ON_UNSET_COLOR) |
void | DrawLight (const ON_Light &light, COLORREF wireframe_color) |
void | DrawLine (const ON_3dPoint &, const ON_3dPoint &) |
void | DrawNurbsCage (const ON_NurbsCage &, int display_density=1) |
void | DrawNurbsCurve (const ON_NurbsCurve &nurbs_curve) |
void | DrawNurbsSurface (const ON_NurbsSurface &, int display_density=1) |
void | DrawPoint (const ON_3dPoint &, const ON_3dVector *=nullptr) |
void | DrawPointCloud (int point_count, const ON_3dPoint *points, const ON_3dPoint &origin) |
void | DrawRenderPreviewMesh (const ON_Mesh *, const CRhinoMaterial &render_material, BOOL32 bCullCW, BOOL32 bHighlighted) |
void | DrawRhinoObject (const CRhinoObject *, ON_Xform xform, ON_Color color=ON_UNSET_COLOR) |
void | DrawShadedMesh (const ON_Mesh *, bool bCullCW, bool bFlatShade, bool bHighlighted) |
void | DrawSphere (const ON_Sphere &sphere) |
void | DrawString (const wchar_t *string, int slength, const ON_3dPoint &point, int bMiddle=false, int rotation=0, int height=12, const wchar_t *fontface=L"Arial") |
void | DrawSurface (const ON_Surface &, int display_density=1) |
void | DrawTangentBar (const ON_3dPoint &, const ON_3dVector &, ON_3dPoint *start_point=NULL, ON_3dPoint *end_point=NULL) |
void | DrawTorus (const ON_Torus &torus) |
void | DrawTriangle (const ON_3dPoint &p0, const ON_3dPoint &p1, const ON_3dPoint &p2) |
void | DrawTriangle (const ON_3dPoint corners[3]) |
void | DrawWireframeMesh (const ON_Mesh *, BOOL32 bCullCW) |
void | EnableFlatShade (bool bFlatShade=true) |
void | EnableSelectedShade (bool bSelectedShade=true) |
bool | FlatShade () const |
ON_DEPRECATED void | GetDisplayXform (ON_Xform &display_xform) const |
bool | GetElevatorHeight (const ON_Line &world_line, const ON_3dPoint &elevator_basepoint, const ON_3dVector &elevator_axis, BOOL32 bGridSnap, double grid_snap_spacing, double *elevator_height) const |
void | GetMarkedObjectXform (int *mark_value, ON_Xform &marked_object_xform) const |
void | GetModelXform (ON_Xform &model_xform) const |
bool | GetPickXform (const ON_4iRect &, ON_Xform &) const |
bool | GetPickXform (int, int, ON_Xform &) const |
picking More... | |
const class CRhTraceImage * | GetTraceImage (void) const |
const class CRhWallpaper * | GetWallpaperImage (void) const |
bool | GetZBuffer (class CRhinoZBuffer &) const |
bool | InOutDolly (double) |
out < 0 < in More... | |
bool | InterruptDrawing () const |
bool | IsMainViewportTopViewOnly () const |
bool | IsModelView () const |
bool | IsNamedView (bool &modified) |
returns true if the view is very similar to an existing named view in the document More... | |
bool | IsPageViewMainViewport () const |
bool | IsPlanView () const |
bool | IsThickDisplayActive (double *thickness_scale=nullptr) const |
bool | IsTraceImage () |
bool | IsVisible (const ON_3dPoint &) const |
bool | IsVisible (const ON_BoundingBox &) const |
bool | IsWallpaperImage () |
bool | IsXUp () const |
viewports are either x-up, y-up, or z-up More... | |
bool | IsYUp () const |
bool | IsZUp () const |
int | Iteration () const |
bool | LateralDolly (double x, double y) |
left x < 0 < right x, down y < 0 < up y More... | |
bool | LeftRightDolly (double) |
left < 0 < right More... | |
bool | LeftRightRotate (double) |
keyboard arrow key interaction tools More... | |
bool | Magnify (double, int, const ON_2iPoint *=nullptr) |
bool | MouseAdjustLensLength (const ON_2iPoint &mouse0, const ON_2iPoint &mouse1, bool bMoveTarget=false) |
bool | MouseDollyZoom (const ON_2iPoint &mouse0, const ON_2iPoint &mouse1) |
bool | MouseInOutDolly (const ON_2iPoint &mouse0, const ON_2iVector &mouse1) |
bool | MouseLateralDolly (const ON_2iPoint &mouse0, const ON_2iVector &mouse1) |
bool | MouseMagnify (const ON_2iPoint &mouse0, const ON_2iPoint &mouse1) |
bool | MouseRotateCamera (const ON_2iPoint &mouse0, const ON_2iPoint &mouse1) |
bool | MouseRotateView (const ON_2iPoint &mouse0, const ON_2iPoint &mouse1) |
mouse interaction tools More... | |
bool | MouseTilt (const ON_2iPoint &mouse0, const ON_2iPoint &mouse1) |
ON_3dVector | MouseTrackballVector (int, int) const |
ON_wString | Name () const |
bool | NextConstructionPlane () |
bool | NextViewProjection () |
void | operator delete (void *) |
void | operator delete (void *, void *) |
void | operator delete[] (void *) |
void * | operator new (size_t) |
void * | operator new (size_t, void *) |
in place new/delete More... | |
void * | operator new[] (size_t) |
array new/delete More... | |
CRhinoView * | ParentView () const |
bool | PopConstructionPlane () |
bool | PopViewProjection () |
bool | PrevConstructionPlane () |
bool | PrevViewProjection () |
void | PushConstructionPlane (const ON_3dmConstructionPlane &cplane) |
void | PushViewProjection () |
bool | RestoreNamedView (const ON_3dmView &view, CRhinoDoc *pDoc=nullptr, bool bAspectRatio=false, bool bAnimate=false, bool bConstantSpeed=false, int frames=100, double units_per_frame=1.0, int delay=10) |
unsigned int | RuntimeSerialNumber () const |
int | ScreenHeight () const |
int | ScreenWidth () const |
bool | SelectedShade () const |
void | SetCameraDirection (ON_3dVector camera_direction, BOOL32 bUpdateTargetLocation=true) |
void | SetCameraLocation (ON_3dPoint camera_location, BOOL32 bUpdateTargetLocation=true) |
void | SetClippingPlanes (const ON_BoundingBox &) |
set optimal clipping planes to view objects in a world coordinate 3d bounding box More... | |
bool | SetClippingRegionTransformation (const ON_4iRect &, class ON_ClippingRegion &clip_region) const |
bool | SetClippingRegionTransformation (int, int, class ON_ClippingRegion &clip_region) const |
void | SetConstructionPlane (const ON_3dmConstructionPlane &cplane) |
bool | SetDisplayMode (const ON_UUID &) |
ON_DEPRECATED void | SetDisplayXform (const ON_Xform &display_xform) |
ON_Color | SetDrawColor (COLORREF color) |
void | SetMarkedObjectXform (int mark_value, const ON_Xform &marked_object_xform) |
void | SetModelXform (const ON_Xform &model_xform) |
bool | SetName (const wchar_t *) |
viewport properties More... | |
void | SetScreenSize (int width, int height, bool forceRegen=false) |
void | SetShowConstructionAxes (BOOL32) |
void | SetShowConstructionGrid (BOOL32) |
void | SetShowWorldAxes (BOOL32) |
void | SetTarget (ON_3dPoint target_location, BOOL32 bUpdateCameraLocation=true) |
void | SetTargetAndCameraLocation (ON_3dPoint target_location, ON_3dPoint camera_location, BOOL32 bUpdateCameraDirection=true, BOOL32 bAddToViewStack=true) |
bool | SetToBackView (const wchar_t *sViewName=nullptr, BOOL32 bUpdateConstructionPlane=true) |
bool | SetToBottomView (const wchar_t *sViewName=nullptr, BOOL32 bUpdateConstructionPlane=true) |
bool | SetToFrontView (const wchar_t *sViewName=nullptr, BOOL32 bUpdateConstructionPlane=true) |
bool | SetToLeftView (const wchar_t *sViewName=nullptr, BOOL32 bUpdateConstructionPlane=true) |
bool | SetToPerspectiveView (const wchar_t *sViewName=nullptr, BOOL32 bUpdateConstructionPlane=true) |
bool | SetToPlanView (const ON_3dPoint &, const ON_3dVector &, const ON_3dVector &, BOOL32=false) |
Default views. More... | |
bool | SetToRightView (const wchar_t *sViewName=nullptr, BOOL32 bUpdateConstructionPlane=true) |
bool | SetToTopView (const wchar_t *sViewName=nullptr, BOOL32 bUpdateConstructionPlane=true) |
bool | SetToTwoPointPerspectiveView (const wchar_t *sViewName, bool bUpdateConstructionPlane=true) |
bool | SetTraceImage (const ON_3dmViewTraceImage &traceimage) |
void | SetView (const ON_3dmView &view) |
bool | SetVP (const ON_Viewport &, BOOL32 bUpdateTargetLocation, BOOL32 bAddToViewStack=true) |
bool | SetWallpaperImage (const ON_3dmWallpaperImage &wallpaper) |
bool | ShowConstructionAxes () const |
controls display of construction plane axes More... | |
bool | ShowConstructionGrid () const |
controls display of construction plane grid More... | |
bool | ShowWorldAxes () const |
controls display of world axes icon More... | |
ON_3dPoint | Target () const |
viewport target point More... | |
bool | UpdateTransforms (BOOL32 bForceUpdate=false) |
const ON_3dmView & | View () const |
ON_UUID | ViewportId () const |
const ON_Viewport & | VP () const |
Static Public Member Functions | |
static ON::active_space | ActiveSpaceFromViewType (ON::view_type view_type) |
static CRhinoViewport * | FromRuntimeSerialNumber (unsigned int rhino_viewport_sn) |
static CRhinoViewport * | FromViewportId (ON_UUID rhino_viewport_id) |
static unsigned int | GetViewportList (unsigned int rhino_doc_sn, unsigned int rhino_view_sn, ON_SimpleArray< unsigned int > &rhino_viewport_sn_list) |
static unsigned int | GetViewportList (unsigned int rhino_doc_sn, unsigned int rhino_view_sn, unsigned int rhino_viewport_sn0, size_t rhino_viewport_sn_list_capacity, unsigned int *rhino_viewport_sn_list) |
static unsigned int | HeadRuntimeSerialNumber () |
static bool | IsValidViewportPointer (const void *viewport) |
static bool | IsValidViewportReference (const CRhinoViewport &viewport) |
static unsigned int | RuntimeSerialNumber (const CRhinoViewport *viewport) |
static unsigned int | TailRuntimeSerialNumber () |
static ON::view_type | ViewTypeFromActiveSpace (ON::active_space active_space) |
Public Attributes | |
ON_3dmView | m_v |
pretend these are private and you'll be happier. More... | |
ON_ClassArray< ON_3dmView > | m_view_stack |
int | m_view_stack_index = -1 |
-1 or index of view in use More... | |
Friends | |
class | CRhinoDetailViewObject |
class | CRhinoView |
class | CRhViewportPrivate |
Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete Rhino SDK copyright information see http://www.rhino3d.com/developer.
CRhinoViewport::CRhinoViewport | ( | ) |
CRhinoViewport::~CRhinoViewport | ( | ) |
|
static |
CRhinoDisplayPipeline* CRhinoViewport::AttachPipeline | ( | CRhinoDisplayPipeline * | ) |
unsigned int CRhinoViewport::ChangeCounter | ( | ) | const |
Description: The value of change counter is incremented every time the view projection or construction plane changes. The user can the mouse and nestable view manipulation commands to change a view at any time. The value value of change counter can be used to detect these changes in code that is sensitive to the view projection. Returns: current value of change counter. (m_vp_iteration) Example: change_counter0 = vp.ChangeCounter(). ... if ( change_counter0 != vp.ChangeCounter() ) { view projection changed }
void CRhinoViewport::ClearUndoInformation | ( | bool | bClearProjections = true , |
bool | bClearCPlanes = true |
||
) |
Description: Clears saved view projections and cplanes. Parameters: bClearProjections - [in] if true, then saved view projections are cleared. bClearCPlanes - [in] if true, then saved construction planes are cleared. Remarks: This function should be used only in special circumstances, like when a new file is read. Calling this function destroys the information needed in commands likeUndoView and CPlaneNext/CPlanePrevious.
bool CRhinoViewport::ClientToScreenPort | ( | ON_2iPoint & | pt | ) | const |
Description: Convert a point in parent CRhinoView client window coordinates to the ON_Viewport screen port client coordinates. The screen port of a CRhinoViewport may not match the client area of the parent CRhinoView. This occurs in cases when the CRhinoViewport is a nested child viewport Parameters: pt [in/out]: point in client coordinates of parent CRhinoView window as input. This is converted to the screen port client coordinates of the ON_Viewport as output Returns: true if the point is inside of the CRhinoViewport's screen port rectangle
const ON_3dmConstructionPlane& CRhinoViewport::ConstructionPlane | ( | ) | const |
Returns: Viewport construction plane
void CRhinoViewport::CopyFrom | ( | const CRhinoViewport & | src, |
bool | copy_id, | ||
bool | copy_parent_view | ||
) |
void CRhinoViewport::CopyFrom | ( | const CRhinoViewport & | src, |
bool | copy_id = false |
||
) |
Description: Similar to an operator= except this will not modify the viewport id unless told to. Items not copied are: m_draw_step, m_vp_iteration, m_xform_iteration, m_dp m_cplane_stack, m_cplane_stack_index Parameters: src [in]: CRhinoViewport to copy information from copy_id [in]: If true, this viewport's id will be changed to match that of src. This is typically NOT something that you want to do. This set to true for operations like printing in order to work with a temporary CRhinoViewport that is an exact duplicate of the src viewport
bool CRhinoViewport::DisplayModeIsShaded | ( | void | ) | const |
Determine if this viewport's display attributes support "shading". This assumption here is that if shading is supported, then objects will be shaded.
CRhinoDisplayPipeline* CRhinoViewport::DisplayPipeline | ( | void | ) | const |
unsigned int CRhinoViewport::DocumentRuntimeSerialNumber | ( | ) | const |
Returns: The serial number of the view's document, if one exists. Zero if there is no view or no document associated with this viewport.
bool CRhinoViewport::DollyExtents | ( | ON_BoundingBox | bbox, |
ON::coordinate_system | cs | ||
) |
Description: Dolly the camera (change its location) so that the bbox is centered in the viewport and fills the central region of the viewport. The "target" point is updated to be the center of the bounding box. Parameters: bbox - [in] cs - [in] coordinates system of the bounding box. NOTE WELL: If cs is anything besides ON::world_cs, the the coordinates are with respect to the current projection returned by this->VP(). Note that the call to DollyExtents will change the projection so that any non-world coordinate bbox will not be valid after the function returns. If this is confusing, then restrict yourself to using world coordinate bounding boxes and cs = ON::world_cs. Remarks: The Rhino "ZoomExtents" command uses DollyExtents to calculate the view projection. Technically, "zoom" would leave the camera location fixed and modify the camera angle.
bool CRhinoViewport::DownUpDolly | ( | double | ) |
down < 0 < up
bool CRhinoViewport::DownUpRotate | ( | double | ) |
down < 0 < up
void CRhinoViewport::DrawActivePoint | ( | const ON_3dPoint & | ) |
void CRhinoViewport::DrawArc | ( | const ON_Arc & | ) |
void CRhinoViewport::DrawBezier | ( | const ON_BezierCurve & | ) |
void CRhinoViewport::DrawBezierCage | ( | const ON_BezierSurface & | , |
int | display_density = 1 |
||
) |
void CRhinoViewport::DrawBezierSurface | ( | const ON_BezierSurface & | , |
int | display_density = 1 |
||
) |
void CRhinoViewport::DrawBoundingBox | ( | const ON_BoundingBox & | ) |
void CRhinoViewport::DrawBox | ( | const ON_3dPoint * | box_corners | ) |
void CRhinoViewport::DrawBrep | ( | const ON_Brep & | , |
int | display_density = 1 |
||
) |
void CRhinoViewport::DrawCircle | ( | const ON_Circle & | ) |
ON_Color CRhinoViewport::DrawColor | ( | ) | const |
void CRhinoViewport::DrawCone | ( | const ON_Cone & | cone | ) |
void CRhinoViewport::DrawConstructionPlane | ( | const ON_3dmConstructionPlane & | cplane, |
BOOL32 | bShowConstructionGrid, | ||
BOOL32 | bShowConstructionAxes, | ||
BOOL32 | bShowConstructionZAxis, | ||
COLORREF | thin_line_color = ON_UNSET_COLOR , |
||
COLORREF | thick_line_color = ON_UNSET_COLOR , |
||
COLORREF | grid_x_axis_color = ON_UNSET_COLOR , |
||
COLORREF | grid_y_axis_color = ON_UNSET_COLOR |
||
) |
void CRhinoViewport::DrawCurve | ( | const ON_Curve & | curve | ) |
void CRhinoViewport::DrawCylinder | ( | const ON_Cylinder & | cylinder | ) |
void CRhinoViewport::DrawDirectionArrow | ( | const ON_3dPoint & | , |
const ON_3dVector & | , | ||
ON_3dPoint * | head_point = NULL |
||
) |
void CRhinoViewport::DrawDot | ( | int | screen_x, |
int | screen_y, | ||
const wchar_t * | text = NULL , |
||
COLORREF | dot_color = RGB(0, 0, 0) , |
||
COLORREF | text_color = ON_UNSET_COLOR |
||
) |
void CRhinoViewport::DrawDot | ( | ON_3dPoint | point, |
const wchar_t * | text = NULL , |
||
COLORREF | dot_color = RGB(0, 0, 0) , |
||
COLORREF | text_color = ON_UNSET_COLOR |
||
) |
void CRhinoViewport::DrawDottedLine | ( | const ON_3dPoint & | , |
const ON_3dPoint & | |||
) |
void CRhinoViewport::DrawExtrusion | ( | const ON_Extrusion & | ) |
void CRhinoViewport::DrawFalseColorMesh | ( | const ON_Mesh * | , |
bool | bCullCW, | ||
COLORREF | edge_color = ON_UNSET_COLOR |
||
) |
void CRhinoViewport::DrawLight | ( | const ON_Light & | light, |
COLORREF | wireframe_color | ||
) |
void CRhinoViewport::DrawLine | ( | const ON_3dPoint & | , |
const ON_3dPoint & | |||
) |
void CRhinoViewport::DrawNurbsCage | ( | const ON_NurbsCage & | , |
int | display_density = 1 |
||
) |
void CRhinoViewport::DrawNurbsCurve | ( | const ON_NurbsCurve & | nurbs_curve | ) |
void CRhinoViewport::DrawNurbsSurface | ( | const ON_NurbsSurface & | , |
int | display_density = 1 |
||
) |
void CRhinoViewport::DrawPoint | ( | const ON_3dPoint & | , |
const ON_3dVector * | = nullptr |
||
) |
void CRhinoViewport::DrawPointCloud | ( | int | point_count, |
const ON_3dPoint * | points, | ||
const ON_3dPoint & | origin | ||
) |
void CRhinoViewport::DrawRenderPreviewMesh | ( | const ON_Mesh * | , |
const CRhinoMaterial & | render_material, | ||
BOOL32 | bCullCW, | ||
BOOL32 | bHighlighted | ||
) |
void CRhinoViewport::DrawRhinoObject | ( | const CRhinoObject * | , |
ON_Xform | xform, | ||
ON_Color | color = ON_UNSET_COLOR |
||
) |
void CRhinoViewport::DrawShadedMesh | ( | const ON_Mesh * | , |
bool | bCullCW, | ||
bool | bFlatShade, | ||
bool | bHighlighted | ||
) |
void CRhinoViewport::DrawSphere | ( | const ON_Sphere & | sphere | ) |
void CRhinoViewport::DrawString | ( | const wchar_t * | string, |
int | slength, | ||
const ON_3dPoint & | point, | ||
int | bMiddle = false , |
||
int | rotation = 0 , |
||
int | height = 12 , |
||
const wchar_t * | fontface = L"Arial" |
||
) |
void CRhinoViewport::DrawSurface | ( | const ON_Surface & | , |
int | display_density = 1 |
||
) |
void CRhinoViewport::DrawTangentBar | ( | const ON_3dPoint & | , |
const ON_3dVector & | , | ||
ON_3dPoint * | start_point = NULL , |
||
ON_3dPoint * | end_point = NULL |
||
) |
void CRhinoViewport::DrawTorus | ( | const ON_Torus & | torus | ) |
void CRhinoViewport::DrawTriangle | ( | const ON_3dPoint & | p0, |
const ON_3dPoint & | p1, | ||
const ON_3dPoint & | p2 | ||
) |
void CRhinoViewport::DrawTriangle | ( | const ON_3dPoint | corners[3] | ) |
void CRhinoViewport::EnableFlatShade | ( | bool | bFlatShade = true | ) |
Description: By default, shaded viewports can either use smooth shading. If flat shading is enabled, then mesh objects are flat shaded. Parameters: bFlatShade - [in] If true, all mesh objects in this viewport will be flat shaded.
See Also: CRhinoViewport::SetDisplayMode CRhinoViewport::EnableSelectedShade CRhinoViewport::FlatShade
void CRhinoViewport::EnableSelectedShade | ( | bool | bSelectedShade = true | ) |
Description: By default, all surface and mesh objects are shaded in shaded viewports. If bSelectedShade is true, then only selected mesh and solid objects are shaded. Parameters: bSelectedShade - [in] If true, only selected mesh and surface objects are shaded in shaded. See Also: CRhinoViewport::SetDisplayMode CRhinoViewport::EnableFlatShade CRhinoViewport::SelectedShade
bool CRhinoViewport::FlatShade | ( | ) | const |
Returns: True if all mesh objects in this viewport will be flat shaded.
See Also: CRhinoViewport::EnableFlatShade
|
static |
Parameters: rhino_viewport_sn - [out] CRhinoViewport runtime serial number Returns: A pointer to the CRhinoViewport class with the specified runtime serial number or null if none exists.
|
static |
Parameters: rhino_doc_sn - [in] 0: iteration ignores the document a viewportport is associated with. >0: iteration is restricted to viewportports associated with a specific document. rhino_view_sn - [in] 0: iteration ignores the viewport a viewportport is associated with. >0: iteration is restricted to viewportports associated with the specified viewport. rhino_viewport_id - [in]
ON_DEPRECATED void CRhinoViewport::GetDisplayXform | ( | ON_Xform & | display_xform | ) | const |
Description: Get the display transformation that is applied to the projected geometry immediately before it is drawn.
Parameters: display_xform - [out] Remarks: The default display transformation is the identity. The display transformation is intended to be used in printing applications. The camera and projection transformations are handled in the m_v settings. See Also: CRhinoViewport::SetDisplayXform
bool CRhinoViewport::GetElevatorHeight | ( | const ON_Line & | world_line, |
const ON_3dPoint & | elevator_basepoint, | ||
const ON_3dVector & | elevator_axis, | ||
BOOL32 | bGridSnap, | ||
double | grid_snap_spacing, | ||
double * | elevator_height | ||
) | const |
Description: Calculate elevator mode point Parameters: world_line - [in] line from near to far clipping plane that projects to mouse point. elevator_basepoint - [in] elevator_axis - [in] unit vector bGridSnap - [in] true if grid snap is enabled. When in doubt, use value of RhinoApp().AppSettings().GridSnap(). grid_snap_spacing - [in] grid snap distance. When in doubt, use value of ConstructionPlane().m_snap_spacing elevator_height -[out] elevator height returned here. Returns: true if point is successfully calculated. The 3d location is elevator_basepoint + elevator_height*elevator_axis.
void CRhinoViewport::GetMarkedObjectXform | ( | int * | mark_value, |
ON_Xform & | marked_object_xform | ||
) | const |
Description: Get the display transformation that is applied to marked objects. Parameters: mark_value - [out] marked_object_xform - [out] See Also: CRhinoViewport::SetMarkedObjectXform
void CRhinoViewport::GetModelXform | ( | ON_Xform & | model_xform | ) | const |
Description: Get the model transformation that is applied to geometry before it is drawn. Parameters: model_xform - [out] Remarks: The default model transformation is the identity. The model transformation is intended to be used for dynamic drawing of objects. The camera and projection transformations are handled in the m_v settings. See Also: CRhinoViewport::SetModelXform
bool CRhinoViewport::GetPickXform | ( | int | , |
int | , | ||
ON_Xform & | |||
) | const |
picking
GetPickXform 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.
const class CRhTraceImage* CRhinoViewport::GetTraceImage | ( | void | ) | const |
|
static |
Description: In most cases, it is easier, faster and more robust to use a CRhinoViewportIterator to go through the list of viewports. In the rare case when you really do want a list of all existing viewport serial numbers, use this function. Parameters: rhino_doc_sn - [in] 0: iteration ignores the document a viewportport is associated with. >0: iteration is restricted to viewportports associated with a specific document. rhino_view_sn - [in] 0: iteration ignores the viewport a viewportport is associated with. >0: iteration is restricted to viewportports associated with the specified viewport. rhino_viewport_sn_list - [out] list of rhino viewport serial numbers in increasing order. Returns: Number of rhino viewport serial numbers in rhino_viewport_sn_list[]. See Also: CRhinoViewportIterator
|
static |
Description: In most cases, it is easier, faster and more robust to use a CRhinoViewportIterator to go through the list of viewports. In the rare case when you really do want a list of existing viewport serial numbers, use this function. Parameters: rhino_doc_sn - [in] 0: iteration ignores the document a viewportport is associated with. >0: iteration is restricted to viewportports associated with a specific document. rhino_view_sn - [in] 0: iteration ignores the viewport a viewportport is associated with. >0: iteration is restricted to viewportports associated with the specified viewport. rhino_viewport_sn0 - [in] Serial numbers <= rhino_viewport_sn0 will not be added to rhino_viewport_sn_list[]. rhino_viewport_sn_list_capacity - [in] maximum number of elements in rhino_viewport_sn_list[] array. rhino_viewport_sn_list - [out] list of rhino viewport serial numbers > rhino_viewport_sn0. Returns: Number of rhino viewports set in rhino_viewport_sn_list[]. See Also: CRhinoViewportIterator
const class CRhWallpaper* CRhinoViewport::GetWallpaperImage | ( | void | ) | const |
bool CRhinoViewport::GetZBuffer | ( | class CRhinoZBuffer & | ) | const |
Description: Retrieves the exact contents of this viewport's entire z-buffer. Meaning, what you see is what you get...If you want to change the output contents of the z-buffer, (ie. forced shading) then you should construct your own CRhinoZBuffer
object using this viewport, make the appropirate CRhinoZBuffer method calls, and then "Capture()" the z-buffer (see CRhinoZBuffer for details). Parameters: CRhinoZBuffer& : output parameter that will contain all captured z-buffer info. Returns: true: If z-buffer was successfully captured... false: If no z-buffer was captured (or some other failure occurred).
Examples:
CRhinoZBuffer zbuffer;
/ Test contents of entire zbuffer... if ( pView->Viewport().GetZBuffer( zbuffer ) )
for (int y = 0; y < zbuffer.Height(); y++) for (int x = 0; x < zbuffer.Width(); x++) { float z = zbuffer.ZValue( x, y );
if ( (z > 0.0) && (z < 1.0) ) { / Then point (x,y) 'hit' something... } }
/ Test contents of a rectangular area within the z-buffer and convert / the hit points to 3D world coordinates... CRhinoZBuffer zbuffer; CRect rect = some rectangular portion of the viewport... ON_SimpleArray<ON_3dPoint> points;
if ( pView->Viewport().GetZBuffer( zbuffer ) ) for (int y = rect.top; y < rect.bottom; y++) for (int x = rect.left; x < rect.right; x++) { float z = zbuffer.ZValue( x, y );
if ( (z > 0.0) && (z < 1.0) ) { points.Append( zbuffer.WorldPoint( x, y ) ); } }
|
static |
Returns: The serial number of the oldest viewport that exists or 0 if no viewports exist. This will be the smallest serial number of any viewport that currently exits.
bool CRhinoViewport::InOutDolly | ( | double | ) |
out < 0 < in
bool CRhinoViewport::InterruptDrawing | ( | ) | const |
bool CRhinoViewport::IsMainViewportTopViewOnly | ( | ) | const |
Description: Determines if this viewport is should be able to be panned and zoomed, but not rotated or changed to a different camera view vector. This is used by functions that attempt to set the viewport's projection. If the projection is not compatible with a page view / UV Editor view and IsMainViewportTopViewOnly() == true, then the setting of the projection is not allowed Return: true if thie viewport is the main viewport for a CRhinoPageView
bool CRhinoViewport::IsModelView | ( | ) | const |
Description: Return true if m_v.m_view_type == ON::model_view_type.
bool CRhinoViewport::IsNamedView | ( | bool & | modified | ) |
returns true if the view is very similar to an existing named view in the document
bool CRhinoViewport::IsPageViewMainViewport | ( | ) | const |
Description: Determines if this viewport is the main viewport for a page view. Page views should be able to be panned and zoomed, but not rotated or changed to a different camera view vector. This is used by functions that attempt to set the viewport's projection. If the projection is not compatible with a page view and IsPageViewMainViewport() == true, then the setting of the projection is not allowed Return: true if thie viewport is the main viewport for a CRhinoPageView
bool CRhinoViewport::IsPlanView | ( | ) | const |
returns true if construction plane z axis is parallel to camera direction.
bool CRhinoViewport::IsThickDisplayActive | ( | double * | thickness_scale = nullptr | ) | const |
Description: Determines if printing or "print display" is active for this viewport Parameters: thickness_scale [out] - optional. Scale applied to an object's plot thickness for displaying on the screen or printing Returns: true if printing or print display is active for this viewport
bool CRhinoViewport::IsTraceImage | ( | ) |
Description: Verifies the existence of background bitmap. Parameters: None. Returns: True if a background bitmap exists. False otherwise Remarks: THIS FUNCTION IS DEPRECATED AND WILL BE REMOVED IN THE FUTURE. If you require similar functionality, use RhinoCreatePictureFrame(). See rhinoSdkObject.h for details.
|
static |
Returns: True if rhino_viewport is null or points to an existing CRhinoViewport.
|
static |
bool CRhinoViewport::IsVisible | ( | const ON_3dPoint & | ) | const |
Description: returns true if the world coordinate point is visible in the viewing frustum.
bool CRhinoViewport::IsVisible | ( | const ON_BoundingBox & | ) | const |
Description: returns true if some portion world coordinate bounding box is potentially visible in the viewing frustum.
bool CRhinoViewport::IsWallpaperImage | ( | ) |
Description: Verifies the existence of a wallpaper. Parameters: None. Returns: True if a wallpaper exists. False otherwise
bool CRhinoViewport::IsXUp | ( | ) | const |
viewports are either x-up, y-up, or z-up
bool CRhinoViewport::IsYUp | ( | ) | const |
bool CRhinoViewport::IsZUp | ( | ) | const |
|
inline |
bool CRhinoViewport::LateralDolly | ( | double | x, |
double | y | ||
) |
left x < 0 < right x, down y < 0 < up y
bool CRhinoViewport::LeftRightDolly | ( | double | ) |
left < 0 < right
bool CRhinoViewport::LeftRightRotate | ( | double | ) |
keyboard arrow key interaction tools
left < 0 < right
bool CRhinoViewport::Magnify | ( | double | , |
int | , | ||
const ON_2iPoint * | = nullptr |
||
) |
bool CRhinoViewport::MouseAdjustLensLength | ( | const ON_2iPoint & | mouse0, |
const ON_2iPoint & | mouse1, | ||
bool | bMoveTarget = false |
||
) |
bool CRhinoViewport::MouseDollyZoom | ( | const ON_2iPoint & | mouse0, |
const ON_2iPoint & | mouse1 | ||
) |
bool CRhinoViewport::MouseInOutDolly | ( | const ON_2iPoint & | mouse0, |
const ON_2iVector & | mouse1 | ||
) |
bool CRhinoViewport::MouseLateralDolly | ( | const ON_2iPoint & | mouse0, |
const ON_2iVector & | mouse1 | ||
) |
bool CRhinoViewport::MouseMagnify | ( | const ON_2iPoint & | mouse0, |
const ON_2iPoint & | mouse1 | ||
) |
bool CRhinoViewport::MouseRotateCamera | ( | const ON_2iPoint & | mouse0, |
const ON_2iPoint & | mouse1 | ||
) |
Description: Rotate view around camera location.
bool CRhinoViewport::MouseRotateView | ( | const ON_2iPoint & | mouse0, |
const ON_2iPoint & | mouse1 | ||
) |
mouse interaction tools
Description: Rotate view around target.
bool CRhinoViewport::MouseTilt | ( | const ON_2iPoint & | mouse0, |
const ON_2iPoint & | mouse1 | ||
) |
ON_3dVector CRhinoViewport::MouseTrackballVector | ( | int | , |
int | |||
) | const |
ON_wString CRhinoViewport::Name | ( | ) | const |
bool CRhinoViewport::NextConstructionPlane | ( | ) |
Description: Sets the construction plane to the plane that was active before the last call to PrevConstructionPlane. Returns: true if a construction plane was popped. See Also: CRhinoViewport::PushConstructionPlane, CRhinoViewport::SetConstructionPlane CRhinoViewport::ConstructionPlane
bool CRhinoViewport::NextViewProjection | ( | ) |
Description: Sets the view projection and target to the settings that were active before the last call to PrevView. Returns: true if the view stack was popped.
void CRhinoViewport::operator delete | ( | void * | ) |
void CRhinoViewport::operator delete | ( | void * | , |
void * | |||
) |
void CRhinoViewport::operator delete[] | ( | void * | ) |
void* CRhinoViewport::operator new | ( | size_t | ) |
Override operator new/delete to make sure allocate/deallocate occurs in same memory manager See comments at the top of opennurbs_object.cpp for details. new/delete
void* CRhinoViewport::operator new | ( | size_t | , |
void * | |||
) |
in place new/delete
void* CRhinoViewport::operator new[] | ( | size_t | ) |
array new/delete
CRhinoView* CRhinoViewport::ParentView | ( | ) | const |
Description: Gets the parent view, if there is one. Returns: A pointer to the parent view or NULL. Remarks: Every CRhinoView has an associated CRhinoViewport that does all the 3d display work. Those associated viewports return the CRhinoView as their parent view. However, CRhinoViewports are used in other image creating contexts that do not have a parent CRhinoView. If you call ParentView, you MUST check for NULL return values.
bool CRhinoViewport::PopConstructionPlane | ( | ) |
Description: Sets the construction plane to the plane that was active before the last call to PushConstructionPlane. Returns: true if a construction plane was popped. See Also: CRhinoViewport::PushConstructionPlane, CRhinoViewport::SetConstructionPlane CRhinoViewport::ConstructionPlane
bool CRhinoViewport::PopViewProjection | ( | ) |
Description: Sets the view projection and target to the settings at the top of the view stack and removes those settings from the view stack.
bool CRhinoViewport::PrevConstructionPlane | ( | ) |
Description: Sets the construction plane to the plane that was active before the last call to NextConstructionPlane or SetConstructionPlane. Returns: true if a construction plane was popped. See Also: CRhinoViewport::PushConstructionPlane, CRhinoViewport::SetConstructionPlane CRhinoViewport::ConstructionPlane
bool CRhinoViewport::PrevViewProjection | ( | ) |
Description: Sets the view projection and target to the settings that were active before the last call to NextViewProjection. Returns: true if the view stack was popped.
void CRhinoViewport::PushConstructionPlane | ( | const ON_3dmConstructionPlane & | cplane | ) |
Description: Pushes the current construction plane on the viewport's construction plane stack and sets the construction plane to cplane. Parameters: cplane - [in] Returns: true if a construction plane was popped. See Also: CRhinoViewport::PopConstructionPlane, CRhinoViewport::SetConstructionPlane CRhinoViewport::ConstructionPlane
void CRhinoViewport::PushViewProjection | ( | ) |
Description: Appends the current view projection and target to the viewport's view stack.
bool CRhinoViewport::RestoreNamedView | ( | const ON_3dmView & | view, |
CRhinoDoc * | pDoc = nullptr , |
||
bool | bAspectRatio = false , |
||
bool | bAnimate = false , |
||
bool | bConstantSpeed = false , |
||
int | frames = 100 , |
||
double | units_per_frame = 1.0 , |
||
int | delay = 10 |
||
) |
Description: Expert user function to set viewport projection, target location, name, display mode, window location in the Rhino mainframe, construction plane and wallpaper bitmap using the same code used by the NamedView command - including support for animation fixed-aspect ratio and so on. Parameters: view - [in] The view to set. pDoc - [in] The document is only used to retrieve information about other affected objects and data, including clipping planes. Can be nullptr.
unsigned int CRhinoViewport::RuntimeSerialNumber | ( | ) | const |
|
static |
int CRhinoViewport::ScreenHeight | ( | ) | const |
int CRhinoViewport::ScreenWidth | ( | ) | const |
bool CRhinoViewport::SelectedShade | ( | ) | const |
Returns: True if only selected objects are shaded. See Also: CRhinoViewport::EnableSelectedShade
void CRhinoViewport::SetCameraDirection | ( | ON_3dVector | camera_direction, |
BOOL32 | bUpdateTargetLocation = true |
||
) |
Description: 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. Parameters: camera_direction - [in] new camera direction bUpdateTarget - [in] if true, the target location is changed so that the vector from the camera location to the target is parallel to the camera direction. If false, the target location is not changed. See the remarks section of CRhinoViewport::SetTarget for important details. Remarks: See the remarks section of CRhinoViewport::SetTarget for important details. See Also: CRhinoViewport::Target CRhinoViewport::SetTarget CRhinoViewport::SetTargetAndCameraLocation CRhinoViewport::SetCameraLocation CRhinoViewport::SetCameraDirection CRhinoViewport::SetVP CRhinoViewport::SetView
void CRhinoViewport::SetCameraLocation | ( | ON_3dPoint | camera_location, |
BOOL32 | bUpdateTargetLocation = true |
||
) |
Description: 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. Parameters: camera_location - [in] new target location bUpdateTarget - [in] if true, the target location is changed so that the vector from the camera location to the target is parallel to the camera direction vector.
If false, the target location is not changed. See the remarks section of CRhinoViewport::SetTarget for important details. Remarks: See the remarks section of CRhinoViewport::SetTarget for important details. See Also: CRhinoViewport::Target CRhinoViewport::SetTarget CRhinoViewport::SetTargetAndCameraLocation CRhinoViewport::SetCameraLocation CRhinoViewport::SetCameraDirection CRhinoViewport::SetVP CRhinoViewport::SetView
void CRhinoViewport::SetClippingPlanes | ( | const ON_BoundingBox & | ) |
set optimal clipping planes to view objects in a world coordinate 3d bounding box
bool CRhinoViewport::SetClippingRegionTransformation | ( | const ON_4iRect & | , |
class ON_ClippingRegion & | clip_region | ||
) | const |
bool CRhinoViewport::SetClippingRegionTransformation | ( | int | , |
int | , | ||
class ON_ClippingRegion & | clip_region | ||
) | const |
void CRhinoViewport::SetConstructionPlane | ( | const ON_3dmConstructionPlane & | cplane | ) |
Description: Sets the construction plane to cplane. Parameters: cplane - [in] See Also: CRhinoViewport::PushConstructionPlane, CRhinoViewport::PopConstructionPlane CRhinoViewport::ConstructionPlane
bool CRhinoViewport::SetDisplayMode | ( | const ON_UUID & | ) |
A viewport's display mode can be determined by using the uuid of one of the predefined or user defined display attributes, (see CDisplayPipelineAttributes)...
ON_DEPRECATED void CRhinoViewport::SetDisplayXform | ( | const ON_Xform & | display_xform | ) |
Description: Set the display transformation that is applied to the projected geometry immediately before it is drawn.
Parameters: display_xform - [in] Remarks: The default display transformation is the identity. The display transformation is intended to be used in printing applications. The camera and projection transformations are handled in the m_v settings. See Also: CRhinoViewport::SetModelXform CRhinoViewport::GetDisplayXform
ON_Color CRhinoViewport::SetDrawColor | ( | COLORREF | color | ) |
void CRhinoViewport::SetMarkedObjectXform | ( | int | mark_value, |
const ON_Xform & | marked_object_xform | ||
) |
Description: Set the display transformation that is applied to marked objects. Parameters: mark_value - [in] if not zero, then objects with this mark value are displayed using the marked_object_xform. marked_object_xform - [in] Remarks: The default marked object transformation is the identity. The marked object transformation is intended to be used when inserting models. See Also: CRhinoViewport::SetModelXform CRhinoViewport::GetMarkedObjectXform
void CRhinoViewport::SetModelXform | ( | const ON_Xform & | model_xform | ) |
Description: Set the model transformation that is applied to geometry before it is drawn. Parameters: model_xform - [in] Remarks: The default model transformation is the identity. The model transformation is intended to be used for dynamic drawing of objects. The camera and projection transformations are handled in the m_v settings. See Also: CRhinoViewport::SetDisplayXform CRhinoViewport::GetModelXform
bool CRhinoViewport::SetName | ( | const wchar_t * | ) |
viewport properties
void CRhinoViewport::SetScreenSize | ( | int | width, |
int | height, | ||
bool | forceRegen = false |
||
) |
Drawing controls
void CRhinoViewport::SetShowConstructionAxes | ( | BOOL32 | ) |
void CRhinoViewport::SetShowConstructionGrid | ( | BOOL32 | ) |
void CRhinoViewport::SetShowWorldAxes | ( | BOOL32 | ) |
void CRhinoViewport::SetTarget | ( | ON_3dPoint | target_location, |
BOOL32 | bUpdateCameraLocation = true |
||
) |
Description: 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. Parameters: target_location - [in] new target location bUpdateCameraLocation - [in] if true, the camera location is translated so that the camera direction vector is parallel to the vector from the camera location to the target location.
If false, the camera location is not changed. See the remarks section for important details. Remarks: In general, Rhino users expect to have the camera direction vector and the vector from the camera location to the target location to be parallel. If you use the CRhinoViewport functions listed in the see also section to set the camera location, camera direction, and target point, then the relationship between these three points and vectors is automatically maintained. If you directly manipulate the camera by using the CRhinoViewport::SetVP member function, then you should carefully set the target by calling SetTarget() with bUpdateCameraLocation=false. See Also: CRhinoViewport::Target CRhinoViewport::SetTarget CRhinoViewport::SetTargetAndCameraLocation CRhinoViewport::SetCameraLocation CRhinoViewport::SetCameraDirection CRhinoViewport::SetVP CRhinoViewport::SetView
void CRhinoViewport::SetTargetAndCameraLocation | ( | ON_3dPoint | target_location, |
ON_3dPoint | camera_location, | ||
BOOL32 | bUpdateCameraDirection = true , |
||
BOOL32 | bAddToViewStack = true |
||
) |
Description: Set viewport camera location and target location. By default the camera direction vector is changed so that it is parallel to the vector from the camera location to the target location. Parameters: target_location - [in] new target location camera_location - [in] new camera location bUpdateCameraDirection - [in] if true, the camera direction vector is changed so that it is parallel to the vector from the camera location to the target location. If false, the camera direction vector is not changed. See the remarks section of CRhinoViewport::SetTarget for important details. bAddToViewStack - [in] if true, the new viewport is added to view stack so UndoView will restore the previous one. If false, the viewport is not added to view stack, which is useful if this is called from dynamic view manipulation. Remarks: See the remarks section of CRhinoViewport::SetTarget for important details. See Also: CRhinoViewport::Target CRhinoViewport::SetTarget CRhinoViewport::SetTargetAndCameraLocation CRhinoViewport::SetCameraLocation CRhinoViewport::SetCameraDirection CRhinoViewport::SetVP CRhinoViewport::SetView
bool CRhinoViewport::SetToBackView | ( | const wchar_t * | sViewName = nullptr , |
BOOL32 | bUpdateConstructionPlane = true |
||
) |
Description: Set view to parallel projection with world Z pointing up and world X pointing to the left. Parameters: sViewName - [in] if not NULL, the view name is set Parameters: sViewName - [in] if not NULL, then view name is also set bUpdateConstructionPlane - [in] if true, then the construction plane is set to the view plane. Returns: true if successful See Also CRhinoViewport::SetConstructionPlane, CRhinoViewport::SetName, CRhinoViewport::IsXUp, CRhinoViewport::IsYUp, CRhinoViewport::IsZUp
bool CRhinoViewport::SetToBottomView | ( | const wchar_t * | sViewName = nullptr , |
BOOL32 | bUpdateConstructionPlane = true |
||
) |
Description: Set view to parallel projection with world Y pointing down and world X pointing to the right. Parameters: sViewName - [in] if not NULL, the view name is set Parameters: sViewName - [in] if not NULL, then view name is also set bUpdateConstructionPlane - [in] if true, then the construction plane is set to the view plane. Returns: true if successful See Also CRhinoViewport::SetConstructionPlane, CRhinoViewport::SetName, CRhinoViewport::IsXUp, CRhinoViewport::IsYUp, CRhinoViewport::IsZUp
bool CRhinoViewport::SetToFrontView | ( | const wchar_t * | sViewName = nullptr , |
BOOL32 | bUpdateConstructionPlane = true |
||
) |
Description: Set view to parallel projection with world Z pointing up and world X pointing to the right. Parameters: sViewName - [in] if not NULL, the view name is set Parameters: sViewName - [in] if not NULL, then view name is also set bUpdateConstructionPlane - [in] if true, then the construction plane is set to the view plane. Returns: true if successful See Also CRhinoViewport::SetConstructionPlane, CRhinoViewport::SetName, CRhinoViewport::IsXUp, CRhinoViewport::IsYUp, CRhinoViewport::IsZUp
bool CRhinoViewport::SetToLeftView | ( | const wchar_t * | sViewName = nullptr , |
BOOL32 | bUpdateConstructionPlane = true |
||
) |
Description: Set view to parallel projection with world Z pointing up and world Y pointing to the left. Parameters: sViewName - [in] if not NULL, the view name is set Parameters: sViewName - [in] if not NULL, then view name is also set bUpdateConstructionPlane - [in] if true, then the construction plane is set to the view plane. Returns: true if successful See Also CRhinoViewport::SetConstructionPlane, CRhinoViewport::SetName, CRhinoViewport::IsXUp, CRhinoViewport::IsYUp, CRhinoViewport::IsZUp
bool CRhinoViewport::SetToPerspectiveView | ( | const wchar_t * | sViewName = nullptr , |
BOOL32 | bUpdateConstructionPlane = true |
||
) |
Description: Set view to bird's eye perspective projection. Parameters: sViewName - [in] if not NULL, the view name is set Parameters: sViewName - [in] if not NULL, then view name is also set bUpdateConstructionPlane - [in] if true, then the construction plane is set to the world XY plane Returns: true if successful See Also CRhinoViewport::SetConstructionPlane, CRhinoViewport::SetName, CRhinoViewport::IsXUp, CRhinoViewport::IsYUp, CRhinoViewport::IsZUp
bool CRhinoViewport::SetToPlanView | ( | const ON_3dPoint & | , |
const ON_3dVector & | , | ||
const ON_3dVector & | , | ||
BOOL32 | = false |
||
) |
Default views.
bool CRhinoViewport::SetToRightView | ( | const wchar_t * | sViewName = nullptr , |
BOOL32 | bUpdateConstructionPlane = true |
||
) |
Description: Set view to parallel projection with world Z pointing up and world Y pointing to the right. Parameters: sViewName - [in] if not NULL, the view name is set Parameters: sViewName - [in] if not NULL, then view name is also set bUpdateConstructionPlane - [in] if true, then the construction plane is set to the view plane. Returns: true if successful See Also CRhinoViewport::SetConstructionPlane, CRhinoViewport::SetName, CRhinoViewport::IsXUp, CRhinoViewport::IsYUp, CRhinoViewport::IsZUp
bool CRhinoViewport::SetToTopView | ( | const wchar_t * | sViewName = nullptr , |
BOOL32 | bUpdateConstructionPlane = true |
||
) |
Description: Set view to parallel top view projection. Parameters: sViewName - [in] if not NULL, then view name is also set bUpdateConstructionPlane - [in] if true, then the construction plane is set to the view plane. Returns: true if successful See Also CRhinoViewport::SetConstructionPlane, CRhinoViewport::SetName, CRhinoViewport::IsXUp, CRhinoViewport::IsYUp, CRhinoViewport::IsZUp
bool CRhinoViewport::SetToTwoPointPerspectiveView | ( | const wchar_t * | sViewName, |
bool | bUpdateConstructionPlane = true |
||
) |
Description: Set view to the Rhino default two point perspective projection. Parameters: sViewName - [in] if not NULL, the view name is set bUpdateConstructionPlane - [in] Set construction plane to be parallel to ground plane. Returns: true if successful
bool CRhinoViewport::SetTraceImage | ( | const ON_3dmViewTraceImage & | traceimage | ) |
Description: Sets the background bitmap. Parameters: traceimage - [in] Returns: True if successful. Remarks: THIS FUNCTION IS DEPRECATED AND WILL BE REMOVED IN THE FUTURE. If you require similar functionality, use RhinoCreatePictureFrame(). See rhinoSdkObject.h for details.
void CRhinoViewport::SetView | ( | const ON_3dmView & | view | ) |
Description: Expert user function to set viewport projection, target location, name, display mode, window location in the Rhino mainframe, construction plane, background bitmap and wallpaper bitmap. Parameters: view - [in] Remarks: This function is primarily used to save and restore view settings. If you want to modify specific viewport settings, use the functions listed in the see also section. See Also: CRhinoViewport::Target CRhinoViewport::SetTarget CRhinoViewport::SetTargetAndCameraLocation CRhinoViewport::SetCameraLocation CRhinoViewport::SetCameraDirection CRhinoViewport::SetVP CRhinoViewport::SetView
bool CRhinoViewport::SetVP | ( | const ON_Viewport & | , |
BOOL32 | bUpdateTargetLocation, | ||
BOOL32 | bAddToViewStack = true |
||
) |
Description: Set viewport camera projection. Parameters: camera_location - [in] new target location bUpdateTargetLocation - [in] if true, the target location is changed so that the vector from the camera location to the target is parallel to the camera direction vector.
If false, the target location is not changed. See the remarks section of CRhinoViewport::SetTarget for important details. bAddToViewStack - [in] if true, the new viewport is added to view stack so UndoView will restore the previous one. If false, the viewport is not added to view stack, which is useful if this is called from dynamic view manipulation. Remarks: See the remarks section of CRhinoViewport::SetTarget for important details. See Also: CRhinoViewport::Target CRhinoViewport::SetTarget CRhinoViewport::SetTargetAndCameraLocation CRhinoViewport::SetCameraLocation CRhinoViewport::SetCameraDirection CRhinoViewport::SetVP CRhinoViewport::SetView
bool CRhinoViewport::SetWallpaperImage | ( | const ON_3dmWallpaperImage & | wallpaper | ) |
Description: Sets the wallpaper bitmap. Parameters: wallpaper - [in] Returns: True if successful.
bool CRhinoViewport::ShowConstructionAxes | ( | ) | const |
controls display of construction plane axes
bool CRhinoViewport::ShowConstructionGrid | ( | ) | const |
controls display of construction plane grid
bool CRhinoViewport::ShowWorldAxes | ( | ) | const |
controls display of world axes icon
|
static |
Returns: The serial number of the newest viewport that exists or 0 if no viewports exist. This will be the largest serial number of any viewport that currently exits. Remarks: Other viewports may have been created and deleted after this viewport.
ON_3dPoint CRhinoViewport::Target | ( | ) | const |
viewport target point
bool CRhinoViewport::UpdateTransforms | ( | BOOL32 | bForceUpdate = false | ) |
Description: Update the transform cache. If m_xform_iteration != m_vp_iteration or bForceUpdate is true, the cache is updated. Returns: true if the transformations are set.
const ON_3dmView& CRhinoViewport::View | ( | ) | const |
Description: Get complete information about the viewport projection, target location, name, display mode, window location in the Rhino mainframe, construction plane, background bitmap and wallpaper bitmap. Returns: view information as an ON_3dmView. See Also: CRhinoViewport::SetView
ON_UUID CRhinoViewport::ViewportId | ( | ) | const |
Returns: m_v.m_vp.ViewportId().
|
static |
const ON_Viewport& CRhinoViewport::VP | ( | ) | const |
Description: Get viewport projection information. Returns: viewport projection information as an ON_Viewport. See Also: CRhinoViewport::SetVP
|
friend |
|
friend |
|
friend |
ON_3dmView CRhinoViewport::m_v |
pretend these are private and you'll be happier.
viewport settings
ON_ClassArray<ON_3dmView> CRhinoViewport::m_view_stack |
int CRhinoViewport::m_view_stack_index = -1 |
-1 or index of view in use