QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
opennurbs_viewport.cpp File Reference
#include "opennurbs.h"

Classes

class  ON_PgonPt
 

Macros

#define ON_DEFAULT_FRUS_FAR   1000.0
 
#define ON_DEFAULT_MIN_NEAR_DIST   0.0001
 
#define ON_DEFAULT_MIN_NEAR_OVER_FAR   0.0001
 

Functions

static bool ChangeFromParallelToPerspectiveHelper (ON_Viewport &vp, double target_distance, double lens_length)
 
static double clipDist (const double *camLoc, const double *camZ, const double *P)
 
static int comparePptAngle (const void *pa, const void *pb)
 
static ON_BOOL32 GetRelativeScreenCoordinates (int port_left, int port_right, int port_bottom, int port_top, ON_BOOL32 bSortPoints, int &x0, int &y0, int &x1, int &y1, double &s0, double &t0, double &s1, double &t1)
 
static bool GetTwoPointPerspectiveUpAndDirHelper (const ON_3dVector &up, const ON_3dVector &CamDir, const ON_3dVector &CamY, const ON_3dVector &CamZ, ON_3dVector &new_up, ON_3dVector &new_dir)
 
static double len2d (double x, double y)
 
static bool ON__IsCameraFramePerpindicular (const ON_3dVector &unit_vector0, const ON_3dVector &unit_vector1)
 
static bool ON__IsCameraFrameUnitVectorHelper (const ON_3dVector &v)
 
bool ON_GetViewportRotationAngles (const ON_3dVector &X, const ON_3dVector &Y, const ON_3dVector &Z, double *angle1, double *angle2, double *angle3)
 
bool ON_IntersectViewFrustumPlane (const ON_Viewport &vp, const ON_PlaneEquation &plane_equation, ON_SimpleArray< ON_3dPoint > &points)
 
 ON_OBJECT_IMPLEMENT (ON_Viewport, ON_Geometry, "D66E5CCF-EA39-11d3-BFE5-0010830122F0")
 
bool ON_ViewportFromRhinoView (ON::view_projection projection, const ON_3dPoint &rhvp_target, double rhvp_angle1, double rhvp_angle2, double rhvp_angle3, double rhvp_viewsize, double rhvp_cameradist, int screen_width, int screen_height, ON_Viewport &vp)
 
static void unitize2d (double x, double y, double *ux, double *uy)
 
static void UpdateTargetPointHelper (ON_Viewport &vp, double target_distance)
 

Macro Definition Documentation

◆ ON_DEFAULT_FRUS_FAR

#define ON_DEFAULT_FRUS_FAR   1000.0

◆ ON_DEFAULT_MIN_NEAR_DIST

#define ON_DEFAULT_MIN_NEAR_DIST   0.0001

◆ ON_DEFAULT_MIN_NEAR_OVER_FAR

#define ON_DEFAULT_MIN_NEAR_OVER_FAR   0.0001

Function Documentation

◆ ChangeFromParallelToPerspectiveHelper()

static bool ChangeFromParallelToPerspectiveHelper ( ON_Viewport & vp,
double target_distance,
double lens_length )
static

◆ clipDist()

static double clipDist ( const double * camLoc,
const double * camZ,
const double * P )
static

◆ comparePptAngle()

static int comparePptAngle ( const void * pa,
const void * pb )
static

◆ GetRelativeScreenCoordinates()

static ON_BOOL32 GetRelativeScreenCoordinates ( int port_left,
int port_right,
int port_bottom,
int port_top,
ON_BOOL32 bSortPoints,
int & x0,
int & y0,
int & x1,
int & y1,
double & s0,
double & t0,
double & s1,
double & t1 )
static

◆ GetTwoPointPerspectiveUpAndDirHelper()

static bool GetTwoPointPerspectiveUpAndDirHelper ( const ON_3dVector & up,
const ON_3dVector & CamDir,
const ON_3dVector & CamY,
const ON_3dVector & CamZ,
ON_3dVector & new_up,
ON_3dVector & new_dir )
static

◆ len2d()

static double len2d ( double x,
double y )
static

◆ ON__IsCameraFramePerpindicular()

static bool ON__IsCameraFramePerpindicular ( const ON_3dVector & unit_vector0,
const ON_3dVector & unit_vector1 )
static

◆ ON__IsCameraFrameUnitVectorHelper()

static bool ON__IsCameraFrameUnitVectorHelper ( const ON_3dVector & v)
static

◆ ON_GetViewportRotationAngles()

bool ON_GetViewportRotationAngles ( const ON_3dVector & X,
const ON_3dVector & Y,
const ON_3dVector & Z,
double * angle1,
double * angle2,
double * angle3 )

◆ ON_IntersectViewFrustumPlane()

bool ON_IntersectViewFrustumPlane ( const ON_Viewport & vp,
const ON_PlaneEquation & plane_equation,
ON_SimpleArray< ON_3dPoint > & points )

◆ ON_OBJECT_IMPLEMENT()

ON_OBJECT_IMPLEMENT ( ON_Viewport ,
ON_Geometry ,
"D66E5CCF-EA39-11d3-BFE5-0010830122F0"  )

◆ ON_ViewportFromRhinoView()

bool ON_ViewportFromRhinoView ( ON::view_projection projection,
const ON_3dPoint & rhvp_target,
double rhvp_angle1,
double rhvp_angle2,
double rhvp_angle3,
double rhvp_viewsize,
double rhvp_cameradist,
int screen_width,
int screen_height,
ON_Viewport & vp )

◆ unitize2d()

static void unitize2d ( double x,
double y,
double * ux,
double * uy )
static

◆ UpdateTargetPointHelper()

static void UpdateTargetPointHelper ( ON_Viewport & vp,
double target_distance )
static