Rhino C++ API  7.26
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CRhinoVisualAnalysisMode Class Referenceabstract

#include <rhinoSdkAnalysisModes.h>

Public Types

enum  { wireframe_style = 1, texture_style = 2, false_color_style = 4 }

Public Member Functions

 CRhinoVisualAnalysisMode (ON_UUID am_id, int style)
virtual ~CRhinoVisualAnalysisMode ()
virtual void DrawBrepObject (const CRhinoBrepObject &brep_object, CRhinoDisplayPipeline &dp) const
virtual void DrawCurveObject (const CRhinoCurveObject &curve_object, CRhinoDisplayPipeline &dp) const
virtual void DrawExtrusionObject (const CRhinoExtrusionObject &extrusion_object, CRhinoDisplayPipeline &dp) const
virtual void DrawMesh (const CRhinoObject &rhino_object, const ON_Mesh &mesh, CRhinoDisplayPipeline &dp) const
virtual void DrawMeshObject (const CRhinoMeshObject &mesh_object, CRhinoDisplayPipeline &dp) const
virtual void DrawNurbsCurve (const CRhinoObject &rhino_object, const ON_NurbsCurve &nurbs_curve, CRhinoDisplayPipeline &dp) const
virtual void DrawNurbsSurface (const CRhinoObject &rhino_object, const ON_NurbsSurface &nurbs_surface, CRhinoDisplayPipeline &dp) const
virtual void DrawPointCloudObject (const CRhinoPointCloudObject &point_object, CRhinoDisplayPipeline &dp) const
virtual void DrawPointObject (const CRhinoPointObject &point_object, CRhinoDisplayPipeline &dp) const
virtual bool EnableUserInterface (bool bEnable) const
virtual void GetAnalysisModeName (ON_wString &name) const =0
bool IsFalseColor () const
bool IsShaded () const
 texture or falsecolor More...
bool IsTexture () const
 style = 2 More...
bool IsWireframe () const
virtual bool ObjectSupportsAnalysisMode (const CRhinoObject *object) const
virtual void SetAnalysisModeDisplayAttributes (const CRhinoObject *object, CDisplayPipelineAttributes &display_attrs) const
virtual bool ShowIsoCurves () const
virtual void UpdateVertexColors (const CRhinoObject *object, ON_SimpleArray< const ON_Mesh * > &meshes) const

Static Public Member Functions

static const CRhinoVisualAnalysisModeMode (ON_UUID am_id)

Public Attributes

const ON_UUID m_am_id
const int m_style
 one of the above enum values More...

Detailed Description

For each visual analysis mode there is a single instance of a class derived from CRhinoVisualAnalysisMode. The base class constructor, CRhinoVisualAnalysisMode(ON_UUID mode_id) registers the visual analysis mode with Rhino.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

There are three supported styles. Anything more complex has to create a display pipeline.


like curvature hair or naked edge analysis)


like emap and zebra


like draft angle, curvature, thickness analysis

Constructor & Destructor Documentation

◆ CRhinoVisualAnalysisMode()

CRhinoVisualAnalysisMode::CRhinoVisualAnalysisMode ( ON_UUID  am_id,
int  style 

◆ ~CRhinoVisualAnalysisMode()

virtual CRhinoVisualAnalysisMode::~CRhinoVisualAnalysisMode ( )

Member Function Documentation

◆ DrawBrepObject()

virtual void CRhinoVisualAnalysisMode::DrawBrepObject ( const CRhinoBrepObject brep_object,
CRhinoDisplayPipeline dp 
) const

◆ DrawCurveObject()

virtual void CRhinoVisualAnalysisMode::DrawCurveObject ( const CRhinoCurveObject curve_object,
CRhinoDisplayPipeline dp 
) const

Description: If m_style = wireframe_style, then the default decomposes the curve object into nurbs curve segments and calls the virtual DrawNurbsCurve for each segment. Parameters: curve_object - [in] dp - [in]

◆ DrawExtrusionObject()

virtual void CRhinoVisualAnalysisMode::DrawExtrusionObject ( const CRhinoExtrusionObject extrusion_object,
CRhinoDisplayPipeline dp 
) const

◆ DrawMesh()

virtual void CRhinoVisualAnalysisMode::DrawMesh ( const CRhinoObject rhino_object,
const ON_Mesh mesh,
CRhinoDisplayPipeline dp 
) const

◆ DrawMeshObject()

virtual void CRhinoVisualAnalysisMode::DrawMeshObject ( const CRhinoMeshObject mesh_object,
CRhinoDisplayPipeline dp 
) const

◆ DrawNurbsCurve()

virtual void CRhinoVisualAnalysisMode::DrawNurbsCurve ( const CRhinoObject rhino_object,
const ON_NurbsCurve nurbs_curve,
CRhinoDisplayPipeline dp 
) const

Description: The default does nothing. This is a good function to override for analysis modes like curvature hair display. Parameters: curve_object - [in] Curve object nurbs_curve - [in] A nurbs representation of portion of the curve or a dynamically edited nurbs_curve. dp - [in]

◆ DrawNurbsSurface()

virtual void CRhinoVisualAnalysisMode::DrawNurbsSurface ( const CRhinoObject rhino_object,
const ON_NurbsSurface nurbs_surface,
CRhinoDisplayPipeline dp 
) const

◆ DrawPointCloudObject()

virtual void CRhinoVisualAnalysisMode::DrawPointCloudObject ( const CRhinoPointCloudObject point_object,
CRhinoDisplayPipeline dp 
) const

◆ DrawPointObject()

virtual void CRhinoVisualAnalysisMode::DrawPointObject ( const CRhinoPointObject point_object,
CRhinoDisplayPipeline dp 
) const

◆ EnableUserInterface()

virtual bool CRhinoVisualAnalysisMode::EnableUserInterface ( bool  bEnable) const

Description: Turn the analysis mode's user interface on and off.
For Rhino's built in modes this opens or closes the modeless dialog that controls the analysis mode's display settings.

◆ GetAnalysisModeName()

virtual void CRhinoVisualAnalysisMode::GetAnalysisModeName ( ON_wString name) const
pure virtual

Description: Get the name of the analysis mode. This name is used byt the What command and the object properties details window to describe the object.

◆ IsFalseColor()

bool CRhinoVisualAnalysisMode::IsFalseColor ( ) const

◆ IsShaded()

bool CRhinoVisualAnalysisMode::IsShaded ( ) const

texture or falsecolor

◆ IsTexture()

bool CRhinoVisualAnalysisMode::IsTexture ( ) const

style = 2

◆ IsWireframe()

bool CRhinoVisualAnalysisMode::IsWireframe ( ) const

◆ Mode()

static const CRhinoVisualAnalysisMode* CRhinoVisualAnalysisMode::Mode ( ON_UUID  am_id)

Description: Use the visual analysis mode id to lookup a visual analysis mode. Parameters: am_id - [in] Returns: A pointer to the visual analysis mode. This pointer will not change during an instance of Rhino.exe.

◆ ObjectSupportsAnalysisMode()

virtual bool CRhinoVisualAnalysisMode::ObjectSupportsAnalysisMode ( const CRhinoObject object) const

Description: Generally, a plug-in developer will override this function. Parameters: object - [in] Returns: True if this visual analysis mode can be used on object.

◆ SetAnalysisModeDisplayAttributes()

virtual void CRhinoVisualAnalysisMode::SetAnalysisModeDisplayAttributes ( const CRhinoObject object,
CDisplayPipelineAttributes display_attrs 
) const

Description: If an analysis mode needs to modify display attributes, this is the place to do it. In particular, if m_style = CRhinoVisualAnalysisMode::texture_style, then this virtual function must be overridden.

Shaded visual analysis modes that use texture mapping, like emap and zebra, override this function to set up the texture. Parameters: object - [in]

◆ ShowIsoCurves()

virtual bool CRhinoVisualAnalysisMode::ShowIsoCurves ( ) const

Returns: True if this visual analysis mode should show isocuves on shaded surface objects. Often a mode's user interface will provide a way to change this setting.

◆ UpdateVertexColors()

virtual void CRhinoVisualAnalysisMode::UpdateVertexColors ( const CRhinoObject object,
ON_SimpleArray< const ON_Mesh * > &  meshes 
) const

Description: If m_style = CRhinoVisualAnalysisMode::false_color_style, then this virtual function must be overridden. Parameters: object - [in] meshes - [in/out] meshes used to draw the object.

Member Data Documentation

◆ m_am_id

const ON_UUID CRhinoVisualAnalysisMode::m_am_id

Identifies the analysis mode. For built-in analysis modes, this is one of the ON_UUIDs listed above. Plug-ins may define there own analysis modes, so the list above is not a complete list. The value of m_mode_id is set by the constructor.

◆ m_style

const int CRhinoVisualAnalysisMode::m_style

one of the above enum values