Rhino C++ API  8.6
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CRhinoDisplayEngine Class Referenceabstract

#include <RhinoSdkDisplayEngine.h>

Inheritance diagram for CRhinoDisplayEngine:
ON_Object CRhinoDisplayEngine_GDI CRhinoDisplayEngine_OGL

Public Member Functions

 CRhinoDisplayEngine ()
 
virtual ~CRhinoDisplayEngine ()
 
virtual int ActiveStereoProjection () const
 
virtual void AddLight (const ON_Light &light)
 
const ON_XformCameraToClip () const
 
const ON_XformCameraToClipInverse () const
 
virtual bool CanSaveDepthBuffer ()
 
virtual bool CaptureFrame (const ON_Viewport &viewport)
 
virtual void ClearClipPlanes ()
 
virtual void ClearDepthBuffer ()
 
virtual void ClearFrameBuffer (const CRhinoDib *dib)
 
void ClearFrameBuffer (const ON_Color &color)
 
void ClearFrameBuffer (const ON_Color &colorTop, const ON_Color &colorBottom)
 
virtual void ClearFrameBuffer (const ON_Color &colorTopLeft, const ON_Color &colorBottomLeft, const ON_Color &colorTopRight, const ON_Color &colorBottomRight)=0
 
virtual void ClearLights ()
 
virtual void ClearTextureCache ()
 
const ON_SimpleArray< ON_ClippingPlaneInfo > & ClippingPlanes () const
 
ON_2dPoint ClippingToScreenPoint (const ON_4dPoint &point) const
 
int ClipPlaneCount () const
 
virtual bool CopyBackBufferFrom (const CRhinoDib &dib)
 
virtual bool CopyBackBufferFrom (HDC pDC)
 
virtual bool CopyBackBufferTo (CRhinoDib &dib)
 
virtual bool CopyBackBufferTo (HDC hDC)
 
virtual bool CopyDepthBufferTo (CRhinoDib &dib, bool bConvertToImage=false, bool bInvertDepthValues=false, CRhinoDib *pBackground=nullptr)
 
virtual bool CopyDepthToBackBuffer ()
 
virtual int CreateClipRegion (const ON_Curve &boundary)
 
ECullFaceMode CullFaceMode () const
 
virtual int DepthBufferBitDepth ()
 
virtual void DestroyClipRegion (int region_id)
 
void DisableCoplanarClippingPlanes (const CRhinoObject *pRhinoObject, ON_SimpleArray< int > &planes_disabled)
 
void DisableCoplanarClippingPlanes (const ON_Plane &plane, ON_SimpleArray< int > &planes_disabled)
 
const CDisplayPipelineAttributesDisplayAttrs () const
 
float DpiScale () const
 
virtual void Draw2dLines (const ON_2fPoint *points, int count, bool asPolyline, ON_Color strokeColor, float strokeWidth, RhinoDashStyle style, bool xormode)=0
 
virtual void DrawBezier (int dim, BOOL32 bIsRational, int order, int cv_stride, const double *cv4d, const CRhCurveAttributes &attrs)
 
virtual void DrawBitmap (const CRhinoDib &dib, int nX, int nY)
 
void DrawBrepWires (const ON_Brep *brep, const class CDisplayPipelineAttributes *da, int wireDensity, bool edgeAnalysis, const class CRhDisplayPenPrivate *pen, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawBrepWires (const ON_Brep *brep, const class CDisplayPipelineAttributes *da, int wireDensity, bool edgeAnalysis, CRhinoCacheHandle *cacheHandle)
 
virtual bool DrawCapturedFrame (const ON_Viewport &destination)
 
virtual void DrawConstructionPlane (const ON_3dmConstructionPlane &plane, bool bShowGrid, bool bShowGridAxes, bool bShowZAxis, const ON_Color &grid_thin_color, const ON_Color &grid_thick_color, const ON_Color &grid_xaxis_color, const ON_Color &grid_yaxis_color, const ON_Color &grid_zaxis_color, int grid_thick_line_size, int grid_axis_line_size, int axes_percentage=100, bool bForceBackground=false)
 
virtual void DrawCurve (const ON_Curve &curve, const class CRhinoDisplayPen &pen, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawDot (const ON_TextDot &dot, bool locationInWorld, ON_Color fillColor, ON_Color textColor, ON_Color borderColor, class CRhinoCacheHandle *cache)=0
 
virtual void DrawEnvironment ()
 
void DrawExtrusionWires (const ON_Extrusion &extrusion, const class CDisplayPipelineAttributes *da, int wireDensity, bool edgeAnalysis, const class CRhDisplayPenPrivate *pen, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawExtrusionWires (const ON_Extrusion &extrusion, const class CDisplayPipelineAttributes *da, int wireDensity, bool edgeAnalysis, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawGroundPlane (const class CDisplayPipelineAttributes &dpa, const class CRhDisplayGroundPlane &groundplane)
 
void DrawHatch (const ON_Hatch &hatch, const class CRhinoDisplayBrush *fillBrush, const class CRhinoDisplayBrush *hatchBrush, const class CRhinoDisplayPen *boundaryPen, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawHatch (const ON_Hatch &hatch, const class CRhinoDisplayBrush *hatchBrush, const class CRhinoDisplayPen *boundaryPen, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawHatch (const ON_Hatch &hatch, const ON_HatchPattern *pattern, float strokeWidth, ON_Color hatchColor, ON_Color boundaryColor, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawLine (const ON_3dPoint &from, const ON_3dPoint &to, const ON_Color &color, int thickness, UINT pattern=0xFFFFFFFF)
 
void DrawLineNoClip (const ON_3dPoint &from, const ON_3dPoint &to, const ON_Color &color, float thickness)
 
virtual void DrawLines (const class CLinesDescriptor &ld)
 
virtual bool DrawLines (ON_Color color, int line_count, float thickness, const float *vertices, const ON_Xform *model_xform)
 
void DrawMesh (const ON_Mesh &mesh, bool wires, bool shaded, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawMeshes (const ON_Mesh **meshes, int count, bool wires, bool shaded, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
void DrawMeshFace (const ON_Mesh &mesh, int faceIndex, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawMeshFaces (const ON_Mesh &mesh, const int *faces, int faceCount, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
void DrawMeshFaces (const ON_Mesh &mesh, const ON_SimpleArray< int > &faces, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawPointCloud (const ON_PointCloud &cloud, ERhinoPointStyle style, float pixelSize, bool scaleSizeForDpi, ON_Color colorOverride, int indexCount, const unsigned int *indices, CRhinoCacheHandle *cache, int degradeCount)
 
void DrawPoints (int count, const class CRhPointData *points, const class CRhPointData *forcedOverride, CRhinoCacheHandle *cache, const ON_Xform *ffoTransform, bool precomputedTransform)
 
virtual void DrawPoints (int count, const class CRhPointData *points, CRhinoCacheHandle *cache)=0
 
void DrawPoints (int count, const class CRhPointData *points, CRhinoCacheHandle *cache, const ON_Xform *ffoTransform, bool precomputedTransform)
 
virtual void DrawPoints (int count, const ON_2dPoint *screenPoints, ERhinoPointStyle style, const ON_Color &strokeColor, const ON_Color &fillColor, float diameterPixels, float strokeWidthPixels, float innerDiameterPixels, float rotationRadians, bool autoScaleDpi, CRhinoCacheHandle *cache)
 
virtual void DrawPoints (int count, const ON_3dPoint *points, ERhinoPointStyle style, const ON_Color &strokeColor, const ON_Color &fillColor, float diameter, float strokeWidth, float innerDiameter, float rotationRadians, bool diameterInPixels, bool autoScaleDpi, CRhinoCacheHandle *cache)
 
virtual void DrawPolygon (const ON_3dPoint *points, int count, ON_Color color, bool bFilled)
 
virtual void DrawPolylines (const class CLinesDescriptor &ld)
 
virtual void DrawPolylines (const class CRhinoClippingVertexCollection *lists, int count)=0
 
virtual void DrawRoundedRectangle (ON_2fPoint screenCenter, float pixelWidth, float pixelHeight, float cornerRadius, ON_Color strokeColor, float strokeWidth, ON_Color fillColor)=0
 
virtual void DrawShadedBrep (const ON_Brep *brep, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawString (const ON_TextContent &text, const ON_Xform &textXform, ON_Color color, CRhinoCacheHandle *cache)
 
virtual void DrawString (const wchar_t *text, const ON_Color &textColor, const ON_2dPoint &point, bool middle, float fontHeightPixels, const ON_Font *font)=0
 
virtual void DrawString (const wchar_t *text, const ON_Xform &xf, const ON_Font *font, const ON_Color &color, ON::TextHorizontalAlignment horizontalAlignment, ON::TextVerticalAlignment verticalAlignment, CRhinoCacheHandle *cache)=0
 
virtual void DrawSubD (const class CRhinoSubDDisplay &subd_display, const class CRhinoSubDDisplayAttributes &subd_display_attributes)
 
virtual void DrawSubD (const class ON_SubD &subd, const class CRhSubDDisplayAttributes *attrs, CRhinoCacheHandle *cacheHandle)
 Do not call - placeholder virtual function in order to improve SubD display without breaking SDK. More...
 
virtual void DrawSubDComponents (const class ON_SubD &subd, const class ON_SubDComponentPtr *components, size_t componentCount, const class CRhSubDDisplayAttributes *attrs, CRhinoCacheHandle *cacheHandle)
 Do not call - placeholder virtual function in order to improve SubD display without breaking SDK. More...
 
void DrawTechnicalWires (const CRhinoObject &rhinoObject, const ON_Color &color, float borderThickness, float silhouetteThickness, float creaseThickness)
 
virtual void DrawTextRun (const ON_TextRun &run, const ON_Font *font, const ON_Xform &xform, ON_Color color, CRhinoCacheHandle *cache)
 
virtual void DrawTraceImage (const class CRhTraceImage &traceimage)
 
virtual void DrawWallpaper (const class CRhWallpaper &wallpaper)
 
virtual void DrawWorldAxes (const ON_Color &xaxis_color, const ON_Color &yaxis_color, const ON_Color &zaxis_color, int axes_length, int label_offset, int letter_size)
 
virtual bool EnableClipPlanes (bool bEnable, int plane=-1)
 
virtual void EnableColorWriting (bool bEnable=true)
 
virtual void EnableDepthTesting (bool bEnable=true)
 
virtual void EnableDepthWriting (bool bEnable=true)
 
void EnableMaterials (bool on)
 
virtual void EnableMeshBuffering (bool on)
 "State" operations & attributes... More...
 
virtual void EnableMultiSample (bool bEnable=true)
 Enables / disables multisampling. More...
 
void EnableShadows (bool)
 New for V8 [end]. More...
 
virtual void FlushAll ()
 
virtual int FrameBufferBitDepth ()
 
virtual void FrameBufferChannelDepth (int &red_bits, int &green_bits, int &blue_bits, int &alpha_bits)
 
ON_3dPoint FrustumCenter () const
 
const CRhinoDocGeometrySource () const
 Return the document that the pipeline uses to get geometry information from when drawing. More...
 
virtual bool GetBackBuffer (CRhinoDib &dib)
 
virtual const class CRhFrameCapture * GetCapturedFrame () const
 
void GetCurveAttributes (CRhCurveAttributes &attributes) const
 
virtual bool GetDepthBuffer (float *buffer, int left, int top, int width, int height)
 
ON_SimpleArray< ON_PlaneEquationGetEnabledClipPlanes (const ON_Xform *xf) const
 
void GetFarPlane (ON_Plane &) const
 
virtual const ON_LightGetLight (int index) const
 
ON_Xform GetModelViewMatrix () const
 
virtual int GetMultiSampleMode () const
 
virtual void GetMultiSampleModes (ON_SimpleArray< int > &modes) const
 
void GetNearFarPlane (ON_Plane &N, ON_Plane &F) const
 
void GetNearPlane (ON_Plane &) const
 
virtual bool GetOffscreenBufferInfo (HDC hDC, int &nColorDepth, int &nZDepth)
 
virtual class CRhGLSceneManager * GetSceneManager ()
 
class CRhGLSceneManager * GetSceneManager (const CRhinoDoc *doc)
 
virtual class CRhGLSceneManager * GetSceneManager (unsigned int docSerialNumber)
 
virtual double GetStereoParallax () const
 
virtual double GetStereoSeparation () const
 
virtual bool HasDepthBuffer ()
 
const ON_XformInstanceDefinitionTransform () const
 
virtual bool InStereoMode () const
 
virtual void InvalidateCapturedFrame ()
 Caching operations... More...
 
virtual bool IsAccelerated () const
 
bool IsEntireBoxVisible (const ON_BoundingBox &bbox) const
 
bool IsPreview (void) const
 
virtual int LightCount () const
 
const CDisplayPipelineAttributes::LinearWorkflowLinearWorkflow () const
 
virtual int MaxClipPlanesSupported () const
 
virtual int MaxDecalsSupported () const
 
virtual int MaxLightsSupported () const
 
virtual int MaxObjectMappingsSupported () const
 
int MaxProceduralCommandsSupported () const
 
int MaxProceduralsSupported () const
 
int MaxProceduralTransformsSupported () const
 
virtual bool MeshBufferingEnabled () const
 
const ON_XformModelTransform () const
 Model transform operations... More...
 
bool ModelTransformIsIdentity () const
 
virtual void NotifyClippingPlanesChanged ()
 
virtual bool NotifyFrameSizeChanged (int nWidth, int nHeight)
 
virtual bool NotifyProjectionChanged ()
 Notifier routines called by the pipeline framework... More...
 
virtual bool PopColorWriting ()
 
virtual void PopDepthTesting ()
 
virtual void PopDepthWriting ()
 
void PopModelTransform ()
 
void PopModelViewMatrix ()
 
void PopProjection ()
 
ON_UUID PreviewEnvironmentId (void) const
 
virtual void PushColorWriting (bool bEnable)
 
virtual void PushDepthTesting (bool bEnable)
 
virtual void PushDepthWriting (bool bEnable)
 
void PushModelTransform (const ON_Xform &mt)
 
void PushModelViewMatrix ()
 
void PushModelViewMatrix (const ON_Xform &xf)
 
void PushProjection (const ON_Viewport &viewport)
 
virtual bool ResetEngine ()
 
virtual bool RestoreBackBuffer ()
 
virtual bool RestoreDepthBuffer ()
 
virtual bool SaveBackBuffer ()
 
virtual bool SaveDepthBuffer ()
 
double ScreenLength (double world_length) const
 
const ON_XformScreenToClip () const
 
const ON_XformScreenToClipInverse () const
 
void SetCamera (const ON_Viewport &)
 
virtual int SetClippingPlanes (const ON_SimpleArray< ON_ClippingPlaneInfo > &clipplanes)
 
virtual int SetClipRegion (int region_id)
 
virtual ECullFaceMode SetCullFaceMode (ECullFaceMode mode)
 
void SetCurveAttributes (const CRhCurveAttributes &attributes)
 
virtual int SetDepthMode (int nDepth)
 
void SetDpiScale (float scale)
 
void SetInstanceDefinitionTransform (const ON_Xform &idt)
 
void SetIsPreview (bool)
 
void SetLinearWorkflow (const CDisplayPipelineAttributes::LinearWorkflow &lw)
 
void SetModelTransform (const ON_Xform &mt)
 
void SetModelViewMatrix (const ON_Xform &xf)
 
virtual bool SetMultiSampleMode (int mode)
 
void SetPreviewEnvironmentId (ON_UUID id)
 
virtual bool SetStereoMode (bool bStereo)
 
virtual void SetStereoParallax (float)
 
virtual void SetStereoSeparation (float fSep)
 
virtual int SetZBiasLevel (int zbias)
 
bool ShadowsEnabled (void) const
 
virtual bool ShowBackBuffer (HDC hDC)
 
virtual void ShutdownEngine ()
 
virtual bool StartEngine ()
 Engine initialization and cleanup operations... More...
 
virtual bool StopEngine ()
 
virtual bool SupportsMultiSampling () const
 
virtual bool SupportsShading () const
 
bool UseClipPlanes () const
 
bool UseMaterials ()
 
const ON_ViewportVP () const
 Generic engine attributes... More...
 
float WireDpiScale () const
 
const ON_XformWorldToCamera (bool includeModelXform=true) const
 
const ON_XformWorldToCameraInverse (bool includeModelXform=true) const
 
const ON_XformWorldToClip (bool includeModelXform=true) const
 world to screen transform = Viewport(world to clip)*m_ModelTransform More...
 
const ON_XformWorldToClipInverse (bool includeModelXform=true) const
 
ON_4dPoint WorldToClippingPoint (const ON_3dPoint &point) const
 
const ON_XformWorldToScreen (bool includeModelXform=true) const
 world to screen transform = Viewport(world to screen)*m_ModelTransform More...
 
const ON_XformWorldToScreenInverse (bool includeModelXform=true) const
 
ON_2dPoint WorldToScreenPoint (const ON_3dPoint &point) const
 
virtual int ZBiasLevel () const
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 
bool AttachUserData (class ON_UserData *pUserData)
 
unsigned int ClearAllComponentStates () const
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 
void CopyUserData (const ON_Object &source_object)
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 
virtual ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 
virtual void DestroyRuntimeCache (bool bDelete=true)
 
bool DetachUserData (class ON_UserData *pUserData)
 
virtual void Dump (ON_TextLog &) const
 
void EmergencyDestroy ()
 
class ON_UserDataFirstUserData () const
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
bool IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const
 
bool IsKindOf (const ON_ClassId *pClassId) const
 
virtual bool IsValid (class ON_TextLog *text_log=nullptr) const
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 
virtual void MemoryRelocate ()
 
virtual ON_UUID ModelObjectId () const
 
void MoveUserData (ON_Object &source_object)
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 
virtual ON::object_type ObjectType () const
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
virtual bool Read (ON_BinaryArchive &binary_archive)
 
virtual unsigned int SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const
 
virtual unsigned int SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 
int SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace)
 
virtual unsigned int SizeOf () const
 
bool ThisIsNullptr (bool bSilentError) const
 
void TransformUserData (const class ON_Xform &xform)
 
virtual bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
 
int UserStringCount () const
 
virtual bool Write (ON_BinaryArchive &binary_archive) const
 

Protected Member Functions

void BufferMeshWires (CRhinoCacheHandle &cache, const CDisplayPipelineAttributes &da, const ON_Xform *xform, bool isSubD, const CRhinoSubDDisplayAttributes *subdAttrs)
 
void BufferShadedMesh (CRhinoCacheHandle &cache, const ON_Xform *xform)
 
void BufferShadedMesh (CRhinoCacheHandle &cache, ECullFaceMode cfm, const ON_Color &frontAmbient, const ON_Color &frontDiffuse, const std::shared_ptr< CDisplayPipelineMaterial > &material, const ON_SHA1_Hash &materialHash, const ON_Xform *xform)
 
void BufferShadedMeshes (class CRhVboMeshCache *buffer)
 
void ComputeZBiasValues (int bias, double &a, double &b, double &c, double &d, bool &use_d) const
 
void DrawBezier (int, const ON_4fPoint *, const CRhCurveAttributes &, int=1, int=0)
 
void DrawConstructionPlaneFarLines (ON_SimpleArray< ON_Line > &far_lines)
 
void DrawConstructionPlaneLine (const ON_Plane &near_plane, const ON_3dPoint &p, const ON_3dPoint &q, ON_SimpleArray< ON_Line > &far_lines)
 
virtual void FlushCurveBuffer ()
 
virtual void FlushMeshBuffer ()
 
virtual void FlushPointBuffer ()
 
HDC GetRenderTargetDC () const
 
void iShutdownEngine ()
 
void Line (const ON_4fPoint &start, const ON_4fPoint &end)
 
void LineTo (const ON_4fPoint &)
 clipping coordinate point More...
 
void MoveTo (const ON_4fPoint &)
 clipping coordinate point More...
 
void MoveToLineTo (const ON_4fPoint &start, const ON_4fPoint &end)
 
virtual void SetRenderTarget (HDC pDC, bool bShutDown)
 
virtual void SetRenderTarget (HWND hWnd)
 
void SetScreenDrawTolerance (double, double, double)
 
bool SupportsVboBuffers () const
 New for V8 [begin]. More...
 
double ZBiasDistance (double z, double w) const
 

Protected Attributes

double m__zbias_a = 0
 (near+far) More...
 
double m__zbias_b = 0
 (far-near) More...
 
double m__zbias_c = 0
 m__zbias_d*‍/(4*near*far) More...
 
double m__zbias_d = 0
 parallel proj bias or 0 for no zbias More...
 
bool m__zbias_use_d = true
 true to return constance bias More...
 
bool m_bInfiniteDepth = false
 
bool m_bInStereoMode = false
 Stereo viewing operations... More...
 
bool m_bUseMaterials = true
 
ON_Viewport m_Camera
 
ON_ClassArray< ON_Viewportm_CameraStack
 
float m_cliptol_x = 0.01f
 
float m_cliptol_y = 0.01f
 
float m_cliptol_z = 0.01f
 tolerance in clipping coordinates More...
 
CRhCurveAttributes m_curve_attrs
 
ON_SimpleArray< bool > m_depth_testing_stack
 
ON_SimpleArray< bool > m_depth_writing_stack
 
CRhinoDisplayPipelinem_dp = nullptr
 
float m_dpi_scale = 1.0f
 scaling for high resolution displays More...
 
int m_draw_speed = 0
 0 = accurate, 1 = fast, 2 = really More...
 
float m_fStereoParallax = 1.0f
 
float m_fStereoSeparation = 1.0f
 
HDC m_hDC = nullptr
 Device Context handle render target. More...
 
HWND m_hWnd = nullptr
 Engine display and drawing attributes... More...
 
ON_SimpleArray< ON_Xformm_modelview_matrix_stack
 
ON_SimpleArray< ON_Xformm_ModelXformStack
 
int m_nDisplayHeight = 0
 
int m_nDisplayWidth = 0
 Viewport size attributes... More...
 
class CRhDisplayEnginePrivatem_private = nullptr
 
float m_stol_x = 0.75f
 
float m_stol_y = 0.75f
 
float m_stol_z = 1.00f
 screen buffer drawing tolerances More...
 
int m_wire_depth = 0
 

Friends

class CRhDisplayEnginePrivate
 
class CRhinoDisplayPipeline
 
class CRhinoPipelineRef
 

Additional Inherited Members

- Public Types inherited from ON_Object
enum  UserDataConflictResolution : unsigned char {
  UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3,
  UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6
}
 

Detailed Description

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. Each display pipeline contains a display engine. The engine performs the actual API specific calls to draw (GDI, OpenGL, DirectX). This is the generic base class that performs common engine operations. Subclasses will draw using specific display technologies (CRhinoDisplayEngine_OGL, CRhinoDisplayEngine_GDI)

Constructor & Destructor Documentation

◆ CRhinoDisplayEngine()

CRhinoDisplayEngine::CRhinoDisplayEngine ( )

◆ ~CRhinoDisplayEngine()

virtual CRhinoDisplayEngine::~CRhinoDisplayEngine ( )
virtual

Member Function Documentation

◆ ActiveStereoProjection()

virtual int CRhinoDisplayEngine::ActiveStereoProjection ( ) const
virtual

Description: 0 = left, 1 = right...

Reimplemented in CRhinoDisplayEngine_OGL.

◆ AddLight()

virtual void CRhinoDisplayEngine::AddLight ( const ON_Light light)
virtual

Description: Add a light to the list of lights that the engine should use when displaying shaded geometry. Parameters: light: [in] the light information the engine should use to set up an graphics technology specific light

Reimplemented in CRhinoDisplayEngine_OGL.

◆ BufferMeshWires()

void CRhinoDisplayEngine::BufferMeshWires ( CRhinoCacheHandle cache,
const CDisplayPipelineAttributes da,
const ON_Xform xform,
bool  isSubD,
const CRhinoSubDDisplayAttributes subdAttrs 
)
protected

◆ BufferShadedMesh() [1/2]

void CRhinoDisplayEngine::BufferShadedMesh ( CRhinoCacheHandle cache,
const ON_Xform xform 
)
protected

◆ BufferShadedMesh() [2/2]

void CRhinoDisplayEngine::BufferShadedMesh ( CRhinoCacheHandle cache,
ECullFaceMode  cfm,
const ON_Color frontAmbient,
const ON_Color frontDiffuse,
const std::shared_ptr< CDisplayPipelineMaterial > &  material,
const ON_SHA1_Hash materialHash,
const ON_Xform xform 
)
protected

◆ BufferShadedMeshes()

void CRhinoDisplayEngine::BufferShadedMeshes ( class CRhVboMeshCache *  buffer)
protected

◆ CameraToClip()

const ON_Xform& CRhinoDisplayEngine::CameraToClip ( ) const

◆ CameraToClipInverse()

const ON_Xform& CRhinoDisplayEngine::CameraToClipInverse ( ) const

◆ CanSaveDepthBuffer()

virtual bool CRhinoDisplayEngine::CanSaveDepthBuffer ( )
virtual

Returns: true if this engine can save depth buffer information

Reimplemented in CRhinoDisplayEngine_OGL.

◆ CaptureFrame()

virtual bool CRhinoDisplayEngine::CaptureFrame ( const ON_Viewport viewport)
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ ClearClipPlanes()

virtual void CRhinoDisplayEngine::ClearClipPlanes ( )
virtual

Description: Remove all the user defined clipping planes that may have been added through the AddClipPlane function

◆ ClearDepthBuffer()

virtual void CRhinoDisplayEngine::ClearDepthBuffer ( )
virtual

Description: Clear the depth buffer for this engine. If the engine does not support depth buffered drawing, then nothing is done.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ ClearFrameBuffer() [1/4]

virtual void CRhinoDisplayEngine::ClearFrameBuffer ( const CRhinoDib dib)
virtual

Description: File the frame buffer with a bitmap image This function also clears the depth buffer for engines that support depth buffered drawing. Parameters: dib: [in] the image to draw into the frame buffer

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ ClearFrameBuffer() [2/4]

void CRhinoDisplayEngine::ClearFrameBuffer ( const ON_Color color)

Generic engine routines for drawing low-level primitives...

Note: These routines are usually (and probably should be) always overridden by custom engines since their default implementations do nothing. By not implementing one, some, or all of these routines, you are in a sense disabling the drawing for those respective features or items and all other items that use them.

For example: If you do not override "DrawPoints()" in your engine, and don't implement some form of point rendering, then points and all routines that use/need points will no longer show up in the final frame buffer. Description: Fill the frame buffer with a single color This function also clears the depth buffer for engines that support depth buffered drawing. Parameters: color: [in] the color to fill the frame buffer with

◆ ClearFrameBuffer() [3/4]

void CRhinoDisplayEngine::ClearFrameBuffer ( const ON_Color colorTop,
const ON_Color colorBottom 
)

Description: Fill the frame buffer with a vertical gradient between two colors This function also clears the depth buffer for engines that support depth buffered drawing. Parameters: colorTop: [in] the color on the top line of the frame buffer colorBottom: [in] the color on the bottom line of the frame buffer

◆ ClearFrameBuffer() [4/4]

virtual void CRhinoDisplayEngine::ClearFrameBuffer ( const ON_Color colorTopLeft,
const ON_Color colorBottomLeft,
const ON_Color colorTopRight,
const ON_Color colorBottomRight 
)
pure virtual

Description: Fill the frame buffer with a gradient between four corner colors This function also clears the depth buffer for engines that support depth buffered drawing. Parameters: colorTopLeft: [in] the color in the top-left corner of the frame buffer colorBottomLeft: [in] the color in the bottom-left corner of the frame buffer colorTopRight: [in] the color in the top-right corner of the frame buffer colorBottomRight: [in] the color in the bottom-right corner of the frame buffer

Implemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ ClearLights()

virtual void CRhinoDisplayEngine::ClearLights ( )
virtual

◆ ClearTextureCache()

virtual void CRhinoDisplayEngine::ClearTextureCache ( )
virtual

Description: Remove all cached texture information that may be stored locally or on the graphics card

Reimplemented in CRhinoDisplayEngine_OGL.

◆ ClippingPlanes()

const ON_SimpleArray<ON_ClippingPlaneInfo>& CRhinoDisplayEngine::ClippingPlanes ( ) const

◆ ClippingToScreenPoint()

ON_2dPoint CRhinoDisplayEngine::ClippingToScreenPoint ( const ON_4dPoint point) const

Description: Convert a point in 4d clipping coordinates to 2d screen space coordinates Parameters: point: [in] the location in clipping coordinates to convert Returns: the screen space coordinate where the clipping coordinate would be drawn

◆ ClipPlaneCount()

int CRhinoDisplayEngine::ClipPlaneCount ( ) const

Returns: Number of user defined clipping planes currently set up for this engine. This does not include the standard view frustum clipping planes

◆ ComputeZBiasValues()

void CRhinoDisplayEngine::ComputeZBiasValues ( int  bias,
double &  a,
double &  b,
double &  c,
double &  d,
bool &  use_d 
) const
protected

◆ CopyBackBufferFrom() [1/2]

virtual bool CRhinoDisplayEngine::CopyBackBufferFrom ( const CRhinoDib dib)
virtual

Description: Copy color information from a bitmap into the back buffer Parameters: dib: [in] bitmap that contains the color information Returns: true if successful

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ CopyBackBufferFrom() [2/2]

virtual bool CRhinoDisplayEngine::CopyBackBufferFrom ( HDC  pDC)
virtual

Description: Copy color information from a device context into the back buffer Parameters: pDC: [in] device context that contains the color information Returns: true if successful

◆ CopyBackBufferTo() [1/2]

virtual bool CRhinoDisplayEngine::CopyBackBufferTo ( CRhinoDib dib)
virtual

Description: Copy color information in back buffer to a bitmap Parameters: dib: [out] bitmap that is created with color information from back buffer Returns: true if successful

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ CopyBackBufferTo() [2/2]

virtual bool CRhinoDisplayEngine::CopyBackBufferTo ( HDC  hDC)
virtual

Description: Copy color information in back buffer to a device context Parameters: pDC: [in] device context that will get color information blitted into it Returns: true if successful

Reimplemented in CRhinoDisplayEngine_GDI.

◆ CopyDepthBufferTo()

virtual bool CRhinoDisplayEngine::CopyDepthBufferTo ( CRhinoDib dib,
bool  bConvertToImage = false,
bool  bInvertDepthValues = false,
CRhinoDib pBackground = nullptr 
)
virtual

Description: Copy the depth buffer information to a bitmap Parameters: dib: [out] the bitmap that is created with depth buffer information bConvertToImage: [in] if true, the depth information is converted into a grey scale image if false, each byte in the dib contains a depth value bInvertDepthValues: [in] if true, the values in the dib are flipped where a byte used to be 0 will now be 255 and a byte that used to be 255 will now be 0 pBackground: [in] If not NULL, this image will be place in the background of dib where no depth information was written to Returns: true if successful

Reimplemented in CRhinoDisplayEngine_OGL.

◆ CopyDepthToBackBuffer()

virtual bool CRhinoDisplayEngine::CopyDepthToBackBuffer ( )
virtual

Description: Copy depth information into color values in the back buffer Returns: true if successful

◆ CreateClipRegion()

virtual int CRhinoDisplayEngine::CreateClipRegion ( const ON_Curve boundary)
virtual

Description: Clip region defines an area on the framebuffer where drawing can occur Note - This function has not been implemented for V4 and serves as a virtual function placeholder for future versions of Rhino Parameters: boundary: [in] a closed 2d curve used to define area where drawing can occur Returns: id for an engine defined clip region. -1 if a clip region could not be created

◆ CullFaceMode()

ECullFaceMode CRhinoDisplayEngine::CullFaceMode ( ) const

◆ DepthBufferBitDepth()

virtual int CRhinoDisplayEngine::DepthBufferBitDepth ( )
virtual

Returns: Number of bits per pixel used to describe the depth value

Reimplemented in CRhinoDisplayEngine_OGL.

◆ DestroyClipRegion()

virtual void CRhinoDisplayEngine::DestroyClipRegion ( int  region_id)
virtual

Description: Clip region defines an area on the framebuffer where drawing can occur Note - This function has not been implemented for V4 and serves as a virtual function placeholder for future versions of Rhino Parameters: region_id: [in] id returned from CreateClipRegion function

◆ DisableCoplanarClippingPlanes() [1/2]

void CRhinoDisplayEngine::DisableCoplanarClippingPlanes ( const CRhinoObject pRhinoObject,
ON_SimpleArray< int > &  planes_disabled 
)

◆ DisableCoplanarClippingPlanes() [2/2]

void CRhinoDisplayEngine::DisableCoplanarClippingPlanes ( const ON_Plane plane,
ON_SimpleArray< int > &  planes_disabled 
)

◆ DisplayAttrs()

const CDisplayPipelineAttributes* CRhinoDisplayEngine::DisplayAttrs ( ) const

◆ DpiScale()

float CRhinoDisplayEngine::DpiScale ( ) const

◆ Draw2dLines()

virtual void CRhinoDisplayEngine::Draw2dLines ( const ON_2fPoint points,
int  count,
bool  asPolyline,
ON_Color  strokeColor,
float  strokeWidth,
RhinoDashStyle  style,
bool  xormode 
)
pure virtual

Description: Draw polyline defined in screen coordinates This is the low level 2d drawing routine used for drawing lines, rectangles,...

Parameters
asPolylineif false, each point pair is treated as independent lines

Implemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ DrawBezier() [1/2]

virtual void CRhinoDisplayEngine::DrawBezier ( int  dim,
BOOL32  bIsRational,
int  order,
int  cv_stride,
const double *  cv4d,
const CRhCurveAttributes attrs 
)
virtual

Description: Draw a bezier curve Parameters: dim: [in] bIsRational: [in] order: [in] cv_stride: [in] number of doubles between CVs (>=4) cv4d: [in] 4d homogeneous world coordinate CVs attrs: [in] attributes for the curve

Reimplemented in CRhinoDisplayEngine_GDI.

◆ DrawBezier() [2/2]

void CRhinoDisplayEngine::DrawBezier ( int  ,
const ON_4fPoint ,
const CRhCurveAttributes ,
int  = 1,
int  = 0 
)
protected

◆ DrawBitmap()

virtual void CRhinoDisplayEngine::DrawBitmap ( const CRhinoDib dib,
int  nX,
int  nY 
)
virtual

Description: Draw a bitmap Parameters: dib: [in] the bitmap to draw nX: [in] screen coordinate left location to draw top-left corner of dib nY: [in] screen coordinate top location to draw top-left corner of dib mask: [in] if set to a color, the dib is drawn using a color mask for transparency

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ DrawBrepWires() [1/2]

void CRhinoDisplayEngine::DrawBrepWires ( const ON_Brep brep,
const class CDisplayPipelineAttributes da,
int  wireDensity,
bool  edgeAnalysis,
const class CRhDisplayPenPrivate *  pen,
CRhinoCacheHandle cacheHandle 
)

◆ DrawBrepWires() [2/2]

virtual void CRhinoDisplayEngine::DrawBrepWires ( const ON_Brep brep,
const class CDisplayPipelineAttributes da,
int  wireDensity,
bool  edgeAnalysis,
CRhinoCacheHandle cacheHandle 
)
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ DrawCapturedFrame()

virtual bool CRhinoDisplayEngine::DrawCapturedFrame ( const ON_Viewport destination)
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ DrawConstructionPlane()

virtual void CRhinoDisplayEngine::DrawConstructionPlane ( const ON_3dmConstructionPlane plane,
bool  bShowGrid,
bool  bShowGridAxes,
bool  bShowZAxis,
const ON_Color grid_thin_color,
const ON_Color grid_thick_color,
const ON_Color grid_xaxis_color,
const ON_Color grid_yaxis_color,
const ON_Color grid_zaxis_color,
int  grid_thick_line_size,
int  grid_axis_line_size,
int  axes_percentage = 100,
bool  bForceBackground = false 
)
virtual

Description: Draws construction plane lines and axes for the given cplane object.

Parameters: bShowGrid: [in] true to draw cplane grid bShowGridAxes: [in] true to draw cplane grid axes

◆ DrawConstructionPlaneFarLines()

void CRhinoDisplayEngine::DrawConstructionPlaneFarLines ( ON_SimpleArray< ON_Line > &  far_lines)
protected

◆ DrawConstructionPlaneLine()

void CRhinoDisplayEngine::DrawConstructionPlaneLine ( const ON_Plane near_plane,
const ON_3dPoint p,
const ON_3dPoint q,
ON_SimpleArray< ON_Line > &  far_lines 
)
protected

◆ DrawCurve()

virtual void CRhinoDisplayEngine::DrawCurve ( const ON_Curve curve,
const class CRhinoDisplayPen &  pen,
CRhinoCacheHandle cacheHandle 
)
virtual

◆ DrawDot()

virtual void CRhinoDisplayEngine::DrawDot ( const ON_TextDot dot,
bool  locationInWorld,
ON_Color  fillColor,
ON_Color  textColor,
ON_Color  borderColor,
class CRhinoCacheHandle cache 
)
pure virtual

◆ DrawEnvironment()

virtual void CRhinoDisplayEngine::DrawEnvironment ( )
virtual

Description: Draws background environment into the frame buffer.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ DrawExtrusionWires() [1/2]

void CRhinoDisplayEngine::DrawExtrusionWires ( const ON_Extrusion extrusion,
const class CDisplayPipelineAttributes da,
int  wireDensity,
bool  edgeAnalysis,
const class CRhDisplayPenPrivate *  pen,
CRhinoCacheHandle cacheHandle 
)

◆ DrawExtrusionWires() [2/2]

virtual void CRhinoDisplayEngine::DrawExtrusionWires ( const ON_Extrusion extrusion,
const class CDisplayPipelineAttributes da,
int  wireDensity,
bool  edgeAnalysis,
CRhinoCacheHandle cacheHandle 
)
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ DrawGroundPlane()

virtual void CRhinoDisplayEngine::DrawGroundPlane ( const class CDisplayPipelineAttributes dpa,
const class CRhDisplayGroundPlane &  groundplane 
)
virtual

Description: Draws a ground plane into the frame buffer.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ DrawHatch() [1/3]

void CRhinoDisplayEngine::DrawHatch ( const ON_Hatch hatch,
const class CRhinoDisplayBrush *  fillBrush,
const class CRhinoDisplayBrush *  hatchBrush,
const class CRhinoDisplayPen *  boundaryPen,
CRhinoCacheHandle cacheHandle 
)

◆ DrawHatch() [2/3]

virtual void CRhinoDisplayEngine::DrawHatch ( const ON_Hatch hatch,
const class CRhinoDisplayBrush *  hatchBrush,
const class CRhinoDisplayPen *  boundaryPen,
CRhinoCacheHandle cacheHandle 
)
virtual

◆ DrawHatch() [3/3]

virtual void CRhinoDisplayEngine::DrawHatch ( const ON_Hatch hatch,
const ON_HatchPattern pattern,
float  strokeWidth,
ON_Color  hatchColor,
ON_Color  boundaryColor,
CRhinoCacheHandle cacheHandle 
)
virtual

◆ DrawLine()

virtual void CRhinoDisplayEngine::DrawLine ( const ON_3dPoint from,
const ON_3dPoint to,
const ON_Color color,
int  thickness,
UINT  pattern = 0xFFFFFFFF 
)
virtual

Description: Draws a line at specified locations, using specified thickness, color and pattern. Parameters: from: [in] start point of line to: [in] end point of line color: [in] color to draw line thickness: [in] thickness in screen pixels pattern: [in] bit pattern to use for drawing. All bits set to 1 means draw a solid line

◆ DrawLineNoClip()

void CRhinoDisplayEngine::DrawLineNoClip ( const ON_3dPoint from,
const ON_3dPoint to,
const ON_Color color,
float  thickness 
)

Description: Draws a line at specified locations, using specified thickness and color. This version of line drawing will draw the segments of the line that extend beyond the near and far planes of the view frustum with depths on those planes Parameters: from: [in] start point of line to: [in] end point of line color: [in] color to draw line thickness: [in] thickness in screen pixels

◆ DrawLines() [1/2]

virtual void CRhinoDisplayEngine::DrawLines ( const class CLinesDescriptor ld)
virtual

Description: Draw a set of lines Parameters: ld: [in] the line locations and attributes to draw

Reimplemented in CRhinoDisplayEngine_OGL.

◆ DrawLines() [2/2]

virtual bool CRhinoDisplayEngine::DrawLines ( ON_Color  color,
int  line_count,
float  thickness,
const float *  vertices,
const ON_Xform model_xform 
)
virtual

◆ DrawMesh()

void CRhinoDisplayEngine::DrawMesh ( const ON_Mesh mesh,
bool  wires,
bool  shaded,
const class CDisplayPipelineAttributes da,
CRhinoCacheHandle cacheHandle 
)

Description: Draw a mesh with a given set of display attributes Parameters: mesh: [in] Mesh to draw da: [in] Display attributes to use for drawing. This is required. Passing NULL will not draw anything

◆ DrawMeshes()

virtual void CRhinoDisplayEngine::DrawMeshes ( const ON_Mesh **  meshes,
int  count,
bool  wires,
bool  shaded,
const class CDisplayPipelineAttributes da,
CRhinoCacheHandle cacheHandle 
)
virtual

◆ DrawMeshFace()

void CRhinoDisplayEngine::DrawMeshFace ( const ON_Mesh mesh,
int  faceIndex,
const class CDisplayPipelineAttributes da,
CRhinoCacheHandle cacheHandle 
)

Description: Draw a single face from a mesh Parameters: mesh: [in] the mesh that contains the face to draw faceIndex: [in] the index into the mesh's m_F array for the face da: [in] Display attributes to use for drawing. This is required. Passing NULL will not draw anything

◆ DrawMeshFaces() [1/2]

virtual void CRhinoDisplayEngine::DrawMeshFaces ( const ON_Mesh mesh,
const int *  faces,
int  faceCount,
const class CDisplayPipelineAttributes da,
CRhinoCacheHandle cacheHandle 
)
virtual

Description: Draw a set of faces from a mesh Parameters: mesh: [in] the mesh that contains the faces to draw faces: [in] array of indices into the mesh's m_F array for the faces faceCount: [in] number of elements in the faces array da: [in] Display attributes to use for drawing. This is required. Passing NULL will not draw anything

◆ DrawMeshFaces() [2/2]

void CRhinoDisplayEngine::DrawMeshFaces ( const ON_Mesh mesh,
const ON_SimpleArray< int > &  faces,
const class CDisplayPipelineAttributes da,
CRhinoCacheHandle cacheHandle 
)

◆ DrawPointCloud()

virtual void CRhinoDisplayEngine::DrawPointCloud ( const ON_PointCloud cloud,
ERhinoPointStyle  style,
float  pixelSize,
bool  scaleSizeForDpi,
ON_Color  colorOverride,
int  indexCount,
const unsigned int *  indices,
CRhinoCacheHandle cache,
int  degradeCount 
)
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ DrawPoints() [1/5]

void CRhinoDisplayEngine::DrawPoints ( int  count,
const class CRhPointData *  points,
const class CRhPointData *  forcedOverride,
CRhinoCacheHandle cache,
const ON_Xform ffoTransform,
bool  precomputedTransform 
)

◆ DrawPoints() [2/5]

virtual void CRhinoDisplayEngine::DrawPoints ( int  count,
const class CRhPointData *  points,
CRhinoCacheHandle cache 
)
pure virtual

◆ DrawPoints() [3/5]

void CRhinoDisplayEngine::DrawPoints ( int  count,
const class CRhPointData *  points,
CRhinoCacheHandle cache,
const ON_Xform ffoTransform,
bool  precomputedTransform 
)

◆ DrawPoints() [4/5]

virtual void CRhinoDisplayEngine::DrawPoints ( int  count,
const ON_2dPoint screenPoints,
ERhinoPointStyle  style,
const ON_Color strokeColor,
const ON_Color fillColor,
float  diameterPixels,
float  strokeWidthPixels,
float  innerDiameterPixels,
float  rotationRadians,
bool  autoScaleDpi,
CRhinoCacheHandle cache 
)
virtual

◆ DrawPoints() [5/5]

virtual void CRhinoDisplayEngine::DrawPoints ( int  count,
const ON_3dPoint points,
ERhinoPointStyle  style,
const ON_Color strokeColor,
const ON_Color fillColor,
float  diameter,
float  strokeWidth,
float  innerDiameter,
float  rotationRadians,
bool  diameterInPixels,
bool  autoScaleDpi,
CRhinoCacheHandle cache 
)
virtual

Description: Draws a point at specified location, using specified radius, style and color.

Parameters: point: [in] the location to draw the point radius: [in] point size in screen pixels style: [in] style used for how the point should be drawn color: [in] color used to draw the point

◆ DrawPolygon()

virtual void CRhinoDisplayEngine::DrawPolygon ( const ON_3dPoint points,
int  count,
ON_Color  color,
bool  bFilled 
)
virtual

Description: Draw a polygon using a set of points for the polygon border Parameters: points: [in] array of points in world coordinates to use for polygon border count: [in] number of elements in points array color: [in] draw color bFilled: [in] true = draw the polygon as a filled shape false = just draw the polygon border

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ DrawPolylines() [1/2]

virtual void CRhinoDisplayEngine::DrawPolylines ( const class CLinesDescriptor ld)
virtual

Description: Draw a polyline using information stored in a CLinesDescriptor. Note - If not implemented by deriving engine class, this routine will just call "DrawLine" method in a loop Parameters: ld: [in] the polyline locations and attributes to draw

◆ DrawPolylines() [2/2]

virtual void CRhinoDisplayEngine::DrawPolylines ( const class CRhinoClippingVertexCollection *  lists,
int  count 
)
pure virtual

◆ DrawRoundedRectangle()

virtual void CRhinoDisplayEngine::DrawRoundedRectangle ( ON_2fPoint  screenCenter,
float  pixelWidth,
float  pixelHeight,
float  cornerRadius,
ON_Color  strokeColor,
float  strokeWidth,
ON_Color  fillColor 
)
pure virtual

◆ DrawShadedBrep()

virtual void CRhinoDisplayEngine::DrawShadedBrep ( const ON_Brep brep,
const class CDisplayPipelineAttributes da,
CRhinoCacheHandle cacheHandle 
)
virtual

◆ DrawString() [1/3]

virtual void CRhinoDisplayEngine::DrawString ( const ON_TextContent text,
const ON_Xform textXform,
ON_Color  color,
CRhinoCacheHandle cache 
)
virtual

Reimplemented in CRhinoDisplayEngine_GDI.

◆ DrawString() [2/3]

virtual void CRhinoDisplayEngine::DrawString ( const wchar_t *  text,
const ON_Color textColor,
const ON_2dPoint point,
bool  middle,
float  fontHeightPixels,
const ON_Font font 
)
pure virtual

Description: Draws text with specified color, font and height Parameters: text: [in] string to draw color: [in] text color point: [in] definition point, either lower-left or middle based on value in middle middle: [in] TRUE: middle justified, FALSE: lower-left justified fontface: [in] face name to use for font selection

Implemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ DrawString() [3/3]

virtual void CRhinoDisplayEngine::DrawString ( const wchar_t *  text,
const ON_Xform xf,
const ON_Font font,
const ON_Color color,
ON::TextHorizontalAlignment  horizontalAlignment,
ON::TextVerticalAlignment  verticalAlignment,
CRhinoCacheHandle cache 
)
pure virtual

◆ DrawSubD() [1/2]

virtual void CRhinoDisplayEngine::DrawSubD ( const class CRhinoSubDDisplay subd_display,
const class CRhinoSubDDisplayAttributes subd_display_attributes 
)
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ DrawSubD() [2/2]

virtual void CRhinoDisplayEngine::DrawSubD ( const class ON_SubD subd,
const class CRhSubDDisplayAttributes *  attrs,
CRhinoCacheHandle cacheHandle 
)
virtual

Do not call - placeholder virtual function in order to improve SubD display without breaking SDK.

◆ DrawSubDComponents()

virtual void CRhinoDisplayEngine::DrawSubDComponents ( const class ON_SubD subd,
const class ON_SubDComponentPtr components,
size_t  componentCount,
const class CRhSubDDisplayAttributes *  attrs,
CRhinoCacheHandle cacheHandle 
)
virtual

Do not call - placeholder virtual function in order to improve SubD display without breaking SDK.

◆ DrawTechnicalWires()

void CRhinoDisplayEngine::DrawTechnicalWires ( const CRhinoObject rhinoObject,
const ON_Color color,
float  borderThickness,
float  silhouetteThickness,
float  creaseThickness 
)

◆ DrawTextRun()

virtual void CRhinoDisplayEngine::DrawTextRun ( const ON_TextRun run,
const ON_Font font,
const ON_Xform xform,
ON_Color  color,
CRhinoCacheHandle cache 
)
virtual

◆ DrawTraceImage()

virtual void CRhinoDisplayEngine::DrawTraceImage ( const class CRhTraceImage &  traceimage)
virtual

Description: Draws background bitmap image into the frame buffer.

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ DrawWallpaper()

virtual void CRhinoDisplayEngine::DrawWallpaper ( const class CRhWallpaper &  wallpaper)
virtual

Description: Draws wallpaper image into the frame buffer.

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ DrawWorldAxes()

virtual void CRhinoDisplayEngine::DrawWorldAxes ( const ON_Color xaxis_color,
const ON_Color yaxis_color,
const ON_Color zaxis_color,
int  axes_length,
int  label_offset,
int  letter_size 
)
virtual

Standard engine routines for drawing high-level (non-primitive) items...

Note: These routines eventually end up calling the low-level primitive drawing routines, which, for the most part, are usually overridden by custom engines. Therefore, it's usually not necessary to override any of these routines, unless you want to completely change the way they look or are drawn. Description: Draws world axes icon in lower left corner of viewport.

Parameters: xaxis_color - [in] X axis color yaxis_color - [in] Y axis color zaxis_color - [in] Z axis color axes_length - [in] length in pixels (25 works well) label_offset- [in] distance in pixels labels are placed from axes letter_size - [in] label font size (in points, 14 works well)

◆ EnableClipPlanes()

virtual bool CRhinoDisplayEngine::EnableClipPlanes ( bool  bEnable,
int  plane = -1 
)
virtual

Description: Enable/Disable user defined clipping planes Parameters: plane: [in] index for plane to enable/disable. If -1, all planes will be enabled or disabled

◆ EnableColorWriting()

virtual void CRhinoDisplayEngine::EnableColorWriting ( bool  bEnable = true)
virtual

Description: Turn on/off writing of information to the color buffer

Reimplemented in CRhinoDisplayEngine_OGL.

◆ EnableDepthTesting()

virtual void CRhinoDisplayEngine::EnableDepthTesting ( bool  bEnable = true)
virtual

Description: Turn of/off depth testing for engines that support depth buffers

Reimplemented in CRhinoDisplayEngine_OGL.

◆ EnableDepthWriting()

virtual void CRhinoDisplayEngine::EnableDepthWriting ( bool  bEnable = true)
virtual

Description Turn on/off writing of information to the depth buffer for engines that support depth buffers

Reimplemented in CRhinoDisplayEngine_OGL.

◆ EnableMaterials()

void CRhinoDisplayEngine::EnableMaterials ( bool  on)

◆ EnableMeshBuffering()

virtual void CRhinoDisplayEngine::EnableMeshBuffering ( bool  on)
virtual

"State" operations & attributes...

Reimplemented in CRhinoDisplayEngine_OGL.

◆ EnableMultiSample()

virtual void CRhinoDisplayEngine::EnableMultiSample ( bool  bEnable = true)
virtual

Enables / disables multisampling.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ EnableShadows()

void CRhinoDisplayEngine::EnableShadows ( bool  )

New for V8 [end].

◆ FlushAll()

virtual void CRhinoDisplayEngine::FlushAll ( )
virtual

Description: Flushes any and all buffers used by the engine.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ FlushCurveBuffer()

virtual void CRhinoDisplayEngine::FlushCurveBuffer ( )
protectedvirtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ FlushMeshBuffer()

virtual void CRhinoDisplayEngine::FlushMeshBuffer ( )
protectedvirtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ FlushPointBuffer()

virtual void CRhinoDisplayEngine::FlushPointBuffer ( )
protectedvirtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ FrameBufferBitDepth()

virtual int CRhinoDisplayEngine::FrameBufferBitDepth ( )
virtual

Returns: Number of bits per pixel for the frame buffer color values

Reimplemented in CRhinoDisplayEngine_OGL.

◆ FrameBufferChannelDepth()

virtual void CRhinoDisplayEngine::FrameBufferChannelDepth ( int &  red_bits,
int &  green_bits,
int &  blue_bits,
int &  alpha_bits 
)
virtual

Description: Gets the number of bits used to define each color channel for an individual pixel Parameters: red_bits: [out] number of bits dedicated to describing red level in pixel green_bits: [out] number of bits dedicated to describing green level in pixel blue_bits: [out] number of bits dedicated to describing blue level in pixel alpha_bits: [out] number of bits dedicated to describing alpha level in pixel

Reimplemented in CRhinoDisplayEngine_OGL.

◆ FrustumCenter()

ON_3dPoint CRhinoDisplayEngine::FrustumCenter ( ) const

◆ GeometrySource()

const CRhinoDoc* CRhinoDisplayEngine::GeometrySource ( ) const

Return the document that the pipeline uses to get geometry information from when drawing.

◆ GetBackBuffer()

virtual bool CRhinoDisplayEngine::GetBackBuffer ( CRhinoDib dib)
virtual

Description: copy the color information in the back buffer to a bitmap Parameters: dib: [out] the bitmap that is created and holds the back buffer's values Returns: true if successful

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ GetCapturedFrame()

virtual const class CRhFrameCapture* CRhinoDisplayEngine::GetCapturedFrame ( ) const
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ GetCurveAttributes()

void CRhinoDisplayEngine::GetCurveAttributes ( CRhCurveAttributes attributes) const

Description: Get the current curve attributes that are being used by the engine Parameters: attributes: [out] the current curve attributes

◆ GetDepthBuffer()

virtual bool CRhinoDisplayEngine::GetDepthBuffer ( float *  buffer,
int  left,
int  top,
int  width,
int  height 
)
virtual

Description: Read depth values into an array Parameters: buffer: [out] array large enough to hold width * height elements This array will hold the depth values left: [in] defines rectangle on viewport to get information from top: [in] defines rectangle on viewport to get information from width: [in] defines rectangle on viewport to get information from height: [in] defines rectangle on viewport to get information from Returns: true if successful

Reimplemented in CRhinoDisplayEngine_OGL.

◆ GetEnabledClipPlanes()

ON_SimpleArray<ON_PlaneEquation> CRhinoDisplayEngine::GetEnabledClipPlanes ( const ON_Xform xf) const

◆ GetFarPlane()

void CRhinoDisplayEngine::GetFarPlane ( ON_Plane ) const

◆ GetLight()

virtual const ON_Light* CRhinoDisplayEngine::GetLight ( int  index) const
virtual

◆ GetModelViewMatrix()

ON_Xform CRhinoDisplayEngine::GetModelViewMatrix ( ) const

◆ GetMultiSampleMode()

virtual int CRhinoDisplayEngine::GetMultiSampleMode ( ) const
virtual

Returns: The current multi-sample mode for this engine or -1 if multisampling is not supported

Reimplemented in CRhinoDisplayEngine_OGL.

◆ GetMultiSampleModes()

virtual void CRhinoDisplayEngine::GetMultiSampleModes ( ON_SimpleArray< int > &  modes) const
virtual

Description: If this engine supports multisampling, this function retrieves a list of the multisampling modes available Parameters: modes: [out] list of multi-sample modes available Note: the values returned are engine specific, and only the underlying engine knows how to really interpret their meaning. The routine SetMultiSampleMode( N ) is used in conjunction with these return values, and again, only the engine knows what they mean and how they're interpreted when actually setting up multi-sampling.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ GetNearFarPlane()

void CRhinoDisplayEngine::GetNearFarPlane ( ON_Plane N,
ON_Plane F 
) const

◆ GetNearPlane()

void CRhinoDisplayEngine::GetNearPlane ( ON_Plane ) const

◆ GetOffscreenBufferInfo()

virtual bool CRhinoDisplayEngine::GetOffscreenBufferInfo ( HDC  hDC,
int &  nColorDepth,
int &  nZDepth 
)
virtual

Description:

Reimplemented in CRhinoDisplayEngine_OGL.

◆ GetRenderTargetDC()

HDC CRhinoDisplayEngine::GetRenderTargetDC ( ) const
protected

◆ GetSceneManager() [1/3]

virtual class CRhGLSceneManager* CRhinoDisplayEngine::GetSceneManager ( )
virtual

From CRhEngineExtension class. These functions should change as we clean up V6

◆ GetSceneManager() [2/3]

class CRhGLSceneManager* CRhinoDisplayEngine::GetSceneManager ( const CRhinoDoc doc)

◆ GetSceneManager() [3/3]

virtual class CRhGLSceneManager* CRhinoDisplayEngine::GetSceneManager ( unsigned int  docSerialNumber)
virtual

◆ GetStereoParallax()

virtual double CRhinoDisplayEngine::GetStereoParallax ( ) const
virtual

◆ GetStereoSeparation()

virtual double CRhinoDisplayEngine::GetStereoSeparation ( ) const
virtual

◆ HasDepthBuffer()

virtual bool CRhinoDisplayEngine::HasDepthBuffer ( )
virtual

Returns: true if this engine can use a depth buffer (z-buffer)

Reimplemented in CRhinoDisplayEngine_OGL.

◆ InstanceDefinitionTransform()

const ON_Xform& CRhinoDisplayEngine::InstanceDefinitionTransform ( ) const

Returns: The instance definition transformation. The same as ModelTransform() excluding the dynamic transform.

◆ InStereoMode()

virtual bool CRhinoDisplayEngine::InStereoMode ( ) const
virtual

◆ InvalidateCapturedFrame()

virtual void CRhinoDisplayEngine::InvalidateCapturedFrame ( )
virtual

Caching operations...

Reimplemented in CRhinoDisplayEngine_OGL.

◆ IsAccelerated()

virtual bool CRhinoDisplayEngine::IsAccelerated ( ) const
virtual

Description: Is this engine drawing using hardware acceleration? Returns: true if the engine is using hardware accelerated OpenGL or Direct3D

Reimplemented in CRhinoDisplayEngine_OGL.

◆ IsEntireBoxVisible()

bool CRhinoDisplayEngine::IsEntireBoxVisible ( const ON_BoundingBox bbox) const

Returns: true if the supplied bounding box is entirely inside the clip box.x

◆ iShutdownEngine()

void CRhinoDisplayEngine::iShutdownEngine ( )
protected

Description: This should always be called instead of the virtual ShutDownEngine function. This function does eventually call the virtual ShutDownEngine

◆ IsPreview()

bool CRhinoDisplayEngine::IsPreview ( void  ) const

◆ LightCount()

virtual int CRhinoDisplayEngine::LightCount ( ) const
virtual

Returns: Number of lights this engine is currently using for drawing shaded geometry

◆ Line()

void CRhinoDisplayEngine::Line ( const ON_4fPoint start,
const ON_4fPoint end 
)
protected

◆ LinearWorkflow()

const CDisplayPipelineAttributes::LinearWorkflow& CRhinoDisplayEngine::LinearWorkflow ( ) const

◆ LineTo()

void CRhinoDisplayEngine::LineTo ( const ON_4fPoint )
protected

clipping coordinate point

◆ MaxClipPlanesSupported()

virtual int CRhinoDisplayEngine::MaxClipPlanesSupported ( ) const
virtual

Returns: The maximum number of user defined clipping planes supported. This does not include the standard view frustum clipping planes. OpenGL and Direct3D will support different numbers of clipping planes based on the installed graphics card.

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ MaxDecalsSupported()

virtual int CRhinoDisplayEngine::MaxDecalsSupported ( ) const
virtual

Returns: The maximum number of decals supported for shading. OpenGL and Direct3D will support different numbers of decals based on the installed graphics card.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ MaxLightsSupported()

virtual int CRhinoDisplayEngine::MaxLightsSupported ( ) const
virtual

Returns: The maximum number of lights supported for shading. OpenGL and Direct3D will support different numbers of lights based on the installed graphics card.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ MaxObjectMappingsSupported()

virtual int CRhinoDisplayEngine::MaxObjectMappingsSupported ( ) const
virtual

Returns: The maximum number of object mappings supported for shading. OpenGL and Direct3D will support different numbers of object mappings based on the installed graphics card.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ MaxProceduralCommandsSupported()

int CRhinoDisplayEngine::MaxProceduralCommandsSupported ( ) const

Returns: The maximum number of procedural commands supported for shading. OpenGL and Direct3D will support different numbers of procedural commands based on the installed graphics card.

◆ MaxProceduralsSupported()

int CRhinoDisplayEngine::MaxProceduralsSupported ( ) const

Returns: The maximum number of procedurals supported for shading. OpenGL and Direct3D will support different numbers of procedurals based on the installed graphics card.

◆ MaxProceduralTransformsSupported()

int CRhinoDisplayEngine::MaxProceduralTransformsSupported ( ) const

Returns: The maximum number of procedural transforms supported for shading. OpenGL and Direct3D will support different numbers of procedural transforms based on the installed graphics card.

◆ MeshBufferingEnabled()

virtual bool CRhinoDisplayEngine::MeshBufferingEnabled ( ) const
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ ModelTransform()

const ON_Xform& CRhinoDisplayEngine::ModelTransform ( ) const

Model transform operations...

Returns: The model transformation that is currently being applied to geometry for drawing.

◆ ModelTransformIsIdentity()

bool CRhinoDisplayEngine::ModelTransformIsIdentity ( ) const

◆ MoveTo()

void CRhinoDisplayEngine::MoveTo ( const ON_4fPoint )
protected

clipping coordinate point

◆ MoveToLineTo()

void CRhinoDisplayEngine::MoveToLineTo ( const ON_4fPoint start,
const ON_4fPoint end 
)
protected

◆ NotifyClippingPlanesChanged()

virtual void CRhinoDisplayEngine::NotifyClippingPlanesChanged ( )
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ NotifyFrameSizeChanged()

virtual bool CRhinoDisplayEngine::NotifyFrameSizeChanged ( int  nWidth,
int  nHeight 
)
virtual

Description: Tell the engine that the size of the rectangle that it draws to has changed.

Reimplemented in CRhinoDisplayEngine_GDI, and CRhinoDisplayEngine_OGL.

◆ NotifyProjectionChanged()

virtual bool CRhinoDisplayEngine::NotifyProjectionChanged ( )
virtual

Notifier routines called by the pipeline framework...

Description: This routine is normally called by the pipeline framework because the current "display's" viewport projection has changed...This means that all of the commonly used engine attributes need to be updated.

Note: this routine should never be called haphazardly since it can be somewhat expensive performance-wise. However, if you or your display pipeline ever change the projection other than by through the standard pipeline mechanisms, then you must ensure that this routine gets called AFTER the changes, or update these attributes manually on an as-needed basis. Also, if your engine overrides this routine, then it is best that your implementation also call the derived class's implementation. Returns: true on success

Reimplemented in CRhinoDisplayEngine_OGL.

◆ PopColorWriting()

virtual bool CRhinoDisplayEngine::PopColorWriting ( )
virtual

Description: Restore state of color writing that was saved by calling PushColorWriting Returns: previous state of color writing

◆ PopDepthTesting()

virtual void CRhinoDisplayEngine::PopDepthTesting ( )
virtual

Description: Restore state of depth testing that was saved by calling PushDepthTesting Returns: previous state of depth testing

◆ PopDepthWriting()

virtual void CRhinoDisplayEngine::PopDepthWriting ( )
virtual

Description: Restore state of depth writing that was saved by calling PushDepthWriting Returns: previous state of depth writing

◆ PopModelTransform()

void CRhinoDisplayEngine::PopModelTransform ( )

Description: Restore a model transform that was pushed on to a stack of transforms using the PushModelTransform function

◆ PopModelViewMatrix()

void CRhinoDisplayEngine::PopModelViewMatrix ( )

◆ PopProjection()

void CRhinoDisplayEngine::PopProjection ( )

Description: Restore the viewport that was pushed on to a stack with a call to PushProjection.

◆ PreviewEnvironmentId()

ON_UUID CRhinoDisplayEngine::PreviewEnvironmentId ( void  ) const

◆ PushColorWriting()

virtual void CRhinoDisplayEngine::PushColorWriting ( bool  bEnable)
virtual

Description: Save the current state of color writing on a stack and turn on/off color writing

◆ PushDepthTesting()

virtual void CRhinoDisplayEngine::PushDepthTesting ( bool  bEnable)
virtual

Description: Save the current state of depth testing on a stack and turn on/off depth testing

◆ PushDepthWriting()

virtual void CRhinoDisplayEngine::PushDepthWriting ( bool  bEnable)
virtual

Description: Save the current state of depth writing on a stack and turn on/off depth writing

◆ PushModelTransform()

void CRhinoDisplayEngine::PushModelTransform ( const ON_Xform mt)

Description: Save the current model transform on a stack and set a new model transform Remark: This function does not multiply mt by the existing model transform. If you want to compound transformations multiply ModelTransform() by your xform before calling this function. Parameters: mt: [in] the transform that the engine's model transform will be set to.

◆ PushModelViewMatrix() [1/2]

void CRhinoDisplayEngine::PushModelViewMatrix ( )

◆ PushModelViewMatrix() [2/2]

void CRhinoDisplayEngine::PushModelViewMatrix ( const ON_Xform xf)

◆ PushProjection()

void CRhinoDisplayEngine::PushProjection ( const ON_Viewport viewport)

Description: Save the current viewport on a stack and set the current viewport to a given viewport Parameters: viewport: [in] the viewport to make the current viewport for the engine.

◆ ResetEngine()

virtual bool CRhinoDisplayEngine::ResetEngine ( )
virtual

Description: Should reset the engine back to some initial state...but at the same time try to maintain current state (ie. opened or closed). Typically this means saving the current state, shutting down the engine and then restarting the engine with the saved state

This is typically only used for things like changing the multisampling modes for an engine Returns: true if the reset operation was successful

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ RestoreBackBuffer()

virtual bool CRhinoDisplayEngine::RestoreBackBuffer ( )
virtual

Returns: true if a saved back buffer was successfully restored to the back buffer

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ RestoreDepthBuffer()

virtual bool CRhinoDisplayEngine::RestoreDepthBuffer ( )
virtual

Returns: true if a saved depth buffer was successfully restored to the engine depth buffer

Reimplemented in CRhinoDisplayEngine_OGL.

◆ SaveBackBuffer()

virtual bool CRhinoDisplayEngine::SaveBackBuffer ( )
virtual

Returns: true if this engine successfully saved back buffer color information to a location that can be retrieved at a later time

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ SaveDepthBuffer()

virtual bool CRhinoDisplayEngine::SaveDepthBuffer ( )
virtual

Returns: true is this engine successfully saved the depth buffer information to a location that can be retrieved at a later time

Reimplemented in CRhinoDisplayEngine_OGL.

◆ ScreenLength()

double CRhinoDisplayEngine::ScreenLength ( double  world_length) const

◆ ScreenToClip()

const ON_Xform& CRhinoDisplayEngine::ScreenToClip ( ) const

◆ ScreenToClipInverse()

const ON_Xform& CRhinoDisplayEngine::ScreenToClipInverse ( ) const

◆ SetCamera()

void CRhinoDisplayEngine::SetCamera ( const ON_Viewport )

Description: Set the camera's frustum that this engine uses to define it's view projection information Note: This information is copied into the engines local camera settings, so making any changes to the passed in viewport object after calling this routine will have no effect. You must always use SetCamera( ...) to change and/or set the engine's frustum.

◆ SetClippingPlanes()

virtual int CRhinoDisplayEngine::SetClippingPlanes ( const ON_SimpleArray< ON_ClippingPlaneInfo > &  clipplanes)
virtual

◆ SetClipRegion()

virtual int CRhinoDisplayEngine::SetClipRegion ( int  region_id)
virtual

Description: Clip region defines an area on the framebuffer where drawing can occur Note - This function has not been implemented for V4 and serves as a virtual function placeholder for future versions of Rhino Parameters: region_id: [in] id returned from CreateClipRegion function

◆ SetCullFaceMode()

virtual ECullFaceMode CRhinoDisplayEngine::SetCullFaceMode ( ECullFaceMode  mode)
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ SetCurveAttributes()

void CRhinoDisplayEngine::SetCurveAttributes ( const CRhCurveAttributes attributes)

Description: Set the current curve attributes that are being used by the engine Parameters: attributes: [in] the engine's current curve attributes are set to these values

◆ SetDepthMode()

virtual int CRhinoDisplayEngine::SetDepthMode ( int  nDepth)
virtual

Description: Sets the current depth-testing mode used when drawing curves and lines. This basically determines whether lines are either always drawn in front, in back, or pays attention to the current depth value in the depth buffer. Parameters: nDepth: [in] 0 = Perform a depth-buffer test draw - this the normal mode of operation -1 = Always draw in back of everything else (i.e. on the far clipping plane) 1 = Always draw in front of everything else (i.e. on the near clipping plane) Note: All parameter values are currently clamped to [-1 .. 1] Returns: int : the previously used depth mode setting.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ SetDpiScale()

void CRhinoDisplayEngine::SetDpiScale ( float  scale)

◆ SetInstanceDefinitionTransform()

void CRhinoDisplayEngine::SetInstanceDefinitionTransform ( const ON_Xform idt)

Description: Set the instance definition transformation. This is the same as the model transformation excluding the dynamic transform. Parameters: idt: [in] the instance definition transform.

◆ SetIsPreview()

void CRhinoDisplayEngine::SetIsPreview ( bool  )

◆ SetLinearWorkflow()

void CRhinoDisplayEngine::SetLinearWorkflow ( const CDisplayPipelineAttributes::LinearWorkflow lw)

◆ SetModelTransform()

void CRhinoDisplayEngine::SetModelTransform ( const ON_Xform mt)

Description: Set a model transformation that will be applied to all future drawing operations. All line and point buffers are always flushed in ths function before the transformation is set. Parameters: mt: [in] the transform that the engine's model transform will be set to.

◆ SetModelViewMatrix()

void CRhinoDisplayEngine::SetModelViewMatrix ( const ON_Xform xf)

Used to track the contents of the OpenGL model view matrix We should always use this matrix to compute new model transform matrices on the CPU in double precision because the OpenGL matrix stack is in floats and precision goes down the toilet when you are far from the origin and call glmultmatrix. We should always glloadmatrix with our double precision calculated xform.

◆ SetMultiSampleMode()

virtual bool CRhinoDisplayEngine::SetMultiSampleMode ( int  mode)
virtual

Description: Set the current multisampling mode for this engine Parameters: mode: [in] one of the modes retrieved from GetMultiSampleModes function Returns: true on success. If the engine does not support multisampling the return value will always be false

Reimplemented in CRhinoDisplayEngine_OGL.

◆ SetPreviewEnvironmentId()

void CRhinoDisplayEngine::SetPreviewEnvironmentId ( ON_UUID  id)

◆ SetRenderTarget() [1/2]

virtual void CRhinoDisplayEngine::SetRenderTarget ( HDC  pDC,
bool  bShutDown 
)
protectedvirtual

◆ SetRenderTarget() [2/2]

virtual void CRhinoDisplayEngine::SetRenderTarget ( HWND  hWnd)
protectedvirtual

Description: Set the window that this engine draws on

◆ SetScreenDrawTolerance()

void CRhinoDisplayEngine::SetScreenDrawTolerance ( double  ,
double  ,
double   
)
protected

◆ SetStereoMode()

virtual bool CRhinoDisplayEngine::SetStereoMode ( bool  bStereo)
virtual

Reimplemented in CRhinoDisplayEngine_OGL.

◆ SetStereoParallax()

virtual void CRhinoDisplayEngine::SetStereoParallax ( float  )
virtual

◆ SetStereoSeparation()

virtual void CRhinoDisplayEngine::SetStereoSeparation ( float  fSep)
virtual

◆ SetZBiasLevel()

virtual int CRhinoDisplayEngine::SetZBiasLevel ( int  zbias)
virtual

Description: Sets a bias to apply to drawn geometry. Typical values are -1 for pushing geometry further away 0 for no biasing +1 for pulling geometry a little closer Parameters: zbias: [in] new bias level to apply Returns: previous zbias mode value

◆ ShadowsEnabled()

bool CRhinoDisplayEngine::ShadowsEnabled ( void  ) const

◆ ShowBackBuffer()

virtual bool CRhinoDisplayEngine::ShowBackBuffer ( HDC  hDC)
virtual

Description: Display the contents of the back buffer on to the front buffer Parameters: pDC: [in] device context to draw the back buffer colors to Returns: true if successful

Reimplemented in CRhinoDisplayEngine_OGL.

◆ ShutdownEngine()

virtual void CRhinoDisplayEngine::ShutdownEngine ( )
virtual

Description: Should completely shutdown and destroy everything associated with this engine... This includes any runtime buffers, dibs, or rendering contexts

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ StartEngine()

virtual bool CRhinoDisplayEngine::StartEngine ( )
virtual

Engine initialization and cleanup operations...

Description: At the very beginning of drawing each frame the pipeline will call StartEngine to allow the engine to perform any required initializaion or context enabling

All subclasses that override this function should call this base class version of the function. Returns: True if the engine was successfully "started". False if something went wrong. If the function returns false, the pipeline will not be able to draw a frame.

Reimplemented in CRhinoDisplayEngine_OGL, and CRhinoDisplayEngine_GDI.

◆ StopEngine()

virtual bool CRhinoDisplayEngine::StopEngine ( )
virtual

Description: Near the end of drawing a frame the display pipeline will call StopEngine to tell the engine that it should flush any remaining buffers and perform and other task that must occur just prior to displaying the frame. Returns: true if the engine was successfully stopped. This is pretty much always true

Reimplemented in CRhinoDisplayEngine_OGL.

◆ SupportsMultiSampling()

virtual bool CRhinoDisplayEngine::SupportsMultiSampling ( ) const
virtual

Returns: True if the underlying engine technology support multisampling modes. This is used for anti-aliasing purposes and depends on the installed graphics card.

Reimplemented in CRhinoDisplayEngine_OGL.

◆ SupportsShading()

virtual bool CRhinoDisplayEngine::SupportsShading ( ) const
virtual

Returns: True if the display engine support drawing triangles with lighting effects. Basically this is false for GDI and true for OpenGL and DirectX

Reimplemented in CRhinoDisplayEngine_OGL.

◆ SupportsVboBuffers()

bool CRhinoDisplayEngine::SupportsVboBuffers ( ) const
protected

New for V8 [begin].

◆ UseClipPlanes()

bool CRhinoDisplayEngine::UseClipPlanes ( ) const

◆ UseMaterials()

bool CRhinoDisplayEngine::UseMaterials ( )

◆ VP()

const ON_Viewport& CRhinoDisplayEngine::VP ( ) const

Generic engine attributes...

Description: Get the viewport that this engine draws the contents of

◆ WireDpiScale()

float CRhinoDisplayEngine::WireDpiScale ( ) const

◆ WorldToCamera()

const ON_Xform& CRhinoDisplayEngine::WorldToCamera ( bool  includeModelXform = true) const

◆ WorldToCameraInverse()

const ON_Xform& CRhinoDisplayEngine::WorldToCameraInverse ( bool  includeModelXform = true) const

◆ WorldToClip()

const ON_Xform& CRhinoDisplayEngine::WorldToClip ( bool  includeModelXform = true) const

world to screen transform = Viewport(world to clip)*m_ModelTransform

◆ WorldToClipInverse()

const ON_Xform& CRhinoDisplayEngine::WorldToClipInverse ( bool  includeModelXform = true) const

◆ WorldToClippingPoint()

ON_4dPoint CRhinoDisplayEngine::WorldToClippingPoint ( const ON_3dPoint point) const

Description: Convert a point in 3d world space coordinates to 4d clipping coordinates Parameters: point: [in] the location in world coordinates to convert Returns: the equivalent clipping coordinates to the world coordinate with the current viewport projection

◆ WorldToScreen()

const ON_Xform& CRhinoDisplayEngine::WorldToScreen ( bool  includeModelXform = true) const

world to screen transform = Viewport(world to screen)*m_ModelTransform

◆ WorldToScreenInverse()

const ON_Xform& CRhinoDisplayEngine::WorldToScreenInverse ( bool  includeModelXform = true) const

◆ WorldToScreenPoint()

ON_2dPoint CRhinoDisplayEngine::WorldToScreenPoint ( const ON_3dPoint point) const

Description: Convert a point in 3d world space coordinates to 2d screen space coordinates Parameters: point: [in] the location in world coordinates to convert Returns: the screen space coordinate where the world coordinate would be drawn

◆ ZBiasDistance()

double CRhinoDisplayEngine::ZBiasDistance ( double  z,
double  w 
) const
protected

Description: Quickly calculates a zbias to apply in applications like drawing curves on surfaces. In parallel projections the zbias is constant. In perpsective projections the zbias depends on the depth where the bias is being applied. Parameters: z, w - [in] clipping depth (homogeneous coordinates) ( -1 <= z <= 1 ) Returns: homogeneous zbias at z

◆ ZBiasLevel()

virtual int CRhinoDisplayEngine::ZBiasLevel ( ) const
virtual

Friends And Related Function Documentation

◆ CRhDisplayEnginePrivate

friend class CRhDisplayEnginePrivate
friend

◆ CRhinoDisplayPipeline

friend class CRhinoDisplayPipeline
friend

◆ CRhinoPipelineRef

friend class CRhinoPipelineRef
friend

Member Data Documentation

◆ m__zbias_a

double CRhinoDisplayEngine::m__zbias_a = 0
protected

(near+far)

◆ m__zbias_b

double CRhinoDisplayEngine::m__zbias_b = 0
protected

(far-near)

◆ m__zbias_c

double CRhinoDisplayEngine::m__zbias_c = 0
protected

m__zbias_d*‍/(4*near*far)

◆ m__zbias_d

double CRhinoDisplayEngine::m__zbias_d = 0
protected

parallel proj bias or 0 for no zbias

◆ m__zbias_use_d

bool CRhinoDisplayEngine::m__zbias_use_d = true
protected

true to return constance bias

◆ m_bInfiniteDepth

bool CRhinoDisplayEngine::m_bInfiniteDepth = false
protected

If m_bInfiniteDepth = true, then wireframe drawing does not clip at the near/far clipping planes. This is useful when code like curvature hair display or control polygon editing is drawing curves and points that are often outside the view frustum and changing the near/far clipping planes to include the wireframe is either computationally expensive or leads to numerically unstable view frustums. The default setting of m_bInfiniteDepth is false. The setting is controlled by CRhinoDisplayPipeline::SetInfinteDepth() and reported by CRhinoDisplayPipeline::InfiniteDepth(). It is a "state" setting and any code that changes m_bInfiniteDepth is responsible for restoring its value to the previous setting.

◆ m_bInStereoMode

bool CRhinoDisplayEngine::m_bInStereoMode = false
protected

Stereo viewing operations...

◆ m_bUseMaterials

bool CRhinoDisplayEngine::m_bUseMaterials = true
protected

◆ m_Camera

ON_Viewport CRhinoDisplayEngine::m_Camera
protected

◆ m_CameraStack

ON_ClassArray<ON_Viewport> CRhinoDisplayEngine::m_CameraStack
protected

◆ m_cliptol_x

float CRhinoDisplayEngine::m_cliptol_x = 0.01f
protected

◆ m_cliptol_y

float CRhinoDisplayEngine::m_cliptol_y = 0.01f
protected

◆ m_cliptol_z

float CRhinoDisplayEngine::m_cliptol_z = 0.01f
protected

tolerance in clipping coordinates

◆ m_curve_attrs

CRhCurveAttributes CRhinoDisplayEngine::m_curve_attrs
protected

◆ m_depth_testing_stack

ON_SimpleArray<bool> CRhinoDisplayEngine::m_depth_testing_stack
protected

◆ m_depth_writing_stack

ON_SimpleArray<bool> CRhinoDisplayEngine::m_depth_writing_stack
protected

◆ m_dp

CRhinoDisplayPipeline* CRhinoDisplayEngine::m_dp = nullptr
protected

◆ m_dpi_scale

float CRhinoDisplayEngine::m_dpi_scale = 1.0f
protected

scaling for high resolution displays

◆ m_draw_speed

int CRhinoDisplayEngine::m_draw_speed = 0
protected

0 = accurate, 1 = fast, 2 = really

◆ m_fStereoParallax

float CRhinoDisplayEngine::m_fStereoParallax = 1.0f
protected

◆ m_fStereoSeparation

float CRhinoDisplayEngine::m_fStereoSeparation = 1.0f
protected

◆ m_hDC

HDC CRhinoDisplayEngine::m_hDC = nullptr
protected

Device Context handle render target.

◆ m_hWnd

HWND CRhinoDisplayEngine::m_hWnd = nullptr
protected

Engine display and drawing attributes...

Window handle for window based render targets

◆ m_modelview_matrix_stack

ON_SimpleArray<ON_Xform> CRhinoDisplayEngine::m_modelview_matrix_stack
protected

◆ m_ModelXformStack

ON_SimpleArray<ON_Xform> CRhinoDisplayEngine::m_ModelXformStack
protected

◆ m_nDisplayHeight

int CRhinoDisplayEngine::m_nDisplayHeight = 0
protected

◆ m_nDisplayWidth

int CRhinoDisplayEngine::m_nDisplayWidth = 0
protected

Viewport size attributes...

Common attributes "probably" used by most engine implementations. Note: These get set appropriately by the framework when necessary so there's no guess-work and no duplication needed by other engines. see description for "NotifyProjectionChanged"

◆ m_private

class CRhDisplayEnginePrivate* CRhinoDisplayEngine::m_private = nullptr
protected

◆ m_stol_x

float CRhinoDisplayEngine::m_stol_x = 0.75f
protected

◆ m_stol_y

float CRhinoDisplayEngine::m_stol_y = 0.75f
protected

◆ m_stol_z

float CRhinoDisplayEngine::m_stol_z = 1.00f
protected

screen buffer drawing tolerances

◆ m_wire_depth

int CRhinoDisplayEngine::m_wire_depth = 0
protected