BaseDraw Class Reference

#include <c4d_basedraw.h>

Inheritance diagram for BaseDraw:

Detailed Description

Represents a view window that can be drawn into.

Note
Has to be created with Alloc() and destroyed with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.
Warning
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.

Private Member Functions

 BaseDraw ()
 
 ~BaseDraw ()
 
BaseContainer GetData (void)
 
void SetData (const BaseContainer &bc, Bool add=true)
 
BaseContainerGetDataInstance (void)
 

Get Parameter

GeData GetParameterData (Int32 id)
 

Alloc/Free

static BaseDrawAlloc ()
 
static void Free (BaseDraw *&bd)
 

Camera

Bool HasCameraLink (void)
 
BaseObjectGetSceneCamera (const BaseDocument *doc)
 
void SetSceneCamera (BaseObject *op, Bool animate=false)
 
BaseObjectGetEnv () const
 
BaseObjectGetSky () const
 
BaseObjectGetEditorCamera (void)
 

Initialization

void InitClipbox (Int32 left, Int32 top, Int32 right, Int32 bottom, Int32 flags)
 
void InitView (BaseContainer *camera, const Matrix &op_m, Float sv, Float pix_x, Float pix_y, Bool fitview)
 
void InitializeView (BaseDocument *doc, BaseObject *cam, Bool editorsv)
 
void DrawEnd ()
 

Color/Transparency

Vector GetObjectColor (BaseDrawHelp *bh, BaseObject *op, Bool lines=false)
 
Vector CheckColor (const Vector &col)
 
void SetTransparency (Int32 trans)
 
Int32 GetTransparency (void)
 

Drawing Setup

void SetPen (const Vector &col, Int32 flags=0)
 
void SetPointSize (Float pointsize)
 
void SetLightList (Int32 mode)
 

Color Conversion

Vector ConvertColor (const Vector &c)
 
Vector ConvertColorReverse (const Vector &c)
 

Z-Buffer/Depth Setup

void LineZOffset (Int32 offset)
 
void SetDepth (Bool enable)
 

Matrix Transform

void SetMatrix_Projection ()
 
void SetMatrix_Screen ()
 
void SetMatrix_Screen (Int32 zoffset)
 
void SetMatrix_Screen (Int32 zoffset, const Matrix4d64 *m)
 
void SetMatrix_Camera ()
 
void SetMatrix_Matrix (BaseObject *op, const Matrix &mg)
 
void SetMatrix_Matrix (BaseObject *op, const Matrix &mg, Int32 zoffset)
 

2D Drawing

void DrawPoint2D (const Vector &p)
 
void DrawLine2D (const Vector &p1, const Vector &p2)
 
void DrawHandle2D (const Vector &p, DRAWHANDLE type=DRAWHANDLE_SMALL)
 
void DrawCircle2D (Int32 mx, Int32 my, Float rad)
 
void DrawHUDText (Int32 x, Int32 y, const String &txt)
 
void DrawMultipleHUDText (const maxon::BaseArray< HUDTextEntry > &texts)
 

3D Drawing

void DrawHandle (const Vector &vp, DRAWHANDLE type, Int32 flags)
 
void DrawPointArray (Int32 cnt, const Vector32 *vp, const Float32 *vc=nullptr, Int32 colcnt=0, const Vector32 *vn=nullptr)
 
void DrawLine (const Vector &p1, const Vector &p2, Int32 flags)
 
void DrawArc (const Vector &pos, Float radius, Float angle_start, Float angle_end, Int32 subdiv=32, Int32 flags=0)
 
void DrawPoly (Vector *vp, Vector *vf, Vector *vn, Int32 anz, Int32 flags)
 
void DrawTexture (const BaseBitmap *bmp, Vector *padr4, Vector *cadr, Vector *vnadr, Vector *uvadr, Int32 pntcnt, DRAW_ALPHA alphamode, DRAW_TEXTUREFLAGS flags)
 
void DrawTexture (C4DGLuint bmp, Vector *padr4, Vector *cadr, Vector *vnadr, Vector *uvadr, Int32 pntcnt, DRAW_ALPHA alphamode)
 
void DrawCircle (const Matrix &m)
 
void DrawBox (const Matrix &m, Float size, const Vector &col, Bool wire)
 
void DrawPolygon (Vector *p, Vector *f, Bool quad)
 
void DrawSphere (const Vector &off, const Vector &size, const Vector &col, Int32 flags)
 
void DrawArrayEnd ()
 

Object Drawing

DRAWRESULT DrawPolygonObject (BaseDrawHelp *bh, BaseObject *op, DRAWOBJECT flags, BaseObject *parent=nullptr, const Vector &col=Vector(.5))
 
DRAWRESULT DrawObject (BaseDrawHelp *bh, BaseObject *op, DRAWOBJECT flags, DRAWPASS drawpass, BaseObject *parent=nullptr, const Vector &col=Vector(.5))
 
Bool DrawScene (Int32 flags)
 
Bool DrawHighlight (BASEDRAW_HIGHLIGHT flags)
 

Line Strip Drawing

void LineStripBegin ()
 
void LineStripEnd ()
 
void LineStrip (const Vector &vp, const Vector &vc, Int32 flags)
 

Polyline Drawing

Bool InitDrawXORPolyLine ()
 
void FreeDrawXORPolyLine ()
 
void DrawXORPolyLine (const Float32 *p, Int32 cnt)
 
void BeginDrawXORPolyLine ()
 
void EndDrawXORPolyLine (Bool blit)
 

Highlight Pass

Bool GetHighlightPassColor (const BaseDrawHelp &bh, Bool lineObject, Vector &col) const
 
GlFrameBuffer * GetHighlightFramebuffer (const Vector32 &vMin=Vector32(-1.0f), const Vector32 &vMax=Vector32(1.0f))
 

View Undo

void InitUndo (BaseDocument *doc)
 
void DoUndo (BaseDocument *doc)
 

Draw Parameters

void SetDrawParam (Int32 id, const GeData &data)
 
GeData GetDrawParam (Int32 id)
 

Miscellaneous

void AddMessageHook (BaseDrawMessageHook fn)
 
Bool AddToPostPass (BaseObject *op, BaseDrawHelp *bh)
 
DISPLAYFILTER GetDisplayFilter ()
 
DISPLAYMODE GetReductionMode () const
 
DRAWPASS GetDrawPass () const
 
Bool GetDrawStatistics (BaseContainer &bc) const
 
DISPLAYEDITSTATE GetEditState ()
 
EditorWindowGetEditorWindow ()
 
void GetGridStep (Float &step, Float &fade)
 
const Matrix4d64GetViewMatrix (Int32 n)
 
Bool IsViewOpen (BaseDocument *doc)
 
void OverrideCamera (StereoCameraInfo *si)
 
Bool PointInRange (const Vector &p, Int32 x, Int32 y)
 
void SetClipPlaneOffset (Float o)
 
void SetTexture (BaseBitmap *bm, Bool tile, DRAW_ALPHA alphamode, DRAW_TEXTUREFLAGS flags)
 
Float SimpleShade (const Vector &p, const Vector &n)
 
Bool TestBreak ()
 

Extended GL Mode

Bool IsOpenGL ()
 
Bool IsEnhancedOpenGL ()
 
Bool DrawFullscreenPolygon (Int32 lVectorInfoCount, const GlVertexBufferVectorInfo *const *ppVectorInfo)
 
Int32 GetFrameScreen (Int32 *cl, Int32 *ct, Int32 *cr, Int32 *cb)
 
Bool GetFullscreenPolygonVectors (Int32 &lAttributeCount, const GlVertexBufferAttributeInfo *const *&ppAttibuteInfo, Int32 &lVectorInfoCount, const GlVertexBufferVectorInfo *const *&ppVectorInfo)
 
Int32 GetGlLightCount () const
 
const GlLight * GetGlLight (Int32 lIndex) const
 
OITInfoGetOITInfo ()
 

GPU Renderer

Bool IsMarkedAsGPURenderer ()
 
Bool IsGPURenderer ()
 
void SetViewportRender (const String &id)
 
void FrameFinished ()
 

Additional Inherited Members

- Public Member Functions inherited from BaseView
void GetFrame (Int32 *cl, Int32 *ct, Int32 *cr, Int32 *cb)
 
void GetSafeFrame (Int32 *cl, Int32 *ct, Int32 *cr, Int32 *cb)
 
Matrix GetMg (void)
 
Matrix GetMi (void)
 
const MatrixGetBaseMatrix () const
 
void SetBaseMatrix (const Matrix &m)
 
Float GetPlanarRotation () const
 
void SetPlanarRotation (Float r)
 
Bool TestPoint (Float x, Float y)
 
Bool TestPointZ (const Vector &p)
 
Bool TestClipping3D (const Vector &mp, const Vector &rad, const Matrix &mg, Bool *clip2d, Bool *clipz)
 
Bool ClipLine2D (Vector *p1, Vector *p2)
 
Bool ClipLineZ (Vector *p1, Vector *p2)
 
Vector WS (const Vector &p)
 
Vector SW (const Vector &p)
 
Vector SW_Reference (Float x, Float y, const Vector &wp)
 
Vector WC (const Vector &p)
 
Vector CW (const Vector &p)
 
Vector SC (const Vector &p)
 
Vector CS (const Vector &p, Bool z_inverse)
 
Vector WC_V (const Vector &v)
 
Vector CW_V (const Vector &v)
 
Vector WS_V (const Vector &v, const Vector &p)
 
Vector SW_V (const Vector &v, const Vector &p)
 
Float PW_S (Float z, Bool horizontal)
 
Float WP_S (Float z, Bool horizontal)
 
Float PW_W (const Vector &p, Bool horizontal)
 
Float WP_W (const Vector &p, Bool horizontal)
 
Bool ZSensitiveNear (void)
 
Float ZSensitiveNearClipping (void)
 
Bool ZSensitiveFar (void)
 
Float ZSensitiveFarClipping (void)
 
Vector ProjectPointOnLine (const Vector &p, const Vector &v, Float mouse_x, Float mouse_y, Float *offset=nullptr, Int32 *err=nullptr)
 
Vector ProjectPointOnPlane (const Vector &p, const Vector &v, Float mouse_x, Float mouse_y, Int32 *err=nullptr)
 
Bool BackfaceCulling (const Vector &n, const Vector &p)
 
Int32 GetProjection (void)
 
StereoCameraInfoGetStereoInfo () const
 
void GetViewParameter (Vector *offset, Vector *scale, Vector *scale_z) const
 
- Public Member Functions inherited from BaseList2D
BaseList2DGetNext (void)
 
BaseList2DGetPred (void)
 
void SetBit (Int32 mask)
 
Bool GetBit (Int32 mask) const
 
void DelBit (Int32 mask)
 
void ToggleBit (Int32 mask)
 
Int32 GetAllBits (void) const
 
void SetAllBits (Int32 bits)
 
BaseContainer GetData (void)
 
void SetData (const BaseContainer &bc, Bool add=true)
 
const BaseContainerGetDataInstance (void) const
 
BaseContainerGetDataInstance (void)
 
const BaseContainerGetDataInstanceRef (void) const
 
BaseContainerGetDataInstanceRef (void)
 
const StringGetName (void) const
 
void SetName (const String &name)
 
String GetBubbleHelp (void)
 
Bool TransferGoal (BaseList2D *dst, Bool undolink)
 
Bool TransferMarker (BaseList2D *dst) const
 
Bool Scale (Float scale)
 
Bool Edit (void)
 
void GetIcon (IconData *dat)
 
GeListHeadGetNLARoot (void)
 
BaseList2DAnimationLayerRemap (BaseObject **layer=nullptr)
 
const StringGetTypeName (void)
 
BaseList2DGetMain (void) 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
 
GeListHeadGetOverrideRoot (void)
 
BaseOverrideGetFirstOverride (void)
 
GeListHeadGetShaderRepositoryRoot (void)
 
void GetMarkerStampEx (UInt32 *l1, UInt32 *l2)
 
const GeMarkerGetMarker (void) 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)
 
BaseShaderGetFirstShader () const
 
void InsertShader (BaseShader *shader, BaseShader *pred=nullptr)
 
void ClearKeyframeSelection ()
 
Bool FindKeyframeSelection (const DescID &id)
 
Bool SetKeyframeSelection (const DescID &id, Bool selection)
 
Bool KeyframeSelectionContent ()
 
LayerObjectGetLayerObject (BaseDocument *doc)
 
Bool SetLayerObject (LayerObject *layer)
 
const LayerDataGetLayerData (BaseDocument *doc, Bool rawdata=false)
 
Bool SetLayerData (BaseDocument *doc, const LayerData &data)
 
GeListHeadGetCTrackRoot (void)
 
CTrackGetFirstCTrack (void)
 
CTrackFindCTrack (const DescID &id)
 
- Public Member Functions inherited from GeListNode
GeListNodeGetNext (void)
 
GeListNodeGetPred (void)
 
GeListNodeGetDown (void)
 
GeListNodeGetUp (void)
 
GeListNodeGetDownLast (void)
 
void InsertBefore (GeListNode *bl)
 
void InsertAfter (GeListNode *bl)
 
void InsertUnder (GeListNode *bl)
 
void InsertUnderLast (GeListNode *bl)
 
void Remove (void)
 
GeListHeadGetListHead (void)
 
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)
 
GeListNodeGetCustomData (void)
 
BaseDocumentGetDocument (void)
 
Int32 GetBranchInfo (BranchInfo *info, Int32 max, GETBRANCHINFO flags)
 
Bool IsDocumentRelated (void)
 
Int32 GetInfo (void)
 
Bool GetNBit (NBIT bit) const
 
Bool ChangeNBit (NBIT bit, NBITCONTROL bitmode)
 
- Public Member Functions inherited from C4DAtom
Int32 GetType (void) const
 
Int32 GetRealType (void) const
 
Int32 GetDiskType (void) const
 
Bool IsInstanceOf (Int32 id) const
 
Int32 GetClassification (void) const
 
Bool Message (Int32 type, void *data=nullptr)
 
Bool MultiMessage (MULTIMSG_ROUTE flags, Int32 type, void *data)
 
C4DAtomGetClone (COPYFLAGS flags, AliasTrans *trn)
 
Bool CopyTo (C4DAtom *dst, COPYFLAGS flags, AliasTrans *trn)
 
Bool Read (HyperFile *hf, Int32 id, Int32 level)
 
Bool Write (HyperFile *hf)
 
Bool ReadObject (HyperFile *hf, Bool readheader)
 
Bool WriteObject (HyperFile *hf)
 
Bool GetDescription (Description *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)
 
DynamicDescriptionGetDynamicDescription ()
 
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)
 
- Static Public Member Functions inherited from BaseList2D
static BaseList2DAlloc (Int32 type)
 
static void Free (BaseList2D *&bl)
 

Constructor & Destructor Documentation

§ BaseDraw()

BaseDraw ( )
private

§ ~BaseDraw()

~BaseDraw ( )
private

Member Function Documentation

§ GetData()

BaseContainer GetData ( void  )
private

Internal.

Warning
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()

void SetData ( const BaseContainer bc,
Bool  add = true 
)
private

Internal.

Warning
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()

BaseContainer* GetDataInstance ( void  )
private

Internal.

Warning
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()

GeData GetParameterData ( Int32  id)

Convenience method to get parameters.
Here is his simple implementation:

Parameters
[in]idA parameter ID. See dbasedraw.h description file.
Returns
The parameter data for id.

§ Alloc()

static BaseDraw* Alloc ( void  )
static

Allocates a base draw. Destroy the allocated base draw with Free(). Use AutoAlloc to automate the allocation and destruction based on scope. Private.

Note
Useful for situations when there is no base draw available. It is used for instance in Mograph's Camera shader.
Returns
The allocated base draw, or nullptr if the allocation failed.

§ Free()

static void Free ( BaseDraw *&  bd)
static

Destructs base draws allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope. Private.

Parameters
[in,out]bdThe 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.

Returns
true if a scene camera is used and false if the editor camera is used.

§ GetSceneCamera()

BaseObject* GetSceneCamera ( const BaseDocument doc)

Gets the current scene camera from the passed document.

Parameters
[in]docThe document to get the scene camera from. The caller owns the pointed document.
Returns
The scene camera, or nullptr if no scene camera is used.

§ SetSceneCamera()

void SetSceneCamera ( BaseObject op,
Bool  animate = false 
)

Sets a new scene camera. If op is nullptr, the editor camera is used.

Parameters
[in]opThe new camera.
[in]animatePrivate.

§ GetEnv()

BaseObject* GetEnv ( ) const

Internal.

Since
R19

§ GetSky()

BaseObject* GetSky ( ) const

Internal.

Since
R19

§ GetEditorCamera()

BaseObject* GetEditorCamera ( void  )

Gets the editor camera.

Returns
The editor camera. Guaranteed to never be nullptr.

§ InitClipbox()

void InitClipbox ( Int32  left,
Int32  top,
Int32  right,
Int32  bottom,
Int32  flags 
)

Used to render into a frame buffer with a different resolution than the editor view. Private.

Parameters
[in]leftThe left coordinate of the frame buffer.
[in]topThe top coordinate of the frame buffer.
[in]rightThe right coordinate of the frame buffer.
[in]bottomThe bottom coordinate of the frame buffer.
[in]flagsThe flag INIT_CLIPBOX_ADJUSTGLSIZE can be set.

§ InitView()

void InitView ( BaseContainer camera,
const Matrix op_m,
Float  sv,
Float  pix_x,
Float  pix_y,
Bool  fitview 
)

Used to render into a frame buffer with a different resolution than the editor view. Private.

Parameters
[in]cameraThe camera's container. The caller owns the pointed container.
[in]op_mThe camera's matrix.
[in]svThe frame's ratio.
[in]pix_xThe frame's X size.
[in]pix_yThe frame's Y size.
[in]fitviewSet to true to fit the view.

§ InitializeView()

void InitializeView ( BaseDocument doc,
BaseObject cam,
Bool  editorsv 
)

Used after rendering into a frame buffer with a different resolution than the editor view. Private.

Parameters
[in]docThe view's document. The caller owns the pointed document.
[in]camThe view's camera. The caller owns the pointed camera.
[in]editorsvSet to true to retain the view's ratio.

§ DrawEnd()

void DrawEnd ( )

Private.

Since
R19

§ GetObjectColor()

Vector GetObjectColor ( BaseDrawHelp bh,
BaseObject op,
Bool  lines = false 
)

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.

Parameters
[in]bhThe base draw helper.The caller owns the pointed base draw helper.
[in]opThe object to get the wireframe color. The caller owns the pointed object.
[in]linesIf set to true and the object's color is set to Layer but the object is not assigned to a layer the color set for Shaded Wireframe is used.
Returns
The object color.

§ CheckColor()

Vector CheckColor ( const Vector col)

Makes sure that a color has at least 15% difference to the background color.

Parameters
[in]colThe original color.
Returns
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.

Parameters
[in]transThe transparency.

§ GetTransparency()

Int32 GetTransparency ( void  )

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.

Returns
The current transparency.

§ SetPen()

void SetPen ( const Vector col,
Int32  flags = 0 
)

Sets the pen color for the following drawing operations.

Parameters
[in]colThe new pen color.
[in]flagsFlag SET_PEN_USE_PROFILE_COLOR can be set.

§ SetPointSize()

void SetPointSize ( Float  pointsize)

Sets the drawn point size.

Parameters
[in]pointsizeThe new point size.

§ SetLightList()

void SetLightList ( Int32  mode)

Sets the lighting used by the draw functions.

Note
This method only affects the new 3D drawing methods below it, i.e. DrawLine(), LineStrip(), DrawHandle(), DrawPoly(), DrawTexture(), DrawCircle(), DrawBox(), DrawPolygon() and DrawSphere().
Parameters
[in]modeThe lighting mode: BDRAW_SETLIGHTLIST

§ ConvertColor()

Vector ConvertColor ( const Vector c)

Converts colors from document color to viewport color profile.

Parameters
[in]cThe color to convert (document).
Returns
The converted color (viewport).

§ ConvertColorReverse()

Vector ConvertColorReverse ( const Vector c)

Converts colors from viewport color to document color profile.

Parameters
[in]cThe color to convert (viewport).
Returns
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:

§ SetDepth()

void SetDepth ( Bool  enable)

Enables/disables writing to the depth buffer. Private.

Parameters
[in]enabletrue 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).

Note
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).

Note
This method only affects the new 3D drawing methods below it, i.e. DrawLine(), LineStrip(), DrawHandle(), DrawPoly(), DrawTexture(), DrawCircle(), DrawBox(), DrawPolygon() and DrawSphere().
Parameters
[in]zoffsetSets 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]

void SetMatrix_Screen ( Int32  zoffset,
const Matrix4d64 m 
)

Private.

§ SetMatrix_Camera()

void SetMatrix_Camera ( )

Sets the transformation matrix to the camera system.

Note
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]

void SetMatrix_Matrix ( BaseObject op,
const Matrix mg 
)

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.

Note
This method only affects the new 3D drawing methods below it, i.e. DrawLine(), LineStrip(), DrawHandle(), DrawPoly(), DrawTexture(), DrawCircle(), DrawBox(), DrawPolygon() and DrawSphere().
Parameters
[in]opA 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]mgThe new transformation matrix.

§ SetMatrix_Matrix() [2/2]

void SetMatrix_Matrix ( BaseObject op,
const Matrix mg,
Int32  zoffset 
)

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.

Note
This method only affects the new 3D drawing methods below it, i.e. DrawLine(), LineStrip(), DrawHandle(), DrawPoly(), DrawTexture(), DrawCircle(), DrawBox(), DrawPolygon() and DrawSphere().
Parameters
[in]opA 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]mgThe new transformation matrix.
[in]zoffsetSets 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 Vector p)

Draws a one-pixel point in the current pen color at p.

Parameters
[in]pA point in screen space coordinate.

§ DrawLine2D()

void DrawLine2D ( const Vector p1,
const Vector p2 
)

Draws a line in the current pen color between p1 and p2.

Parameters
[in]p1The start point of the line in screen space coordinate.
[in]p2The end point of the line in screen space coordinate.

§ DrawHandle2D()

void DrawHandle2D ( const Vector p,
DRAWHANDLE  type = DRAWHANDLE_SMALL 
)

Draws a handle at p.

Parameters
[in]pA point in screen space coordinate.
[in]typeThe handle type: DRAWHANDLE

§ DrawCircle2D()

void DrawCircle2D ( Int32  mx,
Int32  my,
Float  rad 
)

Draws a circle in the current pen color with a radius of rad and the center at (mx, my).

Parameters
[in]mxThe X coordinate of the circle's center in screen space coordinate.
[in]myThe Y coordinate of the circle's center in screen space coordinate.
[in]radThe circle's radius.

§ DrawHandle()

void DrawHandle ( const Vector vp,
DRAWHANDLE  type,
Int32  flags 
)

Draws a handle at vp.

Parameters
[in]vpA point. The coordinate must be in the space defined by SetMatrix_Screen(), SetMatrix_Camera() or SetMatrix_Matrix().
[in]typeThe handle type: DRAWHANDLE
[in]flagsThe clipping flags: NOCLIP_D or NOCLIP_Z.

§ DrawPointArray()

void DrawPointArray ( Int32  cnt,
const Vector32 vp,
const Float32 vc = nullptr,
Int32  colcnt = 0,
const Vector32 vn = nullptr 
)

Draws an array of points with individual colors.

Note
The coordinates must be in the space defined by SetMatrix_Screen(), SetMatrix_Camera() or SetMatrix_Matrix().
Parameters
[in]cntThe number of points.
[in]vpAn array of point coordinates. The caller owns the pointed array.
[in]vcAn array of point color elements. The caller owns the pointed array.
[in]colcntThe number of color elements, for example 3 for RGB.
[in]vnReserved for future use. The caller owns the pointed array.

§ DrawLine()

void DrawLine ( const Vector p1,
const Vector p2,
Int32  flags 
)

Draws a line in the current pen color between p1 and p2.

Parameters
[in]p1The start point in world space coordinate.
[in]p2The end point in world space coordinate.
[in]flagsThe clipping flags: NOCLIP_D or NOCLIP_Z.

§ DrawArc()

void DrawArc ( const Vector pos,
Float  radius,
Float  angle_start,
Float  angle_end,
Int32  subdiv = 32,
Int32  flags = 0 
)

Draws an arc (section of a circle) in the current pen color at pos.

Parameters
[in]posThe position of the rectangle that defines the arc. The coordinate must be in screen space.
[in]radiusThe arc's radius.
[in]angle_startThe start of the angle in radians.
[in]angle_endThe end of the angle in radians.
[in]subdivThe range between angle_start and angle_end is divided into subdiv line segments.
[in]flagsThe clipping flags: NOCLIP_D or NOCLIP_Z.

§ DrawPoly()

void DrawPoly ( Vector vp,
Vector vf,
Vector 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().

Note
The coordinates must be in the space defined by SetMatrix_Screen(), SetMatrix_Camera() or SetMatrix_Matrix().
Parameters
[in]vpAn array of point coordinates. The caller owns the pointed array.
[in]vfAn array of point colors. The caller owns the pointed array.
[in]vnAn array of point normals. The caller owns the pointed array.
[in]anzThe number of points. Must be either 3 (for triangles) or 4 (for quadrangles).
[in]flagsThe clipping flags: NOCLIP_D or NOCLIP_Z.

§ DrawTexture() [1/2]

void DrawTexture ( const BaseBitmap bmp,
Vector padr4,
Vector cadr,
Vector vnadr,
Vector uvadr,
Int32  pntcnt,
DRAW_ALPHA  alphamode,
DRAW_TEXTUREFLAGS  flags 
)

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().

Parameters
[in]bmpThe texture to draw. The caller owns the pointed bitmap.
[in]padr4An array of point coordinates. The coordinates must be in the space defined by SetMatrix_Screen(), SetMatrix_Camera() or SetMatrix_Matrix().
[in]cadrAn array of colors. Must have 4 items regardless of pntcnt.
[in]vnadrAn array of point normals. Must have 4 items regardless of pntcnt.
[in]uvadrAn array of UV coordinates. Must have 4 items regardless of pntcnt.
[in]pntcntThe number of points in padr4. Must be either 3 (triangle) or 4 (quadrangle).
[in]alphamodeThe alpha channel mode: DRAW_ALPHA
[in]flagsA combination of these flags: DRAW_TEXTUREFLAGS

§ DrawTexture() [2/2]

void DrawTexture ( C4DGLuint  bmp,
Vector padr4,
Vector cadr,
Vector vnadr,
Vector uvadr,
Int32  pntcnt,
DRAW_ALPHA  alphamode 
)

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().

Parameters
[in]bmpA handle to an OpenGL bitmap. Extended OpenGL mode. This mode is not documented. See c4d_gl.h for definitions.
[in]padr4An array of point coordinates. The coordinates must be in the space defined by SetMatrix_Screen(), SetMatrix_Camera() or SetMatrix_Matrix().
[in]cadrAn array of colors. Must have 4 items regardless of pntcnt.
[in]vnadrAn array of point normals. Must have 4 items regardless of pntcnt.
[in]uvadrAn array of UV coordinates. Must have 4 items regardless of pntcnt.
[in]pntcntThe number of points in padr4. Must be either 3 (triangle) or 4 (quadrangle).
[in]alphamodeThe alpha channel mode: DRAW_ALPHA

§ DrawCircle()

void DrawCircle ( const Matrix m)

Draws an ellipse in the current pen color. The ellipse is specified by the matrix m, where m.v1 and m.v2 are the axis vectors and m.off is the center position. (m.v3 is not used.)

Parameters
[in]mA matrix describing the ellipse. The coordinates must be in the space defined by SetMatrix_Screen(), SetMatrix_Camera() or SetMatrix_Matrix().

§ DrawBox()

void DrawBox ( const Matrix m,
Float  size,
const Vector col,
Bool  wire 
)

Draws a box. The eight points of the box are defined as:

p[0] = m * Vector(-size, -size, -size);
p[1] = m * Vector( size, -size, -size);
p[2] = m * Vector( size, -size, size);
p[3] = m * Vector(-size, -size, size);
p[4] = m * Vector(-size, size, -size);
p[5] = m * Vector( size, size, -size);
p[6] = m * Vector( size, size, size);
p[7] = m * Vector(-size, size, size);
Note
To get arbitrary cubic forms, set size to 0.5 and multiply the vectors in the matrix by the length.
Parameters
[in]mA matrix describing the box. The coordinates must be in the space defined by SetMatrix_Screen(), SetMatrix_Camera() or SetMatrix_Matrix().
[in]sizeThe size of the box.
[in]colThe color of the box.
[in]wireIf true the box is drawn as wireframe.

§ DrawPolygon()

void DrawPolygon ( Vector p,
Vector 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.

Parameters
[in]pAn 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]fAn array of point colors. The caller owns the pointed array.
[in]quadIf true the number of points must be 4, otherwise it must be 3.

§ DrawSphere()

void DrawSphere ( const Vector off,
const Vector size,
const Vector col,
Int32  flags 
)

Draws a sphere at position off of size specified by the size vector in each direction and color specified by col.

Parameters
[in]offThe position of the sphere. The point coordinate must be in the space defined by SetMatrix_Screen(), SetMatrix_Camera() or SetMatrix_Matrix().
[in]sizeThe size of the sphere.
[in]colThe color of the sphere.
[in]flagsThe flags: NOCLIP_D or NOCLIP_Z and/or BDRAW_DRAW_SPHERE_FLAGS_NO_SHADING.

§ DrawArrayEnd()

void DrawArrayEnd ( )

Each 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()

DRAWRESULT DrawPolygonObject ( BaseDrawHelp bh,
BaseObject op,
DRAWOBJECT  flags,
BaseObject parent = nullptr,
const Vector col = Vector(.5) 
)

Draws the polygon object op.

Parameters
[in]bhThe base draw help. The caller owns the pointed base draw help.
[in]opThe polygon object to draw. The caller owns the pointed object.
[in]flagsThe flags: DRAWOBJECT
[in]parentThis 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]colThe object's color.
Returns
The result of drawing the polygon object: DRAWRESULT

§ DrawObject()

DRAWRESULT DrawObject ( BaseDrawHelp bh,
BaseObject op,
DRAWOBJECT  flags,
DRAWPASS  drawpass,
BaseObject parent = nullptr,
const Vector col = Vector(.5) 
)

Draws the object op.

Parameters
[in]bhThe base draw help. The caller owns the pointed base draw help.
[in]opThe object to draw. The caller owns the pointed object.
[in]flagsThe flags: DRAWOBJECT
[in]drawpassThe draw pass: DRAWPASS
[in]parentThis 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]colThe object's color.
Returns
The result of drawing the object: DRAWRESULT

§ DrawScene()

Bool DrawScene ( Int32  flags)

Draws a scene into the framebuffer.

Parameters
[in]flagsNot used.
Returns
true if the scene was drawn successfully, otherwise false.

§ DrawHighlight()

Bool DrawHighlight ( BASEDRAW_HIGHLIGHT  flags)

Private.

Since
R19

§ LineStripBegin()

void LineStripBegin ( )

Starts a new colored line strip.
Draw several line strip segments with LineStrip() calls and then finish the line strip with LineStripEnd().

§ LineStripEnd()

void LineStripEnd ( )

Finishes line strips started with LineStripBegin().

§ LineStrip()

void LineStrip ( const Vector vp,
const Vector 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.

Warning
This method must be enclosed between LineStripBegin() and LineStripEnd() calls.
Parameters
[in]vpThe point coordinate. The coordinate must be in the space defined by SetMatrix_Screen(), SetMatrix_Camera() or SetMatrix_Matrix().
[in]vcThe point color.
[in]flagsThe clipping flags: NOCLIP_D or NOCLIP_Z.

§ InitDrawXORPolyLine()

Bool InitDrawXORPolyLine ( )

Initializes the view to draw XOR poly line (set the correct projection matrices).

See also
Example in DrawXORPolyLine()
Returns
true if successful, otherwise false.

§ FreeDrawXORPolyLine()

void FreeDrawXORPolyLine ( )

Frees drawing XOR poly line (restore the old projection matrices).

§ DrawXORPolyLine()

void DrawXORPolyLine ( const Float32 p,
Int32  cnt 
)

Draws a XOR poly line. Example:

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->DrawXORPolyLine(points, count);
bd->EndDrawXORPolyLine(false);
Parameters
[in]pThe pointer to the line points array. The format of the array is 2*cnt*sizeof(Float32) (2 Float32 per point).
[in]cntThe number of line points.

§ BeginDrawXORPolyLine()

void BeginDrawXORPolyLine ( )

Begins drawing an XOR poly line (sets the view's context as current context).

See also
Example in DrawXORPolyLine().

§ EndDrawXORPolyLine()

void EndDrawXORPolyLine ( Bool  blit)

Ends the drawing of a XOR poly line (makes nullptr the current context).

See also
Example in DrawXORPolyLine().
Parameters
[in]blitSet to true to use blitting.

§ GetHighlightPassColor()

Bool GetHighlightPassColor ( const BaseDrawHelp bh,
Bool  lineObject,
Vector col 
) const

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.

Note
This function should only be called in the highlight pass.
Parameters
[in]bhThe base draw help.
[in]lineObjectMust be set to true, if the object is a line object.
[in]colAssigned the highlight color.
Returns
true if the object is selected or highlighted and the color col is assigned.
false if drawing the object can be skipped.

§ GetHighlightFramebuffer()

GlFrameBuffer* GetHighlightFramebuffer ( const Vector32 vMin = Vector32(-1.0f),
const Vector32 vMax = Vector32(1.0f) 
)

Gets the framebuffer in which the highlights are drawn and sets the bounding box of the highlight area (vMin and vMax).
Both vectors must be in clip space [-1, 1] on all axes. They should be passed when the bounding box is known for the current object to speed up the calculation of the highlights and outlines. Private.

Parameters
[in]vMinThe minimum position of the bounding box.
[in]vMaxThe maximum position of the bounding box.
Returns
The highlight framebuffer.

§ InitUndo()

void InitUndo ( BaseDocument doc)

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.)

Parameters
[in]docThe view's document. The caller owns the pointed document.

§ DoUndo()

void DoUndo ( BaseDocument doc)

Performs an undo operation in the view. This is the same as the user selecting Undo View from within Cinema 4D.

Parameters
[in]docThe view's document. The caller owns the pointed document.

§ SetDrawParam()

void SetDrawParam ( Int32  id,
const GeData data 
)

Sets draw parameters.

Note
This method only affects the new 3D drawing methods below it, i.e. DrawLine(), LineStrip(), DrawHandle(), DrawPoly(), DrawTexture(), DrawCircle(), DrawBox(), DrawPolygon() and DrawSphere().
Parameters
[in]idThe draw parameter ID: DRAW_PARAMETER
[in]dataThe new draw parameter data to set.

§ GetDrawParam()

GeData GetDrawParam ( Int32  id)

Gets draw parameters.

Note
This method only affects the new 3D drawing methods below it, i.e. DrawLine(), LineStrip(), DrawHandle(), DrawPoly(), DrawTexture(), DrawCircle(), DrawBox(), DrawPolygon() and DrawSphere().
Parameters
[in]idThe draw parameter ID: DRAW_PARAMETER
Returns
The draw parameter data.

§ AddMessageHook()

void AddMessageHook ( BaseDrawMessageHook  fn)

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.

Parameters
[in]fnThe message hook.

§ AddToPostPass()

Bool AddToPostPass ( BaseObject op,
BaseDrawHelp bh 
)

Adds the object op to DRAWPASS_XRAY.
Example:

Bool MyObject::Draw(BaseObject* op, Int32 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.

Parameters
[in]opThe object to add to the X-ray pass. The caller owns the pointed object.
[in]bhThe base draw helper. The caller owns the pointed base draw helper.
Returns
true if the object was successfully added to the X-ray pass, otherwise false.

§ GetDisplayFilter()

DISPLAYFILTER 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().

Returns
A bit field with the following flags: DISPLAYFILTER

§ GetReductionMode()

DISPLAYMODE GetReductionMode ( ) const

Gets the reduction mode of the base draw.

Returns
The reduction mode: DISPLAYMODE

§ GetDrawPass()

DRAWPASS GetDrawPass ( ) const

Gets the current drawpass.

Returns
The current drawpass: DRAWPASS

§ GetDrawStatistics()

Bool GetDrawStatistics ( BaseContainer bc) const

Gets OpenGL geometry statistics.

Parameters
[out]bcThe container filled with the statistics: DRAW_STATISTIC
Returns
true if statistics were returned successfully, otherwise false.

§ GetEditState()

DISPLAYEDITSTATE 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().

Returns
The edit state: DISPLAYEDITSTATE

§ GetEditorWindow()

EditorWindow* GetEditorWindow ( )

Gets the EditorWindow for this base draw.

Returns
The EditorWindow. Cinema 4D owns the pointed EditorWindow.

§ GetGridStep()

void GetGridStep ( Float step,
Float fade 
)

Gets the grid spacing and the transparency value of the minor grid that fade when the user zoom in or out with dynamic grid.

Parameters
[out]stepIs assigned the workplane grid spacing.
[out]fadeIs assigned the transparency value of the minor grid.

§ GetViewMatrix()

const Matrix4d64& GetViewMatrix ( Int32  n)

Gets the view matrix.

Parameters
[in]nThe type of view matrix to get: DRAW_GET_VIEWMATRIX
Returns
The view matrix.

§ IsViewOpen()

Bool IsViewOpen ( BaseDocument doc)

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.

Parameters
[in]docThe document for the operation. The caller owns the pointed document.
Returns
true if a view is open, otherwise false.

§ OverrideCamera()

void OverrideCamera ( StereoCameraInfo si)

Changes the stereoscopic camera data for this view.

Parameters
[in]siThe stereoscopic camera data to set. The caller owns the pointed StereoCameraInfo.

§ PointInRange()

Bool PointInRange ( const Vector p,
Int32  x,
Int32  y 
)

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.

Parameters
[in]pA point in world space.
[in]xA screen X coordinate.
[in]yA screen Y coordinate.
Returns
true if the point is within range, otherwise false.

§ SetClipPlaneOffset()

void SetClipPlaneOffset ( Float  o)

Offsets the OpenGL clipping planes by this offset.

Parameters
[in]oThe offset.

§ SetTexture()

void SetTexture ( BaseBitmap bm,
Bool  tile,
DRAW_ALPHA  alphamode,
DRAW_TEXTUREFLAGS  flags 
)

Sets a texture used by the vertex buffer.

Parameters
[in]bmThe texture's bitmap. The caller owns the pointed bitmap.
[in]tileSet to true to enable tiling.
[in]alphamodeThe alpha channel mode: DRAW_ALPHA
[in]flagsThe draw texture flags: DRAW_TEXTUREFLAGS

§ SimpleShade()

Float SimpleShade ( const Vector p,
const Vector 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.

Note
Can be combined with DrawPolygon() to draw simple shaded polygons.
Parameters
[in]pA point in world space.
[in]nA normal in world space.
Returns
The intensity of the light. Between 0 and 1.

§ TestBreak()

Bool TestBreak ( )

Checks for thread breaks in the draw.

Returns
true if a stopping condition has occurred, otherwise false.

§ IsOpenGL()

Bool IsOpenGL ( )

Extended OpenGL mode. This mode is not documented. See c4d_gl.h for definitions.

§ IsEnhancedOpenGL()

Bool IsEnhancedOpenGL ( )

Extended OpenGL mode. This mode is not documented. See c4d_gl.h for definitions.

§ DrawFullscreenPolygon()

Bool DrawFullscreenPolygon ( Int32  lVectorInfoCount,
const GlVertexBufferVectorInfo *const *  ppVectorInfo 
)

Extended OpenGL mode. This mode is not documented. See c4d_gl.h for definitions.

§ GetFrameScreen()

Int32 GetFrameScreen ( Int32 cl,
Int32 ct,
Int32 cr,
Int32 cb 
)

Extended OpenGL mode. This mode is not documented. See c4d_gl.h for definitions.

Returns
-2: no OpenGL window, -1: off-screen view, 0: system error, 1: success.

§ GetFullscreenPolygonVectors()

Bool GetFullscreenPolygonVectors ( Int32 lAttributeCount,
const GlVertexBufferAttributeInfo *const *&  ppAttibuteInfo,
Int32 lVectorInfoCount,
const GlVertexBufferVectorInfo *const *&  ppVectorInfo 
)

Extended OpenGL mode. This mode is not documented. See c4d_gl.h for definitions.

§ GetGlLightCount()

Int32 GetGlLightCount ( ) const

Extended OpenGL mode. This mode is not documented. See c4d_gl.h for definitions.

§ GetGlLight()

const GlLight* GetGlLight ( Int32  lIndex) const

Extended OpenGL mode. This mode is not documented. See c4d_gl.h for definitions.

§ GetOITInfo()

OITInfo& GetOITInfo ( )

Extended OpenGL mode. This mode is not documented. See c4d_gl.h for definitions.

§ DrawHUDText()

void DrawHUDText ( Int32  x,
Int32  y,
const String txt 
)

Draws text into the 2D viewport in the style of the HUD.

Since
R18
Parameters
[in]xThe left X coordinate to draw the text at.
[in]yThe upper Y coordinate to draw the text at.
[in]txtThe text to draw.

§ DrawMultipleHUDText()

void DrawMultipleHUDText ( const maxon::BaseArray< HUDTextEntry > &  texts)

Draws many HUD text entries at once.

Since
R18
Parameters
[in]textsThe array of text entries and their screen space positions to draw to the HUD.

§ IsMarkedAsGPURenderer()

Bool IsMarkedAsGPURenderer ( )

Checks if the view is marked as GPU Renderer.

Since
R19
Returns
true if the view is marked to run the GPU Renderer, otherwise false.

§ IsGPURenderer()

Bool IsGPURenderer ( )

Checks if the view is running the GPU Renderer.

Since
R19
Returns
true if the view is running the GPU renderer, otherwise false.

§ SetViewportRender()

void SetViewportRender ( const String id)

Private.

Since
R19

§ FrameFinished()

void FrameFinished ( )

Private.

Since
R19