23 #if !defined(OPENNURBS_VIEWPORT_INC_)
24 #define OPENNURBS_VIEWPORT_INC_
229 double target_distance,
230 bool bSymmetricFrustum,
262 double target_distance,
385 double* near_dist = NULL,
386 double* far_dist = NULL
440 const double* bboxmin,
441 const double* bboxmax
444 const double* center,
474 bool bLeftRightSymmetric,
475 bool bTopBottomSymmetric,
476 double target_distance
502 bool bGrowNearFar=
false
525 double* view_plane_depth
564 bool bGrowNearFar=
false
590 bool bGrowNearFar=
false
630 double min_near_dist,
631 double min_near_over_far,
638 double min_near_dist,
639 double min_near_over_far,
641 double relative_depth_bias
704 double view_plane_depth,
709 double view_plane_depth,
854 double view_plane_depth,
928 double* half_diagonal_angle,
929 double* half_vertical_angle,
930 double* half_horizontal_angle
933 double* half_smallest_angle
936 double half_smallest_angle
964 ON::coordinate_system srcCS,
965 ON::coordinate_system destCS,
992 double* pixels_per_unit
1006 double half_view_angle,
1011 double half_view_angle,
1049 double proj_plane_dist,
1057 double dolly_distance
1182 unsigned int depth_buffer_bit_depth,
1183 double* min_near_dist,
1184 double* min_near_over_far
1216 double relative_depth_bias,
1254 double relative_depth_bias,
1269 unsigned int depth_buffer_bit_depth
1433 bool SetCameraFrame();
1447 bool SetClipModXform(
ON_Xform clip_mod_xform );
1453 double m__MIN_NEAR_DIST;
1454 double m__MIN_NEAR_OVER_FAR;
1465 ON_GetViewportRotationAngles(
1476 ON_ViewportFromRhinoView(
1477 ON::view_projection,
1507 ON_IntersectViewFrustumPlane(
ON_3dPoint m_target_point
bool SetCameraAngle(double half_smallest_angle)
ON_3dPoint FrustumCenterPoint(double target_distance) const
double FrustumTop() const
bool IsCameraFrameWorldPlan(int *, int *, int *)
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
void SetFrustumTopBottomSymmetry(bool bForceTopBottomSymmetry)
bool GetCameraExtents(int, int, const double *, ON_BoundingBox &cambbox, int bGrowBox=false) const
double FrustumFar() const
bool GetCameraExtents(const ON_BoundingBox &, ON_BoundingBox &cambbox, int bGrowBox=false) const
bool GetFrustumCenter(double *) const
bool SetFrustumNearFar(double near_dist, double far_dist, double min_near_dist, double min_near_over_far, double target_dist, double relative_depth_bias)
bool GetClipCoordDepthBiasXform(double relative_depth_bias, ON_Xform &clip_bias) const
ON_UUID ViewportId(void) const
static const double DefaultMinNearOverFar
void SetCameraLocationLock(bool bLockCameraLocation)
bool Extents(double half_view_angle, const ON_3dPoint ¢er, double radius)
bool IsTwoPointPerspectiveProjection() const
bool GetFarRect(ON_3dPoint &left_bottom, ON_3dPoint &right_bottom, ON_3dPoint &left_top, ON_3dPoint &right_top) const
bool GetPointDepth(ON_3dPoint point, double *view_plane_depth) const
bool GetNearPlane(ON_Plane &near_plane) const
double PerspectiveMinNearOverFar() const
ON_BOOL32 Write(ON_BinaryArchive &) const
bool GetFrustumTopPlaneEquation(ON_PlaneEquation &top_plane_equation) const
ON::view_projection m_projection
bool GetCameraAngle(double *half_diagonal_angle, double *half_vertical_angle, double *half_horizontal_angle) const
double FrustumWidth() const
double FrustumLeft() const
bool ChangeToPerspectiveProjection(double target_distance, bool bSymmetricFrustum, double lens_length)
double FrustumBottom() const
bool GetFrustumBottomPlaneEquation(ON_PlaneEquation &bottom_plane_equation) const
ON_3dVector CameraUp() const
unsigned char m_reserved1
double FrustumNear() const
static const double DefaultFarDist
bool ChangeToTwoPointPerspectiveProjection(double target_distance, ON_3dVector up, double lens_length)
bool GetNearPlaneEquation(ON_PlaneEquation &near_plane_equation) const
bool IsValidCamera() const
bool SetFrustum(double left, double right, double bottom, double top, double near_dist, double far_dist)
ON_BOOL32 Transform(const ON_Xform &)
ON_Viewport & operator=(const ON_Viewport &)
bool SetFrustumNearFar(const double *center, double radius)
bool GetFrustumAspect(double &) const
bool GetViewPlaneEquation(double view_plane_depth, ON_PlaneEquation &view_plane_equation) const
bool GetPointDepth(ON_3dPoint point, double *near_dist, double *far_dist, bool bGrowNearFar=false) const
bool GetCamera35mmLensLength(double *lens_length) const
bool GetScreenPort(int *left, int *right, int *port_bottom, int *port_top, int *port_near=NULL, int *port_far=NULL) const
double FrustumHeight() const
static const double DefaultNearDist
bool GetFrustum(double *left, double *right, double *bottom, double *top, double *near_dist=NULL, double *far_dist=NULL) const
ON_3dVector CameraX() const
bool GetWorldToScreenScale(const ON_3dPoint &point_in_frustum, double *pixels_per_unit) const
bool SetCameraDirection(const ON_3dVector &)
bool GetFarPlane(ON_Plane &far_plane) const
ON_Xform ClipModXform() const
ON_3dVector CameraDirection() const
bool GetBoundingBoxDepth(ON_BoundingBox bbox, double *near_dist, double *far_dist, bool bGrowNearFar=false) const
bool CameraLocationIsLocked() const
double PerspectiveMinNearDist() const
bool SetScreenPort(int port_left, int port_right, int port_bottom, int port_top, int port_near=0, int port_far=0)
bool GetCoordinateSprite(int, int, int, int[3], double[3][2]) const
bool ChangeToSymmetricFrustum(bool bLeftRightSymmetric, bool bTopBottomSymmetric, double target_distance)
bool ZoomToScreenRect(int screen_x0, int screen_y0, int screen_x1, int screen_y1)
bool GetViewPlane(double view_plane_depth, ON_Plane &view_plane) const
bool SetViewportId(const ON_UUID &viewport_id)
bool GetFrustumLine(double screenx, double screeny, ON_Line &world_line) const
ON_3dVector CameraY() const
ON_BOOL32 GetBBox(double *, double *, ON_BOOL32=false) const
unsigned char m_frustum_symmetry_flags
bool GetFrustumRightPlaneEquation(ON_PlaneEquation &right_plane_equation) const
bool IsParallelProjection() const
int ScreenPortWidth() const
bool SetViewScale(double x, double y)
void GetViewScale(double *x, double *y) const
ON_3dVector CameraZ() const
bool ChangeToParallelProjection(bool bSymmetricFrustum)
double ClipCoordDepthBias(double relative_depth_bias, double clip_z, double clip_w) const
bool GetDollyCameraVector(int screen_x0, int screen_y0, int screen_x1, int screen_y1, double proj_plane_dist, ON_3dVector &dolly_vector) const
bool SetFrustumAspect(double)
bool GetScreenPortAspect(double &) const
bool GetCameraExtents(ON_3dPoint &, double, ON_BoundingBox &cambox, int bGrowBox=false) const
bool GetNearRect(ON_3dPoint &left_bottom, ON_3dPoint &right_bottom, ON_3dPoint &left_top, ON_3dPoint &right_top) const
bool SetCamera35mmLenseLength(double lens_length)
bool GetCameraAngle(double *half_smallest_angle) const
void SetPerspectiveMinNearOverFar(double min_near_over_far)
bool IsValidFrustum() const
bool GetXform(ON::coordinate_system srcCS, ON::coordinate_system destCS, ON_Xform &matrix) const
double FrustumMaximumDiameter() const
bool GetCameraFrame(double *, double *, double *, double *) const
bool SetCameraLocation(const ON_3dPoint &)
bool SetFrustumNearFar(const double *bboxmin, const double *bboxmax)
bool SetCameraUp(const ON_3dVector &)
bool FrustumIsLeftRightSymmetric() const
bool GetFrustumLeftPlane(ON_Plane &left_plane) const
ON_BOOL32 Read(ON_BinaryArchive &)
bool DollyFrustum(double dolly_distance)
bool GetViewPlaneRect(double view_plane_depth, ON_3dPoint &left_bottom, ON_3dPoint &right_bottom, ON_3dPoint &left_top, ON_3dPoint &right_top) const
static const ON_3dVector Default3dCameraDirection
int ScreenPortHeight() const
bool GetFrustumTopPlane(ON_Plane &top_plane) const
bool IsPerspectiveProjection() const
void SetCameraUpLock(bool bLockCameraUp)
bool GetSphereDepth(ON_Sphere sphere, double *near_dist, double *far_dist, bool bGrowNearFar=false) const
double FrustumRight() const
bool ClipModXformIsIdentity() const
bool SetFrustumNearFar(double near_dist, double far_dist)
bool SetCamera35mmLensLength(double lens_length)
bool DollyCamera(const ON_3dVector &dolly_vector)
static const double DefaultMinNearDist
bool SetProjection(ON::view_projection projection)
bool SetFrustumNearFar(double near_dist, double far_dist, double min_near_dist, double min_near_over_far, double target_dist)
void SetFrustumLeftRightSymmetry(bool bForceLeftRightSymmetry)
bool GetFrustumRightPlane(ON_Plane &right_plane) const
bool FrustumIsTopBottomSymmetric() const
bool GetFrustumLeftPlaneEquation(ON_PlaneEquation &left_plane_equation) const
ON_3dPoint CameraLocation() const
bool SetTargetPoint(ON_3dPoint target_point)
bool Extents(double half_view_angle, const ON_BoundingBox &world_bbox)
void UnlockFrustumSymmetry()
bool CameraDirectionIsLocked() const
double FrustumMinimumDiameter() const
void SetCameraDirectionLock(bool bLockCameraDirection)
ON::view_projection Projection() const
void Dump(ON_TextLog &) const
bool GetFrustumBottomPlane(ON_Plane &bottom_plane) const
void ChangeViewportId(const ON_UUID &viewport_id)
void SetPerspectiveClippingPlaneConstraints(unsigned int depth_buffer_bit_depth)
bool GetCamera35mmLenseLength(double *lens_length) const
static void GetPerspectiveClippingPlaneConstraints(ON_3dPoint camera_location, unsigned int depth_buffer_bit_depth, double *min_near_dist, double *min_near_over_far)
ON_Xform ClipModInverseXform() const
ON_3dPoint TargetPoint() const
bool CameraUpIsLocked() const
bool GetFarPlaneEquation(ON_PlaneEquation &far_plane_equation) const
void SetPerspectiveMinNearDist(double min_near_dist)
double TargetDistance(bool bUseFrustumCenterFallback) const