#include <rhinoSdkViewport.h>
◆ CRhinoViewportIterator()
CRhinoViewportIterator::CRhinoViewportIterator |
( |
unsigned int |
rhino_doc_sn, |
|
|
unsigned int |
rhino_view_sn |
|
) |
| |
Parameters: rhino_doc_sn - [in] 0: iteration ignores the document a viewportport is associated with. >0: iteration is restricted to viewportports associated with a specific document. rhino_view_sn - [in] 0: iteration ignores the viewport a viewportport is associated with. >0: iteration is restricted to viewportports associated with the specified viewport.
◆ CurrentViewport()
class CRhinoViewport* CRhinoViewportIterator::CurrentViewport |
( |
| ) |
const |
Returns: The current value of the iterator. Remarks:
◆ CurrentViewportRuntimeSerialNumber()
unsigned int CRhinoViewportIterator::CurrentViewportRuntimeSerialNumber |
( |
| ) |
const |
◆ DocRuntimeSerialNumber()
unsigned int CRhinoViewportIterator::DocRuntimeSerialNumber |
( |
| ) |
const |
Example: Iteratate all viewports: unsigned int rhino_doc_sn = 0 or CRhinoDoc.RuntimeSerialNumber(); unsigned int rhino_view_sn = 0 or CRhinoView.RuntimeSerialNumber(); CRhinoDocIterator doc_it(rhino_doc_sn,rhino_view_sn); for ( CRhinoViewport* rhino_viewport = viewport_it.First(); 0 != rhino_viewport; rhino_viewport = viewport_it.Next() ) { ... } Returns: 0: iteration ignores the document a viewportport is associated with. >0: iteration is restricted to viewportports associated with a specific document.
◆ First()
Returns: The first viewport that exists. Remarks: You may call First() multiple times on the same iterator.
◆ Next()
Returns: The next viewport 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 viewport in Rhino. This is done so that people can write while loops like CRhinoViewportIterator it(rhino_doc_sn); while ( CRhinoViewport* rhino_viewport = it.Next() ) { ... }
◆ ViewRuntimeSerialNumber()
unsigned int CRhinoViewportIterator::ViewRuntimeSerialNumber |
( |
| ) |
const |
Returns: 0: iteration ignores the viewport a viewportport is associated with. >0: iteration is restricted to viewportports associated with the specified viewport.