Rhino C++ API  8.6
Public Attributes | List of all members
ClippingInfo Struct Reference

#include <RhinoSdkDisplayPipeline.h>

Public Attributes

ON_BoundingBox bbox
 
double bbox_far
 
double bbox_near
 
ON_3dPoint camera_location
 
ON_3dVector camera_Y
 unit up vector More...
 
ON_3dVector camera_Z
 unit vector (negative unitized direction) More...
 
double frustum_bottom
 
double frustum_far
 
double frustum_left
 
double frustum_near
 
double frustum_right
 
double frustum_top
 
double min_near_dist
 
double min_near_over_far
 
double target_dist
 

Detailed Description

Copyright (c) 1993-2022 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.

Member Data Documentation

◆ bbox

ON_BoundingBox ClippingInfo::bbox

CRhinoDisplayPipeline::iCalcBoundingBox sets bbox. Often it is too big, but generally contains everything core Rhino knows needs to be drawn.

◆ bbox_far

double ClippingInfo::bbox_far

◆ bbox_near

double ClippingInfo::bbox_near

You can override the virtual function CRhinoDisplayPipeline::CalcClippingPlanes() and adjust the values of m_Clipping.bbox_near m_Clipping.bbox_far If you set them incorrectly, Rhino will ignore your request. bbox_near > 0 bbox_far > bbox_near

NOTE WELL: These are INPUT values used in the calculations that set the view frustum's near and far values. Use the visible portion of objects you want to set to set bbox_near and bbox_far. Specifically, do not set bbox_near = frustum_near, or you will cause "near creep" when relative depth bias is taken into account when near clipping planes are set.

◆ camera_location

ON_3dPoint ClippingInfo::camera_location

◆ camera_Y

ON_3dVector ClippingInfo::camera_Y

unit up vector

◆ camera_Z

ON_3dVector ClippingInfo::camera_Z

unit vector (negative unitized direction)

◆ frustum_bottom

double ClippingInfo::frustum_bottom

◆ frustum_far

double ClippingInfo::frustum_far

◆ frustum_left

double ClippingInfo::frustum_left

These fields report the view frustum that was set by Rhino. Unless you are doing something pretty fancy, you should ignore these values and query the actual view frustum if you want to know where it is. These values get set when core Rhino view code calculates the view frustum. None of these values are used as input to any core Rhino calculation that sets a view frustum.

◆ frustum_near

double ClippingInfo::frustum_near

◆ frustum_right

double ClippingInfo::frustum_right

◆ frustum_top

double ClippingInfo::frustum_top

◆ min_near_dist

double ClippingInfo::min_near_dist

CRhinoDisplayPipeline::iCalcClippingPlanes sets min_near_dist and min_near_over_far based on video hardware capabilities. If you want high quality display, make sure your code sets near and far so that bbox_near >= min_near_dist bbox_near >= min_near_over_far*bbox_far

◆ min_near_over_far

double ClippingInfo::min_near_over_far

◆ target_dist

double ClippingInfo::target_dist

Rhino sets this to be the distance from the camera to the target. It can generally be ignored. In situations where bbox_near and bbox_far are too far apart, target_dist can be used as a hint about what area of the frustum is the most important to show.