内容表

关于

A BaseView object represents a viewport window. Such a BaseView can be obtained from the active BaseDocument to get information on the viewport window. The class BaseDraw is based on BaseView . It can be used to draw something in a viewport window via a "Draw" function.

警告
It is only allowed to draw into the viewport inside a "Draw" function. See Draw Manual .

Access

The BaseDraw windows used to display the active BaseDocument can be accessed with:

BaseDocument Editor Windows .

Such a BaseDraw can be used to access the scene camera.

// This example accesses the active BaseDraw to get its camera. // Then it moves the active object into the view of that camera.
BaseDraw * const baseDraw = doc-> GetActiveBaseDraw (); if (baseDraw == nullptr ) return maxon::IllegalArgumentError( MAXON_SOURCE_LOCATION ); BaseObject * const cameraObject = baseDraw-> GetEditorCamera ();

// move active object into the camera view const 矩阵 cameraMatrix = cameraObject-> GetMg (); 矩阵 targetPosition = activeObject-> GetMg (); targetPosition. off = cameraMatrix. off + (900.0 * cameraMatrix. sqmat . v3 ); activeObject-> SetMg (targetPosition);

更新

The viewport windows are redrawn if something in the active document changed:

另请参阅 Core Messages Manual and Cinema 4D Threads Manual .

特性

The parameters of a given BaseDraw are accessed as usual with C4DAtom::GetParameter() and C4DAtom::SetParameter() . The parameter IDs are defined in dbasedraw.h

// This example enables the display of polygon normals. baseDraw-> SetParameter ( BASEDRAW_DATA_SHOWNORMALS , true , DESCFLAGS_SET::NONE ); baseDraw-> SetParameter ( BASEDRAW_DATA_SELECTED_NORMALS , false , DESCFLAGS_SET::NONE );

// scale normal size const Float oldScale = baseDraw-> GetParameterData ( BASEDRAW_DATA_NORMALS_SCALE ). GetFloat (); const Float newScale = oldScale * 2.0; baseDraw-> SetParameter ( BASEDRAW_DATA_NORMALS_SCALE , newScale, DESCFLAGS_SET::NONE );

// This example changes the projection type and display mode. const DescID projectionID { BASEDRAW_DATA_PROJECTION }; const Int32 projectionType = BASEDRAW_PROJECTION_FRONT ; baseDraw-> SetParameter (projectionID, projectionType, DESCFLAGS_SET::NONE ); const DescID displayID { BASEDRAW_DATA_SDISPLAYACTIVE }; const Int32 displayType = BASEDRAW_SDISPLAY_HIDDENLINE ; baseDraw-> SetParameter (displayID, displayType, DESCFLAGS_SET::NONE );

A BaseDraw defines also certain display filters that decide what element types are displayed in the viewport windows.

注意
To edit the filter settings use the parameters defined in dbasedraw.h
// This example checks if the given BaseObject is visible in the active editor view. BaseDraw * const bd = doc-> GetActiveBaseDraw (); if (bd == nullptr ) return maxon::UnexpectedError( MAXON_SOURCE_LOCATION ); const DISPLAYFILTER filter = bd-> GetDisplayFilter (); const Bool displayFilter = CheckDisplayFilter ( object , filter);

// check editor visibility const Bool editorVisibiliy = CheckEditorVisibility ( object );

// check if the object is visible in the viewport if (displayFilter && editorVisibiliy) { ApplicationOutput ( "The object is visible in the Editor" _s); } else { ApplicationOutput ( "The object is not visible in the Editor" _s); }

// This example switches the filter setting // of the SDS filter. const DISPLAYFILTER filter = baseDraw-> GetDisplayFilter ();

// switch filter for SDS if (filter & DISPLAYFILTER::HYPERNURBS ) baseDraw-> SetParameter ( BASEDRAW_DISPLAYFILTER_HYPERNURBS , false , DESCFLAGS_SET::NONE ); else baseDraw-> SetParameter ( BASEDRAW_DISPLAYFILTER_HYPERNURBS , true , DESCFLAGS_SET::NONE );

旋转

A viewport window with planar projection can be rotated:

// This example restores the rotation of all editor windows. const Int32 count = doc-> GetBaseDrawCount (); for ( Int32 i = 0; i < count; ++i) { BaseDraw * const baseDraw = doc-> GetBaseDraw (i); if (baseDraw == nullptr ) return maxon::UnexpectedError( MAXON_SOURCE_LOCATION ); baseDraw-> InitUndo (doc); baseDraw-> SetPlanarRotation (0.0f); }

Camera

A viewport window with a perspective projection displays the scene from the point of view of a camera. This camera is defined using an object. This can be a scene camera, a scene object or the editor camera.

另请参阅 CameraObject Manual .

// This example accesses or sets the scene camera.

// get the BaseDraw BaseDraw * const bd = doc-> GetActiveBaseDraw (); if (bd == nullptr ) return maxon::UnexpectedError( MAXON_SOURCE_LOCATION );

// check if a scene camera is used if (bd-> HasCameraLink ()) { // get scene camera and print the name BaseObject * const cam = bd-> GetSceneCamera (doc); if (cam != nullptr ) ApplicationOutput ( "Camera Object: " + cam-> GetName ()); } else { // create a new camera object BaseObject * const camera = BaseObject::Alloc ( Ocamera ); if (camera == nullptr ) return maxon::OutOfMemoryError( MAXON_SOURCE_LOCATION ); doc-> InsertObject (camera, nullptr , nullptr );

// use this camera as the scene camera bd-> SetSceneCamera (camera); }

Scene Elements

The viewport also displays a background and some global light settings. Both the background and the global seetings are defines using scene elements.

// This example accesses the sky object and // environment object from the given BaseDraw. BaseObject * const envObject = baseDraw-> GetEnvironmentObject (); if (envObject) { GeData data; envObject-> GetParameter ( ENVIRONMENT_AMBIENT , data, DESCFLAGS_GET::NONE ); const 向量 color = data. GetVector (); ApplicationOutput ( "Environment Color: " + String::VectorToString (color)); }

// check the used sky object BaseObject * const skyObject = baseDraw-> GetSkyObject (); if (skyObject) { BaseTag * const tag = skyObject-> GetTag ( Ttexture ); if (tag) { GeData data; tag-> GetParameter ( TEXTURETAG_MATERIAL , data, DESCFLAGS_GET::NONE ); C4DAtom * const atom = data. GetLinkAtom (doc); BaseList2D * const material = static_cast< BaseList2D * > (atom); if (material) ApplicationOutput ( "Material on Sky: " + material-> GetName ()); } }

GPU Renderer

The GPU renderer of Cinema 4D can render inside a given BaseDraw window.

// This example checks if the given BaseDraw is marked as // a GPU render view and is currently using the GPU renderer.

if (baseDraw-> IsMarkedAsGPURenderer ()) { if (baseDraw-> IsGPURenderer ()) { ApplicationOutput ( "BaseDraw is rendering using the GPU renderer." ); } }

Drawing

Inside a "Draw" function one can use the following functions to draw into the viewport windows. See Draw Manual .

警告
It is not allowed to draw in any other context.

While drawing one should check if the drawing thread has been aborted:

// This example tests if the current drawing operation should be aborted. Bool Draw( BaseSceneHook * node, BaseDocument * doc, BaseDraw * bd, BaseDrawHelp * bh, BaseThread * bt, SCENEHOOKDRAW flags) { iferr_scope_handler { err.DiagOutput(); err.DbgStop(); return false ; };

// check if all pointers are valid if (node == nullptr || doc == nullptr || bd == nullptr || bh == nullptr ) iferr_throw (maxon::NullptrError( MAXON_SOURCE_LOCATION ));

// check if the drawing operation should be aborted if (bd-> TestBreak ()) return true ;

Drawing Pass

The viewport is drawn in several passes. One should check if the drawing operation is needed in the current pass. This is especially important for ObjectData::Draw() .

参数

Several parameters configure the drawing operations that follow.

The parameters are:

注意
At the end of the drawing operation these parameters have to be restored.
// This example changes the line width, draws a line and resets the old value.

// store and set line width const GeData oldLineWidth = bd-> GetDrawParam ( DRAW_PARAMETER_LINEWIDTH ); bd-> SetDrawParam ( DRAW_PARAMETER_LINEWIDTH , GeData { 3.0 });

// draw lines bd-> SetPen ( 向量 { 1.0, 0.0, 0.0 }); bd-> DrawLine ( 向量 { 0, 0, 0 }, 向量 { 100, 100, 0 }, NOCLIP_D );

// reset parameter bd-> SetDrawParam ( DRAW_PARAMETER_LINEWIDTH , oldLineWidth);

设置

The draw settings configure the drawing operations that follow.

注意
The color used with BaseDraw::SetPen() may be obtained with GetViewColor() . See also Colors .
// This example draws some points with random color and size. bd-> SetMatrix_Matrix ( nullptr , 矩阵 (), 6); Random rnd; for ( Int32 i = 0; i < 100; ++i) { // set random color const Float r = rnd. Get01 (); const Float g = rnd. Get01 (); const Float b = rnd. Get01 (); const 向量 color { r, g, b }; bd-> SetPen (color);

// set random size const Float size = rnd. Get01 () * 10.0; bd-> SetPointSize (size);

// draw point with custom size const 向量 pos { i* 10.0, 0.0, 0.0 }; bd-> DrawHandle (pos, DRAWHANDLE::CUSTOM , 0); }

The light list defines what lights should influence the shading on 3D drawing operations. Typically used to disable lights.

Transparency settings for polygon drawing are defined with:

另请参阅 DRAW_PARAMETER_ALPHA_THRESHOLD above.

矩阵

A drawing operation may be performed in screen, camera or world space. Before any drawing operation the operation space must be defined.

// This example draws some points in various spaces.

// draw something in screen space const 向量 screenPos { 100, 100.0, 0.0 }; bd-> SetMatrix_Screen (); bd-> DrawHandle (screenPos, DRAWHANDLE::BIG , 0);

// draw something in camera space const 向量 camPos { 0.0 }; // center of non-perspective camera bd-> SetMatrix_Camera (); bd-> DrawHandle (camPos, DRAWHANDLE::BIG , 0);

// draw something in world space const 向量 worldPos { 100.0, 100.0, 100.0 }; bd-> SetMatrix_Matrix ( nullptr , 矩阵 ()); bd-> DrawHandle (worldPos, DRAWHANDLE::BIG , 0);

2D Drawing Operations

These functions perform drawing operations in 2D space:

注意
To calculate screen space coordinates see Transformation .
// This example draws a 2D line, circle and point. bd-> SetMatrix_Screen (); const 向量 center { 100, 100, 0 }; const 向量 tangentPoint { 150, 100, 0 };

// draw line and circle bd-> SetPen ( 向量 (0.8)); bd-> DrawLine2D (center, tangentPoint); bd-> DrawCircle2D (( Int32 )center. x , ( Int32 )center. y , tangentPoint.x - center. x );

// draw point bd-> SetPen ( 向量 (1.0)); bd-> DrawPoint2D (center);

Text can easily be drawn with:

注意
These functions are typically used with a scene hook.
// This example draws two text boxes in the viewport in a scene hook. const DRAWPASS pass = bd-> GetDrawPass ();

// check if the current pass is the object pass with inverted highlight flag if ((flags& SCENEHOOKDRAW::HIGHLIGHT_PASS_INV ) && pass == DRAWPASS::OBJECT ) { bd-> SetTransparency (0); maxon::BaseArray<HUDTextEntry> hudEntries; HUDTextEntry entryA; entryA. _txt = "This is the first entry" ; entryA. _position = 向量 { 200, 220, 0 }; hudEntries. Append (entryA) iferr_return ; HUDTextEntry entryB; entryB. _txt = "This is the second entry" ; entryB. _position = 向量 { 200, 260, 0 }; hudEntries. Append (entryB) iferr_return ; bd-> DrawMultipleHUDText (hudEntries); }

General Drawing Operations

Depending on the current transformation matrix these operations can draw in 2D or 3D space.

The z-buffer is configured with:

These clipping flags used with 3D drawing operations:

The drawing operations are:

// This example fills a GeClipMap. // The internal BaseBitmap is used to draw the content to the screen. AutoAlloc<GeClipMap> clipMap; if (clipMap) { clipMap-> Init (100, 50, 32); clipMap-> BeginDraw (); // fill background clipMap-> SetColor (255, 0, 0, 64); clipMap-> FillRect (0, 0, 100, 50); // draw text clipMap-> SetColor (0, 0, 0, 255); clipMap-> TextAt (0, 11, "Hello World" ); clipMap-> EndDraw (); const BaseBitmap * const bitmap = clipMap-> GetBitmap (); if (bitmap) { // draw texture in screen space bd-> SetMatrix_Screen (); const DRAW_ALPHA alpha = DRAW_ALPHA::FROM_IMAGE ; const DRAW_TEXTUREFLAGS texture = DRAW_TEXTUREFLAGS::NONE ; bd-> DrawTexture (bitmap, positions.GetFirst(), colors.GetFirst(), normals.GetFirst(), uvcoords.GetFirst(), 4, alpha, texture); } }

每个 BaseDraw::DrawPolygon() puts the polygon into an internal array. The drawing of this array can be triggered with:

A simple shading value is often used with BaseDraw::DrawPoly() and BaseDraw::DrawPolygon() :

// This example shades four vertices and uses the // calculated colors with BaseDraw::DrawPolygon().

// base color const 向量 color { 1.0, 0.0, 0.0 };

// calculate shades colors[0] = color * bd-> SimpleShade (vertice[0], normals[0]); colors[1] = color * bd-> SimpleShade (vertice[1], normals[1]); colors[2] = color * bd-> SimpleShade (vertice[2], normals[2]); colors[3] = color * bd-> SimpleShade (vertice[3], normals[3]);

// draw in object space const 矩阵 & mg = bh-> GetMg (); bd-> SetMatrix_Matrix (op, mg);

// no additional shading bd-> SetLightList ( BDRAW_SETLIGHTLIST_NOLIGHTS );

// set transparency bd-> SetTransparency (128);

// draw polygon bd-> DrawPolygon (vertice, colors, true );

对象

Complete polygon objects can be drawn with:

// This example re-draws the currently active polygon object in a ObjectData::Draw() function. BaseDocument * const doc = bd-> GetDocument ();

// check if the current pass is the object pass const Bool docSet = doc != nullptr ; const Bool isObjectPass = drawpass == DRAWPASS::OBJECT ; if (docSet && isObjectPass) { // get the active object BaseObject * const activeObject = doc-> GetActiveObject ();

// check if the active object is not the host object itself // and if it is a polygon object const Bool activeObjectSet = activeObject != nullptr ; const Bool activeObjectIsNotOp = activeObject != op; if (activeObjectSet && activeObjectIsNotOp) { if (activeObject-> IsInstanceOf ( Opolygon )) { // draw the object bd-> SetMatrix_Matrix ( nullptr , 矩阵 ()); bd-> DrawObject (bh, activeObject, DRAWOBJECT::NONE , drawpass, nullptr ); return DRAWRESULT::OK ; } } }

Line Strip

The line strip functions allow to easily draw line paths:

// This example draws a random path composed of several lines. Random randomGen;

// start position 向量 pos(0);

// init const GeData oldLineWidth = bd-> GetDrawParam ( DRAW_PARAMETER_LINEWIDTH ); bd-> SetDrawParam ( DRAW_PARAMETER_LINEWIDTH , GeData { 4.0 }); bd-> SetMatrix_Matrix ( nullptr , 矩阵 ());

// draw random lines bd-> LineStripBegin (); for ( Int32 i = 0; i < 100; ++i) { // get random color const Float r = randomGen. Get01 (); const Float g = randomGen. Get01 (); const Float b = randomGen. Get01 (); const 向量 color { r, g, b }; bd-> LineStrip (pos, color, NOCLIP_Z );

// apply random offset const Float x = randomGen. Get01 () * 100; const Float y = randomGen. Get01 () * 100; const Float z = randomGen. Get01 () * 100; pos += 向量 (x, y, z); } bd-> LineStripEnd ();

// reset parameter bd-> SetDrawParam ( DRAW_PARAMETER_LINEWIDTH , oldLineWidth);

XOR Lines

XOR lines are used with selection tools in the viewport. Typically one should use the LassoSelection class instead.

警告
These functions have been marked as deprecated.

另请参阅 EditorWindow::DrawXORLine() .

// This example draws a XOR line in ToolData::MouseInput().

// check if the view can be initialized if (bd-> InitDrawXORPolyLine ()) { bd-> BeginDrawXORPolyLine (); bd-> DrawXORPolyLine (point, 2); bd-> EndDrawXORPolyLine ( true ); bd-> FreeDrawXORPolyLine (); const DRAWFLAGS flags = DRAWFLAGS::NO_THREAD | DRAWFLAGS::INMOVE | DRAWFLAGS::ONLY_ACTIVE_VIEW | DRAWFLAGS::NO_ANIMATION ; DrawViews (flags, bd); } else { win-> DrawXORLine (( Int32 )point[0], ( Int32 )point[1], ( Int32 )point[2], ( Int32 )point[3]); }

Colors

Colors can be obtained and converted with:

// This example gets the object color for the object itself in ObjectData::Draw(). // This color is then used to draw a circle. const 向量 color = bd-> GetObjectColor (bh, op); bd-> SetPen (color); bd-> SetMatrix_Matrix ( nullptr , 矩阵 ()); 矩阵 circleSettings = bh-> GetMg (); circleSettings. sqmat . v1 *= 200.0; circleSettings. sqmat . v2 *= 200.0; circleSettings. sqmat . v3 *= 200.0; bd-> DrawCircle (circleSettings);

Frame

The dimensions of a viewport window are accessed with:

// This example prints the frame size of the given BaseDraw. // PrintFrameSize() is a custom utility function. Int32 cl, ct, cr, cb;

// frame size baseDraw-> GetFrame (&cl, &ct, &cr, &cb); PrintFrameSize(cl, ct, cr, cb);

// safe frame baseDraw-> GetSafeFrame (&cl, &ct, &cr, &cb); PrintFrameSize(cl, ct, cr, cb);

Stereo

These functions get and change the stereo settings for the given viewport window:

Projection

A viewport window can display the scene using orthogonal or perspective projection:

Transformation

The following functions allow to transform a given point between world, screen and camera space:

// This example draws a circle around the position of the active object. const BaseObject * const object = doc-> GetActiveObject (); if ( object ) { const 向量 worldSpacePos = object ->GetMg().off; const 向量 screenSpacePos = bd-> WS (worldSpacePos); bd-> DrawCircle2D (( Int32 )screenSpacePos. x , ( Int32 )screenSpacePos. y , 100); }

// This example picks an object in the viewport within a ToolData:MouseInput() function. // The distance of the picked object is obtained from the C4DObjectList and used // with BaseView::SW() to get the world space position. const Int32 xpos = ( Int32 )x; const Int32 ypos = ( Int32 )y; Matrix4d64 m; const Bool res = ViewportSelect::PickObject (bd, doc, xpos, ypos, 1, VIEWPORT_PICK_FLAGS::NONE , nullptr , list, &m); if (res && (list->GetCount() > 0)) { const Float distance = list->GetZ(0); const 向量 worldSpacePos = bd-> SW ( 向量 (x, y, distance)); ApplicationOutput ( "World Space Hit Point: " + String::VectorToString (worldSpacePos)); }

Also sizes can be transformed:

These 3D projection functions are typically used to handle mouse input in tools:

// This example moves an object on the base plane in a ToolData::MouseInput() function. Int32 err = 0; const 向量 pos = bd-> ProjectPointOnPlane ( 向量 (0), 向量 (0, 1, 0), positionX, positionY, &err); if (err == 0) { // place object 矩阵 mg = object ->GetMg(); mg. off = pos; object ->SetMg(mg);

// update managers and viewport GeSyncMessage ( EVMSG_ASYNCEDITORMOVE , 0, 0, 0); DrawViews ( DRAWFLAGS::ONLY_ACTIVE_VIEW | DRAWFLAGS::NO_THREAD | DRAWFLAGS::NO_ANIMATION ); }

Testing and Clipping

The following tests can be performed:

// This example draws a 2D circle for each point of the given polygon object. // The object is only handled if its bounding box is visible in the viewport. // A circle is only drawn if the point is inside the viewport window.

// get polygon object properties const 矩阵 mg = polyObject-> GetMg (); const 向量 bbox = polyObject-> GetMp (); const 向量 rad = polyObject-> GetRad ();

// test if the poly object is visible at all if (bd-> TestClipping3D (bbox, rad, mg, nullptr , nullptr )) { // set pen color 向量 color(0.6, 0.6, 0.6); color = bd-> CheckColor (color); bd-> SetPen (color);

// points const 向量 * const points = polyObject-> GetPointR (); const Int32 pointCount = polyObject-> GetPointCount ();

// get each point for ( Int32 i = 0; i < pointCount; ++i) { const 向量 point = mg * points[i]; const 向量 screenSpacePos = bd-> WS (point);

// check each point if (bd-> TestPoint (screenSpacePos. x , screenSpacePos. y )) { // draw circle for each point bd-> DrawCircle2D ( SAFEINT32 (screenSpacePos. x ), SAFEINT32 (screenSpacePos. y ), 10.0f); } } }

A given line define by two points can be clipped:

A view can use near- and far-clipping:

Undo

A BaseDraw has its own undo buffer that stores changes:

// This example restores the rotation of all editor windows. const Int32 count = doc-> GetBaseDrawCount (); for ( Int32 i = 0; i < count; ++i) { BaseDraw * const baseDraw = doc-> GetBaseDraw (i); if (baseDraw == nullptr ) return maxon::UnexpectedError( MAXON_SOURCE_LOCATION ); baseDraw-> InitUndo (doc); baseDraw-> SetPlanarRotation (0.0f); }

杂项

Further functions are:

// This example accesses the Drawport statistics of the given BaseDraw // and prints them to the console window.

// get draw statistics maxon::DataDictionary stats; if (!baseDraw-> GetDrawStatistics (stats)) return maxon::UnexpectedError( MAXON_SOURCE_LOCATION ); for ( const auto & data : stats) { const maxon::Data key = data.first.GetCopy() iferr_return ; const maxon::Data value = data.second.GetCopy() iferr_return ; const maxon::DataType type = value. GetType (); ApplicationOutput ( "Key: @, Value: @ (@)" , key, value, type); }

BaseDrawHelp

BaseDrawHelp is a utility class that contains useful information. It is mostly used in the context of ObjectData::Draw() . An instance is typically handed over as an argument but can also be created on demand:

The BaseDrawHelp object provides access to these properties:

Information on the BaseObject that is supposed to be drawn:

A BaseObject may be drawn with a specific display mode as defined in Tdisplay.h .

// This example draws a given polygon object using a BaseDrawHelp in ObjectData::Draw().

// allocate BaseDrawHelp BaseDrawHelp * bhelp = BaseDrawHelp::Alloc (bd, bh-> GetDocument ()); if (bhelp == nullptr ) return DRAWRESULT::FAILURE ;

// get the current display options BaseContainer displayOptions = bh-> GetDisplay ();

// set mode to "Wire" displayOptions. SetInt32 ( DISPLAYTAG_SDISPLAYMODE , ( Int32 ) DISPLAYMODE::WIRE );

// set display options bhelp-> SetDisplay (&displayOptions);

// get Matrix from original BaseDrawHelp object const 矩阵 originalMatrix = bh-> GetMg (); bhelp-> SetMg (originalMatrix);

// draw an object const DRAWOBJECT flags = DRAWOBJECT::USE_CUSTOM_COLOR | DRAWOBJECT::XRAY_OFF | DRAWOBJECT::NO_EOGL ; bd-> DrawObject (bhelp, object , flags, DRAWPASS::OBJECT , nullptr , 向量 (1.0, 0, 0));

// free BaseDrawHelp BaseDrawHelp::Free (bhelp);

延伸阅读

VIEWPORT_PICK_FLAGS::NONE
@ NONE
None.
BASEDRAW_DATA_PROJECTION
@ BASEDRAW_DATA_PROJECTION
定义: dbasedraw.h:40
Opolygon
#define Opolygon
Polygon - PolygonObject.
定义: ge_prepass.h:975
BaseDraw::SetMatrix_Camera
void SetMatrix_Camera()
定义: c4d_basedraw.h:1089
BaseDraw::DrawPoint2D
void DrawPoint2D(const Vector &p)
定义: c4d_basedraw.h:1144
BASEDRAW_SDISPLAY_HIDDENLINE
@ BASEDRAW_SDISPLAY_HIDDENLINE
定义: dbasedraw.h:221
BaseList2D
定义: c4d_baselist.h:2144
BaseView::SW
Vector SW(const Vector &p) const
定义: c4d_basedraw.h:417
GeData::GetLinkAtom
C4DAtomGoal * GetLinkAtom(const BaseDocument *doc, Int32 instanceof=0) const
BASEDRAW_DATA_SDISPLAYACTIVE
@ BASEDRAW_DATA_SDISPLAYACTIVE
定义: dbasedraw.h:26
BaseDocument::InsertObject
void InsertObject(BaseObject *op, BaseObject *parent, BaseObject *pred, Bool checknames=false)
BaseDraw::GetDrawParam
GeData GetDrawParam(Int32 id) const
定义: c4d_basedraw.h:1505
BaseDraw::GetDrawStatistics
Bool GetDrawStatistics(maxon::DataDictionary &statistics) const
定义: c4d_basedraw.h:1621
BaseDraw::IsGPURenderer
Bool IsGPURenderer()
定义: c4d_basedraw.h:1800
GeClipMap::Init
IMAGERESULT Init(Int32 w, Int32 h, Int32 bits)
BASEDRAW_DATA_NORMALS_SCALE
@ BASEDRAW_DATA_NORMALS_SCALE
定义: dbasedraw.h:69
BaseDraw::LineStripEnd
void LineStripEnd()
Finishes line strips started with LineStripBegin().
定义: c4d_basedraw.h:1376
maxon::SqrMat3::v3
V v3
The Z axis.
定义: matrix.h:31
矩阵
maxon::Mat3< maxon::Vector64 > Matrix
定义: ge_math.h:167
CheckDisplayFilter
Bool CheckDisplayFilter(BaseObject *op, DISPLAYFILTER filter)
maxon::Vec2::y
T y
定义: vec2.h:32
BaseDrawHelp
定义: c4d_basedraw.h:39
BaseDraw::GetEnvironmentObject
BaseObject * GetEnvironmentObject() const
定义: c4d_basedraw.h:843
CheckEditorVisibility
Bool CheckEditorVisibility(BaseObject *op)
BaseView::GetFrame
void GetFrame(Int32 *cl, Int32 *ct, Int32 *cr, Int32 *cb)
DRAWFLAGS::NO_THREAD
@ NO_THREAD
Synchronous call.
iferr_throw
#define iferr_throw(ERR)
定义: resultbase.h:1497
DRAW_ALPHA::FROM_IMAGE
@ FROM_IMAGE
Generates the alpha channel from the RGB image information.
TEXTURETAG_MATERIAL
@ TEXTURETAG_MATERIAL
定义: ttexture.h:29
BaseObject
定义: c4d_baseobject.h:224
maxon::Mat3< maxon::Vector64 >
maxon::DataType
定义: datatypebase.h:726
DescID
定义: lib_description.h:327
BaseView::GetSafeFrame
void GetSafeFrame(Int32 *cl, Int32 *ct, Int32 *cr, Int32 *cb)
HUDTextEntry::_txt
String _txt
The text to draw to the HUD.
定义: c4d_basedraw.h:251
BaseContainer::SetInt32
void SetInt32(Int32 id, Int32 l)
定义: c4d_basecontainer.h:505
BaseDrawHelp::SetMg
void SetMg(const Matrix &mg)
定义: c4d_basedraw.h:97
BaseDraw::EndDrawXORPolyLine
void EndDrawXORPolyLine(Bool blit)
定义: c4d_basedraw.h:1450
NOCLIP_Z
#define NOCLIP_Z
Z clipping.
定义: c4d_basedraw.h:1131
BaseDraw::InitDrawXORPolyLine
Bool InitDrawXORPolyLine()
定义: c4d_basedraw.h:1398
BaseDrawHelp::SetDisplay
void SetDisplay(BaseContainer *bc)
定义: c4d_basedraw.h:109
DRAWRESULT::OK
@ OK
Something was drawn.
Float
maxon::Float Float
定义: ge_sys_math.h:64
DRAWOBJECT
DRAWOBJECT
定义: ge_prepass.h:4387
PointObject::GetPointCount
Int32 GetPointCount(void) const
定义: c4d_baseobject.h:1439
maxon::SqrMat3::v1
V v1
The X axis.
定义: matrix.h:25
DRAWFLAGS::INMOVE
@ INMOVE
In move.
DRAWFLAGS
DRAWFLAGS
定义: ge_prepass.h:2598
BaseObject::SetMg
void SetMg(const Matrix &m)
定义: c4d_baseobject.h:488
BaseDrawHelp::Alloc
static BaseDrawHelp * Alloc(BaseDraw *bd, BaseDocument *doc)
DISPLAYFILTER
DISPLAYFILTER
定义: ge_prepass.h:4279
DISPLAYFILTER::HYPERNURBS
@ HYPERNURBS
Subdivision Surface.
BaseView::TestPoint
Bool TestPoint(Float x, Float y)
定义: c4d_basedraw.h:348
DRAWOBJECT::XRAY_OFF
@ XRAY_OFF
Disables X-Ray mode.
BaseDraw::DrawMultipleHUDText
void DrawMultipleHUDText(const maxon::BaseArray< HUDTextEntry > &texts)
定义: c4d_basedraw.h:1763
BaseDraw::DrawCircle
void DrawCircle(const Matrix &m)
定义: c4d_basedraw.h:1253
maxon::Data
定义: datatypebase.h:1143
BaseDraw::DrawHandle
void DrawHandle(const Vector &vp, DRAWHANDLE type, Int32 flags)
定义: c4d_basedraw.h:1182
BaseThread
定义: c4d_thread.h:27
BaseObject::GetMg
Matrix GetMg() const
定义: c4d_baseobject.h:482
BaseTag
定义: c4d_basetag.h:46
BaseDraw::SetDrawParam
void SetDrawParam(Int32 id, const GeData &data)
定义: c4d_basedraw.h:1497
SAFEINT32
Int32 SAFEINT32(Float32 x)
定义: apibasemath.h:266
DRAWOBJECT::USE_CUSTOM_COLOR
@ USE_CUSTOM_COLOR
Use a custom color.
DRAW_ALPHA
DRAW_ALPHA
定义: ge_prepass.h:2745
BaseDraw::GetDrawPass
DRAWPASS GetDrawPass() const
定义: c4d_basedraw.h:1613
DRAWOBJECT::NO_EOGL
@ NO_EOGL
No Extended OpenGL.
BaseDraw::GetSceneCamera
BaseObject * GetSceneCamera(const BaseDocument *doc)
定义: c4d_basedraw.h:829
iferr_return
#define iferr_return
定义: resultbase.h:1434
BaseDraw::IsMarkedAsGPURenderer
Bool IsMarkedAsGPURenderer()
定义: c4d_basedraw.h:1793
maxon::Vec2::x
T x
定义: vec2.h:31
MAXON_SOURCE_LOCATION
#define MAXON_SOURCE_LOCATION
定义: memoryallocationbase.h:66
EditorWindow::DrawXORLine
void DrawXORLine(Int32 x1, Int32 y1, Int32 x2, Int32 y2)
BaseDraw::LineStripBegin
void LineStripBegin()
定义: c4d_basedraw.h:1371
DrawViews
Bool DrawViews(DRAWFLAGS flags, BaseDraw *bd=nullptr)
HUDTextEntry
Class structure to hold HUD Text for BaseDraw::DrawMultipleHUDText().
定义: c4d_basedraw.h:246
maxon::BaseArray
定义: basearray.h:366
Ocamera
#define Ocamera
Camera - CameraObject.
定义: ge_prepass.h:978
DESCFLAGS_SET::NONE
@ NONE
None.
GeSyncMessage
Bool GeSyncMessage(Int32 messageid, Int32 destid=0, UInt p1=0, UInt p2=0)
DISPLAYMODE::WIRE
@ WIRE
Wireframe.
SCENEHOOKDRAW
SCENEHOOKDRAW
定义: ge_prepass.h:3064
BaseDraw::DrawObject
DRAWRESULT DrawObject(BaseDrawHelp *bh, BaseObject *op, DRAWOBJECT flags, DRAWPASS drawpass, BaseObject *parent=nullptr, const Vector &col=Vector(.5))
定义: c4d_basedraw.h:1339
BaseDraw::TestBreak
Bool TestBreak()
定义: c4d_basedraw.h:1721
EVMSG_ASYNCEDITORMOVE
#define EVMSG_ASYNCEDITORMOVE
The user moved something in the editor window. Managers should update things like position fields.
定义: ge_prepass.h:2563
BaseDocument::GetActiveBaseDraw
BaseDraw * GetActiveBaseDraw(void)
BaseDraw::DrawTexture
void DrawTexture(const BaseBitmap *bmp, const Vector *padr4, const Vector *cadr, const Vector *vnadr, const Vector *uvadr, Int32 pntcnt, DRAW_ALPHA alphamode, DRAW_TEXTUREFLAGS flags)
定义: c4d_basedraw.h:1247
BaseView::SetPlanarRotation
void SetPlanarRotation(Float r)
定义: c4d_basedraw.h:335
NOCLIP_D
#define NOCLIP_D
Clip against the view border.
定义: c4d_basedraw.h:1130
BaseDocument::GetBaseDraw
BaseDraw * GetBaseDraw(Int32 num)
BaseDrawHelp::GetDisplay
BaseContainer GetDisplay(void)
定义: c4d_basedraw.h:103
BaseDraw
定义: c4d_basedraw.h:747
GeClipMap::BeginDraw
void BeginDraw()
Must be called before any drawing functions.
GeClipMap::TextAt
void TextAt(Int32 x, Int32 y, const String &txt)
GeClipMap::GetBitmap
BaseBitmap * GetBitmap()
HUDTextEntry::_position
Vector _position
The screen space position for the text.
定义: c4d_basedraw.h:252
BaseDraw::FreeDrawXORPolyLine
void FreeDrawXORPolyLine()
定义: c4d_basedraw.h:1405
BaseDraw::SetPen
void SetPen(const Vector &col, Int32 flags=0)
定义: c4d_basedraw.h:981
BaseDraw::GetParameterData
GeData GetParameterData(Int32 id)
DRAWPASS
DRAWPASS
定义: ge_prepass.h:3258
BaseDocument::GetBaseDrawCount
Int32 GetBaseDrawCount()
GeClipMap::SetColor
void SetColor(Int32 r, Int32 g, Int32 b, Int32 a=255)
BaseDrawHelp::Free
static void Free(BaseDrawHelp *&p)
BASEDRAW_DATA_SHOWNORMALS
@ BASEDRAW_DATA_SHOWNORMALS
定义: dbasedraw.h:30
C4DAtom::SetParameter
Bool SetParameter(const DescID &id, const GeData &t_data, DESCFLAGS_SET flags)
maxon::BaseArray::Append
MAXON_ATTRIBUTE_FORCE_INLINE ResultRef< T > Append()
定义: basearray.h:569
BaseDrawHelp::GetDocument
BaseDocument * GetDocument(void)
定义: c4d_basedraw.h:73
maxon::Vec3< maxon::Float64, 1 >
maxon::SqrMat4
定义: matrix4d.h:12
BaseView::ProjectPointOnPlane
Vector ProjectPointOnPlane(const Vector &p, const Vector &v, Float mouse_x, Float mouse_y, Int32 *err=nullptr)
maxon::Vec3::x
T x
定义: vec.h:32
maxon::Mat3::sqmat
SqrMat3< V > sqmat
The 3×3 matrix for rotation, scale and shear.
定义: matrix.h:282
BaseDraw::InitUndo
void InitUndo(BaseDocument *doc)
定义: c4d_basedraw.h:1478
BaseDraw::DrawCircle2D
void DrawCircle2D(Int32 mx, Int32 my, Float rad)
定义: c4d_basedraw.h:1169
DRAWFLAGS::NO_ANIMATION
@ NO_ANIMATION
Ignore all animation.
BaseView::WS
Vector WS(const Vector &p) const
定义: c4d_basedraw.h:409
BaseSceneHook
定义: c4d_basedocument.h:43
SCENEHOOKDRAW::HIGHLIGHT_PASS_INV
@ HIGHLIGHT_PASS_INV
Inverted highlight pass.
BaseDraw::GetEditorCamera
BaseObject * GetEditorCamera(void)
定义: c4d_basedraw.h:868
BaseDraw::DrawLine2D
void DrawLine2D(const Vector &p1, const Vector &p2)
定义: c4d_basedraw.h:1152
maxon::Vec3::y
T y
定义: vec.h:33
BaseDraw::DrawLine
void DrawLine(const Vector &p1, const Vector &p2, Int32 flags)
定义: c4d_basedraw.h:1209
GeData
定义: c4d_gedata.h:82
maxon::Data::GetType
const DataType & GetType() const
定义: datatypebase.h:1220
BaseDraw::SetPointSize
void SetPointSize(Float pointsize)
定义: c4d_basedraw.h:987
iferr_scope_handler
#define iferr_scope_handler
定义: resultbase.h:1361
DRAWHANDLE::BIG
@ BIG
Handle used by object generators and deformers.
C4DAtom
定义: c4d_baselist.h:1331
DRAW_PARAMETER_LINEWIDTH
#define DRAW_PARAMETER_LINEWIDTH
Float Line width in pixels. (OpenGL only.)
定义: c4d_basedraw.h:1510
DRAW_TEXTUREFLAGS
DRAW_TEXTUREFLAGS
定义: ge_prepass.h:2758
Int32
maxon::Int32 Int32
定义: ge_sys_math.h:58
BaseDraw::DrawXORPolyLine
void DrawXORPolyLine(const Float32 *p, Int32 cnt)
定义: c4d_basedraw.h:1435
GeListNode::GetDocument
BaseDocument * GetDocument()
定义: c4d_baselist.h:1915
BaseDraw::LineStrip
void LineStrip(const Vector &vp, const Vector &vc, Int32 flags)
定义: c4d_basedraw.h:1385
ApplicationOutput
#define ApplicationOutput(formatString,...)
定义: debugdiagnostics.h:207
DRAWHANDLE::CUSTOM
@ CUSTOM
Custom handle.
BaseDraw::SetLightList
void SetLightList(Int32 mode)
定义: c4d_basedraw.h:1001
BaseDraw::BeginDrawXORPolyLine
void BeginDrawXORPolyLine()
定义: c4d_basedraw.h:1442
BASEDRAW_PROJECTION_FRONT
@ BASEDRAW_PROJECTION_FRONT
定义: dbasedraw.h:237
BaseDraw::DrawPolygon
void DrawPolygon(const Vector *p, const Vector *f, Bool quad)
定义: c4d_basedraw.h:1292
GeClipMap::FillRect
void FillRect(Int32 x1, Int32 y1, Int32 x2, Int32 y2)
Ttexture
#define Ttexture
Texture - TextureTag.
定义: ge_prepass.h:1236
BaseDraw::SetSceneCamera
void SetSceneCamera(BaseObject *op, Bool animate=false)
定义: c4d_basedraw.h:836
BaseObject::GetTag
BaseTag * GetTag(Int32 type, Int32 nr=0)
定义: c4d_baseobject.h:674
BaseDrawHelp::GetMg
const Matrix & GetMg(void)
定义: c4d_basedraw.h:85
BaseDraw::SetMatrix_Screen
void SetMatrix_Screen()
定义: c4d_basedraw.h:1067
BaseDraw::SetMatrix_Matrix
void SetMatrix_Matrix(BaseObject *op, const Matrix &mg)
定义: c4d_basedraw.h:1101
BaseObject::GetMp
Vector GetMp(void)
定义: c4d_baseobject.h:524
PointObject::GetPointR
const Vector * GetPointR(void) const
定义: c4d_baseobject.h:1425
向量
maxon::Vec3< maxon::Float64, 1 > Vector
定义: ge_math.h:145
BaseDraw::GetSkyObject
BaseObject * GetSkyObject() const
定义: c4d_basedraw.h:850
BaseObject::Alloc
static BaseObject * Alloc(Int32 type)
BaseBitmap
定义: c4d_basebitmap.h:410
ViewportSelect::PickObject
static Bool PickObject(BaseDraw *bd, BaseDocument *doc, Int32 x, Int32 y, Int32 rad, VIEWPORT_PICK_FLAGS flags, LassoSelection *ls, C4DObjectList *list, maxon::SquareMatrix4d *m=nullptr, Int32 *sampleLocation=nullptr)
maxon::Mat3::off
V off
The translation vector.
定义: matrix.h:279
Random::Get01
Float Get01(void)
AutoAlloc
定义: ge_autoptr.h:36
DESCFLAGS_GET::NONE
@ NONE
None.
DRAWRESULT::FAILURE
@ FAILURE
There was an error while drawing.
BDRAW_SETLIGHTLIST_NOLIGHTS
#define BDRAW_SETLIGHTLIST_NOLIGHTS
No lights.
定义: c4d_basedraw.h:1005
BASEDRAW_DATA_SELECTED_NORMALS
@ BASEDRAW_DATA_SELECTED_NORMALS
定义: dbasedraw.h:44
BaseDraw::HasCameraLink
Bool HasCameraLink(void)
定义: c4d_basedraw.h:822
Bool
maxon::Bool Bool
定义: ge_sys_math.h:53
GeClipMap::EndDraw
void EndDraw()
Must be called after a sequence of drawing functions to free the memory allocated by BeginDraw().
BaseDocument::GetActiveObject
BaseObject * GetActiveObject(void)
DRAWPASS::OBJECT
@ OBJECT
Object pass.
Random
定义: c4d_tools.h:811
ENVIRONMENT_AMBIENT
@ ENVIRONMENT_AMBIENT
定义: oenvironment.h:6
C4DAtom::IsInstanceOf
Bool IsInstanceOf(Int32 id) const
定义: c4d_baselist.h:1373
BaseObject::GetRad
Vector GetRad(void)
定义: c4d_baseobject.h:531
BaseList2D::GetName
String GetName() const
定义: c4d_baselist.h:2318
BaseView::TestClipping3D
Bool TestClipping3D(const Vector &mp, const Vector &rad, const Matrix &mg, Bool *clip2d, Bool *clipz)
DRAW_TEXTUREFLAGS::NONE
@ NONE
None.
String::VectorToString
static String VectorToString(const Vector32 &v, Int32 nnk=-1)
定义: c4d_string.h:571
BaseDraw::SimpleShade
Float SimpleShade(const Vector &p, const Vector &n)
定义: c4d_basedraw.h:1715
DISPLAYTAG_SDISPLAYMODE
@ DISPLAYTAG_SDISPLAYMODE
定义: tdisplay.h:6
maxon::SqrMat3::v2
V v2
The Y axis.
定义: matrix.h:28
DRAWFLAGS::ONLY_ACTIVE_VIEW
@ ONLY_ACTIVE_VIEW
Only redraw the active view.
C4DAtom::GetParameter
Bool GetParameter(const DescID &id, GeData &t_data, DESCFLAGS_GET flags)
BaseDocument
定义: c4d_basedocument.h:490
GeData::GetVector
const Vector & GetVector(void) const
定义: c4d_gedata.h:451
BaseDraw::GetDisplayFilter
DISPLAYFILTER GetDisplayFilter() const
定义: c4d_basedraw.h:1588
DRAWOBJECT::NONE
@ NONE
None.
BaseContainer
定义: c4d_basecontainer.h:46
BaseDraw::GetObjectColor
Vector GetObjectColor(const BaseDrawHelp *bh, BaseObject *op, Bool lines=false, Bool usedInBaseDraw=true, Int instanceIndex=0) const
定义: c4d_basedraw.h:948
BaseDraw::SetTransparency
void SetTransparency(Int32 trans)
定义: c4d_basedraw.h:962
BASEDRAW_DISPLAYFILTER_HYPERNURBS
@ BASEDRAW_DISPLAYFILTER_HYPERNURBS
定义: dbasedraw.h:179
GeData::GetFloat
Float GetFloat(void) const
定义: c4d_gedata.h:439
BaseDraw::CheckColor
Vector CheckColor(const Vector &col)
定义: c4d_basedraw.h:955

Copyright  © 2014-2025 乐数软件    

工业和信息化部: 粤ICP备14079481号-1