42 void activate()
override;
43 void deactivate()
override;
47 bool override_selection()
override;
48 bool track_mouse()
override;
49 bool manipulates()
override;
54 virtual void stroke_begin(
int modifiers);
61 virtual void stroke_update(
71 virtual void update_weights(
92 virtual float weight(
float ) {
return 1.f; }
112 virtual float radius();
115 void set_radius(
float radius);
128 virtual float flow();
137 virtual bool multi_objects();
146 virtual bool fast_geodesic();
164 virtual BrushType brush_type();
210 gsl::span<GeometryData> geometry_data();
222 const Imath::V3f& hit_normal_world_orig()
const;
231 bool is_brush_visible()
const;
234 bool is_pressed()
const;
237 std::vector<GeometryData> _geometry_data;
242 void _update_displayed_geometry(
const CameraContext& camera);
252 bool _first_geometry_front_face =
false;
257 return _geometry_data;
277 return _hit_normal_orig;
282 return _brush_matrix;
287 return _brush_matrix_orig;
292 return _brush_visible;
const Imath::M44f & brush_matrix() const
Return the brush matrix which transforms from the brush local space to the world space.
Definition: BrushPlugin.h:280
const Mesh input_mesh
The input mesh of the deformer node.
Definition: BrushPlugin.h:192
const Vec3< T > translation() const
Definition: ImathMatrix.h:2996
Definition: ImathFrame.h:42
Imath::V3f hit_pos_world() const
Return the brush position in world space.
Definition: BrushPlugin.h:260
Definition: ImathFrame.h:43
A mesh value.
Definition: Mesh.h:33
std::vector< Vertex > weights
The vertex weights computed since the last stroke update.
Definition: BrushPlugin.h:199
This class provides viewport space conversion services.
Definition: CameraContext.h:23
std::pair< int, float > Vertex
Definition: BrushPlugin.h:194
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
const Imath::M44f displayed_inversed_transposed_matrix
The mesh matrix to transform the normals from local to world.
Definition: BrushPlugin.h:186
virtual float weight(float)
Convert a distance in weight.
Definition: BrushPlugin.h:92
Definition: BrushPlugin.h:26
std::shared_ptr< UserData > user_data
Optional user provided data. The data set in that field will be passed at the next stroke_update call...
Definition: BrushPlugin.h:205
BufferV3f displayed_normals
The displayed mesh normals.
Definition: BrushPlugin.h:189
bool dirty
Set this flag to update its geometry.
Definition: BrushPlugin.h:175
const Imath::M44f displayed_inversed_matrix
The world to local mesh matrix.
Definition: BrushPlugin.h:185
#define MAQUINA_EXPORT
Definition: Export.h:31
An immutable scene node value.
Definition: Scene.h:35
Mesh displayed_mesh
The displayed mesh in the viewport, may not be the same than the output mesh of the deformer node if ...
Definition: BrushPlugin.h:181
BrushType
The different brush types.
Definition: BrushPlugin.h:31
const Imath::V3f & hit_normal_world_orig() const
Return the brush normal in world space at the beginning of the stroke.
Definition: BrushPlugin.h:275
std::vector< float > accum_weights
The accumulated weights since the beginning of the stroke.
Definition: BrushPlugin.h:202
This interface is passed to the events and is implemented by the application. */. ...
Definition: InteractionContext.h:22
bool is_brush_visible() const
Returns true is the brush is visible.
Definition: BrushPlugin.h:290
const Imath::M44f & brush_matrix_orig() const
Return the brush matrix which transforms from the brush local space to the world space at the beginni...
Definition: BrushPlugin.h:285
bool is_pressed() const
Returns true is the brush is pressed by the user.
Definition: BrushPlugin.h:295
Imath::V3f hit_pos_world_orig() const
Returns the world space brush position at the beginning of the stroke.
Definition: BrushPlugin.h:270
const Imath::M44f displayed_matrix
The displayed mesh precomputed matrices.
Definition: BrushPlugin.h:184
const std::string path
The mesh's path in the edited scene.
Definition: BrushPlugin.h:178
virtual bool do_update_weights()
Does the weights have to be updated at every stroke_update() ?
Definition: BrushPlugin.h:83
Definition: BrushPlugin.h:169
const Imath::V3f & hit_normal_world() const
Return the brush normal in world space.
Definition: BrushPlugin.h:265
Base class of all Rumba nodes.
Definition: Node.h:36
gsl::span< GeometryData > geometry_data()
Return the brush's geometry data.
Definition: BrushPlugin.h:255