Rhino C++ API
8.13
|
#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 |
CRhinoSubDDisplay & | operator= (const CRhinoSubDDisplay &)=default |
CRhinoSubDDisplay & | operator= (CRhinoSubDDisplay &&) |
unsigned int | RhinoDocSerialNumber () const |
ON_UUID | RhinoSubDObjectId () const |
unsigned int | RhinoSubDObjectSerialNumber () const |
const ON_SubD & | SubD () const |
const class CRhinoSubDObject * | SubDObject () 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 |
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.
|
default |
|
default |
|
default |
CRhinoSubDDisplay::CRhinoSubDDisplay | ( | CRhinoSubDDisplay && | ) |
void CRhinoSubDDisplay::Clear | ( | ) |
Description: Removes all contents and references.
unsigned int CRhinoSubDDisplay::ContentSerialNumber | ( | ) | const |
|
static |
Creation
|
static |
|
static |
|
static |
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.
class CRhSubDDisplay* CRhinoSubDDisplay::Display | ( | bool | bCreateIfNeeded | ) |
|
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.
edge |
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.
bool CRhinoSubDDisplay::IsEmpty | ( | ) | const |
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()) ...
|
default |
CRhinoSubDDisplay& CRhinoSubDDisplay::operator= | ( | CRhinoSubDDisplay && | ) |
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.
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.
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.
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.
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().
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.
void CRhinoSubDDisplay::Update | ( | ) |
Description: Update the SubD's mesh fragments if the SubD has changed since the last call to Update().
|
static |