BrushToolData Class Reference Library » Character Animation

#include <lib_ca.h>

Inheritance diagram for BrushToolData:

详细描述

Lets implement custom CA brushes. Normally it is only needed to implement MouseInputStart() , MouseInputDrag() and MouseInputEnd() functions, since the rest have default implementations in BrushBase .
There are other helper functions in BrushBase as well, available through the m_pBrushBase pointer.

公共成员函数

  BrushToolData ()
  ~BrushToolData ()
-  Public Member Functions inherited from DescriptionToolData
virtual Bool   TranslateDescID ( BaseDocument *doc, BaseContainer &data, const DescID &id, DescID &res_id, C4DAtom *&res_at)
virtual const String   GetResourceSymbol ()=0
virtual Int32   GetToolPluginId ()=0
Bool   InteractiveModeling_Restart ( BaseDocument *doc)
-  Public Member Functions inherited from ToolData
virtual Bool   KeyboardInput ( BaseDocument *doc, BaseContainer &data, BaseDraw *bd, EditorWindow *win, const BaseContainer &msg)
virtual TOOLDRAW   Draw ( BaseDocument *doc, BaseContainer &data, BaseDraw *bd, BaseDrawHelp *bh, BaseThread *bt, TOOLDRAWFLAGS flags)
virtual Bool   DisplayControl ( BaseDocument *doc, BaseObject *op, BaseObject *chainstart, BaseDraw *bd, BaseDrawHelp *bh, ControlDisplayStruct &cds) const
virtual Bool   InitDisplayControl ( BaseDocument *doc, BaseContainer &data, BaseDraw *bd, const AtomArray *active)
virtual void  FreeDisplayControl (void)
virtual SubDialog AllocSubDialog ( BaseContainer *bc)
virtual Bool   DoCommand ( ModelingCommandData &mdat)
virtual Int32   GetState ( BaseDocument *doc)
virtual Bool   GetDParameter ( BaseDocument *doc, BaseContainer &data, const DescID &id, GeData &t_data, DESCFLAGS_GET &flags)
-  Public Member Functions inherited from BaseData
  BaseData ()
virtual  ~BaseData (void)
void  Destructor (void)

Public Attributes

BrushBase m_pBrushBase

Overloads

virtual Bool   InitTool ( BaseDocument *doc, BaseContainer &data, BaseThread *bt)
virtual void  FreeTool ( BaseDocument *doc, BaseContainer &data)
virtual void  InitDefaultSettings ( BaseDocument *doc, BaseContainer &data)
virtual Bool   GetDEnabling ( BaseDocument *doc, BaseContainer &data, const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc)
virtual Bool   SetDParameter ( BaseDocument *doc, BaseContainer &data, const DescID &id, const GeData &t_data, DESCFLAGS_SET &flags)
virtual Bool   GetDDescription ( BaseDocument *doc, BaseContainer &data, 描述 *description, DESCFLAGS_DESC &flags)
virtual Bool   消息 ( BaseDocument *doc, BaseContainer &data, Int32 type, void *t_data)
virtual Bool   GetCursorInfo ( BaseDocument *doc, BaseContainer &data, BaseDraw *bd, Float x, Float y, BaseContainer &bc)
virtual Bool   MouseInput ( BaseDocument *doc, BaseContainer &data, BaseDraw *bd, EditorWindow *win, const BaseContainer &msg)

Mouse Input

virtual Bool   MouseInputStart ( BaseDocument *doc, BaseContainer &data, BaseDraw *bd, EditorWindow *win, const BaseContainer &msg, Int32 &flags)
virtual Bool   MouseInputDrag ( BaseDocument *doc, BaseContainer &data, BaseDraw *bd, EditorWindow *win, const BaseContainer &msg, BrushVertexData *vdata, Int32 vcnt, Float x, Float y, Int32 &flags)
virtual Bool   MouseInputEnd ( BaseDocument *doc, BaseContainer &data, BaseDraw *bd, EditorWindow *win, const BaseContainer &msg)

Additional Inherited Members

-  Protected Attributes inherited from DescriptionToolData
Bool   firstaction
Int32   last_dirty

构造函数 & 析构函数文档编制

◆  BrushToolData()

BrushToolData ( )

◆  ~BrushToolData()

~ BrushToolData ( )

成员函数文档编制

◆  InitTool()

virtual Bool InitTool ( BaseDocument doc ,
BaseContainer data ,
BaseThread bt  
)
virtual

Implemented by BrushBase . Normally there is no need to overload this function.

Reimplemented from DescriptionToolData .

◆  FreeTool()

virtual void FreeTool ( BaseDocument doc ,
BaseContainer data  
)
virtual

Implemented by BrushBase . Normally there is no need to overload this function.

Reimplemented from DescriptionToolData .

◆  InitDefaultSettings()

virtual void InitDefaultSettings ( BaseDocument doc ,
BaseContainer data  
)
virtual

Implemented by BrushBase . Normally there is no need to overload this function.

Reimplemented from DescriptionToolData .

◆  GetDEnabling()

virtual Bool GetDEnabling ( BaseDocument doc ,
BaseContainer data ,
const DescID id ,
const GeData t_data ,
DESCFLAGS_ENABLE   flags ,
const BaseContainer itemdesc  
)
virtual

Implemented by BrushBase . Normally there is no need to overload this function.

Reimplemented from DescriptionToolData .

◆  SetDParameter()

virtual Bool SetDParameter ( BaseDocument doc ,
BaseContainer data ,
const DescID id ,
const GeData t_data ,
DESCFLAGS_SET flags  
)
virtual

Implemented by BrushBase . Normally there is no need to overload this function.

Reimplemented from ToolData .

◆  GetDDescription()

virtual Bool GetDDescription ( BaseDocument doc ,
BaseContainer data ,
描述 description ,
DESCFLAGS_DESC flags  
)
virtual

Implemented by BrushBase . Normally there is no need to overload this function.

Reimplemented from DescriptionToolData .

◆  Message()

virtual Bool 消息 ( BaseDocument doc ,
BaseContainer data ,
Int32   type ,
void *  t_data  
)
virtual

Implemented by BrushBase . Normally there is no need to overload this function.

Reimplemented from DescriptionToolData .

◆  GetCursorInfo()

virtual Bool GetCursorInfo ( BaseDocument doc ,
BaseContainer data ,
BaseDraw bd ,
Float   x ,
Float   y ,
BaseContainer bc  
)
virtual

Implemented by BrushBase . Normally there is no need to overload this function.

Reimplemented from ToolData .

◆  MouseInput()

virtual Bool MouseInput ( BaseDocument doc ,
BaseContainer data ,
BaseDraw bd ,
EditorWindow win ,
const BaseContainer msg  
)
virtual

Implemented by BrushBase . Normally there is no need to overload this function.

Reimplemented from ToolData .

◆  MouseInputStart()

virtual Bool MouseInputStart ( BaseDocument doc ,
BaseContainer data ,
BaseDraw bd ,
EditorWindow win ,
const BaseContainer msg ,
Int32 flags  
)
virtual

Called at the start of mouse input. Initialize any data needed for the drag and set any flags needed.

参数
[in] doc The document.
[in] data The data.
[in] bd The base draw.
[in] win The editor window.
[in] msg The input message.
[in] flags The flags. Add the flags needed with the |= operator: BRUSHBASE_MOUSE_FLAG
返回
true if successful, otherwise false .

◆  MouseInputDrag()

virtual Bool MouseInputDrag ( BaseDocument doc ,
BaseContainer data ,
BaseDraw bd ,
EditorWindow win ,
const BaseContainer msg ,
BrushVertexData vdata ,
Int32   vcnt ,
Float   x ,
Float   y ,
Int32 flags  
)
virtual

Called during mouse drag.

参数
[in] doc The document.
[in] data The data.
[in] bd The base draw.
[in] win The editor window.
[in] msg The input message.
[in] vdata The brush vertex data.
[in] vcnt The brush vertex count.
[in] x The mouse X position.
[in] y The mouse Y position.
[in] flags The flags. Add the flags needed with the |= operator: BRUSHBASE_MOUSE_FLAG
返回
true if successful, otherwise false .

◆  MouseInputEnd()

virtual Bool MouseInputEnd ( BaseDocument doc ,
BaseContainer data ,
BaseDraw bd ,
EditorWindow win ,
const BaseContainer msg  
)
virtual

Called after mouse drag. Free any data no longer needed.

参数
[in] doc The document.
[in] data The data.
[in] bd The base draw.
[in] win The editor window.
[in] msg The input message.
返回
true if successful, otherwise false .

Member Data Documentation

◆  m_pBrushBase

BrushBase * m_pBrushBase