SurfacePaintManipulator (object)

バージョン 1.12.0 で追加.

The SurfacePaintManipulator provides base services for a wide range of paint based manipulators. You can use the SurfacePaintManipulator as the basis for your own custom paint manipulators.

The SurfacePaintManipulator provides the following services.

  • It manages an array of target geometries.
  • It manages the processing of events to generate a paint stroke.
  • It raycasts the target geometries and collects the points within the brush volume into a data structure called SurfacePaintManipulator_PointCollection
  • It invokes the virtual methods defined in ISurfacePaintManipulator to enable derived manipulators to apply the paint data to the scene.

The SurfacePaintManipulator supports painting tools that can paint multiple geometries in a single point stroke.

Derived paint manipulators overide the ‘onStrokeBegin’, ‘onPaint’ and ‘onStrokeEnd’ methods to compute a change in the scene.

Usage

  • A Click and drag with a mouse button generates a paint stroke
  • At the start of the paint stroke the ‘onStrokeBegin’ function to be invoked
  • Each update of the paint stroke causes ‘onPaint’ function to be invoked
  • At the end of the paint stroke the ‘onStrokeEnd’ function to be invoked
  • The mouse wheel can be used to resize the paint brush, except on platforms that do not support the mouse wheel.
  • The ‘Ctrl’ modifier key can be held during a mouse drag to resize the brush on these platforms.

SurfacePaintManipulator SurfacePaintManipulator SurfacePaintManipulator ISurfacePaintManipulator ISurfacePaintManipulator SurfacePaintManipulator->ISurfacePaintManipulator Manipulator Manipulator SurfacePaintManipulator->Manipulator SurfaceAttributePaintManipulator SurfaceAttributePaintManipulator SurfaceAttributePaintManipulator->SurfacePaintManipulator SurfaceSculptManipulator SurfaceSculptManipulator SurfaceSculptManipulator->SurfacePaintManipulator

Members

InlineInstance[] targetGeometries  
SurfacePaintManipulator_StrokePoint[] strokePath The stroke points making up the current paint stroke.
SurfacePaintManipulator_State state  
Scalar brushSize  
Scalar brushStrength  
Scalar brushScaleSpeed  
Scalar mouseDownBrushSize  
Vec2 mouseDownScreenPos  
InlineMaterial paintBrushMaterial  
InlineInstance paintBrush  
String portToDrive  
String hostName  
String graphName  
UInt32 evalID  

Methods

  SurfacePaintManipulator ( in SurfacePaintManipulator other )
  SurfacePaintManipulator ()
  addTargetGeometry ! ( in InlineInstance instance )
SurfacePaintManipulator clone ? ()
Boolean hasTargetGeometry ! ( in InlineInstance instance )
  init ! ()
  onDisable ! ()
  onEnable ! ()
  onEvent ! ( io Event event )
  onPaint ! ( io MouseEvent mouseEvent, in SurfacePaintManipulator_PointCollection collectedPoints )
  onStrokeBegin ! ( io MouseEvent mouseEvent )
  onStrokeEnd ! ( io MouseEvent mouseEvent )
  setGraph ! ( in String graphName )
  setPortToDrive ! ( in String portName )
  updateBrush ! ( io Event event, in Vec2 mousePos )

Methods in detail

SurfacePaintManipulator ( in SurfacePaintManipulator other )

copy constructor


SurfacePaintManipulator ()

default constructor


SurfacePaintManipulator.addTargetGeometry! ( in InlineInstance instance )

Add a new target geometry to the paint manipulator.


SurfacePaintManipulator SurfacePaintManipulator.clone? ()

clone method


Boolean SurfacePaintManipulator.hasTargetGeometry! ( in InlineInstance instance )

Returns true if the target geometry has already been added to the paint manipulator.


SurfacePaintManipulator.init! ()

Initialize the default values of the SurfacePaintManipulator SurfacePaintManipulator within thier constructors.

注釈

Should be called by any manipulators inheriting from


SurfacePaintManipulator.onDisable! ()

When the manipulator is disabled, this callback function is invoked.


SurfacePaintManipulator.onEnable! ()

When the manipulator is enabled, this callback function is invoked.


SurfacePaintManipulator.onEvent! ( io Event event )

The event handler function for the SurfacePaintManipulator

event The event propagated from the host DCC application


SurfacePaintManipulator.onPaint! ( io MouseEvent mouseEvent, in SurfacePaintManipulator_PointCollection collectedPoints )

Virtual function overridden in manipulators inheriting from SurfacePaintManipulator


SurfacePaintManipulator.onStrokeBegin! ( io MouseEvent mouseEvent )

Virtual function overridden in manipulators inheriting from SurfacePaintManipulator


SurfacePaintManipulator.onStrokeEnd! ( io MouseEvent mouseEvent )

Virtual function overridden in manipulators inheriting from SurfacePaintManipulator


SurfacePaintManipulator.setGraph! ( in String graphName )

Sets the graph name within the DCC


SurfacePaintManipulator.setPortToDrive! ( in String portName )

Sets the port to drive. This by default is set to the evalID, which forces a refresh of the execution of the DCC node, so for example a deformer will be reexecuted.


SurfacePaintManipulator.updateBrush! ( io Event event, in Vec2 mousePos )

Updates the brush sceenspace transform based on the given mouse event.