BaseDrawHelp Class Reference

#include <c4d_basedraw.h>

Detailed Description

Contains useful data for drawing into a BaseDraw view. Passed by the framework to methods that need it.

Note
Has to be created with Alloc() and destroyed with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.

Public Member Functions

BaseDocumentGetDocument (void)
 
BaseTagGetActiveTag (void)
 
const MatrixGetMg (void)
 
void SetMg (const Matrix &mg)
 
BaseContainer GetDisplay (void)
 
void SetDisplay (BaseContainer *bc)
 
DRAWFLAGS GetViewSchedulerFlags () const
 
Bool IsActive () const
 
Bool IsHighlight () const
 

Static Public Member Functions

static BaseDrawHelpAlloc (BaseDraw *bd, BaseDocument *doc)
 
static void Free (BaseDrawHelp *&p)
 

Private Member Functions

 BaseDrawHelp ()
 
 ~BaseDrawHelp ()
 

Constructor & Destructor Documentation

§ BaseDrawHelp()

BaseDrawHelp ( )
private

Constructor.

§ ~BaseDrawHelp()

~BaseDrawHelp ( )
private

Destructor.

Member Function Documentation

§ Alloc()

static BaseDrawHelp* Alloc ( BaseDraw bd,
BaseDocument doc 
)
static

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

Parameters
[in]bdThe BaseDraw the BaseDrawHelp is assigned to.
[in]docThe document of the BaseDraw.
Returns
The allocated BaseDrawHelp, or nullptr if the allocation failed.

§ Free()

static void Free ( BaseDrawHelp *&  p)
static

Destructs BaseDrawHelp instances allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.

Parameters
[in,out]pThe BaseDrawHelp to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

§ GetDocument()

BaseDocument* GetDocument ( void  )

Gets the relevant document for the current draw operation, i.e. the currently active document.

Note
Never returns nullptr.
Returns
The document for the current draw operation. Cinema 4D owns the pointed document.

§ GetActiveTag()

BaseTag* GetActiveTag ( void  )

Gets the active tag, or nullptr if no tag is active. (Similar to calling GetDocument()->GetActiveTag() but more efficient since the active tag is cached.)

Returns
The active tag. Cinema 4D owns the pointed tag.

§ GetMg()

const Matrix& GetMg ( void  )

Gets the global matrix of the object to be drawn. (Similar to op->GetMg() but more efficient since the matrix is cached.)

Returns
The global matrix of the object to be drawn.

§ SetMg()

void SetMg ( const Matrix mg)

Sets the matrix returned by GetMg().

Parameters
[in]mgThe new global matrix of the object to be drawn.

§ GetDisplay()

BaseContainer GetDisplay ( void  )

Gets a container with the display mode for the object to be drawn. See Tdisplay.h for values.

Returns
The display mode container.

§ SetDisplay()

void SetDisplay ( BaseContainer bc)

Sets the display mode for the object to be drawn. See Tdisplay.h for values.

Parameters
[in]bcThe new display mode container.

§ GetViewSchedulerFlags()

DRAWFLAGS GetViewSchedulerFlags ( ) const

Gets the flags which have been passed to DrawViews().

Returns
A combination of the view scheduler flags: DRAWFLAGS

§ IsActive()

Bool IsActive ( ) const

Checks if the current object is active.

Returns
true if the current object is active, otherwise false.

§ IsHighlight()

Bool IsHighlight ( ) const

Checks if the current object is highlighted (i.e. when the user has moved the mouse over it).

Returns
true if the current object is highlighted, otherwise false.