SnapShotsClient
ReferencesThis is the abstract interface class for all Snapshot clients.
Constructors
Properties
Methods
public abstract bool AnimateDocument(RhinoDoc doc, double dPos, BinaryArchiveReader archive_start, BinaryArchiveReader archive_stop)
Called for each frame. Starting at 0.0.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
| dPos (double) | dPos is the current frame. Starting at 0.0. |
| archive_start (BinaryArchiveReader) | archive_start is a archive to the data of the starting position. |
| archive_stop (BinaryArchiveReader) | archive_stop is a archive to the data of the ending position. |
Returns: true if successful, otherwise false.
public abstract bool AnimateObject(RhinoDoc doc, RhinoObject doc_object, ref Transform transform, double dPos, BinaryArchiveReader archive_start, BinaryArchiveReader archive_stop)
Called for each frame. Starting at 0.0.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
| doc_object (RhinoObject) | doc_obj is the current object. |
| transform (ref Transform) | transform is 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.). |
| dPos (double) | dPos is the current frame. Starting at 0.0. |
| archive_start (BinaryArchiveReader) | archive_start is a archive to the data of the starting position. |
| archive_stop (BinaryArchiveReader) | archive_stop is a archive to the data of the ending position. |
Called once at the start of an animation.
Called once at the end of an animation.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
Predefined application category
The category of this client. Usually one of the above predefined categories like e.g object, rendering or application category
The unique id of this client.
Returns: The unique id of this client.
public abstract void ExtendBoundingBoxForDocumentAnimation(RhinoDoc doc, BinaryArchiveReader archive_start, BinaryArchiveReader archive_stop, ref BoundingBox bbox)
Called once at the start of an animation. This can be used to extend the scene bounding box to avoid clipping.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
| archive_start (BinaryArchiveReader) | archive_start is a archive to the data of the starting position. |
| archive_stop (BinaryArchiveReader) | archive_stop is a archive to the data of the ending position. |
| bbox (ref BoundingBox) | bbox is the current scene bounding box. |
public abstract void ExtendBoundingBoxForObjectAnimation(RhinoDoc doc, RhinoObject doc_object, ref Transform transform, BinaryArchiveReader archive_start, BinaryArchiveReader archive_stop, ref BoundingBox bbox)
Called once at the start of an animation. This can be used to extend the scene bounding box to avoid clipping.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
| doc_object (RhinoObject) | doc_obj is the current object. |
| transform (ref Transform) | transform is 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.). |
| archive_start (BinaryArchiveReader) | archive_start is a archive to the data of the starting position. |
| archive_stop (BinaryArchiveReader) | archive_stop is a archive to the data of the ending position. |
| bbox (ref BoundingBox) | bbox is the current scene bounding box. |
public abstract bool IsCurrentModelStateInAnySnapshot(RhinoDoc doc, BinaryArchiveReader archive, SimpleArrayBinaryArchiveReader archive_array, TextLog text_log = null)
Called before restoring a snapshot. Warns the user if the current model state is not already saved.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
| archive (BinaryArchiveReader) | archive is the current state of the model. |
| archive_array (SimpleArrayBinaryArchiveReader) | archive_array is a list of client data. |
| text_log (TextLog = null) | text_log is used to list the missing items that cannot be found in the current model. |
Returns: return true if successful, otherwise false.
public abstract bool IsCurrentModelStateInAnySnapshot(RhinoDoc doc, RhinoObject doc_object, BinaryArchiveReader archive, SimpleArrayBinaryArchiveReader archive_array, TextLog text_log = null)
Called before restoring a snapshot. Warns the user if the current model state is not already saved.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
| doc_object (RhinoObject) | doc_object is the current object. |
| archive (BinaryArchiveReader) | archive is the current state of the model. |
| archive_array (SimpleArrayBinaryArchiveReader) | archive_array is a list of client data. |
| text_log (TextLog = null) | text_log is used to list the missing items that cannot be found in the current model. |
Returns: return true if successful, otherwise false.
public abstract bool ObjectTransformNotification(RhinoDoc doc, RhinoObject doc_object, ref Transform transform, BinaryArchiveReader archive)
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:
| doc (RhinoDoc) | doc is the current document. |
| doc_object (RhinoObject) | doc_obj is the current object. |
| transform (ref Transform) | transform is 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.). |
| archive (BinaryArchiveReader) | archive is a archive which can be used to update the stored data. |
Returns: true if successful, otherwise false.
The plug-in id that registers this client.
Returns: The plug-in id that registers this client.
public abstract bool PrepareForDocumentAnimation(RhinoDoc doc, BinaryArchiveReader archive_start, BinaryArchiveReader archive_stop)
Called once at the start of an animation.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
| archive_start (BinaryArchiveReader) | archive_start is a archive to the data of the starting position. |
| archive_stop (BinaryArchiveReader) | archive_stop is a archive to the data of the ending position. |
Returns: true if successful, otherwise
public abstract bool PrepareForObjectAnimation(RhinoDoc doc, RhinoObject doc_object, ref Transform transform, BinaryArchiveReader archive_start, BinaryArchiveReader archive_stop)
Called once at the start of an animation.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
| doc_object (RhinoObject) | doc_obj is the current object. |
| transform (ref Transform) | transform is 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.). |
| archive_start (BinaryArchiveReader) | archive_start is a archive to the data of the starting position. |
| archive_stop (BinaryArchiveReader) | archive_stop is a archive to the data of the ending position. |
Returns: true if successful, otherwise false.
Function used to register snapshots client
Parameters:
| client (SnapShotsClient) |
Called when the user restores a snapshot and SupportDocument() returns true.
Parameters:
| doc (RhinoDoc) | doc is the current document |
| archive (BinaryArchiveReader) | archive is the archive to read the data from |
Returns: true if successful, otherwise false
public abstract bool RestoreObject(RhinoDoc doc, RhinoObject doc_object, ref Transform transform, BinaryArchiveReader archive)
Called when the user restores a snapshot and SupportsObjects() and SupportsObject(Rhino.DocObjects.RhinoObject doc_object) returns true.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
| doc_object (RhinoObject) | doc_obj is the current object. |
| transform (ref Transform) | transform is 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.). |
| archive (BinaryArchiveReader) | archive is the archive to read the data from. |
Returns: true if successful, otherwise false.
Called when the user saves a snapshot and SupportDocument() returns true.
Parameters:
| doc (RhinoDoc) | doc is the current document |
| archive (BinaryArchiveWriter) | archive is the archive to write the data to |
Returns: true if successful, otherwise false
public abstract bool SaveObject(RhinoDoc doc, RhinoObject doc_object, ref Transform transform, BinaryArchiveWriter archive)
Called when the user saves a snapshot and SupportsObjects() and SupportsObject(Rhino.DocObjects.RhinoObject doc_object) returns true.
Parameters:
| doc (RhinoDoc) | doc is the current document. |
| doc_object (RhinoObject) | doc_obj is the current object. |
| transform (ref Transform) | transform is 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.). |
| archive (BinaryArchiveWriter) | archive is the archive to write the data to. |
Returns: true if successful, otherwise false.
Called after all clients restored their data.
Parameters:
| doc (RhinoDoc) |
Returns true if the client allows animation.
Returns: true if the client allows animation.
Defines if the client supports document user data or not
Returns: true if the client saves/restores document user data.
Returns true if the client saves/restores object user data for the given object.
Parameters:
| doc_object (RhinoObject) | doc_object is the given object |
Returns: true if the client saves/restores object user data for the given object.
Returns true if the client saves/restores object user data.
Returns: true if the client saves/restores object user data.