Rhino C++ API  8.4
Public Member Functions | List of all members
CRhinoModelViewIterator Class Reference

#include <rhinoSdkView.h>

Public Member Functions

 CRhinoModelViewIterator (unsigned int rhino_doc_sn)
class CRhinoViewCurrentView () const
unsigned int CurrentViewRuntimeSerialNumber () const
unsigned int DocRuntimeSerialNumber () const
class CRhinoViewFirst ()
class CRhinoViewNext ()

Constructor & Destructor Documentation

◆ CRhinoModelViewIterator()

CRhinoModelViewIterator::CRhinoModelViewIterator ( unsigned int  rhino_doc_sn)

Parameters: rhino_doc_sn - [in] 0: iterate all model views of all documents. >0: iteration all model views of the specified doc.

Member Function Documentation

◆ CurrentView()

class CRhinoView* CRhinoModelViewIterator::CurrentView ( ) const

Returns: The current value of the iterator. Remarks:

◆ CurrentViewRuntimeSerialNumber()

unsigned int CRhinoModelViewIterator::CurrentViewRuntimeSerialNumber ( ) const

◆ DocRuntimeSerialNumber()

unsigned int CRhinoModelViewIterator::DocRuntimeSerialNumber ( ) const

Example: Iteratate all model views: unsigned int rhino_doc_sn = 0 or doc->RuntimeSerialNumber(); CRhinoDocIterator doc_it(rhino_doc_sn); for ( CRhinoView* rhino_model_view = view_it.First(); 0 != rhino_model_view; rhino_model_view = view_it.Next() ) { ... }

◆ First()

class CRhinoView* CRhinoModelViewIterator::First ( )

Returns: The first model view that exists. Remarks: You may call First() multiple times on the same iterator.

◆ Next()

class CRhinoView* CRhinoModelViewIterator::Next ( )

Returns: The next model view that exists. Remarks:

  • Once Next() returns null, it will continue to return null until First() is called.
  • If First() has not be called, the first call to Next() returns the first view in Rhino. This is done so that people can write while loops like CRhinoViewIterator it(rhino_doc_sn); while ( CRhinoView* rhino_view = it.Next() ) { ... }