-
首页
-
C4D R23.110 C++ SDK
BrushBase Class Reference
Library
»
Character Animation
#include <lib_ca.h>
详细描述
Helper class for the
BrushToolData
hook.
Private Attributes
|
_BrushToolBase *
|
m_pBase
|
Base Implementations
|
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,
DESCFLAGS_DESC
&flags)
|
Bool
|
消息
(
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)
|
Helpers
|
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,
向量
*pNormals=nullptr,
向量
*pGlobalPoints=nullptr,
Float
*pDistance=nullptr)
|
Float
*
|
CalcSurfaceDistancesFromPoint
(
PolygonObject
*pObject,
Int32
pindex,
Neighbor
*pNeighbor=nullptr,
向量
*pNormals=nullptr,
向量
*pGlobalPoints=nullptr,
Float
*pDistance=nullptr)
|
构造函数 & 析构函数文档编制
◆
BrushBase()
◆
~BrushBase()
成员函数文档编制
◆
Alloc()
Allocates a brush base. Destroy the allocated brush base with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
返回
-
The allocated brush base, or
nullptr
if the allocation failed.
◆
Free()
Destructs brush base instances allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in,out]
|
p
|
The brush base to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
InitTool()
Base implementation for
BrushToolData
.
◆
FreeTool()
Base implementation for
BrushToolData
.
◆
InitDefaultSettings()
Base implementation for
BrushToolData
.
◆
GetDEnabling()
Base implementation for
BrushToolData
.
◆
SetDParameter()
Base implementation for
BrushToolData
.
◆
GetDDescription()
Base implementation for
BrushToolData
.
◆
Message()
Base implementation for
BrushToolData
.
◆
GetCursorInfo()
Base implementation for
BrushToolData
.
◆
MouseInput()
Base implementation for
BrushToolData
.
◆
GetSelected()
Performs a selection at (
x
,
y
) with radius
rad
.
-
警告
-
Call
ValidateObjects()
before this function.
-
参数
-
[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.
|
-
返回
-
The selected vertices.
◆
GetCursor()
Gets the cursor position and radius.
-
参数
-
[out]
|
x
|
Assigned the cursor X position.
|
[out]
|
y
|
Assigned the cursor Y position.
|
-
返回
-
The radius.
◆
GetObjectInfo()
[1/2]
Retrieves object information for
data
.
-
参数
-
[in]
|
data
|
The brush object data.
|
[out]
|
info
|
Assigned the brush object information.
|
◆
GetObjectInfo()
[2/2]
Retrieves the cached object data from
op
.
-
参数
-
[in]
|
op
|
The object.
|
[out]
|
info
|
Assigned the brush object information.
|
-
返回
-
true
if successful, otherwise
false
.
false
if object
op
is not found in the cache.
◆
ValidateObjects()
Validate objects.
-
参数
-
[in]
|
doc
|
The document.
|
[in]
|
data
|
The data container.
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetObjectAt()
Get the objects at (
x
,
y
).
-
警告
-
Call
ValidateObjects()
before this function.
-
参数
-
[in]
|
x
|
The X coordinate.
|
[in]
|
y
|
The Y coordinate.
|
-
返回
-
The brush pixel data.
◆
GetFalloff()
Gets the falloff factor.
-
注意
-
Only valid within
MouseInput()
函数。
-
参数
-
-
返回
-
The falloff factor.
◆
GetStrength()
Float
GetStrength
|
(
|
|
)
|
const
|
Gets the strength (percentage).
-
返回
-
The strength percentage.
◆
GetStrengthMultiplier()
Float
GetStrengthMultiplier
|
(
|
|
)
|
const
|
Gets the strength multiplier. Should be 1.0 unless pen pressure affects strength.
-
返回
-
The multiplier.
◆
GetObjects()
Fills in the atom array with the cached (should be active) objects.
-
参数
-
[in]
|
doc
|
The document.
|
[out]
|
对象
|
The cached objects.
|
-
返回
-
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
).
-
参数
-
[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.
|
-
返回
-
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.
若
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
.
-
参数
-
[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.
|
-
返回
-
The distance array.
◆
CalcSurfaceDistancesFromPoint()
Float
* CalcSurfaceDistancesFromPoint
|
(
|
PolygonObject
*
|
pObject
,
|
|
|
Int32
|
pindex
,
|
|
|
Neighbor
*
|
pNeighbor
=
nullptr
,
|
|
|
向量
*
|
pNormals
=
nullptr
,
|
|
|
向量
*
|
pGlobalPoints
=
nullptr
,
|
|
|
Float
*
|
pDistance
=
nullptr
|
|
)
|
|
|
Used internally for surface distance calculations. Creates an array with an element for each point in
pObject
set to the distance to selected.
若
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
.
-
参数
-
[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.
|
-
返回
-
The distance array.
Member Data Documentation
◆
m_pBase
_BrushToolBase* m_pBase
|
private
|