SnapShotsClient

References
public abstract class SnapShotsClient : IDisposable
This is the abstract interface class for all Snapshot clients.

Constructors

SnapShotsClient

#Since v6.0
public SnapShotsClient()
SnapShotsClient constructor

Properties

CppPointer

#Since v6.0
public nint CppPointer { get; }

SerialNumber

#Since v6.0
public int SerialNumber { get; set; }

Methods

AnimateDocument

#Since v6.0
public abstract bool AnimateDocument(RhinoDoc doc, double dPos, BinaryArchiveReader archive_start, BinaryArchiveReader archive_stop)
Called for each frame. Starting at 0.0.
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.
true if successful, otherwise false.

AnimateObject

#Since v6.0
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.
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.

AnimationStart

#Since v6.0
public abstract void AnimationStart(RhinoDoc doc, int iFrames)
Called once at the start of an animation.
doc (RhinoDoc)doc is the current document.
iFrames (int)iFrames is the number of frames to be animated.

AnimationStop

#Since v6.0
public abstract bool AnimationStop(RhinoDoc doc)
Called once at the end of an animation.
doc (RhinoDoc)doc is the current document.

ApplicationCategory

#Since v6.0
public static string ApplicationCategory()
Predefined application category

Category

#Since v6.0
public abstract string Category()
The category of this client. Usually one of the above predefined categories like e.g object, rendering or application category

ClientId

#Since v6.0
public abstract Guid ClientId()
The unique id of this client.
The unique id of this client.

Dispose

#Since v6.0
public void Dispose()
SnapShotsClient Dispose

DocumentCategory

#Since v6.0
public static string DocumentCategory()
Predefined document category

ExtendBoundingBoxForDocumentAnimation

#Since v6.0
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.
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.

ExtendBoundingBoxForObjectAnimation

#Since v6.0
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.
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.

IsCurrentModelStateInAnySnapshot

#Since v6.0
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.
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.
return true if successful, otherwise false.

IsCurrentModelStateInAnySnapshot

#Since v6.0
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.
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.
return true if successful, otherwise false.

LayersCategory

#Since v6.0
public static string LayersCategory()
Predefined layers category

LightsCategory

#Since v6.0
public static string LightsCategory()
Predefined lights category

Name

#Since v6.0
public abstract string Name()
The client's name.
The client's name.

ObjectsCategory

#Since v6.0
public static string ObjectsCategory()
Predefined objects category

ObjectTransformNotification

#Since v6.0
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.
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.
true if successful, otherwise false.

PlugInId

#Since v6.0
public abstract Guid PlugInId()
The plug-in id that registers this client.
The plug-in id that registers this client.

PrepareForDocumentAnimation

#Since v6.0
public abstract bool PrepareForDocumentAnimation(RhinoDoc doc, BinaryArchiveReader archive_start, BinaryArchiveReader archive_stop)
Called once at the start of an animation.
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.
true if successful, otherwise

PrepareForObjectAnimation

#Since v6.0
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.
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.
true if successful, otherwise false.

RegisterSnapShotClient

#Since v6.0
public static bool RegisterSnapShotClient(SnapShotsClient client)
Function used to register snapshots client
client (SnapShotsClient)

RenderingCategory

#Since v6.0
public static string RenderingCategory()
Predefined rendering category

RestoreDocument

#Since v6.0
public abstract bool RestoreDocument(RhinoDoc doc, BinaryArchiveReader archive)
Called when the user restores a snapshot and SupportDocument() returns true.
doc (RhinoDoc)doc is the current document
archive (BinaryArchiveReader)archive is the archive to read the data from
true if successful, otherwise false

RestoreObject

#Since v6.0
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.
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.
true if successful, otherwise false.

SaveDocument

#Since v6.0
public abstract bool SaveDocument(RhinoDoc doc, BinaryArchiveWriter archive)
Called when the user saves a snapshot and SupportDocument() returns true.
doc (RhinoDoc)doc is the current document
archive (BinaryArchiveWriter)archive is the archive to write the data to
true if successful, otherwise false

SaveObject

#Since v6.0
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.
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.
true if successful, otherwise false.

SnapshotRestored

#Since v6.0
public abstract void SnapshotRestored(RhinoDoc doc)
Called after all clients restored their data.
doc (RhinoDoc)

SupportsAnimation

#Since v6.0
public abstract bool SupportsAnimation()
Returns true if the client allows animation.
true if the client allows animation.

SupportsDocument

#Since v6.0
public abstract bool SupportsDocument()
Defines if the client supports document user data or not
true if the client saves/restores document user data.

SupportsObject

#Since v6.0
public abstract bool SupportsObject(RhinoObject doc_object)
Returns true if the client saves/restores object user data for the given object.
doc_object (RhinoObject)doc_object is the given object
true if the client saves/restores object user data for the given object.

SupportsObjects

#Since v6.0
public abstract bool SupportsObjects()
Returns true if the client saves/restores object user data.
true if the client saves/restores object user data.

ViewsCategory

#Since v6.0
public static string ViewsCategory()
Predefined views category