Rhino C++ API  8.13
Public Member Functions | Static Public Member Functions | List of all members
IRhinoSnapshotsClient Class Referenceabstract

#include <rhinoSdkSnapshots.h>

Inheritance diagram for IRhinoSnapshotsClient:
IRhinoSnapshotsClientEx

Public Member Functions

virtual ~IRhinoSnapshotsClient (void)
 
virtual bool AnimateDocument (CRhinoDoc &doc, double dPos, const ON_Buffer &start, const ON_Buffer &stop)=0
 
virtual bool AnimateObject (CRhinoDoc &doc, const CRhinoObject &obj, const ON_Xform &xformObject, double dPos, const ON_Buffer &start, const ON_Buffer &stop)=0
 
virtual void AnimationStart (CRhinoDoc &doc, int iFrames)=0
 
virtual void AnimationStop (CRhinoDoc &doc)=0
 
virtual ON_wString Category (void) const =0
 
virtual UUID ClientId (void) const =0
 
virtual void * EVF (const wchar_t *, void *)
 
virtual void ExtendBoundingBoxForDocumentAnimation (CRhinoDoc &doc, const ON_Buffer &start, const ON_Buffer &stop, ON_BoundingBox &bb)=0
 
virtual void ExtendBoundingBoxForObjectAnimation (CRhinoDoc &doc, const CRhinoObject &obj, const ON_Xform &xformObject, const ON_Buffer &start, const ON_Buffer &stop, ON_BoundingBox &bb)=0
 
virtual bool IsCurrentModelStateInAnySnapshot (CRhinoDoc &doc, const CRhinoObject &obj, const ON_Buffer &bufferModel, const ON_SimpleArray< const ON_Buffer * > &aSnapShots, ON_TextLog *pReportMissing=nullptr) const =0
 
virtual bool IsCurrentModelStateInAnySnapshot (CRhinoDoc &doc, const ON_Buffer &bufferModel, const ON_SimpleArray< const ON_Buffer * > &aSnapShots, ON_TextLog *pReportMissing=nullptr) const =0
 
virtual ON_wString Name (void) const =0
 
virtual bool ObjectTransformNotification (CRhinoDoc &doc, const CRhinoObject &obj, const ON_Xform &xformObject, ON_Buffer &buffer)=0
 
virtual UUID PlugInId (void) const =0
 
virtual bool PrepareForDocumentAnimation (CRhinoDoc &doc, const ON_Buffer &start, const ON_Buffer &stop)=0
 
virtual bool PrepareForObjectAnimation (CRhinoDoc &doc, const CRhinoObject &obj, const ON_Xform &xformObject, const ON_Buffer &start, const ON_Buffer &stop)=0
 
virtual bool RestoreDocument (CRhinoDoc &doc, const ON_Buffer &buffer)=0
 
virtual bool RestoreObject (CRhinoDoc &doc, const CRhinoObject &obj, const ON_Xform &xformObject, const ON_Buffer &buffer)=0
 
virtual bool SaveDocument (CRhinoDoc &doc, ON_Buffer &buffer)=0
 
virtual bool SaveObject (CRhinoDoc &doc, const CRhinoObject &obj, const ON_Xform &xformObject, ON_Buffer &buffer)=0
 
virtual void SnapshotRestored (CRhinoDoc &doc)=0
 
virtual bool SupportsAnimation (void) const =0
 
virtual bool SupportsDocument (void) const =0
 
virtual bool SupportsObject (const CRhinoObject &obj) const =0
 
virtual bool SupportsObjects (void) const =0
 

Static Public Member Functions

static ON_wString ApplicationCategory (void)
 
static ON_wString DocumentCategory (void)
 
static ON_wString LayersCategory (void)
 
static ON_wString LightsCategory (void)
 
static ON_wString MeshModifiersCategory (void)
 
static ON_wString ObjectsCategory (void)
 
static bool Register (IRhinoSnapshotsClient &client)
 
static ON_wString RenderingCategory (void)
 
static bool Unregister (IRhinoSnapshotsClient &client)
 
static UUID ViewClientId (void)
 
static ON_wString ViewsCategory (void)
 

Detailed Description

Copyright (c) 1993-2017 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. This is the abstract interface class for all Snapshot clients.

Constructor & Destructor Documentation

◆ ~IRhinoSnapshotsClient()

virtual IRhinoSnapshotsClient::~IRhinoSnapshotsClient ( void  )
inlinevirtual

Member Function Documentation

◆ AnimateDocument()

virtual bool IRhinoSnapshotsClient::AnimateDocument ( CRhinoDoc doc,
double  dPos,
const ON_Buffer start,
const ON_Buffer stop 
)
pure virtual

Called for each frame. Starting at 0.0.

Parameters
docis the current document.
dPosis is the current frame. Starting at 0.0.
startis a buffer to the data of the starting position.
stopis a buffer to the data of the ending position.
Returns
true if successful, otherwise false.

◆ AnimateObject()

virtual bool IRhinoSnapshotsClient::AnimateObject ( CRhinoDoc doc,
const CRhinoObject obj,
const ON_Xform xformObject,
double  dPos,
const ON_Buffer start,
const ON_Buffer stop 
)
pure virtual

Called for each frame. Starting at 0.0.

Parameters
docis the current document.
objis the current object.
xformObjectis a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed (scale, rotate etc.).
dPosis is the current frame. Starting at 0.0.
startis a buffer to the data of the starting position.
stopis a buffer to the data of the ending position.
Returns
true if successful, otherwise false.

◆ AnimationStart()

virtual void IRhinoSnapshotsClient::AnimationStart ( CRhinoDoc doc,
int  iFrames 
)
pure virtual

Called once at the start of an animation.

Parameters
docis the current document.
iFramesis the number of frames to be animated.

◆ AnimationStop()

virtual void IRhinoSnapshotsClient::AnimationStop ( CRhinoDoc doc)
pure virtual

Called once at the end of an animation.

◆ ApplicationCategory()

static ON_wString IRhinoSnapshotsClient::ApplicationCategory ( void  )
static
Returns
Predefined categories.

◆ Category()

virtual ON_wString IRhinoSnapshotsClient::Category ( void  ) const
pure virtual
Returns
The category of this client. Usually one of the above.

◆ ClientId()

virtual UUID IRhinoSnapshotsClient::ClientId ( void  ) const
pure virtual
Returns
The unique id of this client.

◆ DocumentCategory()

static ON_wString IRhinoSnapshotsClient::DocumentCategory ( void  )
static

◆ EVF()

virtual void* IRhinoSnapshotsClient::EVF ( const wchar_t *  ,
void *   
)
inlinevirtual

Emergency virtual function for future expansion.

◆ ExtendBoundingBoxForDocumentAnimation()

virtual void IRhinoSnapshotsClient::ExtendBoundingBoxForDocumentAnimation ( CRhinoDoc doc,
const ON_Buffer start,
const ON_Buffer stop,
ON_BoundingBox bb 
)
pure virtual

Called once at the start of an animation. This can be used to extend the scene bounding box to avoid clipping.

Parameters
docis the current document.
startis a buffer to the data of the starting position.
stopis a buffer to the data of the ending position.
bbis the current scene bounding box.

◆ ExtendBoundingBoxForObjectAnimation()

virtual void IRhinoSnapshotsClient::ExtendBoundingBoxForObjectAnimation ( CRhinoDoc doc,
const CRhinoObject obj,
const ON_Xform xformObject,
const ON_Buffer start,
const ON_Buffer stop,
ON_BoundingBox bb 
)
pure virtual

Called once at the start of an animation. This can be used to extend the scene bounding box to avoid clipping.

Parameters
docis the current document.
objis the current object.
xformObjectis a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed (scale, rotate etc.).
startis a buffer to the data of the starting position.
stopis a buffer to the data of the ending position.
bbis the current scene bounding box.

◆ IsCurrentModelStateInAnySnapshot() [1/2]

virtual bool IRhinoSnapshotsClient::IsCurrentModelStateInAnySnapshot ( CRhinoDoc doc,
const CRhinoObject obj,
const ON_Buffer bufferModel,
const ON_SimpleArray< const ON_Buffer * > &  aSnapShots,
ON_TextLog pReportMissing = nullptr 
) const
pure virtual

Called before restoring a snapshot. Warns the user if the current model state is not already saved.

Parameters
docis the current document.
objis the current object.
bufferModelis the current state of the model.
aSnapShotsa list of client data.
pReportMissingis used to list the missing items that cannot be found in the current model.
Returns
true if successful, otherwise false.

◆ IsCurrentModelStateInAnySnapshot() [2/2]

virtual bool IRhinoSnapshotsClient::IsCurrentModelStateInAnySnapshot ( CRhinoDoc doc,
const ON_Buffer bufferModel,
const ON_SimpleArray< const ON_Buffer * > &  aSnapShots,
ON_TextLog pReportMissing = nullptr 
) const
pure virtual

Called before restoring a snapshot. Warns the user if the current model state is not already saved.

Parameters
docis the current document.
bufferModelis the current state of the model.
aSnapShotsa list of client data.
pReportMissingis used to list the missing items that cannot be found in the current model.
Returns
true if successful, otherwise false.

◆ LayersCategory()

static ON_wString IRhinoSnapshotsClient::LayersCategory ( void  )
static

◆ LightsCategory()

static ON_wString IRhinoSnapshotsClient::LightsCategory ( void  )
static

◆ MeshModifiersCategory()

static ON_wString IRhinoSnapshotsClient::MeshModifiersCategory ( void  )
static

◆ Name()

virtual ON_wString IRhinoSnapshotsClient::Name ( void  ) const
pure virtual
Returns
The client's name.

◆ ObjectsCategory()

static ON_wString IRhinoSnapshotsClient::ObjectsCategory ( void  )
static

◆ ObjectTransformNotification()

virtual bool IRhinoSnapshotsClient::ObjectTransformNotification ( CRhinoDoc doc,
const CRhinoObject obj,
const ON_Xform xformObject,
ON_Buffer buffer 
)
pure virtual

Called for every object that is associated with a snapshot and gets transformed in Rhino. This is getting called for each stored snapshot and gives the client the possibility to update the stored data.

Parameters
docis the current document.
objis the current object.
xformObjectis a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed (scale, rotate etc.).
bufferis a buffer which can be used to update the stored data.
Returns
true if successful, otherwise false.

◆ PlugInId()

virtual UUID IRhinoSnapshotsClient::PlugInId ( void  ) const
pure virtual
Returns
The plug-in id that registers this client.

◆ PrepareForDocumentAnimation()

virtual bool IRhinoSnapshotsClient::PrepareForDocumentAnimation ( CRhinoDoc doc,
const ON_Buffer start,
const ON_Buffer stop 
)
pure virtual

Called once at the start of an animation.

Parameters
docis the current document.
startis a buffer to the data of the starting position.
stopis a buffer to the data of the ending position.
Returns
true if successful, otherwise false.

◆ PrepareForObjectAnimation()

virtual bool IRhinoSnapshotsClient::PrepareForObjectAnimation ( CRhinoDoc doc,
const CRhinoObject obj,
const ON_Xform xformObject,
const ON_Buffer start,
const ON_Buffer stop 
)
pure virtual

Called once at the start of an animation.

Parameters
docis the current document.
objis the current object.
xformObjectis a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed (scale, rotate etc.).
startis a buffer to the data of the starting position.
stopis a buffer to the data of the ending position.
Returns
true if successful, otherwise false.

◆ Register()

static bool IRhinoSnapshotsClient::Register ( IRhinoSnapshotsClient client)
static

Call to register your client.

Parameters
clientclient to register.
Returns
true if successful, otherwise false.

◆ RenderingCategory()

static ON_wString IRhinoSnapshotsClient::RenderingCategory ( void  )
static

◆ RestoreDocument()

virtual bool IRhinoSnapshotsClient::RestoreDocument ( CRhinoDoc doc,
const ON_Buffer buffer 
)
pure virtual

Called when the user restores a snapshot and SupportDocument() returns true.

Parameters
docis the current document.
bufferis the buffer to read the data from.
Returns
true if successful, otherwise false.

◆ RestoreObject()

virtual bool IRhinoSnapshotsClient::RestoreObject ( CRhinoDoc doc,
const CRhinoObject obj,
const ON_Xform xformObject,
const ON_Buffer buffer 
)
pure virtual

Called when the user restores a snapshot and SupportsObjects() and SupportsObject(const CRhinoObject& obj) returns true.

Parameters
docis the current document.
objis the current object.
xformObjectis a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed (scale, rotate etc.).
bufferis the buffer to read the data from.
Returns
true if successful, otherwise false.

◆ SaveDocument()

virtual bool IRhinoSnapshotsClient::SaveDocument ( CRhinoDoc doc,
ON_Buffer buffer 
)
pure virtual

Called when the user saves a snapshot and SupportDocument() returns true.

Parameters
docis the current document.
bufferis the buffer to write the data to.
Returns
true if successful, otherwise false.

◆ SaveObject()

virtual bool IRhinoSnapshotsClient::SaveObject ( CRhinoDoc doc,
const CRhinoObject obj,
const ON_Xform xformObject,
ON_Buffer buffer 
)
pure virtual

Called when the user saves a snapshot and SupportsObjects() and SupportsObject(const CRhinoObject& obj) returns true.

Parameters
docis the current document.
objis the current object.
xformObjectis a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed (scale, rotate etc.).
bufferis the buffer to write the data to.
Returns
true if successful, otherwise false.

◆ SnapshotRestored()

virtual void IRhinoSnapshotsClient::SnapshotRestored ( CRhinoDoc doc)
pure virtual

Called after all clients restored their data.

◆ SupportsAnimation()

virtual bool IRhinoSnapshotsClient::SupportsAnimation ( void  ) const
pure virtual
Returns
true if the client allows animation.

◆ SupportsDocument()

virtual bool IRhinoSnapshotsClient::SupportsDocument ( void  ) const
pure virtual
Returns
true if the client saves/restores document user data.

◆ SupportsObject()

virtual bool IRhinoSnapshotsClient::SupportsObject ( const CRhinoObject obj) const
pure virtual
Returns
true if the client saves/restores object user data for the given object.

◆ SupportsObjects()

virtual bool IRhinoSnapshotsClient::SupportsObjects ( void  ) const
pure virtual
Returns
true if the client saves/restores object user data.

◆ Unregister()

static bool IRhinoSnapshotsClient::Unregister ( IRhinoSnapshotsClient client)
static

Call to unregister your client.

Parameters
clientclient to unregister.
Returns
true if successful, otherwise false.

◆ ViewClientId()

static UUID IRhinoSnapshotsClient::ViewClientId ( void  )
static
Returns
The view client ID.

◆ ViewsCategory()

static ON_wString IRhinoSnapshotsClient::ViewsCategory ( void  )
static