Rhino C++ API  8.13
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
CRhinoSubDDisplay Class Reference

#include <RhinoSdkSubD.h>

Public Member Functions

 CRhinoSubDDisplay ()=default
 
 CRhinoSubDDisplay (const CRhinoSubDDisplay &)=default
 
 CRhinoSubDDisplay (CRhinoSubDDisplay &&) ON_NOEXCEPT
 
 ~CRhinoSubDDisplay ()=default
 
void Clear ()
 
unsigned int ContentSerialNumber () const
 
const class CRhSubDDisplay & Display () const
 
class CRhSubDDisplay * Display (bool bCreateIfNeeded)
 
void ForceUpdate ()
 
bool IsEmpty () const
 
ON_SubDMeshFragmentIterator MeshFragmentIterator (bool bCreateIfEmpty) const
 
CRhinoSubDDisplayoperator= (const CRhinoSubDDisplay &)=default
 
CRhinoSubDDisplayoperator= (CRhinoSubDDisplay &&)
 
unsigned int RhinoDocSerialNumber () const
 
ON_UUID RhinoSubDObjectId () const
 
unsigned int RhinoSubDObjectSerialNumber () const
 
const ON_SubDSubD () const
 
const class CRhinoSubDObjectSubDObject () const
 
ON_SubDRef SubDRef () const
 
void Update ()
 

Static Public Member Functions

static CRhinoSubDDisplay Create (const class CRhinoSubDObject &subd_object)
 
static CRhinoSubDDisplay Create (const class CRhinoSubDObject &subd_object, ON_SubDRef display_subd_ref)
 
static CRhinoSubDDisplay Create (const ON_SubD &subd)
 
static CRhinoSubDDisplay Create (ON_SubDRef subd_ref)
 
static bool DrawAsSmoothInteriorEdge (const ON_SubDEdge *edge)
 This function determines how the display code treats an interior SubD edge. (Interior edges with 2 faces). More...
 

Static Public Attributes

static const CRhinoSubDDisplay Empty
 

Detailed Description

Copyright (c) 1993-2015 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. Description: CRhinoSubDDisplay stores information necessary to display and pick ON_SubD objects. A CRhinoSubDDisplay can be created from a CRhinoSubDObject or a stand alone ON_SubD.
It is a reference counted object and the information it can be efficiently and safely passed as a parameter and saved.

Constructor & Destructor Documentation

◆ CRhinoSubDDisplay() [1/3]

CRhinoSubDDisplay::CRhinoSubDDisplay ( )
default

◆ ~CRhinoSubDDisplay()

CRhinoSubDDisplay::~CRhinoSubDDisplay ( )
default

◆ CRhinoSubDDisplay() [2/3]

CRhinoSubDDisplay::CRhinoSubDDisplay ( const CRhinoSubDDisplay )
default

◆ CRhinoSubDDisplay() [3/3]

CRhinoSubDDisplay::CRhinoSubDDisplay ( CRhinoSubDDisplay &&  )

Member Function Documentation

◆ Clear()

void CRhinoSubDDisplay::Clear ( )

Description: Removes all contents and references.

◆ ContentSerialNumber()

unsigned int CRhinoSubDDisplay::ContentSerialNumber ( ) const
Deprecated:
OBSOLETE. ContentSerialNumber() always returns 0

◆ Create() [1/4]

static CRhinoSubDDisplay CRhinoSubDDisplay::Create ( const class CRhinoSubDObject subd_object)
static

Creation

◆ Create() [2/4]

static CRhinoSubDDisplay CRhinoSubDDisplay::Create ( const class CRhinoSubDObject subd_object,
ON_SubDRef  display_subd_ref 
)
static

◆ Create() [3/4]

static CRhinoSubDDisplay CRhinoSubDDisplay::Create ( const ON_SubD subd)
static

◆ Create() [4/4]

static CRhinoSubDDisplay CRhinoSubDDisplay::Create ( ON_SubDRef  subd_ref)
static

◆ Display() [1/2]

const class CRhSubDDisplay& CRhinoSubDDisplay::Display ( ) const

CRhSubDDisplay is used internally.
The definition of CRhSubDDisplay is intentionally not part of the SDK. Plug-ins should ignore these functions.

◆ Display() [2/2]

class CRhSubDDisplay* CRhinoSubDDisplay::Display ( bool  bCreateIfNeeded)

◆ DrawAsSmoothInteriorEdge()

static bool CRhinoSubDDisplay::DrawAsSmoothInteriorEdge ( const ON_SubDEdge edge)
static

This function determines how the display code treats an interior SubD edge. (Interior edges with 2 faces).

Rhino display code has to partition the set of interior edges into 2 disjoint sets, "smooth interior edges" and "other interior edges."

Smooth SubD edges with zero sharpness belong in the "smooth interior edges" set.

Crease SUbD edges belong in the "other interior edges" set.

Sharp SubD edges (which smooth edges with nonzero sharpness) go into "other interior edges" as of Feb 21, 2023. This is done so the ShowEdges command and SubD object display settings can be used to find sharp edges.


Parameters
edge
Returns
True if the display code, ShowEdge command, etc., consider this edge to be a smooth interior edge.

◆ ForceUpdate()

void CRhinoSubDDisplay::ForceUpdate ( )

Description: This function is used when mutable appearance is chaged. There are two current situations. Toggling (flat/smooth a.k.a crunchy/creamy) and changing default texture coordinates.

◆ IsEmpty()

bool CRhinoSubDDisplay::IsEmpty ( ) const

◆ MeshFragmentIterator()

ON_SubDMeshFragmentIterator CRhinoSubDDisplay::MeshFragmentIterator ( bool  bCreateIfEmpty) const

Description: Get an ON_SubDMeshFragmentIterator for displaying the subd object. This fragment iterator is used for both "wireframe" and "shaded" display and selection. It can produce both the smooth surface and control polygon meshes. Parameters: bCreateIfEmpty - [in] If the limit mesh fragments do not exist and bCreateIfEmpty is true, then they will be created. Returns: An ON_SubDMeshFragmentIterator. The fragments are managed by the subd and have information for both surface and control polygon display. Internal shared pointers insure that the subd will stay in scope for the lifetime of the fragment iterator. The value of frit.SubDAppearance() (surface/control polygon) is set from the subd. It can be changed by calling frit.SetSubDAppearanceOveride(). Example: ON_SubDMeshFragmentIterator frit = subddisplay.FragmentIterator() for ( frag = frit.FirstFragment(); nullptr != frag; frag = frit.NextFragment()) ...

◆ operator=() [1/2]

CRhinoSubDDisplay& CRhinoSubDDisplay::operator= ( const CRhinoSubDDisplay )
default

◆ operator=() [2/2]

CRhinoSubDDisplay& CRhinoSubDDisplay::operator= ( CRhinoSubDDisplay &&  )

◆ RhinoDocSerialNumber()

unsigned int CRhinoSubDDisplay::RhinoDocSerialNumber ( ) const

Returns: If this CRhinoSubDDisplay is for a CRhinoSubDObject and that object is part of a CRhinoDoc, then runtime serial number of the CRhinoDoc is returned. Otherwise, 0 is returned.

◆ RhinoSubDObjectId()

ON_UUID CRhinoSubDDisplay::RhinoSubDObjectId ( ) const

Returns: If this CRhinoSubDDisplay is for a CRhinoSubDObject and that object is part of a CRhinoDoc, then id of the CRhinoSubDObject is returned. Otherwise, ON_nil_uuid is returned.

◆ RhinoSubDObjectSerialNumber()

unsigned int CRhinoSubDDisplay::RhinoSubDObjectSerialNumber ( ) const

Returns: If this CRhinoSubDDisplay is for a CRhinoSubDObject, then the runtime serial number of the CRhinoSubDObject is returned. Otherwise, 0 is returned.

◆ SubD()

const ON_SubD& CRhinoSubDDisplay::SubD ( ) const

Returns: If this CRhinoSubDDisplay was created from a CRhinoSubDObject or an ON_SubDRef, then a reference to the ON_SubD is returned. Otherwise ON_SubD::Empty is returned.

◆ SubDObject()

const class CRhinoSubDObject* CRhinoSubDDisplay::SubDObject ( ) const

Returns: CRhinoSubDObject::Cast( CRhinoObject::FromRuntimeSerialNumber( RhinoSubDObjectSerialNumber(), RhinoDocSerialNumber() )); Remarks: The pointer returned by SubDObject() may be nullptr. If not, the pointer can safely be used in the scope of a function that does not allow other Rhino commands to run. For a persistent reference, use RhinoSubDObjectSerialNumber() and RhinoDocSerialNumber().

◆ SubDRef()

ON_SubDRef CRhinoSubDDisplay::SubDRef ( ) const

Returns: If this CRhinoSubDDisplay was created from a CRhinoSubDObject or an ON_SubDRef, then a nonempty ON_SubDRef is returned. Otherwise ON_SubDRef::Empty is returned.

◆ Update()

void CRhinoSubDDisplay::Update ( )

Description: Update the SubD's mesh fragments if the SubD has changed since the last call to Update().

Member Data Documentation

◆ Empty

const CRhinoSubDDisplay CRhinoSubDDisplay::Empty
static