#include <lib_ca.h>
Helper class for the BrushToolData hook.
|
Bool | InitTool (BaseDocument *doc, BaseContainer &data, BaseThread *bt, BrushToolData *tool) |
|
void | FreeTool (BaseDocument *doc, BaseContainer &data) |
|
void | InitDefaultSettings (BaseDocument *doc, BaseContainer &data) |
|
Bool | GetDEnabling (BaseDocument *doc, BaseContainer &data, const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc) |
|
Bool | SetDParameter (BaseDocument *doc, BaseContainer &data, const DescID &id, const GeData &t_data, DESCFLAGS_SET &flags) |
|
Bool | GetDDescription (BaseDocument *doc, BaseContainer &data, Description *description, DESCFLAGS_DESC &flags) |
|
Bool | Message (BaseDocument *doc, BaseContainer &data, Int32 type, void *t_data) |
|
Bool | GetCursorInfo (BaseDocument *doc, BaseContainer &data, BaseDraw *bd, Float x, Float y, BaseContainer &bc) |
|
Bool | MouseInput (BaseDocument *doc, BaseContainer &data, BaseDraw *bd, EditorWindow *win, const BaseContainer &msg) |
|
|
BrushVertexData * | GetSelected (BaseDocument *doc, BaseContainer &data, BaseDraw *bd, Int32 &vcnt, Int32 x, Int32 y, Float rad, BaseObject *op) |
|
Float | GetCursor (Int32 &x, Int32 &y) |
|
void | GetObjectInfo (BrushObjectData *data, BrushObjectInfo &info) |
|
Bool | GetObjectInfo (BaseObject *op, BrushObjectInfo &info) |
|
Bool | ValidateObjects (BaseDocument *doc, BaseContainer &data) |
|
BrushPixelData * | GetObjectAt (Int32 x, Int32 y) |
|
Float | GetFalloff (Float dst, Int32 flags) const |
|
Float | GetStrength () const |
|
Float | GetStrengthMultiplier () const |
|
Bool | GetObjects (BaseDocument *doc, AtomArray *objects) |
|
Bool | UpdateCache (BaseDocument *doc, BaseContainer &data, BaseDraw *bd, Bool force) |
|
Float * | CalcSurfaceDistances (PolygonObject *pObject, BaseSelect *selected, Neighbor *pNeighbor=nullptr, Vector *pNormals=nullptr, Vector *pGlobalPoints=nullptr, Float *pDistance=nullptr) |
|
Float * | CalcSurfaceDistancesFromPoint (PolygonObject *pObject, Int32 pindex, Neighbor *pNeighbor=nullptr, Vector *pNormals=nullptr, Vector *pGlobalPoints=nullptr, Float *pDistance=nullptr) |
|
◆ BrushBase()
◆ ~BrushBase()
◆ Alloc()
Allocates a brush base. Destroy the allocated brush base with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.
- Returns
- The allocated brush base, or nullptr if the allocation failed.
◆ Free()
Destructs brush base instances allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.
- Parameters
-
[in,out] | p | The brush base to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
◆ InitTool()
◆ FreeTool()
◆ InitDefaultSettings()
◆ GetDEnabling()
◆ SetDParameter()
◆ GetDDescription()
◆ Message()
◆ GetCursorInfo()
◆ MouseInput()
◆ GetSelected()
Performs a selection at (x,y) with radius rad.
- Warning
- Call ValidateObjects() before this function.
- Parameters
-
[in] | doc | The document. |
[in] | data | The data container. |
[in] | bd | The base draw view. |
[out] | vcnt | Assigned the selected vertex count. |
[in] | x | The X coordinate. |
[in] | y | The Y coordinate. |
[in] | rad | The radius. |
[in] | op | The object. |
- Returns
- The selected vertices.
◆ GetCursor()
Gets the cursor position and radius.
- Parameters
-
[out] | x | Assigned the cursor X position. |
[out] | y | Assigned the cursor Y position. |
- Returns
- The radius.
◆ GetObjectInfo() [1/2]
Retrieves object information for data.
- Parameters
-
[in] | data | The brush object data. |
[out] | info | Assigned the brush object information. |
◆ GetObjectInfo() [2/2]
Retrieves the cached object data from op.
- Parameters
-
[in] | op | The object. |
[out] | info | Assigned the brush object information. |
- Returns
- true if successful, otherwise false.
false if object op is not found in the cache.
◆ ValidateObjects()
Validate objects.
- Parameters
-
[in] | doc | The document. |
[in] | data | The data container. |
- Returns
- true if successful, otherwise false.
◆ GetObjectAt()
Get the objects at (x,y).
- Warning
- Call ValidateObjects() before this function.
- Parameters
-
[in] | x | The X coordinate. |
[in] | y | The Y coordinate. |
- Returns
- The brush pixel data.
◆ GetFalloff()
Gets the falloff factor.
- Note
- Only valid within MouseInput() functions.
- Parameters
-
- Returns
- The falloff factor.
◆ GetStrength()
Float GetStrength |
( |
| ) |
const |
Gets the strength (percentage).
- Returns
- The strength percentage.
◆ GetStrengthMultiplier()
Float GetStrengthMultiplier |
( |
| ) |
const |
Gets the strength multiplier. Should be 1.0 unless pen pressure affects strength.
- Returns
- The multiplier.
◆ GetObjects()
Fills in the atom array with the cached (should be active) objects.
- Parameters
-
[in] | doc | The document. |
[out] | objects | The cached objects. |
- Returns
- true if successful, otherwise false.
◆ UpdateCache()
Update the cache if object pointers have been changed during mouse drag.
It should not be needed to set force if the object has been made dirty (MSG_UPDATE).
- Parameters
-
[in] | doc | The document. |
[in] | data | The data container. |
[in] | bd | The base draw view. |
[in] | force | Set to true to force the cache update. |
- Returns
- true if successful, otherwise false.
◆ CalcSurfaceDistances()
Used internally for surface distance calculations. Creates an array with an element for each point in pObject set to the distance to selected.
If pDistance is passed this array is used instead.
Either pass the various pointers (those with the nullptr default parameters) or let them be calculated automatically if nullptr.
- Parameters
-
[in] | pObject | The object to calculate. |
[in] | selected | The point selection to calculate. |
[in] | pNeighbor | The neighbor information. |
[in] | pNormals | The point normals. |
[in] | pGlobalPoints | The global points. |
[out] | pDistance | The pre-allocated distance array to be filled. |
- Returns
- The distance array.
◆ CalcSurfaceDistancesFromPoint()
Used internally for surface distance calculations. Creates an array with an element for each point in pObject set to the distance to selected.
If pDistance is passed this array is used instead.
Either pass the various pointers (those with the nullptr default parameters) or let them be calculated automatically if nullptr.
- Parameters
-
[in] | pObject | The object to calculate. |
[in] | pindex | The point to calculate. |
[in] | pNeighbor | The neighbor information. |
[in] | pNormals | The point normals. |
[in] | pGlobalPoints | The global points. |
[out] | pDistance | The pre-allocated distance array to be filled. |
- Returns
- The distance array.
◆ m_pBase