CustomObjectGrips
ReferencesConstructors
CustomObjectGrips
#protected CustomObjectGrips()
CustomObjectGrips
#Creates grips that present themselves to Rhino as
gripsType.Parameters:
| gripsType (ObjectGripsType) | What the grips control. Fixed for the life of the object. |
Finalizer
~CustomObjectGrips
#~CustomObjectGrips()
Properties
If GripsMoved is true if some of the grips have ever been moved GripObject.NewLocation() sets GripsMoved=true.
What these grips control. Set at construction.
true if some of the grips have been moved. GripObject.NewLocation() sets NewLocation=true. Derived classes can set NewLocation to false after updating temporary display information.
Methods
public void Dispose()
Determines if grips are currently being dragged.
Returns: true if grips are dragged.
NeighborGrip
#Get neighbors.
Parameters:
| gripIndex (int) | index of grip where the search begins. |
| dr (int) | 1 = next grip in the first parameter direction. -1 = previous grip in the first parameter direction. |
| ds (int) | 1 = next grip in the second parameter direction. -1 = previous grip in the second parameter direction. |
| dt (int) | 1 = next grip in the third parameter direction. -1 = rev grip in the third parameter direction. |
| wrap (bool) | If true and object is "closed", the search will wrap. |
Returns: Pointer to the desired neighbor or NULL if there is no neighbor.
NewGeometry
#If the grips control just one object, then override NewGeometry(). When NewGeometry() is called, return new geometry calculated from the current grip locations. This happens once at the end of a grip drag.
Returns: The new geometry. The default implementation returns null.
NurbsCurve
#If the grips control a NURBS curve, this returns a pointer to that curve. You can look at but you must NEVER change this curve. Return a curve held in a field, never a temporary: Rhino keeps the underlying pointer after this call returns.
Returns: A pointer to a NURBS curve or null.
NurbsCurveGrip
#If the grips are control points of a NURBS curve, then this gets the grip that controls the i-th CV.
Parameters:
| i (int) | The control point index. |
Returns: A grip controlling a NURBS curve CV or null.
NurbsSurface
#If the grips control a NURBS surface, this returns a pointer to that surface. You can look at but you must NEVER change this surface. Return a surface held in a field, never a temporary: Rhino keeps the underlying pointer after this call returns.
Returns: A pointer to a NURBS surface or null.
NurbsSurfaceGrip
#If the grips are control points of a NURBS surface, then this gets the index of the grip that controls the (i,j)-th CV.
OnDraw
#Draws the grips. In your implementation, override this if you need to draw dynamic elements and then call this base implementation to draw the grips themselves.
Parameters:
| args (GripsDrawEventArgs) | The grips draw event arguments. |
OnReset
#protected virtual void OnReset()
Resets location of all grips to original spots and cleans up stuff that was created by dynamic dragging. This is required when dragging is canceled or in the Copy command when grips are "copied". The override should clean up dynamic workspace stuff.
OnResetMeshes
#protected virtual void OnResetMeshes()
Just before Rhino turns off object grips, it calls this function. If grips have modified any display meshes, they must override this function and restore the meshes to their original states.
OnUpdateMesh
#Just before Rhino shades an object with grips on, it calls this method to update the display meshes. Grips that modify surface or mesh objects must override this function and modify the display meshes here.
Parameters:
| meshType (MeshType) | The mesh type being updated. |
Parameters:
| enabler (TurnOnGripsEventHandler) | |
| customGripsType (Type) |