#include <c4d_basedraw.h>
Contains useful data for drawing into a BaseDraw view. Passed by the framework to methods that need it.
Static Public Member Functions | |
static BaseDrawHelp * | Alloc (BaseDraw *bd, BaseDocument *doc) |
static void | Free (BaseDrawHelp *&p) |
Private Member Functions | |
BaseDrawHelp () | |
~BaseDrawHelp () | |
|
private |
Constructor.
|
private |
Destructor.
|
static |
Allocates a BaseDrawHelp. Destroy the allocated BaseDrawHelp with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.
[in] | bd | The BaseDraw the BaseDrawHelp is assigned to. |
[in] | doc | The document of the BaseDraw. |
|
static |
Destructs BaseDrawHelp instances allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.
[in,out] | p | The BaseDrawHelp to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
BaseDocument* GetDocument | ( | void | ) |
Gets the relevant document for the current draw operation, i.e. the currently active document.
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.)
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.)
maxon::Block<const Matrix> GetMatrices | ( | void | ) |
Gets the global matrices of the object to be drawn (one matrix for each render instance).
void SetMg | ( | const Matrix & | mg | ) |
Sets the matrix returned by GetMg().
[in] | mg | The new global matrix of the object to be drawn. |
BaseContainer GetDisplay | ( | void | ) |
Gets a container with the display mode for the object to be drawn. See Tdisplay.h for values.
void SetDisplay | ( | BaseContainer * | bc | ) |
Sets the display mode for the object to be drawn. See Tdisplay.h for values.
[in] | bc | The new display mode container. |
const maxon::Color32* GetVertexColor | ( | ) |
Gets a pointer to an array of vertex colors or nullptr if no vertex colors are set for the object.
void SetVertexColor | ( | maxon::Color32 * | vertexcolor, |
Bool | perPolygon | ||
) |
Sets the vertex color for the object.
[in] | vertexcolor | Vertex colors. |
[in] | perPolygon | True, if the vertex colors are pre vertex per polygon. Otherwise the vertices are per vertex. |
Bool GetVertexColorShading | ( | ) |
Checks if vertex color shading is active.
void SetVertexColorShading | ( | Bool | vertexcolorShading | ) |
Sets the vertex color shading mode.
[in] | vertexcolorShading | True, if vertex color shading should hapen, false otherwise. |
DISPLAYMODE GetDisplayMode | ( | Bool | original | ) | const |
Gets the current display mode.
[in] | original | If true, the returned display mode is the original mode of the object. |
void SetDisplayMode | ( | DISPLAYMODE | mode, |
Bool | original | ||
) |
Sets the current display mode.
[in] | mode | The new display mode. |
[in] | original | If true, the original display mode is overwritten. |
Float32 GetLod | ( | ) | const |
Gets the current level of detail.
void SetLod | ( | Float32 | lod | ) |
Sets the current level of detail.
[in] | lod | The new level of detail. |
Int32 GetVectorDisplayMode | ( | ) | const |
Gets the vector display mode.
void SetVectorDisplayMode | ( | Int32 | vectorDisplayMode | ) |
Sets the vector display mode.
[in] | vectorDisplayMode | The new vector display mode. |
void SetActiveFlags | ( | Bool | active, |
Bool | hierarchyActive, | ||
Bool | highlighted, | ||
Bool | hierarchyHighlighted | ||
) |
Sets the active flags.
[in] | active | If true, the active flag is set, otherwise it's reset. |
[in] | hierarchyActive | If true, the hierarchy-active flag is set, otherwise it's reset. |
[in] | highlighted | If true, the highlighted flag is set, otherwise it's reset. |
[in] | hierarchyHighlighted | If true, the hierarchy-highlighted flag is set, otherwise it's reset. |
DRAWFLAGS GetViewSchedulerFlags | ( | ) | const |
Gets the flags which have been passed to DrawViews().
Bool IsRenderOnlyGeometry | ( | ) | const |
Checks if the the draw pass is set to render only geometry.
Bool IsActive | ( | ) | const |
Checks if the current object is active.
Bool IsHighlight | ( | ) | const |
Checks if the current object is highlighted (i.e. when the user has moved the mouse over it).
BaseObject* GetColorObject | ( | ) | const |
Gets the color object.
void SetColorObject | ( | BaseObject * | colorObject | ) |
Sets the color object.
[in] | colorObject | The color object. |
BaseObject* GetPainterMesh | ( | Bool & | enabled | ) | const |
Gets the current painter mesh.
[out] | enabled | True, if the mesh is enabled, false otherwise. |