Blender V5.0
blender::draw::overlay::Axes Class Reference

#include <overlay_axes.hh>

Inherits blender::draw::overlay::Overlay.

Public Member Functions

 Axes (const SelectionType selection_type)
void begin_sync (Resources &, const State &state) final
void object_sync (Manager &, const ObjectRef &ob_ref, Resources &res, const State &state) final
void end_sync (Resources &res, const State &state) final
void draw_line (Framebuffer &framebuffer, Manager &manager, View &view) final

Detailed Description

Displays extra object axes. It is toggled by Object Panel > Viewport Display > Axes. Also visible if Options > Affect Only > Origins is enabled.

Definition at line 22 of file overlay_axes.hh.

Constructor & Destructor Documentation

◆ Axes()

blender::draw::overlay::Axes::Axes ( const SelectionType selection_type)
inline

Definition at line 34 of file overlay_axes.hh.

Member Function Documentation

◆ begin_sync()

void blender::draw::overlay::Axes::begin_sync ( Resources & ,
const State &  )
inlinefinalvirtual

Synchronization creates and fill render passes based on context state and scene state.

It runs for every scene update, so keep computation overhead low. If it is triggered, everything in the scene is considered updated. Note that this only concerns the render passes, the mesh batch caches are updated on a per object-data basis.

IMPORTANT: Synchronization must be view agnostic. That is, not rely on view position, projection matrix or frame-buffer size to do conditional pass creation. This is because, by design, syncing can happen once and rendered multiple time (multi view rendering, stereo rendering, orbiting view ...). Conditional pass creation, must be done in the drawing callbacks, but they should remain the exception. Also there will be no access to object data at this point. Creates passes used for object sync and enabling / disabling internal overlay types (e.g. vertices, edges, faces in edit mode). Runs once at the start of the sync cycle. Should also contain passes setup for overlays that are not per object overlays (e.g. Grid).

This method must be implemented.

Implements blender::draw::overlay::Overlay.

Definition at line 36 of file overlay_axes.hh.

References blender::draw::overlay::Overlay::enabled_, and state.

◆ draw_line()

void blender::draw::overlay::Axes::draw_line ( Framebuffer & framebuffer,
Manager & manager,
View & view )
inlinefinalvirtual

◆ end_sync()

void blender::draw::overlay::Axes::end_sync ( Resources & ,
const State &  )
inlinefinalvirtual

◆ object_sync()

void blender::draw::overlay::Axes::object_sync ( Manager & ,
const ObjectRef & ,
Resources & ,
const State &  )
inlinefinalvirtual

Fills passes or buffers for each object. Runs for each individual object state. IMPORTANT: Can run only once for instances using the same state (ObjectRef might contains instancing data).

Reimplemented from blender::draw::overlay::Overlay.

Definition at line 45 of file overlay_axes.hh.

References Object::base_flag, BASE_SELECTED, CTX_MODE_OBJECT, data, Object::dtx, blender::draw::overlay::Overlay::enabled_, blender::draw::overlay::is_from_dupli_or_set(), OB_AXIS, SCE_XFORM_DATA_ORIGIN, blender::draw::select::SelectMap::select_invalid_id(), and state.

Referenced by blender::draw::overlay::Instance::object_sync().


The documentation for this class was generated from the following file: