ImPlot3D’s internal API (implot3d_internal.h): the structures and helpers that ImPlot3D is built with.
The C++ API of ImPlot3D: the signatures and the documentation of its headers. This page is generated by litgen, the engine behind the Python bindings of Dear ImGui Bundle. Functions without Python bindings are not listed.
implot3d_internal.h¶
ImPlot3D::ImLog10¶
static inline double ImLog10(double x);Computes the common (base-10) logarithm (private API)
ImPlot3D::ImSinh¶
static inline double ImSinh(double x);Computes the hyperbolic sine (private API)
ImPlot3D::ImAsinh¶
static inline double ImAsinh(double x);Computes the inverse hyperbolic sine (private API)
Flips a flag in a flagset¶
ImPlot3D::ImPosMod¶
static inline int ImPosMod(int l, int r);Returns always positive modulo (assumes r != 0) (private API)
ImPlot3D::ImNan¶
static inline bool ImNan(double val);Returns True if val is NAN (private API)
ImPlot3D::ImNanOrInf¶
static inline bool ImNanOrInf(double val);Returns True if val is NAN or INFINITY (private API)
ImPlot3D::ImConstrainNan¶
static inline double ImConstrainNan(double val);Turns NANs to 0s (private API)
ImPlot3D::ImConstrainInf¶
static inline double ImConstrainInf(double val);Turns infinity to floating point maximums
Clamped to half DBL_MAX to prevent overflow in size calculations (Max - Min)
(private API)
ImPlot3D::ImAlmostEqual¶
static inline bool ImAlmostEqual(double v1, double v2, int ulp = 2);True if two numbers are approximately equal using units in the last place. (private API)
ImPlot3D::ImAlphaU32¶
static inline ImU32 ImAlphaU32(ImU32 col, float alpha);Set alpha channel of 32-bit color from float in range [0.0 1.0] (private API)
ImPlot3D::ImMixU32¶
static inline ImU32 ImMixU32(ImU32 a, ImU32 b, ImU32 s);Mix color a and b by factor s in [0 256] (private API)
Internal Enumerations¶
ImPlot3DMarkerInternal_ (enum)¶
enum ImPlot3DMarkerInternal_| Member | Value | |
|---|---|---|
ImPlot3DMarker_Invalid = -3, } | -3 |
ImPlot3DNextItemData (struct)¶
struct ImPlot3DNextItemData| Member | |
|---|---|
ImPlot3DSpec Spec; | |
bool RenderLine; | |
bool RenderFill; | |
bool RenderMarkerLine; | |
bool RenderMarkerFill; | |
bool IsAutoFill; | |
bool IsAutoLine; | |
bool Hidden; |
ImPlot3DNextItemData::ImPlot3DNextItemData¶
ImPlot3DNextItemData();ImPlot3DNextItemData::Reset¶
void Reset();(private API)
ImPlot3DColormapData (struct)¶
struct ImPlot3DColormapDataColormap data storage
| Member | |
|---|---|
int Count; |
ImPlot3DColormapData::ImPlot3DColormapData¶
ImPlot3DColormapData();ImPlot3DColormapData::Append¶
int Append(const char* name, const ImU32* keys, int count, bool qual);(private API)
ImPlot3DColormapData::RebuildTables¶
void RebuildTables();(private API)
ImPlot3DColormapData::IsQual¶
inline bool IsQual(ImPlot3DColormap cmap) const;(private API)
ImPlot3DColormapData::GetName¶
inline const char* GetName(ImPlot3DColormap cmap) const;(private API)
ImPlot3DColormapData::GetIndex¶
inline ImPlot3DColormap GetIndex(const char* name) const;(private API)
ImPlot3DColormapData::GetKeys¶
inline const ImU32* GetKeys(ImPlot3DColormap cmap) const;(private API)
ImPlot3DColormapData::GetKeyCount¶
inline int GetKeyCount(ImPlot3DColormap cmap) const;(private API)
ImPlot3DColormapData::GetKeyColor¶
inline ImU32 GetKeyColor(ImPlot3DColormap cmap, int idx) const;(private API)
ImPlot3DColormapData::SetKeyColor¶
inline void SetKeyColor(ImPlot3DColormap cmap, int idx, ImU32 value);(private API)
ImPlot3DColormapData::GetTable¶
inline const ImU32* GetTable(ImPlot3DColormap cmap) const;(private API)
ImPlot3DColormapData::GetTableSize¶
inline int GetTableSize(ImPlot3DColormap cmap) const;(private API)
ImPlot3DColormapData::GetTableColor¶
inline ImU32 GetTableColor(ImPlot3DColormap cmap, int idx) const;(private API)
ImPlot3DColormapData::LerpTable¶
inline ImU32 LerpTable(ImPlot3DColormap cmap, float t) const;(private API)
ImPlot3DItem (struct)¶
struct ImPlot3DItemState information for plot items
| Member | |
|---|---|
ImGuiID ID; | |
ImU32 Color; | |
ImPlot3DMarker Marker; | |
int NameOffset; | |
bool Show; | |
bool LegendHovered; | |
bool SeenThisFrame; |
ImPlot3DItem::ImPlot3DItem¶
ImPlot3DItem();ImPlot3DLegend (struct)¶
struct ImPlot3DLegendHolds legend state
| Member | |
|---|---|
ImPlot3DLegendFlags Flags; | |
ImPlot3DLegendFlags PreviousFlags; | |
ImPlot3DLocation Location; | |
ImPlot3DLocation PreviousLocation; | |
ImVec2 Scroll; | |
ImRect Rect; | |
ImRect RectClamped; | |
bool Hovered; | |
bool Held; |
ImPlot3DLegend::ImPlot3DLegend¶
ImPlot3DLegend();ImPlot3DLegend::Reset¶
void Reset();(private API)
ImPlot3DItemGroup (struct)¶
struct ImPlot3DItemGroupHolds items
| Member | |
|---|---|
ImGuiID ID; | |
ImPlot3DLegend Legend; | |
int ColormapIdx; | |
ImPlot3DMarker MarkerIdx; |
ImPlot3DItemGroup::ImPlot3DItemGroup¶
ImPlot3DItemGroup();ImPlot3DItemGroup::GetItemCount¶
int GetItemCount() const;(private API)
ImPlot3DItemGroup::GetItemID¶
ImGuiID GetItemID(const char* label_id);(private API)
ImPlot3DItemGroup::GetItem¶
ImPlot3DItem* GetItem(ImGuiID id);ImPlot3DItem* GetItem(const char* label_id);(private API)
ImPlot3DItemGroup::GetOrAddItem¶
ImPlot3DItem* GetOrAddItem(ImGuiID id);(private API)
ImPlot3DItemGroup::GetItemByIndex¶
ImPlot3DItem* GetItemByIndex(int i);(private API)
ImPlot3DItemGroup::GetItemIndex¶
int GetItemIndex(ImPlot3DItem* item);(private API)
ImPlot3DItemGroup::GetLegendCount¶
int GetLegendCount() const;(private API)
ImPlot3DItemGroup::GetLegendItem¶
ImPlot3DItem* GetLegendItem(int i);(private API)
ImPlot3DItemGroup::GetLegendLabel¶
const char* GetLegendLabel(int i);(private API)
ImPlot3DItemGroup::Reset¶
void Reset();(private API)
ImPlot3DTick (struct)¶
struct ImPlot3DTickTick mark info
| Member | |
|---|---|
double PlotPos; | |
bool Major; | |
bool ShowLabel; | |
ImVec2 LabelSize; | |
int TextOffset; | |
int Idx; |
ImPlot3DTick::ImPlot3DTick¶
ImPlot3DTick(double value, bool major, bool show_label);ImPlot3DTicker (struct)¶
struct ImPlot3DTickerCollection of ticks
ImPlot3DTicker::ImPlot3DTicker¶
ImPlot3DTicker();ImPlot3DTicker::AddTick¶
ImPlot3DTick& AddTick(double value, bool major, bool show_label, const char* label);inline ImPlot3DTick& AddTick(ImPlot3DTick tick);(private API)
ImPlot3DTicker::GetText¶
const char* GetText(int idx) const;const char* GetText(const ImPlot3DTick& tick) const;(private API)
ImPlot3DTicker::Reset¶
void Reset();(private API)
ImPlot3DTicker::TickCount¶
int TickCount() const;(private API)
ImPlot3DAxis (struct)¶
struct ImPlot3DAxisHolds axis information
| Member | |
|---|---|
ImPlot3DAxisFlags Flags; | |
ImPlot3DAxisFlags PreviousFlags; | |
ImPlot3DRange Range; | |
ImPlot3DCond RangeCond; | |
double NDCScale; | |
ImPlot3DScale Scale; | |
ImPlot3DTicker Ticker; | |
void* FormatterData; | |
bool ShowDefaultTicks; | |
void* TransformData; | Custom transform data set by the user |
ImPlot3DRange ScaledRange; | Cached scaled range values |
bool FitThisFrame; | |
ImPlot3DRange FitExtents; | |
ImPlot3DRange ConstraintRange; | |
ImPlot3DRange ConstraintZoom; | |
bool Hovered; | |
bool Held; | |
ImU32 ColorBg; | |
ImU32 ColorHov; | |
ImU32 ColorAct; |
ImPlot3DAxis::ImPlot3DAxis¶
ImPlot3DAxis();Constructor
ImPlot3DAxis::Reset¶
inline void Reset();(private API)
ImPlot3DAxis::SetRange¶
inline void SetRange(double v1, double v2);(private API)
ImPlot3DAxis::SetMin¶
inline bool SetMin(double _min, bool force = false);(private API)
ImPlot3DAxis::SetMax¶
inline bool SetMax(double _max, bool force = false);(private API)
ImPlot3DAxis::Constrain¶
inline void Constrain();(private API)
ImPlot3DAxis::UpdateTransformCache¶
inline void UpdateTransformCache();(private API)
ImPlot3DAxis::PlotToNDC¶
inline double PlotToNDC(double plt) const;(private API)
ImPlot3DAxis::NDCToPlot¶
inline double NDCToPlot(double t) const;(private API)
ImPlot3DAxis::IsRangeLocked¶
inline bool IsRangeLocked() const;(private API)
ImPlot3DAxis::IsLockedMin¶
inline bool IsLockedMin() const;(private API)
ImPlot3DAxis::IsLockedMax¶
inline bool IsLockedMax() const;(private API)
ImPlot3DAxis::IsLocked¶
inline bool IsLocked() const;(private API)
ImPlot3DAxis::IsInputLockedMin¶
inline bool IsInputLockedMin() const;(private API)
ImPlot3DAxis::IsInputLockedMax¶
inline bool IsInputLockedMax() const;(private API)
ImPlot3DAxis::IsInputLocked¶
inline bool IsInputLocked() const;(private API)
ImPlot3DAxis::IsPanLocked¶
inline bool IsPanLocked(bool increasing);(private API)
ImPlot3DAxis::SetLabel¶
inline void SetLabel(const char* label);(private API)
ImPlot3DAxis::GetLabel¶
inline const char* GetLabel() const;(private API)
ImPlot3DAxis::NDCSize¶
inline double NDCSize() const;(private API)
ImPlot3DAxis::SetAspect¶
inline void SetAspect(double units_per_ndc_unit);(private API)
ImPlot3DAxis::GetAspect¶
double GetAspect() const;(private API)
ImPlot3DAxis::HasLabel¶
bool HasLabel() const;(private API)
ImPlot3DAxis::HasGridLines¶
bool HasGridLines() const;(private API)
ImPlot3DAxis::HasTickLabels¶
bool HasTickLabels() const;(private API)
ImPlot3DAxis::HasTickMarks¶
bool HasTickMarks() const;(private API)
ImPlot3DAxis::IsAutoFitting¶
bool IsAutoFitting() const;(private API)
ImPlot3DAxis::ExtendFit¶
void ExtendFit(double value);(private API)
ImPlot3DAxis::ApplyFit¶
void ApplyFit();(private API)
ImPlot3DPlot (struct)¶
struct ImPlot3DPlotHolds plot state information that must persist after EndPlot
| Member | |
|---|---|
ImGuiID ID; | |
ImPlot3DFlags Flags; | |
ImPlot3DFlags PreviousFlags; | |
bool JustCreated; | |
bool Initialized; | |
ImRect FrameRect; | Outermost bounding rectangle that encapsulates whole the plot/title/padding/etc |
ImRect CanvasRect; | Frame rectangle reduced by padding |
ImRect PlotRect; | Bounding rectangle for the actual plot area |
ImPlot3DQuat InitialRotation; | Initial rotation quaternion |
ImPlot3DQuat Rotation; | Current rotation quaternion |
ImPlot3DCond RotationCond; | |
float AnimationTime; | Remaining animation time |
ImPlot3DQuat RotationAnimationEnd; | End rotation for animation |
bool SetupLocked; | |
bool Hovered; | |
bool Held; | |
int HeldEdgeIdx; | Index of the edge being held |
int HeldPlaneIdx; | Index of the plane being held |
ImPlot3DPoint DragRotationAxis; | Axis of rotation for the duration of a drag |
bool FitThisFrame; | |
ImPlot3DItemGroup Items; | |
bool ContextClick; | True if context button was clicked (to distinguish from double click) |
bool OpenContextThisFrame; |
ImPlot3DPlot::ImPlot3DPlot¶
ImPlot3DPlot();ImPlot3DPlot::SetTitle¶
inline void SetTitle(const char* title);(private API)
ImPlot3DPlot::HasTitle¶
inline bool HasTitle() const;(private API)
ImPlot3DPlot::GetTitle¶
inline const char* GetTitle() const;(private API)
ImPlot3DPlot::IsRotationLocked¶
inline bool IsRotationLocked() const;(private API)
ImPlot3DPlot::ExtendFit¶
void ExtendFit(const ImPlot3DPoint& point);Extends the fit range of all three axes to include the provided point (private API)
ImPlot3DPlot::RangeMin¶
ImPlot3DPoint RangeMin() const;Returns the minimum of the range in all three dimensions (private API)
ImPlot3DPlot::RangeMax¶
ImPlot3DPoint RangeMax() const;Returns the maximum of the range in all three dimensions (private API)
ImPlot3DPlot::RangeCenter¶
ImPlot3DPoint RangeCenter() const;Returns the point at the center of the range in all three dimensions (private API)
ImPlot3DPlot::SetRange¶
void SetRange(const ImPlot3DPoint& min, const ImPlot3DPoint& max);Sets the range of all three axes (private API)
ImPlot3DPlot::GetViewScale¶
float GetViewScale() const;Returns the scale of the plot view (constant to convert from NDC coordinates to pixels coordinates) (private API)
ImPlot3DPlot::GetBoxScale¶
ImPlot3DPoint GetBoxScale() const;Returns the scale of the plot box in each dimension (private API)
ImPlot3DPlot::ApplyEqualAspect¶
void ApplyEqualAspect(ImAxis3D ref_axis);Applies equal aspect ratio constraint using the specified axis as reference.
Other axes are adjusted to match the reference axis’s aspect ratio (units per NDC unit).
(private API)
ImPlot3DContext (struct)¶
struct ImPlot3DContext| Member | |
|---|---|
ImPlot3DPlot* CurrentPlot; | |
ImPlot3DItemGroup* CurrentItems; | |
ImPlot3DItem* CurrentItem; | |
ImPlot3DNextItemData NextItemData; | |
ImPlot3DStyle Style; | |
ImPlot3DColormapData ColormapData; |
Context Utils¶
ImPlot3D::InitializeContext¶
IMPLOT3D_API void InitializeContext(ImPlot3DContext* ctx);Initialize ImPlot3DContext
ImPlot3D::ResetContext¶
IMPLOT3D_API void ResetContext(ImPlot3DContext* ctx);Reset ImPlot3DContext
Style Utils¶
ImPlot3D::IsColorAuto¶
IMPLOT3D_API bool IsColorAuto(const ImVec4& col);IMPLOT3D_API bool IsColorAuto(ImPlot3DCol idx);ImPlot3D::GetAutoColor¶
IMPLOT3D_API ImVec4 GetAutoColor(ImPlot3DCol idx);ImPlot3D::GetStyleColorName¶
IMPLOT3D_API const char* GetStyleColorName(ImPlot3DCol idx);Returns white or black text given background color¶
ImPlot3D::CalcTextColor¶
static inline ImU32 CalcTextColor(const ImVec4& bg);static inline ImU32 CalcTextColor(ImU32 bg);(private API)
ImPlot3D::GetItemData¶
IMPLOT3D_API const ImPlot3DNextItemData& GetItemData();Get styling data for next item (call between BeginItem/EndItem)
ImPlot3D::GetColormapColorU32¶
IMPLOT3D_API ImU32 GetColormapColorU32(int idx, ImPlot3DColormap cmap);Returns a color from the Color map given an index >= 0 (modulo will be performed)
ImPlot3D::NextColormapColorU32¶
IMPLOT3D_API ImU32 NextColormapColorU32();Returns the next unused colormap color and advances the colormap. Can be used to skip colors if desired
ImPlot3D::RenderColorBar¶
IMPLOT3D_API void RenderColorBar(const ImU32* colors, int size, ImDrawList& DrawList, const ImRect& bounds, bool vert, bool reversed, bool continuous);Render a colormap bar
Item Utils¶
ImPlot3D::BeginItem¶
IMPLOT3D_API bool BeginItem(const char* label_id, const ImPlot3DSpec& spec = ImPlot3DSpec(), const ImVec4& item_col = IMPLOT3D_AUTO_COL, ImPlot3DMarker item_mkr = ImPlot3DMarker_Invalid);Begins a new item. Returns False if the item should not be plotted
ImPlot3D::EndItem¶
IMPLOT3D_API void EndItem();ImPlot3D::RegisterOrGetItem¶
IMPLOT3D_API ImPlot3DItem* RegisterOrGetItem(const char* label_id, ImPlot3DItemFlags flags, bool* just_created = nullptr);Register or get an existing item from the current plot
ImPlot3D::GetCurrentItem¶
IMPLOT3D_API ImPlot3DItem* GetCurrentItem();Gets the current item from ImPlot3DContext
ImPlot3D::BustItemCache¶
IMPLOT3D_API void BustItemCache();Busts the cache for every item for every plot in the current context
ImPlot3D::AddTextRotated¶
IMPLOT3D_API void AddTextRotated(ImDrawList* draw_list, ImVec2 pos, float angle, ImU32 col, const char* text_begin, const char* text_end = nullptr);TODO move to another place
Plot Utils¶
ImPlot3D::GetCurrentPlot¶
IMPLOT3D_API ImPlot3DPlot* GetCurrentPlot();Gets the current plot from ImPlot3DContext
ImPlot3D::BustPlotCache¶
IMPLOT3D_API void BustPlotCache();Busts the cache for every plot in the current context
ImPlot3D::GetFramePos¶
IMPLOT3D_API ImVec2 GetFramePos();Get the current frame position (top-left) in pixels
ImPlot3D::GetFrameSize¶
IMPLOT3D_API ImVec2 GetFrameSize();Get the current frame size in pixels
ImPlot3D::PlotToNDC¶
IMPLOT3D_API ImPlot3DPoint PlotToNDC(const ImPlot3DPoint& point);Convert a position in the current plot’s coordinate system to the current plot’s normalized device coordinate system (NDC)
When the cube’s aspect ratio is [1,1,1], the NDC ranges from [-0.5, 0.5] along each axis
ImPlot3D::NDCToPlot¶
IMPLOT3D_API ImPlot3DPoint NDCToPlot(const ImPlot3DPoint& point);ImPlot3D::NDCToPixels¶
IMPLOT3D_API ImVec2 NDCToPixels(const ImPlot3DPoint& point);Convert a position in the current plot’s NDC to pixels
ImPlot3D::PixelsToNDCRay¶
IMPLOT3D_API ImPlot3DRay PixelsToNDCRay(const ImVec2& pix);Convert a pixel coordinate to a ray in the NDC
ImPlot3D::NDCRayToPlotRay¶
IMPLOT3D_API ImPlot3DRay NDCRayToPlotRay(const ImPlot3DRay& ray);Convert a ray in the NDC to a ray in the current plot’s coordinate system
Setup Utils¶
ImPlot3D::SetupLock¶
IMPLOT3D_API void SetupLock();Transforms¶
ImPlot3D::TransformForward_Log10¶
static inline double TransformForward_Log10(double v, void*);(private API)
ImPlot3D::TransformInverse_Log10¶
static inline double TransformInverse_Log10(double v, void*);(private API)
ImPlot3D::TransformForward_SymLog¶
static inline double TransformForward_SymLog(double v, void*);(private API)
ImPlot3D::TransformInverse_SymLog¶
static inline double TransformInverse_SymLog(double v, void*);(private API)