BasePaintTool (object)¶
Members¶
| Boolean | enabled | Handler is enabled. |
| Key | enableKey | Enable key. |
| HandlerExclusivity | handlerExclusivity | Handler exclusivity. |
| Boolean | isIndependent | HandlerExclusivity local override. |
| Boolean | takeAllEvents | It true, the handler takes all the events. |
| Boolean | alwaysEnabled | It true, the handler takes all the events. |
| Boolean | isOwnedByDispatcher | Checks if the handler is owned by a handlerDispatcher. In most of the cases, the dispatcher owns the handlers. However, it’s not true in DFG graphs where the handlers are owns by the nodes. |
| Ref<HandlerDispatcher> | dispatcher | Reference to the dispatcher. |
| ToolTarget | target | Tool target. |
| Boolean | performing | True if the tool is performing an action. |
| ManipulationMode | mode | Paint mode, see ToolConstants.kl. |
| Mat44 | transform | Transform (SRT). |
| Mat44 | currentGeometryTransform | Since we paint in local space, the brush should be drawn in local geometry scaling space. |
| Float32 | radius | Slider radius. |
| String | attributeName | Color blend geometry attributes. |
| PaintToolAttributeStrokeData | attributeStack | Stack attributes, for undo-redo. |
| IndexSet | tempPointSet | Temporary buffer for holding the filtered point set. |
| GeometryAttribute | tempAttribute | Temporary buffer for smoothing. |
| Key | resetKey | Reset the painting, i.e the geometry attributes. |
| Vec3 | initialAxis | Tool initial direction. |
Methods¶
| BasePaintTool ( in BasePaintTool other ) | |
| BasePaintTool () | |
| BasePaintTool | clone ? () |
| Vec3 | computeDisplacementDir ? ( in Ref<PolygonMesh> mesh ) |
| ensureAttributeExists ! ( io Ref<Geometry> geometry, in Boolean resetValues ) | |
| PaintToolAttributeStrokeData | getAttributeStack ? () |
| Boolean | hasKey ? ( in Key key ) |
| init ! ( in BasePaintTarget target, in Key enableKey, in Key resetKey, in String attributeName, in Float32 initialRadius ) | |
| move ! ( io MouseEvent mouseEvent ) | |
| onEvent ! ( io Event event ) | |
| Ref<Geometry> | paint ! ( io MouseEvent mouseEvent ) |
| paintPolygons ! ( io Ref<PolygonMesh> mesh, in GeometryLocation location ) | |
| polygonsToPoints ? ( in Ref<PolygonMesh> mesh, in Index polygonIndex[], io IndexSet points ) | |
| press ! ( io MouseEvent mouseEvent ) | |
| Ref<Geometry> | rayCast ! ( io MouseEvent mouseEvent, io GeometryLocation location, io Mat44 transform, io Vec3 position ) |
| release ! ( io MouseEvent mouseEvent ) | |
| reset ! () | |
| resize ! ( io MouseWheelEvent mouseWheelEvent ) | |
| setPointAttribute ! ( in Index i, in Float32 weight, in Vec3 displacementDir, io Ref<PolygonMesh> mesh ) | |
| smoothPointAttribute ! ( in Index i, in Float32 weight, in Vec3 displacementDir, io Ref<PolygonMesh> mesh ) | |
| toolTransformChanged ! ( in Mat44 transform ) | |
| updateFromTarget ! () |
Methods in detail¶
BasePaintTool ( in BasePaintTool other )
copy constructor
default constructor
BasePaintTool BasePaintTool.clone? ()
clone method
Vec3 BasePaintTool.computeDisplacementDir? ( in Ref<PolygonMesh> mesh )
Implementation of PaintTool.
BasePaintTool.ensureAttributeExists! ( io Ref<Geometry> geometry, in Boolean resetValues )
Implementation of PaintTool. To override.
PaintToolAttributeStrokeData BasePaintTool.getAttributeStack? ()
Gets the attribute-stack, uses for undo-redo.
Boolean BasePaintTool.hasKey? ( in Key key )
Implementation of Tool.
BasePaintTool.init! ( in BasePaintTarget target, in Key enableKey, in Key resetKey, in String attributeName, in Float32 initialRadius )
Initializes a BasePaintTool.
| target | Tool target. |
| enableKey | Key to enable to tool. |
| resetKey | Key to reset the painting. |
| attributeName | The name of the color geometry attribute (color). |
| initialRadius | Initial paint-tool radius. |
BasePaintTool.move! ( io MouseEvent mouseEvent )
Implementation of Tool.
BasePaintTool.onEvent! ( io Event event )
Implementation of EventHandler.
Ref<Geometry> BasePaintTool.paint! ( io MouseEvent mouseEvent )
Paints/deforms the mesh at this mouse-position.
| mouseEvent | The mouse event. |
BasePaintTool.paintPolygons! ( io Ref<PolygonMesh> mesh, in GeometryLocation location )
Implementation of PaintTool.
BasePaintTool.polygonsToPoints? ( in Ref<PolygonMesh> mesh, in Index polygonIndex[], io IndexSet points )
Filters points that are present in many polygons.
| mesh | A reference to the PolygonMesh. |
| polygonIndex | the index of the points to filer. |
| points | The list of non-duplicate points. |
BasePaintTool.press! ( io MouseEvent mouseEvent )
Implementation of Tool.
Ref<Geometry> BasePaintTool.rayCast! ( io MouseEvent mouseEvent, io GeometryLocation location, io Mat44 transform, io Vec3 position )
Implementation of PaintTool. To override.
BasePaintTool.release! ( io MouseEvent mouseEvent )
Implementation of Tool.
BasePaintTool.reset! ()
Implementation of PaintTool. To override.
BasePaintTool.resize! ( io MouseWheelEvent mouseWheelEvent )
Resizes the tool (brush).
| mouseEvent | The mouse event. |
BasePaintTool.setPointAttribute! ( in Index i, in Float32 weight, in Vec3 displacementDir, io Ref<PolygonMesh> mesh )
Implementation of PaintTool. To override.
BasePaintTool.smoothPointAttribute! ( in Index i, in Float32 weight, in Vec3 displacementDir, io Ref<PolygonMesh> mesh )
Implementation of PaintTool. To override.
BasePaintTool.toolTransformChanged! ( in Mat44 transform )
Implementation of PaintTool. To override.
BasePaintTool.updateFromTarget! ()
Implementation of Tool. To override.