-
首页
-
C4D R23.110 C++ SDK
#include <c4d_basedraw.h>
详细描述
Represents a view window that can be drawn into.
-
注意
-
Has to be created with
Alloc()
and destroyed with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
警告
-
The
BaseDraw
parameters must only be accessed with
GetParameter()
/
SetParameter()
, not directly using the data container.
GetParameterData()
convenience method can be used to get parameters.
公共成员函数
|
void
|
GetDrawport
(maxon::DrawportRef &drawport) const
|
void
|
GetDrawportContext
(maxon::DrawportContextRef &context) const
|
void
|
GetViewportImage
(maxon::ImageRef &viewportImage) const
|
void
|
RenderViewportWithoutPostEffects
(maxon::ImageRef &image) const
|
void
|
GetFrame
(
Int32
*cl,
Int32
*ct,
Int32
*cr,
Int32
*cb)
|
void
|
GetSafeFrame
(
Int32
*cl,
Int32
*ct,
Int32
*cr,
Int32
*cb)
|
矩阵
|
GetMg
(void)
|
矩阵
|
GetMi
(void)
|
const
矩阵
&
|
GetBaseMatrix
() const
|
void
|
SetBaseMatrix
(const
矩阵
&m)
|
Float
|
GetPlanarRotation
() const
|
void
|
SetPlanarRotation
(
Float
r)
|
Bool
|
TestPoint
(
Float
x,
Float
y)
|
Bool
|
TestPointZ
(const
向量
&p)
|
Bool
|
TestClipping3D
(const
向量
&mp, const
向量
&rad, const
矩阵
&mg,
Bool
*clip2d,
Bool
*clipz)
|
Bool
|
ClipLine2D
(
向量
*p1,
向量
*p2)
|
Bool
|
ClipLineZ
(
向量
*p1,
向量
*p2)
|
向量
|
WS
(const
向量
&p) const
|
向量
|
SW
(const
向量
&p) const
|
向量
|
SW_Reference
(
Float
x,
Float
y, const
向量
&wp) const
|
向量
|
WC
(const
向量
&p) const
|
向量
|
CW
(const
向量
&p) const
|
向量
|
SC
(const
向量
&p) const
|
向量
|
CS
(const
向量
&p,
Bool
z_inverse) const
|
向量
|
WC_V
(const
向量
&v) const
|
向量
|
CW_V
(const
向量
&v) const
|
向量
|
WS_V
(const
向量
&v, const
向量
&p) const
|
向量
|
SW_V
(const
向量
&v, const
向量
&p) const
|
Float
|
PW_S
(
Float
z,
Bool
horizontal) const
|
Float
|
WP_S
(
Float
z,
Bool
horizontal) const
|
Float
|
PW_W
(const
向量
&p,
Bool
horizontal) const
|
Float
|
WP_W
(const
向量
&p,
Bool
horizontal) const
|
Bool
|
ZSensitiveNear
(void) const
|
Float
|
ZSensitiveNearClipping
(void) const
|
Bool
|
ZSensitiveFar
(void) const
|
Float
|
ZSensitiveFarClipping
(void) const
|
向量
|
ProjectPointOnLine
(const
向量
&p, const
向量
&v,
Float
mouse_x,
Float
mouse_y,
Float
*offset=nullptr,
Int32
*err=nullptr)
|
向量
|
ProjectPointOnPlane
(const
向量
&p, const
向量
&v,
Float
mouse_x,
Float
mouse_y,
Int32
*err=nullptr)
|
Bool
|
BackfaceCulling
(const
向量
&n, const
向量
&p)
|
Int32
|
GetProjection
(void)
|
StereoCameraInfo
*
|
GetStereoInfo
() const
|
void
|
GetViewParameter
(
向量
*offset,
向量
*scale,
向量
*scale_z) const
|
void
|
SetBit
(
Int32
mask)
|
Bool
|
GetBit
(
Int32
mask) const
|
void
|
DelBit
(
Int32
mask)
|
void
|
ToggleBit
(
Int32
mask)
|
Int32
|
GetAllBits
() const
|
void
|
SetAllBits
(
Int32
bits)
|
void
|
SetBitEx
(
Int32
mask,
Int32
flags)
|
const
Char
*
|
GetViewportRenderId
(
VIEWPORT_RENDER_ID
typeId) const
|
BaseList2D
*
|
GetNext
()
|
BaseList2D
*
|
GetPred
()
|
BaseContainer
|
GetData
()
|
void
|
SetData
(const
BaseContainer
&bc,
Bool
add=true)
|
const
BaseContainer
*
|
GetDataInstance
() const
|
BaseContainer
*
|
GetDataInstance
()
|
const
BaseContainer
&
|
GetDataInstanceRef
() const
|
BaseContainer
&
|
GetDataInstanceRef
()
|
String
|
GetName
() const
|
void
|
SetName
(const
maxon::String
&name)
|
String
|
GetBubbleHelp
()
|
Bool
|
TransferGoal
(
BaseList2D
*dst,
Bool
undolink)
|
Bool
|
TransferMarker
(
BaseList2D
*dst) const
|
Bool
|
比例
(
Float
scale)
|
Bool
|
编辑
()
|
void
|
GetIcon
(
IconData
*dat)
|
GeListHead
*
|
GetNLARoot
()
|
BaseList2D
*
|
AnimationLayerRemap
(
BaseObject
**layer=nullptr)
|
String
|
GetTypeName
()
|
BaseList2D
*
|
GetMain
() const
|
void
|
InsertTrackSorted
(
CTrack
*track)
|
Bool
|
AddEventNotification
(
BaseList2D
*bl,
NOTIFY_EVENT
eventid,
NOTIFY_EVENT_FLAG
flags, const
BaseContainer
*data)
|
Bool
|
RemoveEventNotification
(
BaseDocument
*doc,
BaseList2D
*bl,
NOTIFY_EVENT
eventid)
|
Bool
|
FindEventNotification
(
BaseDocument
*doc,
BaseList2D
*bl,
NOTIFY_EVENT
eventid)
|
Bool
|
SetDescIDState
(const
DescID
&id,
DESCIDSTATE
descidstate)
|
DESCIDSTATE
|
GetDescIDState
(const
DescID
&id,
Bool
tolerant) const
|
GeListHead
*
|
GetOverrideRoot
()
|
BaseOverride
*
|
GetFirstOverride
()
|
GeListHead
*
|
GetShaderRepositoryRoot
()
|
GeListHead
*
|
GetHiddenShaderRoot
()
|
maxon::NimbusInterface *
|
GetNimbusRef
(const
maxon::Id
&spaceId) const
|
maxon::Result
< maxon::NimbusInterface * >
|
GetOrCreateNimbusRef
(const
maxon::Id
&spaceId)
|
void
|
RemoveNimbusRef
(const
maxon::Id
&spaceId)
|
maxon::Result
<
maxon::HashMap
<
maxon::Id
,
maxon::ForwardRef
< maxon::NimbusRef > > >
|
GetAllNimbusRefs
() const
|
Bool
|
IsNodeBased
() const
|
void
|
GetMarkerStampEx
(
UInt32
*l1,
UInt32
*l2)
|
const
GeMarker
&
|
GetMarker
() const
|
void
|
SetMarker
(const
GeMarker
&m)
|
Bool
|
AddUniqueID
(
Int32
appid, const
Char
*const mem,
Int
bytes)
|
Bool
|
FindUniqueID
(
Int32
appid, const
Char
*&mem,
Int
&bytes) const
|
Int32
|
GetUniqueIDCount
() const
|
Bool
|
GetUniqueIDIndex
(
Int32
idx,
Int32
&id, const
Char
*&mem,
Int
&bytes) const
|
Bool
|
SetAnimatedParameter
(
CTrack
*track, const
DescID
&id, const
GeData
&t_data1, const
GeData
&t_data2,
Float
mix,
DESCFLAGS_SET
flags)
|
Bool
|
GetAnimatedParameter
(const
DescID
&id,
GeData
&t_data1,
GeData
&t_data2,
Float
&mix,
DESCFLAGS_GET
flags)
|
BaseShader
*
|
GetFirstShader
() const
|
void
|
InsertShader
(
BaseShader
*shader,
BaseShader
*pred=nullptr)
|
void
|
ClearKeyframeSelection
()
|
Bool
|
FindKeyframeSelection
(const
DescID
&id)
|
Bool
|
SetKeyframeSelection
(const
DescID
&id,
Bool
selection)
|
Bool
|
KeyframeSelectionContent
()
|
LayerObject
*
|
GetLayerObject
(
BaseDocument
*doc)
|
Bool
|
SetLayerObject
(
LayerObject
*layer)
|
const
LayerData
*
|
GetLayerData
(
BaseDocument
*doc,
Bool
rawdata=false)
|
Bool
|
SetLayerData
(
BaseDocument
*doc, const
LayerData
&data)
|
GeListHead
*
|
GetCTrackRoot
()
|
CTrack
*
|
GetFirstCTrack
()
|
CTrack
*
|
FindCTrack
(const
DescID
&id)
|
GeListNode
*
|
GetNext
()
|
GeListNode
*
|
GetPred
()
|
GeListNode
*
|
GetDown
()
|
GeListNode
*
|
GetUp
()
|
GeListNode
*
|
GetDownLast
()
|
void
|
InsertBefore
(
GeListNode
*bl)
|
void
|
InsertAfter
(
GeListNode
*bl)
|
void
|
InsertUnder
(
GeListNode
*bl)
|
void
|
InsertUnderLast
(
GeListNode
*bl)
|
void
|
移除
()
|
GeListHead
*
|
GetListHead
()
|
Int32
|
GetNodeID
(
Int32
index=0) const
|
template<typename CAST >
|
const CAST *
|
GetNodeData
(
Int32
index=0) const
|
template<typename CAST >
|
CAST *
|
GetNodeData
(
Int32
index=0)
|
void
|
SetCustomData
(
GeListNode
*node)
|
GeListNode
*
|
GetCustomData
()
|
BaseDocument
*
|
GetDocument
()
|
Int32
|
GetBranchInfo
(
BranchInfo
*info,
Int32
max,
GETBRANCHINFO
flags)
|
Bool
|
IsDocumentRelated
()
|
Int32
|
GetInfo
()
|
Bool
|
GetNBit
(
NBIT
bit) const
|
UInt32
|
GetNBitMask
(
Int32
index) const
|
Bool
|
ChangeNBit
(
NBIT
bit,
NBITCONTROL
bitmode)
|
Int32
|
GetType
() const
|
Int32
|
GetRealType
() const
|
Int32
|
GetDiskType
() const
|
Bool
|
IsInstanceOf
(
Int32
id) const
|
Int32
|
GetClassification
() const
|
Bool
|
消息
(
Int32
type, void *data=nullptr)
|
Bool
|
MultiMessage
(
MULTIMSG_ROUTE
flags,
Int32
type, void *data)
|
C4DAtom
*
|
GetClone
(
COPYFLAGS
flags,
AliasTrans
*trn)
|
Bool
|
CopyTo
(
C4DAtom
*dst,
COPYFLAGS
flags,
AliasTrans
*trn)
|
Bool
|
读取
(
HyperFile
*hf,
Int32
id,
Int32
level)
|
Bool
|
Write
(
HyperFile
*hf)
|
Bool
|
ReadObject
(
HyperFile
*hf,
Bool
readheader)
|
Bool
|
WriteObject
(
HyperFile
*hf)
|
Bool
|
GetDescription
(
描述
*description,
DESCFLAGS_DESC
flags)
|
Bool
|
GetParameter
(const
DescID
&id,
GeData
&t_data,
DESCFLAGS_GET
flags)
|
Bool
|
SetParameter
(const
DescID
&id, const
GeData
&t_data,
DESCFLAGS_SET
flags)
|
DynamicDescription
*
|
GetDynamicDescription
()
|
Bool
|
GetEnabling
(const
DescID
&id, const
GeData
&t_data,
DESCFLAGS_ENABLE
flags, const
BaseContainer
*itemdesc)
|
Bool
|
TranslateDescID
(const
DescID
&id,
DescID
&res_id,
C4DAtom
*&res_at)
|
UInt32
|
GetDirty
(
DIRTYFLAGS
flags) const
|
void
|
SetDirty
(
DIRTYFLAGS
flags)
|
UInt32
|
GetHDirty
(
HDIRTYFLAGS
mask) const
|
void
|
SetHDirty
(
HDIRTYFLAGS
mask)
|
Initialization
|
void
|
InitClipbox
(
Int32
left,
Int32
top,
Int32
right,
Int32
bottom,
Int32
flags)
|
void
|
InitView
(
BaseContainer
*camera, const
矩阵
&op_m,
Float
sv,
Float
pix_x,
Float
pix_y,
Bool
fitview)
|
void
|
InitializeView
(
BaseDocument
*doc,
BaseObject
*cam,
Bool
editorsv)
|
void
|
InitLegacyDrawport
()
|
void
|
DrawEnd
()
|
static void
|
PrepareActionSelections
(const
BaseDocument
*doc,
Bool
withChildren)
|
3D Drawing
|
void
|
DrawHandle
(const
向量
&vp,
DRAWHANDLE
type,
Int32
flags)
|
void
|
DrawHandleWorld
(const
向量
&vp, const
向量
&col,
DRAWHANDLE
type)
|
void
|
DrawPointArray
(
Int32
cnt, const
Vector32
*vp, const
Float32
*vc=nullptr,
Int32
colcnt=0, const
Vector32
*vn=nullptr)
|
void
|
DrawLine
(const
向量
&p1, const
向量
&p2,
Int32
flags)
|
void
|
DrawArc
(const
向量
&pos,
Float
radius,
Float
angle_start,
Float
angle_end,
Int32
subdiv=32,
Int32
flags=0)
|
void
|
DrawPoly
(const
向量
*vp, const
向量
*vf, const
向量
*vn,
Int32
anz,
Int32
flags)
|
void
|
DrawTexture
(const
BaseBitmap
*bmp, const
向量
*padr4, const
向量
*cadr, const
向量
*vnadr, const
向量
*uvadr,
Int32
pntcnt,
DRAW_ALPHA
alphamode,
DRAW_TEXTUREFLAGS
flags)
|
void
|
DrawCircle
(const
矩阵
&m)
|
void
|
DrawBox
(const
矩阵
&m,
Float
size, const
向量
&col,
Bool
wire)
|
void
|
DrawBoundingBox
(
BaseObject
*op, const
矩阵
&mg,
BaseDrawHelp
*bh,
Bool
shading,
向量
*colorOverride=nullptr)
|
void
|
DrawPolygon
(const
向量
*p, const
向量
*f,
Bool
quad)
|
void
|
DrawSphere
(const
向量
&off, const
向量
&size, const
向量
&col,
Int32
flags)
|
void
|
DrawArrayEnd
()
|
Object Drawing
|
DRAWRESULT
|
DrawPolygonObject
(
BaseDrawHelp
*bh,
BaseObject
*op,
DRAWOBJECT
flags,
BaseObject
*parent=nullptr, const
向量
&col=
向量
(.5))
|
DRAWRESULT
|
DrawObject
(
BaseDrawHelp
*bh,
BaseObject
*op,
DRAWOBJECT
flags,
DRAWPASS
drawpass,
BaseObject
*parent=nullptr, const
向量
&col=
向量
(.5))
|
void
|
DrawAnimationPath
(
BaseDocument
*doc,
BaseObject
*op, const
矩阵
&upmg,
Bool
showActivation,
Bool
global,
DRAWPASS
drawpass, const
BaseDrawHelp
*bh)
|
void
|
DrawBoxEdges
(
BaseDocument
*doc,
BaseObject
*op, const
矩阵
&mg,
Bool
inversez,
Bool
inherit,
Int32
vis,
Bool
child)
|
Bool
|
DrawHighlight
(
BASEDRAW_HIGHLIGHT
flags)
|
Bool
|
DrawPostPass
()
|
Bool
|
DrawSceneHook
(
BaseDocument
*doc,
BaseDrawHelp
*bh,
BaseThread
*bt,
SCENEHOOKDRAW
flags,
Int32
start=
LIMIT
<
Int32
>::
MAX
,
Int32
end=
LIMIT
<
Int32
>::
MIN
)
|
杂项
|
void
|
AddMessageHook
(
BaseDrawMessageHook
fn)
|
Bool
|
AddToPostPass
(
BaseObject
*op,
BaseDrawHelp
*bh)
|
DISPLAYFILTER
|
GetDisplayFilter
() const
|
void
|
SetDisplayFilter
(
DISPLAYFILTER
displayFilter)
|
DISPLAYMODE
|
GetReductionMode
() const
|
void
|
SetDrawPass
(
DRAWPASS
drawPass)
|
DRAWPASS
|
GetDrawPass
() const
|
Bool
|
GetDrawStatistics
(maxon::DataDictionary &statistics) const
|
DRAWFLAGS
|
GetDrawFlags
() const
|
DISPLAYEDITSTATE
|
GetEditState
()
|
EditorWindow
*
|
GetEditorWindow
()
|
void
|
GetGridStep
(
Float
&step,
Float
&fade)
|
const
Matrix4d
&
|
GetViewMatrix
(
Int32
n)
|
Vector4d
|
ScreenToClipSpace
(const
向量
&screenCoordinates,
Int32
sampleLocation) const
|
Bool
|
IsViewOpen
(
BaseDocument
*doc)
|
void
|
OverrideCamera
(
StereoCameraInfo
*si)
|
Bool
|
PointInRange
(const
向量
&p,
Int32
x,
Int32
y,
Float
range=10.0_f) const
|
void
|
SetClipPlaneOffset
(
Float
o)
|
void
|
SetTexture
(
BaseBitmap
*bm,
Bool
tile,
DRAW_ALPHA
alphamode,
DRAW_TEXTUREFLAGS
flags)
|
DRAW_TEXTUREFLAGS
|
GetPreferredHUDTextureFlags
() const
|
Float
|
SimpleShade
(const
向量
&p, const
向量
&n)
|
Bool
|
TestBreak
()
|
构造函数 & 析构函数文档编制
◆
BaseDraw()
◆
~BaseDraw()
成员函数文档编制
◆
GetData()
Internal
.
-
警告
-
The
BaseDraw
parameters must only be accessed with
GetParameter()
/
SetParameter()
, not directly using the data container.
GetParameterData()
convenience method can be used to get parameters.
◆
SetData()
Internal
.
-
警告
-
The
BaseDraw
parameters must only be accessed with
GetParameter()
/
SetParameter()
, not directly using the data container.
GetParameterData()
convenience method can be used to get parameters.
◆
GetDataInstance()
Internal
.
-
警告
-
The
BaseDraw
parameters must only be accessed with
GetParameter()
/
SetParameter()
, not directly using the data container.
GetParameterData()
convenience method can be used to get parameters.
◆
GetParameterData()
Convenience method to get parameters.
Here is his simple implementation:
GeData
BaseDraw::GetParameterData
(
Int32
id
)
{
GeData
t_data;
BaseList2D::GetParameter
(
DescLevel
(
id
), t_data,
DESCFLAGS_GET::NONE
);
return
t_data;
}
-
参数
-
[in]
|
id
|
A parameter ID. See
dbasedraw.h
description file.
|
-
返回
-
The parameter data for
id
.
◆
Alloc()
Allocates a base draw. Destroy the allocated base draw with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
Private
.
-
注意
-
Useful for situations when there is no base draw available. It is used for instance in Mograph's Camera shader.
-
返回
-
The allocated base draw, or
nullptr
if the allocation failed.
◆
Free()
Destructs base draws allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
Private
.
-
参数
-
[in,out]
|
bd
|
The base draw to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
HasCameraLink()
Bool
HasCameraLink
|
(
|
void
|
|
)
|
|
Checks if the camera link is enabled.
-
返回
-
true
if a scene camera is used and
false
if the editor camera is used.
◆
GetSceneCamera()
Gets the current scene camera from the passed document.
-
参数
-
[in]
|
doc
|
The document to get the scene camera from. The caller owns the pointed document.
|
-
返回
-
The scene camera, or
nullptr
if no scene camera is used.
◆
SetSceneCamera()
Sets a new scene camera. If
op
is
nullptr
, the editor camera is used.
-
参数
-
[in]
|
op
|
The new camera.
|
[in]
|
animate
|
Private
.
|
◆
GetEnvironmentObject()
Gets the environment object, which is at the highest position in the scene hierarchy, visible and enabled.
-
由于
-
R19
-
返回
-
The highest environment object.
◆
GetSkyObject()
Gets the sky object, which is at the highest position in the scene hierarchy, visible and enabled.
-
由于
-
R19
-
返回
-
The highest sky object.
◆
GetBackgroundObject()
Gets the background object, which is at the highest position in the scene hierarchy, visible and enabled.
-
返回
-
The highest background object.
◆
GetForegroundObject()
Gets the foreground object, which is at the highest position in the scene hierarchy, visible and enabled.
-
返回
-
The highest foreground object.
◆
GetEditorCamera()
Gets the editor camera.
-
返回
-
The editor camera. Guaranteed to never be
nullptr
.
◆
GetXRefObjects()
Gets all X-Ref objects.
-
返回
-
An array of X-Ref objects.
◆
InitClipbox()
Used to render into a frame buffer with a different resolution than the editor view.
Private
.
-
参数
-
[in]
|
left
|
The left coordinate of the frame buffer.
|
[in]
|
top
|
The top coordinate of the frame buffer.
|
[in]
|
right
|
The right coordinate of the frame buffer.
|
[in]
|
bottom
|
The bottom coordinate of the frame buffer.
|
[in]
|
flags
|
The flag
INIT_CLIPBOX_ADJUSTGLSIZE
can be set.
|
◆
InitView()
Used to render into a frame buffer with a different resolution than the editor view.
Private
.
-
参数
-
[in]
|
camera
|
The camera's container. The caller owns the pointed container.
|
[in]
|
op_m
|
The camera's matrix.
|
[in]
|
sv
|
The frame's ratio.
|
[in]
|
pix_x
|
The frame's X size.
|
[in]
|
pix_y
|
The frame's Y size.
|
[in]
|
fitview
|
Set to
true
to fit the view.
|
◆
InitializeView()
Used after rendering into a frame buffer with a different resolution than the editor view.
Private
.
-
参数
-
[in]
|
doc
|
The view's document. The caller owns the pointed document.
|
[in]
|
cam
|
The view's camera. The caller owns the pointed camera.
|
[in]
|
editorsv
|
Set to
true
to retain the view's ratio.
|
◆
InitLegacyDrawport()
void InitLegacyDrawport
|
(
|
|
)
|
|
Must be called from an external renderer to make use of the
BaseDraw
(e.g. for drawing helper lines).
-
由于
-
R19.SP2
Private
.
◆
DrawEnd()
Private
.
-
由于
-
R19
◆
PrepareActionSelections()
static void PrepareActionSelections
|
(
|
const
BaseDocument
*
|
doc
,
|
|
|
Bool
|
withChildren
|
|
)
|
|
|
|
static
|
Private
. Prepares the selected objects for rendering (i.e. sets the BIT_ACTIVESELECTIONDRAW bit).
◆
GetObjectColor()
Gets the wireframe color in the editor for the specified object.
Some types of objects have certain colors. For polygon objects the main color is taken into account.
-
参数
-
[in]
|
bh
|
The base draw helper.The caller owns the pointed base draw helper.
|
[in]
|
op
|
The object to get the wireframe color. The caller owns the pointed object.
|
[in]
|
lines
|
若设为
true
and the object's color is set to
层
but the object is not assigned to a layer the color set for
Shaded Wireframe
被使用。
|
-
返回
-
The object color.
◆
CheckColor()
向量
CheckColor
|
(
|
const
向量
&
|
col
|
)
|
|
Makes sure that a color has at least 15% difference to the background color.
-
参数
-
[in]
|
col
|
The original color.
|
-
返回
-
The new color, adjusted if needed.
◆
SetTransparency()
void SetTransparency
|
(
|
Int32
|
trans
|
)
|
|
Sets the transparency value for the following polygons drawing. The range is 0 to 255, where 255 is 100% transparent.
Use negative values for true transparencies and positive values for 'dotted' transparencies.
-
参数
-
[in]
|
trans
|
The transparency.
|
◆
GetTransparency()
Int32
GetTransparency
|
(
|
void
|
|
)
|
const
|
Gets the current transparency value for polygons drawing. The range is 0 to 255, where 255 is 100% transparent.
Negative values are true transparencies and positive values are 'dotted' transparencies.
-
返回
-
The current transparency.
◆
SetPen()
void SetPen
|
(
|
const
向量
&
|
col
,
|
|
|
Int32
|
flags
=
0
|
|
)
|
|
|
Sets the pen color for the following drawing operations.
-
参数
-
◆
SetPointSize()
void SetPointSize
|
(
|
Float
|
pointsize
|
)
|
|
Sets the drawn point size.
-
参数
-
[in]
|
pointsize
|
The new point size.
|
◆
GetHandleSize()
Gets the point size in pixels for a
DRAWHANDLE
尺寸。
-
参数
-
-
返回
-
Point size in pixels.
◆
SetLightList()
void SetLightList
|
(
|
Int32
|
mode
|
)
|
|
Sets the lighting used by the draw functions.
-
注意
-
This method only affects the new 3D drawing methods below it, i.e.
DrawLine()
,
LineStrip()
,
DrawHandle()
,
DrawPoly()
,
DrawTexture()
,
DrawCircle()
,
DrawBox()
,
DrawPolygon()
and
DrawSphere()
.
-
参数
-
◆
ConvertColor()
向量
ConvertColor
|
(
|
const
向量
&
|
c
|
)
|
|
Converts colors from document color to viewport color profile.
-
参数
-
[in]
|
c
|
The color to convert (document).
|
-
返回
-
The converted color (viewport).
◆
ConvertColorReverse()
向量
ConvertColorReverse
|
(
|
const
向量
&
|
c
|
)
|
|
Converts colors from viewport color to document color profile.
-
参数
-
[in]
|
c
|
The color to convert (viewport).
|
-
返回
-
The converted color (document).
◆
LineZOffset()
void LineZOffset
|
(
|
Int32
|
offset
|
)
|
|
Sets the current Z buffer offset. Use this to for example draw lines over shaded polygons in front of the screen.
A higher offset value means a higher draw priority in the Z-buffer. For example:
-
shaded polygon (level 0)
-
unselected edges (level 2)
-
selected edges (level 4)
-
注意
-
This method only affects the new 3D drawing methods below it, i.e.
DrawLine()
,
LineStrip()
,
DrawHandle()
,
DrawPoly()
,
DrawTexture()
,
DrawCircle()
,
DrawBox()
,
DrawPolygon()
and
DrawSphere()
.
-
参数
-
[in]
|
offset
|
The new Z-buffer offset.
|
◆
SetDepth()
void SetDepth
|
(
|
Bool
|
enable
|
)
|
|
Enables/disables writing to the depth buffer.
Private
.
-
参数
-
[in]
|
enable
|
true
if the depth buffer should be enabled for writing, otherwise
false
.
|
◆
SetMatrix_Projection()
void SetMatrix_Projection
|
(
|
|
)
|
|
Internal
.
◆
SetMatrix_Screen()
[1/3]
void SetMatrix_Screen
|
(
|
|
)
|
|
Sets the transformation matrix to screen coordinates, i.e. from
(0, 0)
to
(width, height)
.
-
注意
-
This method only affects the new 3D drawing methods below it, i.e.
DrawLine()
,
LineStrip()
,
DrawHandle()
,
DrawPoly()
,
DrawTexture()
,
DrawCircle()
,
DrawBox()
,
DrawPolygon()
and
DrawSphere()
.
◆
SetMatrix_Screen()
[2/3]
void SetMatrix_Screen
|
(
|
Int32
|
zoffset
|
)
|
|
Sets the transformation matrix to screen coordinates, i.e. from (0, 0) to (width, height).
-
注意
-
This method only affects the new 3D drawing methods below it, i.e.
DrawLine()
,
LineStrip()
,
DrawHandle()
,
DrawPoly()
,
DrawTexture()
,
DrawCircle()
,
DrawBox()
,
DrawPolygon()
and
DrawSphere()
.
-
参数
-
[in]
|
zoffset
|
Sets the current Z buffer offset. Use this to for example draw lines over shaded polygons in front of the screen.
A higher
zoffset
value means a higher draw priority in the Z buffer. For example:
-
shaded polygon (level
0
)
-
unselected edges (level
2
)
-
selected edges (level
4
)
|
◆
SetMatrix_Screen()
[3/3]
Private
.
◆
SetMatrix_Camera()
void SetMatrix_Camera
|
(
|
|
)
|
|
Sets the transformation matrix to the camera system.
-
注意
-
This method only affects the new 3D drawing methods below it, i.e.
DrawLine()
,
LineStrip()
,
DrawHandle()
,
DrawPoly()
,
DrawTexture()
,
DrawCircle()
,
DrawBox()
,
DrawPolygon()
and
DrawSphere()
.
◆
SetMatrix_Matrix()
[1/2]
Sets the transformation matrix to the given matrix
mg
.
The transformation matrix should transform coordinates passed to the draw functions into world coordinates.
For example for an object generator with local handle vectors the global matrix, or even better the matrix returned by
BaseDrawHelp::GetMg()
, should be used.
In case of a particle system, which calculates all its particles in global space, a unit matrix can be passed because the vectors are already in global space. Basically the matrix that transforms the vectors into global space should be passed.
-
注意
-
This method only affects the new 3D drawing methods below it, i.e.
DrawLine()
,
LineStrip()
,
DrawHandle()
,
DrawPoly()
,
DrawTexture()
,
DrawCircle()
,
DrawBox()
,
DrawPolygon()
and
DrawSphere()
.
-
参数
-
[in]
|
op
|
A scene object or
nullptr
. If an object pointer is passed this is used to compare with an internal pointer to the last passed object pointer.
If the pointers differ no matrix comparison is required internally. Used for performance reasons. The caller owns the pointed object.
|
[in]
|
mg
|
The new transformation matrix.
|
◆
SetMatrix_Matrix()
[2/2]
Sets the transformation matrix to the given matrix
mg
.
The transformation matrix should transform coordinates passed to the draw functions into world coordinates.
For example for an object generator with local handle vectors the global matrix, or even better the matrix returned by
BaseDrawHelp::GetMg()
, should be used.
In case of a particle system, which calculates all its particles in global space, a unit matrix can be passed because the vectors are already in global space. Basically the matrix that transforms the vectors into global space should be passed.
-
注意
-
This method only affects the new 3D drawing methods below it, i.e.
DrawLine()
,
LineStrip()
,
DrawHandle()
,
DrawPoly()
,
DrawTexture()
,
DrawCircle()
,
DrawBox()
,
DrawPolygon()
and
DrawSphere()
.
-
参数
-
[in]
|
op
|
A scene object or
nullptr
. If an object pointer is passed this is used to compare with an internal pointer to the last passed object pointer.
If the pointers differ no matrix comparison is required internally. Used for performance reasons. The caller owns the pointed object.
|
[in]
|
mg
|
The new transformation matrix.
|
[in]
|
zoffset
|
Sets the current Z buffer offset. Use this to for example draw lines over shaded polygons in front of the screen.
A higher
zoffset
value means a higher draw priority in the Z buffer. For example:
-
shaded polygon (level
0
)
-
unselected edges (level
2
)
-
selected edges (level
4
)
|
◆
DrawPoint2D()
void DrawPoint2D
|
(
|
const
向量
&
|
p
|
)
|
|
Draws a one-pixel point in the current pen color at
p
.
-
注意
-
Changes the matrix to screen with
SetMatrix_Screen()
prior to drawing.
-
参数
-
[in]
|
p
|
A point in screen space coordinate.
|
◆
DrawLine2D()
void DrawLine2D
|
(
|
const
向量
&
|
p1
,
|
|
|
const
向量
&
|
p2
|
|
)
|
|
|
Draws a line in the current pen color between
p1
and
p2
.
-
注意
-
Changes the matrix to screen with
SetMatrix_Screen()
prior to drawing.
-
参数
-
[in]
|
p1
|
The start point of the line in screen space coordinate.
|
[in]
|
p2
|
The end point of the line in screen space coordinate.
|
◆
DrawHandle2D()
Draws a handle at
p
.
-
注意
-
Changes the matrix to screen with
SetMatrix_Screen()
prior to drawing.
-
参数
-
[in]
|
p
|
A point in screen space coordinate.
|
[in]
|
type
|
The handle type:
DRAWHANDLE
|
◆
DrawCircle2D()
Draws a circle in the current pen color with a radius of
rad
and the center at (
mx
,
my
).
-
注意
-
Changes the matrix to screen with
SetMatrix_Screen()
prior to drawing.
-
参数
-
[in]
|
mx
|
The X coordinate of the circle's center in screen space coordinate.
|
[in]
|
my
|
The Y coordinate of the circle's center in screen space coordinate.
|
[in]
|
rad
|
The circle's radius.
|
◆
DrawHandle()
Draws a handle at
vp
.
-
参数
-
◆
DrawHandleWorld()
void DrawHandleWorld
|
(
|
const
向量
&
|
vp
,
|
|
|
const
向量
&
|
col
,
|
|
|
DRAWHANDLE
|
type
|
|
)
|
|
|
Draws a handle at
vp
.
-
参数
-
[in]
|
vp
|
A point in world coordinate.
|
[in]
|
col
|
Handle color.
|
[in]
|
type
|
The handle type:
DRAWHANDLE
|
◆
DrawPointArray()
Draws an array of points with individual colors.
-
注意
-
The coordinates must be in the space defined by
SetMatrix_Screen()
,
SetMatrix_Camera()
or
SetMatrix_Matrix()
.
-
参数
-
[in]
|
cnt
|
The number of points.
|
[in]
|
vp
|
An array of point coordinates. The caller owns the pointed array.
|
[in]
|
vc
|
An array of point color elements. The caller owns the pointed array.
|
[in]
|
colcnt
|
The number of color elements, for example
3
for RGB.
|
[in]
|
vn
|
Reserved for future use. The caller owns the pointed array.
|
◆
DrawLine()
void DrawLine
|
(
|
const
向量
&
|
p1
,
|
|
|
const
向量
&
|
p2
,
|
|
|
Int32
|
flags
|
|
)
|
|
|
Draws a line in the current pen color between
p1
and
p2
.
-
参数
-
[in]
|
p1
|
The start point in world space coordinate.
|
[in]
|
p2
|
The end point in world space coordinate.
|
[in]
|
flags
|
The legacy drawing flags: LEGACY_DRAW_FLAGS,
NOCLIP_D
or
NOCLIP_Z
.
|
◆
DrawArc()
Draws an arc (section of a circle) in the current pen color at
pos
.
-
参数
-
[in]
|
pos
|
The position of the rectangle that defines the arc. The coordinate must be in screen space.
|
[in]
|
radius
|
The arc's radius.
|
[in]
|
angle_start
|
The start of the angle in radians.
|
[in]
|
angle_end
|
The end of the angle in radians.
|
[in]
|
subdiv
|
The range between
angle_start
and
angle_end
is divided into
subdiv
line segments.
|
[in]
|
flags
|
The legacy drawing flags: LEGACY_DRAW_FLAGS,
NOCLIP_D
or
NOCLIP_Z
.
|
◆
DrawPoly()
void DrawPoly
|
(
|
const
向量
*
|
vp
,
|
|
|
const
向量
*
|
vf
,
|
|
|
const
向量
*
|
vn
,
|
|
|
Int32
|
anz
,
|
|
|
Int32
|
flags
|
|
)
|
|
|
Draws a colored and shaded polygon using the points in
vp
, the colors in
vf
and the normals in
vn
.
Only triangles and quadrangles are accepted. The colors are interpolated between the points. The shading is determined by
SetLightList()
.
-
注意
-
The coordinates must be in the space defined by
SetMatrix_Screen()
,
SetMatrix_Camera()
or
SetMatrix_Matrix()
.
-
参数
-
[in]
|
vp
|
An array of point coordinates. The caller owns the pointed array.
|
[in]
|
vf
|
An array of point colors. The caller owns the pointed array.
|
[in]
|
vn
|
An array of point normals. The caller owns the pointed array.
|
[in]
|
anz
|
The number of points. Must be either
3
(for triangles) or
4
(for quadrangles).
|
[in]
|
flags
|
The legacy drawing flags: LEGACY_DRAW_FLAGS,
NOCLIP_D
or
NOCLIP_Z
.
|
◆
DrawTexture()
Draws a colored and shaded texture polygon using the points in
padr4
, the colors in
cadr
, the normals in
vnadr
and the UV coordinates in
uvadr
.
Only triangles and quadrangles are accepted. The colors are interpolated between the points and mutiplied with the texture color. The shading is determined by
SetLightList()
. The texture must live at least until the frame redraw has completed. Otherwise
DRAW_TEXTUREFLAGS::TEMPORARY
has to be set.
-
参数
-
[in]
|
bmp
|
The texture to draw. The caller owns the pointed bitmap.
|
[in]
|
padr4
|
An array of point coordinates. The coordinates must be in the space defined by
SetMatrix_Screen()
,
SetMatrix_Camera()
or
SetMatrix_Matrix()
.
|
[in]
|
cadr
|
An array of colors. Must have
4
items regardless of
pntcnt
.
|
[in]
|
vnadr
|
An array of point normals. Must have
4
items regardless of
pntcnt
.
|
[in]
|
uvadr
|
An array of UV coordinates. Must have
4
items regardless of
pntcnt
.
|
[in]
|
pntcnt
|
The number of points in
padr4
. Must be either
3
(triangle) or
4
(quadrangle).
|
[in]
|
alphamode
|
The alpha channel mode:
DRAW_ALPHA
|
[in]
|
flags
|
A combination of these flags:
DRAW_TEXTUREFLAGS
|
◆
DrawCircle()
void DrawCircle
|
(
|
const
矩阵
&
|
m
|
)
|
|
Draws an ellipse in the current pen color. The ellipse is specified by the matrix
m
,其中
m
.v1 and
m
.v2 are the axis vectors and
m
.off is the center position. (
m
.v3 is not used.)
-
参数
-
◆
DrawBox()
void DrawBox
|
(
|
const
矩阵
&
|
m
,
|
|
|
Float
|
size
,
|
|
|
const
向量
&
|
col
,
|
|
|
Bool
|
wire
|
|
)
|
|
|
Draws a box. The eight points of the box are defined as:
p[0] = m *
向量
(-size, -size, -size);
p[1] = m *
向量
( size, -size, -size);
p[2] = m *
向量
( size, -size, size);
p[3] = m *
向量
(-size, -size, size);
p[4] = m *
向量
(-size, size, -size);
p[5] = m *
向量
( size, size, -size);
p[6] = m *
向量
( size, size, size);
p[7] = m *
向量
(-size, size, size);
-
注意
-
To get arbitrary cubic forms, set size to 0.5 and multiply the vectors in the matrix by the length.
-
参数
-
◆
DrawBoundingBox()
Draws the bounding box of given
BaseObject
(op).
-
参数
-
[in]
|
op
|
BaseObject
used to extract the bounding box.
|
[in]
|
mg
|
Global Matrix for the BoundingBox (may differ from op)
|
[in]
|
bh
|
The base draw help. The caller owns the pointed base draw help..
|
[in]
|
shading
|
若
true
the shader is applied
|
[in]
|
colorOverride
|
Use specified color. If null, object color is used.
|
◆
DrawPolygon()
void DrawPolygon
|
(
|
const
向量
*
|
p
,
|
|
|
const
向量
*
|
f
,
|
|
|
Bool
|
quad
|
|
)
|
|
|
Draws a manually shaded triangle or quadrangle.
The corner points are given as an array of vectors in
p
, and the corner colors as a corresponding array of Vectors in
f
. If quad is
false
there should be
3
elements in each array, otherwise
4
. The colors are interpolated between the corners.
-
参数
-
[in]
|
p
|
An array of point coordinates. The caller owns the pointed array. The points coordinates must be in the space defined by
SetMatrix_Screen()
,
SetMatrix_Camera()
or
SetMatrix_Matrix()
.
|
[in]
|
f
|
An array of point colors. The caller owns the pointed array.
|
[in]
|
quad
|
若
true
the number of points must be
4
, otherwise it must be
3
.
|
◆
DrawSphere()
void DrawSphere
|
(
|
const
向量
&
|
off
,
|
|
|
const
向量
&
|
size
,
|
|
|
const
向量
&
|
col
,
|
|
|
Int32
|
flags
|
|
)
|
|
|
Draws a sphere at position
off
of size specified by the
size
vector in each direction and color specified by
col
.
-
参数
-
◆
DrawArrayEnd()
每个
DrawPolygon()
puts the polygon into an internal array and draws the polygons when the array is full or an OpenGL state changes (e.g. the matrix).
DrawArrayEnd()
forces this operation.
◆
DrawPolygonObject()
Draws the polygon object
op
.
-
参数
-
[in]
|
bh
|
The base draw help. The caller owns the pointed base draw help.
|
[in]
|
op
|
The polygon object to draw. The caller owns the pointed object.
|
[in]
|
flags
|
The flags:
DRAWOBJECT
|
[in]
|
parent
|
This is used for the viewport filter.
Take the Floor object for example, it displays a polygon object in the viewport. If parent is set to
nullptr
the drawn polygon is considered by the viewport filter.
If the Floor object has been passed to parent the Floor object is considered by the viewport filter instead.
|
[in]
|
col
|
The object's color.
|
-
返回
-
The result of drawing the polygon object:
DRAWRESULT
◆
DrawObject()
Draws the object
op
.
-
参数
-
[in]
|
bh
|
The base draw help. The caller owns the pointed base draw help.
|
[in]
|
op
|
The object to draw. The caller owns the pointed object.
|
[in]
|
flags
|
The flags:
DRAWOBJECT
|
[in]
|
drawpass
|
The draw pass:
DRAWPASS
|
[in]
|
parent
|
This is used for the viewport filter.
Take the Floor object for example, it displays a polygon object in the viewport. If parent is set to
nullptr
the drawn polygon is considered by the viewport filter.
If the Floor object has been passed to parent the Floor object is considered by the viewport filter instead.
|
[in]
|
col
|
The object's color.
|
-
返回
-
The result of drawing the object:
DRAWRESULT
◆
DrawAnimationPath()
◆
DrawBoxEdges()
◆
DrawHighlight()
Private
.
-
由于
-
R19
◆
DrawPostPass()
Private
.
-
由于
-
R19
◆
DrawSceneHook()
Private
.
-
由于
-
R21
◆
LineStripBegin()
Starts a new colored line strip.
Draw several line strip segments with
LineStrip()
calls and then finish the line strip with
LineStripEnd()
.
◆
LineStripEnd()
Finishes line strips started with
LineStripBegin()
.
◆
LineStrip()
void LineStrip
|
(
|
const
向量
&
|
vp
,
|
|
|
const
向量
&
|
vc
,
|
|
|
Int32
|
flags
|
|
)
|
|
|
Draws a line strip from the point
vp
of the last call to
LineStrip()
to the current
vp
. The line strip is colored with a gradient from the last
vc
to the new
vc
.
-
警告
-
This method must be enclosed between
LineStripBegin()
and
LineStripEnd()
calls.
-
参数
-
◆
InitDrawXORPolyLine()
Bool
InitDrawXORPolyLine
|
(
|
|
)
|
|
Deprecated
. Initializes the view to draw XOR poly line (set the correct projection matrices).
-
另请参阅
-
Example in
DrawXORPolyLine()
-
返回
-
true
if successful, otherwise
false
.
◆
FreeDrawXORPolyLine()
void FreeDrawXORPolyLine
|
(
|
|
)
|
|
Deprecated
. Frees drawing XOR poly line (restore the old projection matrices).
◆
DrawXORPolyLine()
Deprecated
. Draws a XOR poly line.
范例:
Int32
count = 2;
Float32
* p =
nullptr
;
points = (
Float
*)
NewMemClear
(2*count*
sizeof
(
Float
));
if
(p==
nullptr
)
return
false
;
p[2*0+0] = 0.f;
p[2*0+1] = 0.f;
p[2*1+0] = 100.f;
p[2*1+1] = 100.f;
bd->
InitDrawXORPolyLine
();
bd->
BeginDrawXORPolyLine
();
bd->
DrawXORPolyLine
(points, count);
bd->
EndDrawXORPolyLine
(
false
);
bd->
FreeDrawXORPolyLine
();
DeleteMem
(p);
-
参数
-
[in]
|
p
|
The pointer to the line points array. The format of the array is
2*cnt*sizeof(Float32)
(2 Float32 per point).
|
[in]
|
cnt
|
The number of line points.
|
◆
BeginDrawXORPolyLine()
void BeginDrawXORPolyLine
|
(
|
|
)
|
|
Deprecated
. Begins drawing an XOR poly line (sets the view's context as current context).
-
另请参阅
-
Example in
DrawXORPolyLine()
.
◆
EndDrawXORPolyLine()
void EndDrawXORPolyLine
|
(
|
Bool
|
blit
|
)
|
|
Deprecated
. Ends the drawing of a XOR poly line (makes
nullptr
the current context).
-
另请参阅
-
Example in
DrawXORPolyLine()
.
-
参数
-
[in]
|
blit
|
Set to
true
to use blitting.
|
◆
GetHighlightPassColor()
Gets the color in which the object is to draw in the highlight pass.
If the object is selected or highlighted the function returns
true
and the color is returned in
col
.
-
注意
-
This function should only be called in the highlight pass.
-
参数
-
[in]
|
bh
|
The base draw help.
|
[in]
|
lineObject
|
Must be set to
true
, if the object is a line object.
|
[in]
|
col
|
Assigned the highlight color.
|
-
返回
-
true
if the object is selected or highlighted and the color
col
is assigned.
false
if drawing the object can be skipped.
◆
InitUndo()
Call before a change is made to the view to add the old setting to the undo buffer for the view. (This undo buffer is separate from the normal undo buffer.)
-
参数
-
[in]
|
doc
|
The view's document. The caller owns the pointed document.
|
◆
DoUndo()
Performs an undo operation in the view. This is the same as the user selecting
Undo View
from within
Cinema 4D
.
-
参数
-
[in]
|
doc
|
The view's document. The caller owns the pointed document.
|
◆
SetDrawParam()
Sets draw parameters.
-
注意
-
This method only affects the new 3D drawing methods below it, i.e.
DrawLine()
,
LineStrip()
,
DrawHandle()
,
DrawPoly()
,
DrawTexture()
,
DrawCircle()
,
DrawBox()
,
DrawPolygon()
and
DrawSphere()
.
-
参数
-
[in]
|
id
|
The draw parameter ID:
DRAW_PARAMETER
|
[in]
|
data
|
The new draw parameter data to set.
|
◆
GetDrawParam()
Gets draw parameters.
-
注意
-
This method only affects the new 3D drawing methods below it, i.e.
DrawLine()
,
LineStrip()
,
DrawHandle()
,
DrawPoly()
,
DrawTexture()
,
DrawCircle()
,
DrawBox()
,
DrawPolygon()
and
DrawSphere()
.
-
参数
-
-
返回
-
The draw parameter data.
◆
AddMessageHook()
Adds a message hook to the base draw.
This hook is called when the user chooses 'Adapt View', changes the scene camera or if the base draw is deleted.
Private
.
-
参数
-
[in]
|
fn
|
The message hook.
|
◆
AddToPostPass()
Adds the object
op
to DRAWPASS::XRAY.
范例:
DRAWRESULT
MyObject::Draw(
BaseObject
* op,
DRAWPASS
drawpass,
BaseDraw
* bd,
BaseDrawHelp
* bh)
{
if
(drawpass==
DRAWPASS::OBJECT
)
{
bd->
AddToPostPass
(op, bh);
ok =
true
;
}
else
if
(drawpass==
DRAWPASS::XRAY
)
{
....
}
}
The object in this example is drawn both in the object and X-ray pass.
-
参数
-
[in]
|
op
|
The object to add to the X-ray pass. The caller owns the pointed object.
|
[in]
|
bh
|
The base draw helper. The caller owns the pointed base draw helper.
|
-
返回
-
true
if the object was successfully added to the X-ray pass, otherwise
false
.
◆
GetDisplayFilter()
Gets the current display filter.
This is a bit field derived from the BASEDRAW_DISPLAYFILTER_* description flags in
dbasedraw.h
. To set the display filter you have to use the description flags with
SetParameter()
.
-
返回
-
A bit field with the following flags:
DISPLAYFILTER
◆
SetDisplayFilter()
Sets the current display filter.
Private
.
-
参数
-
[in]
|
displayFilter
|
The new display filter.
|
◆
GetReductionMode()
Gets the reduction mode of the base draw.
-
返回
-
The reduction mode:
DISPLAYMODE
◆
SetDrawPass()
Sets the current drawpass.
-
参数
-
[in]
|
drawPass
|
The new drawpass:
DRAWPASS
|
◆
GetDrawPass()
Gets the current drawpass.
-
返回
-
The current drawpass:
DRAWPASS
◆
GetDrawStatistics()
Bool
GetDrawStatistics
|
(
|
maxon::DataDictionary &
|
statistics
|
)
|
const
|
Private
. Gets drawport geometry statistics.
-
参数
-
[out]
|
statistics
|
The container filled with the statistics: DRAW_STATISTIC
|
-
返回
-
true
if statistics were returned successfully, otherwise
false
.
◆
GetDrawFlags()
Gets the draw flags.
-
返回
-
The draw flags.
◆
GetEditState()
Gets the current edit state.
This is a bit field derived from the edit state description flags in
dbasedraw.res
. To set the display filter you have to use the description flags with
SetParameter()
.
-
返回
-
The edit state:
DISPLAYEDITSTATE
◆
GetEditorWindow()
Gets the
EditorWindow
for this base draw.
-
返回
-
The
EditorWindow
.
Cinema 4D
owns the pointed
EditorWindow
.
◆
GetGridStep()
Gets the grid spacing and the transparency value of the minor grid that fade when the user zoom in or out with dynamic grid.
-
参数
-
[out]
|
step
|
Is assigned the workplane grid spacing.
|
[out]
|
fade
|
Is assigned the transparency value of the minor grid.
|
◆
GetViewMatrix()
Gets the view matrix.
-
参数
-
-
返回
-
The view matrix.
◆
ScreenToClipSpace()
Vector4d
ScreenToClipSpace
|
(
|
const
向量
&
|
screenCoordinates
,
|
|
|
Int32
|
sampleLocation
|
|
)
|
|
const
|
Transforms screen space coordinates to clip space. The screen origin is in the upper left corner, the origin of the clip space is in the lower left corner.
-
参数
-
[in]
|
screenCoordinates
|
Coordinates in screen space.
|
-
返回
-
The transformed vector in clip space.
◆
IsViewOpen()
Checks if a view is open. A view is open if it is anywhere in the layout, i.e. even if it is hidden as a tab or behind another window.
-
参数
-
[in]
|
doc
|
The document for the operation. The caller owns the pointed document.
|
-
返回
-
true
if a view is open, otherwise
false
.
◆
OverrideCamera()
Changes the stereoscopic camera data for this view.
-
参数
-
[in]
|
si
|
The stereoscopic camera data to set. The caller owns the pointed
StereoCameraInfo
.
|
◆
PointInRange()
Checks if the screen point (
x
,
y
) is within a hit range of the world point
p
, i.e. if the screen point is close to the world points projection on the screen.
-
参数
-
[in]
|
p
|
A point in world space.
|
[in]
|
x
|
A screen X coordinate.
|
[in]
|
y
|
A screen Y coordinate.
|
[in]
|
range
|
Range in screen space.
|
-
返回
-
true
if the point is within range, otherwise
false
.
◆
SetClipPlaneOffset()
void SetClipPlaneOffset
|
(
|
Float
|
o
|
)
|
|
Offsets the OpenGL clipping planes by this offset.
-
参数
-
◆
SetTexture()
Sets a texture used by the vertex buffer.
-
参数
-
[in]
|
bm
|
The texture's bitmap. The caller owns the pointed bitmap.
|
[in]
|
tile
|
Set to
true
to enable tiling.
|
[in]
|
alphamode
|
The alpha channel mode:
DRAW_ALPHA
|
[in]
|
flags
|
The draw texture flags:
DRAW_TEXTUREFLAGS
|
◆
GetPreferredHUDTextureFlags()
Gets the preferred texture flags for HUD drawing.
-
返回
-
The preferred texture flags for HUD drawing.
◆
SimpleShade()
Float
SimpleShade
|
(
|
const
向量
&
|
p
,
|
|
|
const
向量
&
|
n
|
|
)
|
|
|
A quick shading algorithm that only takes the angle to the camera and a default light into account.
A point and a normal in world space are passed and an intensity is returned.
-
注意
-
Can be combined with
DrawPolygon()
to draw simple shaded polygons.
-
参数
-
[in]
|
p
|
A point in world space.
|
[in]
|
n
|
A normal in world space.
|
-
返回
-
The intensity of the light. Between
0
and
1
.
◆
TestBreak()
Checks for thread breaks in the draw.
-
返回
-
true
if a stopping condition has occurred, otherwise
false
.
◆
IsOpenGL()
Extended OpenGL mode. This mode is not documented. See
c4d_gl.h
for definitions.
◆
IsEnhancedOpenGL()
Bool
IsEnhancedOpenGL
|
(
|
|
)
|
const
|
Extended OpenGL mode. This mode is not documented. See
c4d_gl.h
for definitions.
◆
GetFrameScreen()
Extended OpenGL mode. This mode is not documented. See
c4d_gl.h
for definitions.
-
返回
-
-2
: no OpenGL window,
-1
: off-screen view,
0
: system error,
1
: success.
◆
DrawHUDText()
Draws text into the 2D viewport in the style of the HUD.
-
由于
-
R18
-
参数
-
[in]
|
x
|
The left X coordinate to draw the text at.
|
[in]
|
y
|
The upper Y coordinate to draw the text at.
|
[in]
|
txt
|
The text to draw.
|
◆
DrawMultipleHUDText()
Draws many HUD text entries at once.
-
由于
-
R18
-
参数
-
[in]
|
texts
|
The array of text entries and their screen space positions to draw to the HUD.
|
◆
SetRedrawHelper()
void SetRedrawHelper
|
(
|
const maxon::DrawportRedrawHelperRef &
|
redrawHelper
|
)
|
|
Sets the redraw helper that is used for all draw operations.
-
参数
-
[in]
|
redrawHelper
|
The redraw helper.
|
◆
GetRedrawHelper()
const maxon::DrawportRedrawHelperRef& GetRedrawHelper
|
(
|
|
)
|
const
|
Gets the redraw helper that is used for all draw operations.
-
返回
-
The redraw helper.
◆
GetEditorLights()
Gets the editor lights.
-
返回
-
An array of editor lights.
◆
IsMarkedAsGPURenderer()
Bool
IsMarkedAsGPURenderer
|
(
|
|
)
|
|
Checks if the view is marked as GPU Renderer.
-
由于
-
R19
-
返回
-
true
if the view is marked to run the GPU Renderer, otherwise
false
.
◆
IsGPURenderer()
Checks if the view is running the GPU Renderer.
-
由于
-
R19
-
返回
-
true
if the view is running the GPU renderer, otherwise
false
.
◆
IsMarkedAsCPURenderer()
Bool
IsMarkedAsCPURenderer
|
(
|
|
)
|
|
Returns true if the basedraw is marked as the CPU Renderer.
-
由于
-
R21
-
返回
-
true
if The basedraw is marked to run the CPU Renderer., otherwise
false
.
◆
IsCPURenderer()
Returns true if the basedraw is running the CPU Renderer.
-
由于
-
R21
-
返回
-
true
if The basedraw is running the CPU renderer., otherwise
false
.
◆
SetViewportRender()
Private
.
-
由于
-
R19
◆
FrameFinished()
Private
.
-
由于
-
R19
◆
GetViewportRender()
void GetViewportRender
|
(
|
maxon::ViewportRenderRef &
|
viewportRender
,
|
|
|
Bool
|
draw
|
|
)
|
|
const
|
Private
.
-
由于
-
R19
◆
GetDrawport()
void GetDrawport
|
(
|
maxon::DrawportRef &
|
drawport
|
)
|
const
|
Gets the underlying drawport.
-
参数
-
[out]
|
drawport
|
The drawport.
|
◆
GetDrawportContext()
void GetDrawportContext
|
(
|
maxon::DrawportContextRef &
|
context
|
)
|
const
|
Gets the underlying drawport context.
-
参数
-
[out]
|
context
|
The context.
|
◆
GetViewportImage()
void GetViewportImage
|
(
|
maxon::ImageRef &
|
viewportImage
|
)
|
const
|
Gets the color framebuffer.
-
参数
-
[in]
|
viewportImage
|
The image to write to.
|
◆
RenderViewportWithoutPostEffects()
void RenderViewportWithoutPostEffects
|
(
|
maxon::ImageRef &
|
image
|
)
|
const
|
Renders the viewport to a 32 bit ImageRef without post effects.
-
参数
-
[in]
|
image
|
The image to write to.
|
#define NewMemClear(T, cnt)
定义:
defaultallocator.h:205
void EndDrawXORPolyLine(Bool blit)
定义:
c4d_basedraw.h:1450
Bool InitDrawXORPolyLine()
定义:
c4d_basedraw.h:1398
maxon::Float Float
定义:
ge_sys_math.h:64
Bool AddToPostPass(BaseObject *op, BaseDrawHelp *bh)
定义:
c4d_basedraw.h:1581
maxon::Float32 Float32
定义:
ge_sys_math.h:66
void FreeDrawXORPolyLine()
定义:
c4d_basedraw.h:1405
GeData GetParameterData(Int32 id)
DRAWPASS
定义:
ge_prepass.h:3258
DRAWRESULT
定义:
ge_prepass.h:4097
Represents a level within a DescID.
定义:
lib_description.h:286
void DeleteMem(T *&p)
定义:
defaultallocator.h:258
maxon::Int32 Int32
定义:
ge_sys_math.h:58
void DrawXORPolyLine(const Float32 *p, Int32 cnt)
定义:
c4d_basedraw.h:1435
void BeginDrawXORPolyLine()
定义:
c4d_basedraw.h:1442
maxon::Vec3< maxon::Float64, 1 > Vector
定义:
ge_math.h:145
Bool GetParameter(const DescID &id, GeData &t_data, DESCFLAGS_GET flags)