FalloffData Class Reference

#include <c4d_falloffdata.h>

Inheritance diagram for FalloffData:

详细描述

A data class for creating falloff plugins.
Falloffs appear in any falloff description (unless the flag PLUGINFLAG_HIDE is set during registration) and extend the functionality of effectors and anything that uses falloffs.
使用 RegisterFalloffPlugin() to register a falloff plugin.

公共成员函数

virtual Bool   CheckDirty ( BaseContainer *bc)
virtual Bool   GetDVisible ( DescID &id, BaseContainer *bc, BaseContainer *desc_bc)
virtual DRAWRESULT   Draw (const FalloffDataData &data, DRAWPASS drawpass, BaseDraw *bd, BaseDrawHelp *bh)
virtual Bool   消息 ( Int32 type, BaseContainer *bc, void *m_data)
-  Public Member Functions inherited from BaseData
  BaseData ()
virtual  ~BaseData (void)
void  Destructor (void)

Init/Sample/Free

virtual Bool   Init ( FalloffDataData &falldata, BaseContainer *bc)
virtual Bool   InitFalloff ( BaseContainer *bc, FalloffDataData &falldata)
virtual void  Sample (const 向量 &p, const FalloffDataData &data, Float *res)
virtual void  FreeFalloff ( FalloffDataData &falldata)

Handle

virtual Int32   GetHandleCount ( BaseContainer *bc, const FalloffDataData &data)
virtual void  GetHandle ( BaseContainer *bc, Int32 i, HandleInfo &info, const FalloffDataData &data)
virtual void  SetHandle ( BaseContainer *bc, Int32 i, 向量 p, const FalloffDataData &data)

成员函数文档编制

◆  Init()

virtual Bool Init ( FalloffDataData falldata ,
BaseContainer bc  
)
virtual

Called to initialize the falloff when it is first created.

参数
[in,out] falldata The falloff's data.
[in,out] bc The falloff's container; normally this is the owning object's container.
返回
true if successful, otherwise false .

◆  InitFalloff()

virtual Bool InitFalloff ( BaseContainer bc ,
FalloffDataData falldata  
)
virtual

Called to initialize the falloff just before sampling. Allows to setup any necessary data in falldata or bc.

参数
[in,out] bc The falloff's data.
[in,out] falldata The falloff's container; normally this is the container of the object owning the falloff.
返回
true if successful, otherwise false .

◆  Sample()

virtual void Sample ( const 向量 p ,
const FalloffDataData data ,
Float res  
)
virtual

Called to sample any point. Assign res to return the sampled value.

参数
[in] p The position of the point to sample in falloff space.
[in] data The falloff's data.
[out] res Set to the sampled value.

◆  FreeFalloff()

virtual void FreeFalloff ( FalloffDataData falldata )
virtual

Called to free the falloff.

参数
[in] falldata The falloff's data.

◆  CheckDirty()

virtual Bool CheckDirty ( BaseContainer bc )
virtual

Called to check for a change in the falloff.

参数
[in] bc The falloff's container; normally this is the container of the object owning the falloff.
返回
true if the falloff is dirty, otherwise false .

◆  GetDVisible()

virtual Bool GetDVisible ( DescID id ,
BaseContainer bc ,
BaseContainer desc_bc  
)
virtual

Called to change the visibility of any element in the falloff description. Just return true or false id (like NodeData::GetDEnabling ).

参数
[in] id The description ID.
[in,out] bc The falloff's container; normally this is the container of the object owning the falloff.
[in,out] desc_bc The description element's container.
返回
true if the description element should be visible, otherwise false .

◆  GetHandleCount()

virtual Int32 GetHandleCount ( BaseContainer bc ,
const FalloffDataData data  
)
virtual

Called to get the number of handles for the falloff.
如同 ObjectData::GetHandleCount with additional FalloffDataData .

参数
[in,out] bc The falloff's container; normally this is the container of the object owning the falloff.
[in,out] data The falloff's data.
返回
The handle count.

◆  GetHandle()

virtual void GetHandle ( BaseContainer bc ,
Int32   i ,
HandleInfo info ,
const FalloffDataData data  
)
virtual

Called to get a handle for the falloff.
如同 ObjectData::GetHandle with additional FalloffDataData .

参数
[in,out] bc The falloff's container; normally this is the container of the object owning the falloff.
[in] i The handle index.
[out] info Filled with the information for handle i .
[in,out] data The falloff's data.

◆  SetHandle()

virtual void SetHandle ( BaseContainer bc ,
Int32   i ,
向量   p ,
const FalloffDataData data  
)
virtual

Called to set a handle for the falloff.
如同 ObjectData::SetHandle with additional FalloffDataData .
Called when the user has moved handle i to position p . Constrain the movement and update the internal data.

参数
[in,out] bc The falloff's container; normally this is the container of the object owning the falloff.
[in] i The handle index.
[in] p The new position for handle i .
[in,out] data The falloff's data.

◆  Draw()

virtual DRAWRESULT Draw ( const FalloffDataData data ,
DRAWPASS   drawpass ,
BaseDraw bd ,
BaseDrawHelp bh  
)
virtual

Called to draw the falloff in the viewport.
如同 ObjectData::Draw with additional FalloffDataData .
These predefined color constants should be used: FALLOFFCOLORS

参数
[in,out] data The falloff's data.
[in] drawpass The draw pass: DRAWPASS
[in] bd The editor's view. The caller owns the pointed base draw.
[in] bh The editor's view help. The caller owns the pointed base draw help.
返回
The result of drawing into the editor view: DRAWRESULT

◆  Message()

virtual Bool 消息 ( Int32   type ,
BaseContainer bc ,
void *  m_data  
)
virtual

Called to process messages sent to the falloff.

参数
[in] type The message type: MSG
[in,out] bc The falloff's container; normally this is the container of the object owning the falloff.
[in,out] m_data The message data. The sender owns the pointed data.
返回
true if successful, otherwise false .