__init__.pyi 88 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880
  1. ###############################################################################
  2. # This file is a part of Dear ImGui Bundle, NOT a part of ImPlot3D
  3. # -----------------------------------------------------------------------------
  4. # implot3d/__init__.pyi is the equivalent of implot3d.h, using the bindings
  5. # provided by Dear ImGui Bundle.
  6. #
  7. # It is automatically generated (using https://pthom.github.io/litgen/),
  8. # and is generally very close to the C++ version. Comments, docs are identical.
  9. ###############################################################################
  10. # ruff: noqa: B008, F821, F811
  11. from typing import Any, Optional, List, overload
  12. import numpy as np
  13. import enum
  14. from . import internal as internal
  15. from imgui_bundle import imgui
  16. from imgui_bundle.imgui import ImVec2, ImVec2Like, ImVec4, ImVec4Like, ImU32, ImDrawList, ImTextureRef, WindowFlags
  17. ImageFlags = int # enum ImageFlags_
  18. ImGui_Context = imgui.internal.Context
  19. ##################################################
  20. # Manually inserted code (typedefs, etc.)
  21. ##################################################
  22. IMPLOT3D_AUTO = -1 # Deduce variable automatically
  23. IMPLOT3D_AUTO_COL = ImVec4(0, 0, 0, -1) # Deduce color automatically
  24. AUTO = IMPLOT3D_AUTO
  25. AUTO_COL = IMPLOT3D_AUTO_COL
  26. VERSION: str
  27. UInt = int
  28. Context = Any
  29. ImAxis3D = int # enum ImAxis3D_
  30. # // Flags
  31. # typedef int ImPlot3DFlags; // -> ImPlot3DFlags_ // Flags: for BeginPlot()
  32. Flags = int # enum Flags_ (ImPlot3DFlags)
  33. # typedef int ImPlot3DItemFlags; // -> ImPlot3DItemFlags_ // Flags: Item flags
  34. ItemFlags = int # enum ItemFlags_
  35. # typedef int ImPlot3DScatterFlags; // -> ImPlot3DScatterFlags_ // Flags: Scatter plot flags
  36. ScatterFlags = int # enum ScatterFlags_
  37. # typedef int ImPlot3DLineFlags; // -> ImPlot3DLineFlags_ // Flags: Line plot flags
  38. LineFlags = int # enum LineFlags_
  39. # typedef int ImPlot3DTriangleFlags; // -> ImPlot3DTriangleFlags_ // Flags: Triangle plot flags
  40. TriangleFlags = int # enum TriangleFlags_
  41. # typedef int ImPlot3DQuadFlags; // -> ImPlot3DQuadFlags_ // Flags: QuadFplot flags
  42. QuadFlags = int # enum QuadFlags_
  43. # typedef int ImPlot3DSurfaceFlags; // -> ImPlot3DSurfaceFlags_ // Flags: Surface plot flags
  44. SurfaceFlags = int # enum SurfaceFlags_
  45. # typedef int ImPlot3DMeshFlags; // -> ImPlot3DMeshFlags_ // Flags: Mesh plot flags
  46. MeshFlags = int # enum MeshFlags_
  47. # typedef int ImPlot3DLegendFlags; // -> ImPlot3DLegendFlags_ // Flags: Legend flags
  48. LegendFlags = int # enum LegendFlags_
  49. # typedef int ImPlot3DAxisFlags; // -> ImPlot3DAxisFlags_ // Flags: Axis flags
  50. AxisFlags = int # enum AxisFlags_
  51. # typedef int ImPlot3DColormap; // -> ImPlot3DColormap_ // Enum: Colormaps
  52. Colormap = int # enum Colormap_
  53. # // Enums
  54. # typedef int ImPlot3DCond; // -> ImPlot3DCond_ // Enum: Condition for flags
  55. Cond = int # enum Cond_
  56. # typedef int ImPlot3DCol; // -> ImPlot3DCol_ // Enum: Styling colors
  57. Col = int # enum Col_
  58. # typedef int ImPlot3DStyleVar; // -> ImPlot3DStyleVar_ // Enum: Style variables
  59. StyleVar = int # enum StyleVar_
  60. # typedef int ImPlot3DMarker; // -> ImPlot3DMarker_ // Enum: Marker styles
  61. Marker = int # enum Marker_
  62. # typedef int ImPlot3DLocation; // -> ImPlot3DLocation_ // Enum: Locations
  63. Location = int # enum Location_
  64. # typedef int ImAxis3D; // -> ImAxis3D_ // Enum: Axis indices
  65. # typedef int ImPlane3D; // -> ImPlane3D_ // Enum: Plane indices
  66. ImPlane3D = int # enum ImPlane3D_
  67. # typedef int ImPlot3DColormap; // -> ImPlot3DColormap_ // Enum: Colormaps
  68. Scale = int # enum Scale_
  69. Marker_Auto = Marker_.auto
  70. ItemFlags_None = ItemFlags_.none
  71. """
  72. """
  73. # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AUTOGENERATED CODE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  74. # <litgen_stub> // Autogenerated code below! Do not edit!
  75. #################### <generated_from:implot3d.h> ####################
  76. # SPDX-License-Identifier: MIT
  77. # SPDX-FileCopyrightText: 2024-2026 Breno Cunha Queiroz
  78. # ImPlot3D v0.5 WIP
  79. # Acknowledgments:
  80. # ImPlot3D is heavily inspired by ImPlot
  81. # (https://github.com/epezent/implot) by Evan Pezent,
  82. # and follows a similar code style and structure to
  83. # maintain consistency with ImPlot's API.
  84. # Table of Contents:
  85. # [SECTION] Macros and Defines
  86. # [SECTION] Forward declarations and basic types
  87. # [SECTION] Flags & Enumerations
  88. # [SECTION] Specs API
  89. # [SECTION] Callbacks
  90. # [SECTION] Context
  91. # [SECTION] Begin/End Plot
  92. # [SECTION] Setup
  93. # [SECTION] Plot Items
  94. # [SECTION] Plot Utils
  95. # [SECTION] Miscellaneous
  96. # [SECTION] Styles API (legacy)
  97. # [SECTION] Demo
  98. # [SECTION] Debugging
  99. # [SECTION] ImPlot3DPoint
  100. # [SECTION] ImPlot3DRay
  101. # [SECTION] ImPlot3DPlane
  102. # [SECTION] ImPlot3DBox
  103. # [SECTION] ImPlot3DQuat
  104. # [SECTION] ImPlot3DStyle
  105. # [SECTION] Meshes
  106. # [SECTION] Obsolete API
  107. # #ifndef IMGUI_DISABLE
  108. #
  109. # [ADAPT_IMGUI_BUNDLE]
  110. # #ifdef IMGUI_BUNDLE_PYTHON_API
  111. #
  112. # #endif
  113. #
  114. # [/ADAPT_IMGUI_BUNDLE]
  115. # -----------------------------------------------------------------------------
  116. # [SECTION] Macros and Defines
  117. # -----------------------------------------------------------------------------
  118. # -----------------------------------------------------------------------------
  119. # [SECTION] Forward declarations and basic types
  120. # -----------------------------------------------------------------------------
  121. # Forward declarations
  122. # Enums
  123. # Flags
  124. # Fallback for ImGui versions before v1.92: define ImTextureRef as ImTextureID
  125. # You can `#define IMPLOT3D_NO_IMTEXTUREREF` to avoid this fallback
  126. # -----------------------------------------------------------------------------
  127. # [SECTION] Flags & Enumerations
  128. # -----------------------------------------------------------------------------
  129. class Prop_(enum.IntFlag):
  130. """Plotting properties. These provide syntactic sugar for creating ImPlot3DSpec from (ImPlot3DProp,value) pairs"""
  131. # ImPlot3DProp_LineColor, /* original C++ signature */
  132. line_color = enum.auto() # (= 0) # Line color; IMPLOT3D_AUTO_COL will use next Colormap color
  133. # ImPlot3DProp_LineColors, /* original C++ signature */
  134. line_colors = enum.auto() # (= 1) # Array of line colors (ImU32*); if None, use LineColor for all
  135. # ImPlot3DProp_LineWeight, /* original C++ signature */
  136. line_weight = enum.auto() # (= 2) # Line weight in pixels
  137. # ImPlot3DProp_FillColor, /* original C++ signature */
  138. fill_color = (
  139. enum.auto()
  140. ) # (= 3) # Fill color (applies to shaded regions); IMPLOT3D_AUTO_COL will use next Colormap color
  141. # ImPlot3DProp_FillColors, /* original C++ signature */
  142. fill_colors = enum.auto() # (= 4) # Array of fill colors (ImU32*); if None, use FillColor for all
  143. # ImPlot3DProp_FillAlpha, /* original C++ signature */
  144. fill_alpha = (
  145. enum.auto()
  146. ) # (= 5) # Alpha multiplier (applies to FillColor, FillColors, MarkerFillColor, and MarkerFillColors)
  147. # ImPlot3DProp_Marker, /* original C++ signature */
  148. marker = enum.auto() # (= 6) # Marker type
  149. # ImPlot3DProp_MarkerSize, /* original C++ signature */
  150. marker_size = enum.auto() # (= 7) # Size of markers (radius) *in pixels*
  151. # ImPlot3DProp_MarkerSizes, /* original C++ signature */
  152. marker_sizes = enum.auto() # (= 8) # Array of marker sizes (float*); if None, use MarkerSize for all
  153. # ImPlot3DProp_MarkerLineColor, /* original C++ signature */
  154. marker_line_color = enum.auto() # (= 9) # Marker outline color; IMPLOT3D_AUTO_COL will use next LineColor
  155. # ImPlot3DProp_MarkerLineColors, /* original C++ signature */
  156. marker_line_colors = (
  157. enum.auto()
  158. ) # (= 10) # Array of marker outline colors (ImU32*); if None, use MarkerLineColor for all
  159. # ImPlot3DProp_MarkerFillColor, /* original C++ signature */
  160. marker_fill_color = enum.auto() # (= 11) # Marker fill color; IMPLOT3D_AUTO_COL will use LineColor
  161. # ImPlot3DProp_MarkerFillColors, /* original C++ signature */
  162. marker_fill_colors = (
  163. enum.auto()
  164. ) # (= 12) # Array of marker fill colors (ImU32*); if None, use MarkerFillColor for all
  165. # ImPlot3DProp_Offset, /* original C++ signature */
  166. offset = enum.auto() # (= 13) # Data index offset
  167. # ImPlot3DProp_Stride, /* original C++ signature */
  168. stride = (
  169. enum.auto()
  170. ) # (= 14) # Data stride in bytes; IMPLOT3D_AUTO will result in sizeof(T) where T is the type passed to PlotX
  171. # ImPlot3DProp_Flags /* original C++ signature */
  172. flags = (
  173. enum.auto()
  174. ) # (= 15) # Optional item flags; can be composed from common ImPlot3DItemFlags and/or specialized ImPlot3DXFlags
  175. class Flags_(enum.IntFlag):
  176. """Flags for ImPlot3D::BeginPlot()"""
  177. # ImPlot3DFlags_None = 0, /* original C++ signature */
  178. none = enum.auto() # (= 0) # Default
  179. # ImPlot3DFlags_NoTitle = 1 << 0, /* original C++ signature */
  180. no_title = enum.auto() # (= 1 << 0) # Hide plot title
  181. # ImPlot3DFlags_NoLegend = 1 << 1, /* original C++ signature */
  182. no_legend = enum.auto() # (= 1 << 1) # Hide plot legend
  183. # ImPlot3DFlags_NoMouseText = 1 << 2, /* original C++ signature */
  184. no_mouse_text = enum.auto() # (= 1 << 2) # Hide mouse position in plot coordinates
  185. # ImPlot3DFlags_NoClip = 1 << 3, /* original C++ signature */
  186. no_clip = enum.auto() # (= 1 << 3) # Disable 3D box clipping
  187. # ImPlot3DFlags_NoMenus = 1 << 4, /* original C++ signature */
  188. no_menus = enum.auto() # (= 1 << 4) # The user will not be able to open context menus
  189. # ImPlot3DFlags_Equal = 1 << 5, /* original C++ signature */
  190. equal = enum.auto() # (= 1 << 5) # X, Y, and Z axes will be constrained to have the same units/pixel
  191. # ImPlot3DFlags_NoRotate = 1 << 6, /* original C++ signature */
  192. no_rotate = enum.auto() # (= 1 << 6) # Lock rotation interaction
  193. # ImPlot3DFlags_NoPan = 1 << 7, /* original C++ signature */
  194. no_pan = enum.auto() # (= 1 << 7) # Lock panning/translation interaction
  195. # ImPlot3DFlags_NoZoom = 1 << 8, /* original C++ signature */
  196. no_zoom = enum.auto() # (= 1 << 8) # Lock zoom interaction
  197. # ImPlot3DFlags_NoInputs = 1 << 9, /* original C++ signature */
  198. no_inputs = enum.auto() # (= 1 << 9) # Disable all user inputs
  199. # ImPlot3DFlags_CanvasOnly = ImPlot3DFlags_NoTitle | ImPlot3DFlags_NoLegend | ImPlot3DFlags_NoMouseText, /* original C++ signature */
  200. # }
  201. canvas_only = enum.auto() # (= Flags_NoTitle | Flags_NoLegend | Flags_NoMouseText)
  202. class Cond_(enum.IntFlag):
  203. """Represents a condition for SetupAxisLimits etc. (same as ImGuiCond, but we only support a subset of those enums)"""
  204. # ImPlot3DCond_None = ImGuiCond_None, /* original C++ signature */
  205. none = enum.auto() # (= Cond_None) # No condition (always set the variable), same as _Always
  206. # ImPlot3DCond_Always = ImGuiCond_Always, /* original C++ signature */
  207. always = enum.auto() # (= Cond_Always) # No condition (always set the variable)
  208. # ImPlot3DCond_Once = ImGuiCond_Once, /* original C++ signature */
  209. once = enum.auto() # (= Cond_Once) # Set the variable once per runtime session (only the first call will succeed)
  210. class Col_(enum.IntFlag):
  211. # Plot colors
  212. # ImPlot3DCol_TitleText, /* original C++ signature */
  213. title_text = enum.auto() # (= 0) # Title color
  214. # ImPlot3DCol_InlayText, /* original C++ signature */
  215. inlay_text = enum.auto() # (= 1) # Color for texts appearing inside of plots
  216. # ImPlot3DCol_FrameBg, /* original C++ signature */
  217. frame_bg = enum.auto() # (= 2) # Frame background color
  218. # ImPlot3DCol_PlotBg, /* original C++ signature */
  219. plot_bg = enum.auto() # (= 3) # Plot area background color
  220. # ImPlot3DCol_PlotBorder, /* original C++ signature */
  221. plot_border = enum.auto() # (= 4) # Plot area border color
  222. # Legend colors
  223. # ImPlot3DCol_LegendBg, /* original C++ signature */
  224. legend_bg = enum.auto() # (= 5) # Legend background color
  225. # ImPlot3DCol_LegendBorder, /* original C++ signature */
  226. legend_border = enum.auto() # (= 6) # Legend border color
  227. # ImPlot3DCol_LegendText, /* original C++ signature */
  228. legend_text = enum.auto() # (= 7) # Legend text color
  229. # Axis colors
  230. # ImPlot3DCol_AxisText, /* original C++ signature */
  231. axis_text = enum.auto() # (= 8) # Axis label and tick lables color
  232. # ImPlot3DCol_AxisGrid, /* original C++ signature */
  233. axis_grid = enum.auto() # (= 9) # Axis grid color
  234. # ImPlot3DCol_AxisTick, /* original C++ signature */
  235. axis_tick = enum.auto() # (= 10) # Axis tick color (defaults to AxisGrid)
  236. # ImPlot3DCol_AxisBg, /* original C++ signature */
  237. axis_bg = enum.auto() # (= 11) # Background color of axis hover region (defaults to transparent)
  238. # ImPlot3DCol_AxisBgHovered, /* original C++ signature */
  239. axis_bg_hovered = enum.auto() # (= 12) # Axis hover color (defaults to ImGuiCol_ButtonHovered)
  240. # ImPlot3DCol_AxisBgActive, /* original C++ signature */
  241. axis_bg_active = enum.auto() # (= 13) # Axis active color (defaults to ImGuiCol_ButtonActive)
  242. # ImPlot3DCol_COUNT, /* original C++ signature */
  243. # }
  244. count = enum.auto() # (= 14)
  245. class StyleVar_(enum.IntFlag):
  246. """Plot styling variables"""
  247. # Item style
  248. # ImPlot3DStyleVar_LineWeight, /* original C++ signature */
  249. line_weight = enum.auto() # (= 0) # float, plot item line weight in pixels
  250. # ImPlot3DStyleVar_Marker, /* original C++ signature */
  251. marker = enum.auto() # (= 1) # int, marker specification
  252. # ImPlot3DStyleVar_MarkerSize, /* original C++ signature */
  253. marker_size = enum.auto() # (= 2) # float, marker size in pixels (roughly the marker's "radius")
  254. # ImPlot3DStyleVar_FillAlpha, /* original C++ signature */
  255. fill_alpha = enum.auto() # (= 3) # float, alpha modifier applied to all plot item fills
  256. # Plot style
  257. # ImPlot3DStyleVar_PlotDefaultSize, /* original C++ signature */
  258. plot_default_size = enum.auto() # (= 4) # ImVec2, default size used when ImVec2(0,0) is passed to BeginPlot
  259. # ImPlot3DStyleVar_PlotMinSize, /* original C++ signature */
  260. plot_min_size = enum.auto() # (= 5) # ImVec2, minimum size plot frame can be when shrunk
  261. # ImPlot3DStyleVar_PlotPadding, /* original C++ signature */
  262. plot_padding = (
  263. enum.auto()
  264. ) # (= 6) # ImVec2, padding between widget frame and plot area, labels, or outside legends (i.e. main padding)
  265. # ImPlot3DStyleVar_LabelPadding, /* original C++ signature */
  266. label_padding = enum.auto() # (= 7) # ImVec2, padding between axes labels, tick labels, and plot edge
  267. # ImPlot3DStyleVar_ViewScaleFactor, /* original C++ signature */
  268. view_scale_factor = (
  269. enum.auto()
  270. ) # (= 8) # float, scale factor for 3D view, you can use it to make the whole plot larger or smaller
  271. # Legend style
  272. # ImPlot3DStyleVar_LegendPadding, /* original C++ signature */
  273. legend_padding = enum.auto() # (= 9) # ImVec2, legend padding from plot edges
  274. # ImPlot3DStyleVar_LegendInnerPadding, /* original C++ signature */
  275. legend_inner_padding = enum.auto() # (= 10) # ImVec2, legend inner padding from legend edges
  276. # ImPlot3DStyleVar_LegendSpacing, /* original C++ signature */
  277. legend_spacing = enum.auto() # (= 11) # ImVec2, spacing between legend entries
  278. # ImPlot3DStyleVar_COUNT /* original C++ signature */
  279. # }
  280. count = enum.auto() # (= 12)
  281. class Marker_(enum.IntFlag):
  282. # ImPlot3DMarker_None = -2, /* original C++ signature */
  283. none = enum.auto() # (= -2) # No marker
  284. # ImPlot3DMarker_Auto = -1, /* original C++ signature */
  285. auto = enum.auto() # (= -1) # Automatic marker selection
  286. # ImPlot3DMarker_Circle, /* original C++ signature */
  287. circle = enum.auto() # (= 0) # Circle marker (default)
  288. # ImPlot3DMarker_Square, /* original C++ signature */
  289. square = enum.auto() # (= 1) # Square maker
  290. # ImPlot3DMarker_Diamond, /* original C++ signature */
  291. diamond = enum.auto() # (= 2) # Diamond marker
  292. # ImPlot3DMarker_Up, /* original C++ signature */
  293. up = enum.auto() # (= 3) # Upward-pointing triangle marker
  294. # ImPlot3DMarker_Down, /* original C++ signature */
  295. down = enum.auto() # (= 4) # Downward-pointing triangle marker
  296. # ImPlot3DMarker_Left, /* original C++ signature */
  297. left = enum.auto() # (= 5) # Leftward-pointing triangle marker
  298. # ImPlot3DMarker_Right, /* original C++ signature */
  299. right = enum.auto() # (= 6) # Rightward-pointing triangle marker
  300. # ImPlot3DMarker_Cross, /* original C++ signature */
  301. cross = enum.auto() # (= 7) # Cross marker (not fillable)
  302. # ImPlot3DMarker_Plus, /* original C++ signature */
  303. plus = enum.auto() # (= 8) # Plus marker (not fillable)
  304. # ImPlot3DMarker_Asterisk, /* original C++ signature */
  305. asterisk = enum.auto() # (= 9) # Asterisk marker (not fillable)
  306. # ImPlot3DMarker_COUNT /* original C++ signature */
  307. # }
  308. count = enum.auto() # (= 10)
  309. class ItemFlags_(enum.IntFlag):
  310. """Flags for items"""
  311. # ImPlot3DItemFlags_None = 0, /* original C++ signature */
  312. none = enum.auto() # (= 0) # Default
  313. # ImPlot3DItemFlags_NoLegend = 1 << 0, /* original C++ signature */
  314. no_legend = enum.auto() # (= 1 << 0) # The item won't have a legend entry displayed
  315. # ImPlot3DItemFlags_NoFit = 1 << 1, /* original C++ signature */
  316. no_fit = enum.auto() # (= 1 << 1) # The item won't be considered for plot fits
  317. class ScatterFlags_(enum.IntFlag):
  318. """Flags for PlotScatter"""
  319. # ImPlot3DScatterFlags_None = 0, /* original C++ signature */
  320. none = enum.auto() # (= 0) # Default
  321. # ImPlot3DScatterFlags_NoLegend = ImPlot3DItemFlags_NoLegend, /* original C++ signature */
  322. no_legend = enum.auto() # (= ItemFlags_NoLegend)
  323. # ImPlot3DScatterFlags_NoFit = ImPlot3DItemFlags_NoFit, /* original C++ signature */
  324. # }
  325. no_fit = enum.auto() # (= ItemFlags_NoFit)
  326. class LineFlags_(enum.IntFlag):
  327. """Flags for PlotLine"""
  328. # ImPlot3DLineFlags_None = 0, /* original C++ signature */
  329. none = enum.auto() # (= 0) # Default
  330. # ImPlot3DLineFlags_NoLegend = ImPlot3DItemFlags_NoLegend, /* original C++ signature */
  331. no_legend = enum.auto() # (= ItemFlags_NoLegend)
  332. # ImPlot3DLineFlags_NoFit = ImPlot3DItemFlags_NoFit, /* original C++ signature */
  333. no_fit = enum.auto() # (= ItemFlags_NoFit)
  334. # ImPlot3DLineFlags_Segments = 1 << 10, /* original C++ signature */
  335. segments = enum.auto() # (= 1 << 10) # A line segment will be rendered from every two consecutive points
  336. # ImPlot3DLineFlags_Loop = 1 << 11, /* original C++ signature */
  337. loop = enum.auto() # (= 1 << 11) # The last and first point will be connected to form a closed loop
  338. # ImPlot3DLineFlags_SkipNaN = 1 << 12, /* original C++ signature */
  339. skip_nan = enum.auto() # (= 1 << 12) # NaNs values will be skipped instead of rendered as missing data
  340. class TriangleFlags_(enum.IntFlag):
  341. """Flags for PlotTriangle"""
  342. # ImPlot3DTriangleFlags_None = 0, /* original C++ signature */
  343. none = enum.auto() # (= 0) # Default
  344. # ImPlot3DTriangleFlags_NoLegend = ImPlot3DItemFlags_NoLegend, /* original C++ signature */
  345. no_legend = enum.auto() # (= ItemFlags_NoLegend)
  346. # ImPlot3DTriangleFlags_NoFit = ImPlot3DItemFlags_NoFit, /* original C++ signature */
  347. no_fit = enum.auto() # (= ItemFlags_NoFit)
  348. # ImPlot3DTriangleFlags_NoLines = 1 << 10, /* original C++ signature */
  349. no_lines = enum.auto() # (= 1 << 10) # No lines will be rendered
  350. # ImPlot3DTriangleFlags_NoFill = 1 << 11, /* original C++ signature */
  351. no_fill = enum.auto() # (= 1 << 11) # No fill will be rendered
  352. # ImPlot3DTriangleFlags_NoMarkers = 1 << 12, /* original C++ signature */
  353. no_markers = enum.auto() # (= 1 << 12) # No markers will be rendered
  354. class QuadFlags_(enum.IntFlag):
  355. """Flags for PlotQuad"""
  356. # ImPlot3DQuadFlags_None = 0, /* original C++ signature */
  357. none = enum.auto() # (= 0) # Default
  358. # ImPlot3DQuadFlags_NoLegend = ImPlot3DItemFlags_NoLegend, /* original C++ signature */
  359. no_legend = enum.auto() # (= ItemFlags_NoLegend)
  360. # ImPlot3DQuadFlags_NoFit = ImPlot3DItemFlags_NoFit, /* original C++ signature */
  361. no_fit = enum.auto() # (= ItemFlags_NoFit)
  362. # ImPlot3DQuadFlags_NoLines = 1 << 10, /* original C++ signature */
  363. no_lines = enum.auto() # (= 1 << 10) # No lines will be rendered
  364. # ImPlot3DQuadFlags_NoFill = 1 << 11, /* original C++ signature */
  365. no_fill = enum.auto() # (= 1 << 11) # No fill will be rendered
  366. # ImPlot3DQuadFlags_NoMarkers = 1 << 12, /* original C++ signature */
  367. no_markers = enum.auto() # (= 1 << 12) # No markers will be rendered
  368. class SurfaceFlags_(enum.IntFlag):
  369. """Flags for PlotSurface"""
  370. # ImPlot3DSurfaceFlags_None = 0, /* original C++ signature */
  371. none = enum.auto() # (= 0) # Default
  372. # ImPlot3DSurfaceFlags_NoLegend = ImPlot3DItemFlags_NoLegend, /* original C++ signature */
  373. no_legend = enum.auto() # (= ItemFlags_NoLegend)
  374. # ImPlot3DSurfaceFlags_NoFit = ImPlot3DItemFlags_NoFit, /* original C++ signature */
  375. no_fit = enum.auto() # (= ItemFlags_NoFit)
  376. # ImPlot3DSurfaceFlags_NoLines = 1 << 10, /* original C++ signature */
  377. no_lines = enum.auto() # (= 1 << 10) # No lines will be rendered
  378. # ImPlot3DSurfaceFlags_NoFill = 1 << 11, /* original C++ signature */
  379. no_fill = enum.auto() # (= 1 << 11) # No fill will be rendered
  380. # ImPlot3DSurfaceFlags_NoMarkers = 1 << 12, /* original C++ signature */
  381. no_markers = enum.auto() # (= 1 << 12) # No markers will be rendered
  382. class MeshFlags_(enum.IntFlag):
  383. """Flags for PlotMesh"""
  384. # ImPlot3DMeshFlags_None = 0, /* original C++ signature */
  385. none = enum.auto() # (= 0) # Default
  386. # ImPlot3DMeshFlags_NoLegend = ImPlot3DItemFlags_NoLegend, /* original C++ signature */
  387. no_legend = enum.auto() # (= ItemFlags_NoLegend)
  388. # ImPlot3DMeshFlags_NoFit = ImPlot3DItemFlags_NoFit, /* original C++ signature */
  389. no_fit = enum.auto() # (= ItemFlags_NoFit)
  390. # ImPlot3DMeshFlags_NoLines = 1 << 10, /* original C++ signature */
  391. no_lines = enum.auto() # (= 1 << 10) # No lines will be rendered
  392. # ImPlot3DMeshFlags_NoFill = 1 << 11, /* original C++ signature */
  393. no_fill = enum.auto() # (= 1 << 11) # No fill will be rendered
  394. # ImPlot3DMeshFlags_NoMarkers = 1 << 12, /* original C++ signature */
  395. no_markers = enum.auto() # (= 1 << 12) # No markers will be rendered
  396. class ImageFlags_(enum.IntFlag):
  397. """Flags for PlotImage"""
  398. # ImPlot3DImageFlags_None = 0, /* original C++ signature */
  399. none = enum.auto() # (= 0) # Default
  400. # ImPlot3DImageFlags_NoLegend = ImPlot3DItemFlags_NoLegend, /* original C++ signature */
  401. no_legend = enum.auto() # (= ItemFlags_NoLegend)
  402. # ImPlot3DImageFlags_NoFit = ImPlot3DItemFlags_NoFit, /* original C++ signature */
  403. # }
  404. no_fit = enum.auto() # (= ItemFlags_NoFit)
  405. class DummyFlags_(enum.IntFlag):
  406. """Flags for PlotDummy"""
  407. # ImPlot3DDummyFlags_None = 0 /* original C++ signature */
  408. none = enum.auto() # (= 0) # Default
  409. class LegendFlags_(enum.IntFlag):
  410. """Flags for legends"""
  411. # ImPlot3DLegendFlags_None = 0, /* original C++ signature */
  412. none = enum.auto() # (= 0) # Default
  413. # ImPlot3DLegendFlags_NoButtons = 1 << 0, /* original C++ signature */
  414. no_buttons = enum.auto() # (= 1 << 0) # Legend icons will not function as hide/show buttons
  415. # ImPlot3DLegendFlags_NoHighlightItem = 1 << 1, /* original C++ signature */
  416. no_highlight_item = (
  417. enum.auto()
  418. ) # (= 1 << 1) # Plot items will not be highlighted when their legend entry is hovered
  419. # ImPlot3DLegendFlags_Horizontal = 1 << 2, /* original C++ signature */
  420. horizontal = enum.auto() # (= 1 << 2) # Legend entries will be displayed horizontally
  421. class Location_(enum.IntFlag):
  422. """Used to position legend on a plot"""
  423. # ImPlot3DLocation_Center = 0, /* original C++ signature */
  424. center = enum.auto() # (= 0) # Center-center
  425. # ImPlot3DLocation_North = 1 << 0, /* original C++ signature */
  426. north = enum.auto() # (= 1 << 0) # Top-center
  427. # ImPlot3DLocation_South = 1 << 1, /* original C++ signature */
  428. south = enum.auto() # (= 1 << 1) # Bottom-center
  429. # ImPlot3DLocation_West = 1 << 2, /* original C++ signature */
  430. west = enum.auto() # (= 1 << 2) # Center-left
  431. # ImPlot3DLocation_East = 1 << 3, /* original C++ signature */
  432. east = enum.auto() # (= 1 << 3) # Center-right
  433. # ImPlot3DLocation_NorthWest = ImPlot3DLocation_North | ImPlot3DLocation_West, /* original C++ signature */
  434. north_west = enum.auto() # (= Location_North | Location_West) # Top-left
  435. # ImPlot3DLocation_NorthEast = ImPlot3DLocation_North | ImPlot3DLocation_East, /* original C++ signature */
  436. north_east = enum.auto() # (= Location_North | Location_East) # Top-right
  437. # ImPlot3DLocation_SouthWest = ImPlot3DLocation_South | ImPlot3DLocation_West, /* original C++ signature */
  438. south_west = enum.auto() # (= Location_South | Location_West) # Bottom-left
  439. # ImPlot3DLocation_SouthEast = ImPlot3DLocation_South | ImPlot3DLocation_East /* original C++ signature */
  440. south_east = enum.auto() # (= Location_South | Location_East) # Bottom-right
  441. class AxisFlags_(enum.IntFlag):
  442. """Flags for axis"""
  443. # ImPlot3DAxisFlags_None = 0, /* original C++ signature */
  444. none = enum.auto() # (= 0) # Default
  445. # ImPlot3DAxisFlags_NoLabel = 1 << 0, /* original C++ signature */
  446. no_label = enum.auto() # (= 1 << 0) # No axis label will be displayed
  447. # ImPlot3DAxisFlags_NoGridLines = 1 << 1, /* original C++ signature */
  448. no_grid_lines = enum.auto() # (= 1 << 1) # No grid lines will be displayed
  449. # ImPlot3DAxisFlags_NoTickMarks = 1 << 2, /* original C++ signature */
  450. no_tick_marks = enum.auto() # (= 1 << 2) # No tick marks will be displayed
  451. # ImPlot3DAxisFlags_NoTickLabels = 1 << 3, /* original C++ signature */
  452. no_tick_labels = enum.auto() # (= 1 << 3) # No tick labels will be displayed
  453. # ImPlot3DAxisFlags_LockMin = 1 << 4, /* original C++ signature */
  454. lock_min = enum.auto() # (= 1 << 4) # The axis minimum value will be locked when panning/zooming
  455. # ImPlot3DAxisFlags_LockMax = 1 << 5, /* original C++ signature */
  456. lock_max = enum.auto() # (= 1 << 5) # The axis maximum value will be locked when panning/zooming
  457. # ImPlot3DAxisFlags_AutoFit = 1 << 6, /* original C++ signature */
  458. auto_fit = enum.auto() # (= 1 << 6) # Axis will be auto-fitting to data extents
  459. # ImPlot3DAxisFlags_Invert = 1 << 7, /* original C++ signature */
  460. invert = enum.auto() # (= 1 << 7) # The axis will be inverted
  461. # ImPlot3DAxisFlags_PanStretch = 1 << 8, /* original C++ signature */
  462. pan_stretch = (
  463. enum.auto()
  464. ) # (= 1 << 8) # Panning in a locked or constrained state will cause the axis to stretch if possible
  465. # ImPlot3DAxisFlags_Lock = ImPlot3DAxisFlags_LockMin | ImPlot3DAxisFlags_LockMax, /* original C++ signature */
  466. lock = enum.auto() # (= AxisFlags_LockMin | AxisFlags_LockMax)
  467. # ImPlot3DAxisFlags_NoDecorations = ImPlot3DAxisFlags_NoLabel | ImPlot3DAxisFlags_NoGridLines | ImPlot3DAxisFlags_NoTickLabels, /* original C++ signature */
  468. # }
  469. no_decorations = enum.auto() # (= AxisFlags_NoLabel | AxisFlags_NoGridLines | AxisFlags_NoTickLabels)
  470. class ImAxis3D_(enum.IntFlag):
  471. """Axis indices"""
  472. # ImAxis3D_X = 0, /* original C++ signature */
  473. x = enum.auto() # (= 0) # X-axis
  474. # ImAxis3D_Y, /* original C++ signature */
  475. y = enum.auto() # (= 1) # Y-axis
  476. # ImAxis3D_Z, /* original C++ signature */
  477. z = enum.auto() # (= 2) # Z-axis
  478. # ImAxis3D_COUNT, /* original C++ signature */
  479. # }
  480. count = enum.auto() # (= 3)
  481. class ImPlane3D_(enum.IntFlag):
  482. """Plane indices"""
  483. # ImPlane3D_YZ = 0, /* original C++ signature */
  484. yz = enum.auto() # (= 0) # YZ plane (perpendicular to X-axis)
  485. # ImPlane3D_XZ, /* original C++ signature */
  486. xz = enum.auto() # (= 1) # XZ plane (perpendicular to Y-axis)
  487. # ImPlane3D_XY, /* original C++ signature */
  488. xy = enum.auto() # (= 2) # XY plane (perpendicular to Z-axis)
  489. # ImPlane3D_COUNT, /* original C++ signature */
  490. # }
  491. count = enum.auto() # (= 3)
  492. class Scale_(enum.IntFlag):
  493. """Axis scale"""
  494. # ImPlot3DScale_Linear = 0, /* original C++ signature */
  495. linear = enum.auto() # (= 0) # Default linear scale
  496. # ImPlot3DScale_Log10, /* original C++ signature */
  497. log10 = enum.auto() # (= 1) # Base 10 log scale
  498. # ImPlot3DScale_SymLog, /* original C++ signature */
  499. sym_log = enum.auto() # (= 2) # Symmetric base 10 log scale
  500. class Colormap_(enum.IntFlag):
  501. """Colormaps"""
  502. # ImPlot3DColormap_Deep = 0, /* original C++ signature */
  503. deep = enum.auto() # (= 0) # Same as seaborn "deep"
  504. # ImPlot3DColormap_Dark = 1, /* original C++ signature */
  505. dark = enum.auto() # (= 1) # Same as matplotlib "Set1"
  506. # ImPlot3DColormap_Pastel = 2, /* original C++ signature */
  507. pastel = enum.auto() # (= 2) # Same as matplotlib "Pastel1"
  508. # ImPlot3DColormap_Paired = 3, /* original C++ signature */
  509. paired = enum.auto() # (= 3) # Same as matplotlib "Paired"
  510. # ImPlot3DColormap_Viridis = 4, /* original C++ signature */
  511. viridis = enum.auto() # (= 4) # Same as matplotlib "viridis"
  512. # ImPlot3DColormap_Plasma = 5, /* original C++ signature */
  513. plasma = enum.auto() # (= 5) # Same as matplotlib "plasma"
  514. # ImPlot3DColormap_Hot = 6, /* original C++ signature */
  515. hot = enum.auto() # (= 6) # Same as matplotlib/MATLAB "hot"
  516. # ImPlot3DColormap_Cool = 7, /* original C++ signature */
  517. cool = enum.auto() # (= 7) # Same as matplotlib/MATLAB "cool"
  518. # ImPlot3DColormap_Pink = 8, /* original C++ signature */
  519. pink = enum.auto() # (= 8) # Same as matplotlib/MATLAB "pink"
  520. # ImPlot3DColormap_Jet = 9, /* original C++ signature */
  521. jet = enum.auto() # (= 9) # Same as matplotlib/MATLAB "jet"
  522. # ImPlot3DColormap_Twilight = 10, /* original C++ signature */
  523. twilight = enum.auto() # (= 10) # Same as matplotlib "twilight"
  524. # ImPlot3DColormap_RdBu = 11, /* original C++ signature */
  525. rd_bu = enum.auto() # (= 11) # Same as matplotlib "RdBu"
  526. # ImPlot3DColormap_BrBG = 12, /* original C++ signature */
  527. br_bg = enum.auto() # (= 12) # Same as matplotlib "BrGB"
  528. # ImPlot3DColormap_PiYG = 13, /* original C++ signature */
  529. pi_yg = enum.auto() # (= 13) # Same as matplotlib "PiYG"
  530. # ImPlot3DColormap_Spectral = 14, /* original C++ signature */
  531. spectral = enum.auto() # (= 14) # Same as matplotlib "Spectral"
  532. # ImPlot3DColormap_Greys = 15, /* original C++ signature */
  533. greys = enum.auto() # (= 15) # White/black
  534. # -----------------------------------------------------------------------------
  535. # [SECTION] Specs API
  536. # -----------------------------------------------------------------------------
  537. class Spec:
  538. """Plot item styling specification. Provide these to PlotX functions to override styling, specify
  539. offsetting or stride, or set optional flags. This struct can be used in the following ways:
  540. 1. By declaring and defining a struct instance:
  541. ImPlot3DSpec spec;
  542. spec.LineColor = ImVec4(1,0,0,1);
  543. spec.LineWeight = 2.0;
  544. spec.Marker = ImPlot3DMarker_Circle;
  545. spec.Flags = ImPlot3DItemFlags_NoLegend | ImPlot3DLineFlags_Segments;
  546. ImPlot3D::PlotLine("MyLine", xs, ys, zs, 100, spec);
  547. 2. Inline using ImPlot3DProp,value pairs (order does NOT matter):
  548. ImPlot3D::PlotLine("MyLine", xs, ys, zs, 100, {
  549. ImPlot3DProp_LineColor, ImVec4(1,0,0,1),
  550. ImPlot3DProp_LineWeight, 2.0,
  551. ImPlot3DProp_Marker, ImPlot3DMarker_Circle,
  552. ImPlot3DProp_Flags, ImPlot3DItemFlags_NoLegend | ImPlot3DLineFlags_Segments
  553. });
  554. """
  555. # ImVec4 LineColor = IMPLOT3D_AUTO_COL; /* original C++ signature */
  556. line_color: ImVec4 = IMPLOT3D_AUTO_COL # Line color; IMPLOT3D_AUTO_COL will use next Colormap color
  557. # float LineWeight = 1.0f; /* original C++ signature */
  558. line_weight: float = 1.0 # Line weight in pixels
  559. # ImVec4 FillColor = IMPLOT3D_AUTO_COL; /* original C++ signature */
  560. fill_color: ImVec4 = (
  561. IMPLOT3D_AUTO_COL # Fill color (applies to shaded regions); IMPLOT3D_AUTO_COL will use next Colormap color
  562. )
  563. # float FillAlpha = IMPLOT3D_AUTO; /* original C++ signature */
  564. fill_alpha: float = (
  565. IMPLOT3D_AUTO # Alpha multiplier (applies to FillColor, FillColors, MarkerFillColor, and MarkerFillColors)
  566. )
  567. # ImPlot3DMarker Marker = ImPlot3DMarker_Auto; /* original C++ signature */
  568. marker: Marker = Marker_Auto # Marker type
  569. # float MarkerSize = IMPLOT3D_AUTO; /* original C++ signature */
  570. marker_size: float = IMPLOT3D_AUTO # Size of markers (radius) *in pixels*
  571. # ImVec4 MarkerLineColor = IMPLOT3D_AUTO_COL; /* original C++ signature */
  572. marker_line_color: ImVec4 = IMPLOT3D_AUTO_COL # Marker outline color; IMPLOT3D_AUTO_COL will use LineColor
  573. # ImVec4 MarkerFillColor = IMPLOT3D_AUTO_COL; /* original C++ signature */
  574. marker_fill_color: ImVec4 = IMPLOT3D_AUTO_COL # Marker fill color; IMPLOT3D_AUTO_COL will use LineColor
  575. # int Offset = 0; /* original C++ signature */
  576. offset: int = 0 # Data index offset
  577. # int Stride = IMPLOT3D_AUTO; /* original C++ signature */
  578. stride: int = (
  579. IMPLOT3D_AUTO # Data stride in bytes; IMPLOT3D_AUTO will result in sizeof(T) where T is the type passed to PlotX
  580. )
  581. # ImPlot3DItemFlags Flags = /* original C++ signature */
  582. # ImPlot3DItemFlags_None;
  583. flags: ItemFlags = (
  584. ItemFlags_None # Optional item flags; can be composed from common ImPlot3DItemFlags and/or specialized ImPlot3DXFlags
  585. )
  586. # ImPlot3DSpec(ImVec4 LineColor = IMPLOT3D_AUTO_COL, float LineWeight = 1.0f, ImVec4 FillColor = IMPLOT3D_AUTO_COL, float FillAlpha = IMPLOT3D_AUTO, ImPlot3DMarker Marker = ImPlot3DMarker_Auto, float MarkerSize = IMPLOT3D_AUTO, ImVec4 MarkerLineColor = IMPLOT3D_AUTO_COL, ImVec4 MarkerFillColor = IMPLOT3D_AUTO_COL, int Offset = 0, int Stride = IMPLOT3D_AUTO, ImPlot3DItemFlags Flags = ImPlot3DItemFlags_None); /* original C++ signature */
  587. def __init__(
  588. self,
  589. line_color: Optional[ImVec4Like] = None,
  590. line_weight: float = 1.0,
  591. fill_color: Optional[ImVec4Like] = None,
  592. fill_alpha: float = IMPLOT3D_AUTO,
  593. marker: Optional[Marker] = None,
  594. marker_size: float = IMPLOT3D_AUTO,
  595. marker_line_color: Optional[ImVec4Like] = None,
  596. marker_fill_color: Optional[ImVec4Like] = None,
  597. offset: int = 0,
  598. stride: int = IMPLOT3D_AUTO,
  599. flags: ItemFlags = ItemFlags_None,
  600. ) -> None:
  601. """Auto-generated default constructor with named params
  602. Python bindings defaults:
  603. If any of the params below is None, then its default value below will be used:
  604. * LineColor: IMPLOT3D_AUTO_COL
  605. * FillColor: IMPLOT3D_AUTO_COL
  606. * Marker: Marker_Auto
  607. * MarkerLineColor: IMPLOT3D_AUTO_COL
  608. * MarkerFillColor: IMPLOT3D_AUTO_COL
  609. """
  610. pass
  611. line_colors: Optional[np.ndarray] = (
  612. None # array of colors (np.uint32) for each line. Must have the same length as the data arrays. If None, use LineColor for all lines.
  613. )
  614. fill_colors: Optional[np.ndarray] = (
  615. None # array of colors (np.uint32) for each fill. Must have the same length as the data arrays. If None, use FillColor for all fills.
  616. )
  617. marker_line_colors: Optional[np.ndarray] = (
  618. None # array of colors (np.uint32) for each marker edge. Must have the same length as the data arrays. If None, use MarkerLineColor for all markers.
  619. )
  620. marker_fill_colors: Optional[np.ndarray] = (
  621. None # array of colors (np.uint32) for each marker face. Must have the same length as the data arrays. If None, use MarkerFillColor for all markers.
  622. )
  623. marker_sizes: Optional[np.ndarray] = (
  624. None # array of sizes (np.float32) for each marker. Must have the same length as the data arrays. If None, use MarkerSize for all markers.
  625. )
  626. # -----------------------------------------------------------------------------
  627. # [SECTION] Callbacks
  628. # -----------------------------------------------------------------------------
  629. # -----------------------------------------------------------------------------
  630. # [SECTION] Context
  631. # -----------------------------------------------------------------------------
  632. # IMPLOT3D_API ImPlot3DContext* CreateContext(); /* original C++ signature */
  633. def create_context() -> Context:
  634. """Creates a new ImPlot3D context. Call this after ImGui::CreateContext"""
  635. pass
  636. # IMPLOT3D_API void DestroyContext(ImPlot3DContext* ctx = nullptr); /* original C++ signature */
  637. def destroy_context(ctx: Optional[Context] = None) -> None:
  638. """Destroys an ImPlot3D context. Call this before ImGui::DestroyContext. None = destroy current context"""
  639. pass
  640. # IMPLOT3D_API ImPlot3DContext* GetCurrentContext(); /* original C++ signature */
  641. def get_current_context() -> Context:
  642. """Returns the current ImPlot3D context. None if no context has been set"""
  643. pass
  644. # IMPLOT3D_API void SetCurrentContext(ImPlot3DContext* ctx); /* original C++ signature */
  645. def set_current_context(ctx: Context) -> None:
  646. """Sets the current ImPlot3D context"""
  647. pass
  648. # -----------------------------------------------------------------------------
  649. # [SECTION] Begin/End Plot
  650. # -----------------------------------------------------------------------------
  651. # Starts a 3D plotting context. If this function returns True, EndPlot() MUST
  652. # be called! You are encouraged to use the following convention:
  653. #
  654. # if (ImPlot3D::BeginPlot(...)) {
  655. # ImPlot3D::PlotLine(...);
  656. # ...
  657. # ImPlot3D::EndPlot();
  658. # }
  659. #
  660. # Important notes:
  661. # - #title_id must be unique to the current ImGui ID scope. If you need to avoid ID
  662. # collisions or don't want to display a title in the plot, use double hashes
  663. # (e.g. "MyPlot##HiddenIdText" or "##NoTitle").
  664. # - #size is the **frame** size of the plot widget, not the plot area.
  665. # IMPLOT3D_API bool BeginPlot(const char* title_id, const ImVec2& size = ImVec2(-1, 0), ImPlot3DFlags flags = 0); /* original C++ signature */
  666. def begin_plot(title_id: str, size: Optional[ImVec2Like] = None, flags: Flags = 0) -> bool:
  667. """Python bindings defaults:
  668. If size is None, then its default value will be: ImVec2(-1, 0)
  669. """
  670. pass
  671. # IMPLOT3D_API void EndPlot(); /* original C++ signature */
  672. def end_plot() -> None:
  673. """Only call if BeginPlot() returns True!"""
  674. pass
  675. # -----------------------------------------------------------------------------
  676. # [SECTION] Setup
  677. # -----------------------------------------------------------------------------
  678. # The following API allows you to setup and customize various aspects of the
  679. # current plot. The functions should be called immediately after BeginPlot()
  680. # and before any other API calls. Typical usage is as follows:
  681. # if (ImPlot3D::BeginPlot(...)) { 1) Begin a new plot
  682. # ImPlot3D::SetupAxis(ImAxis3D_X, "My X-Axis"); 2) Make Setup calls
  683. # ImPlot3D::SetupAxis(ImAxis3D_Y, "My Y-Axis");
  684. # ImPlot3D::SetupLegend(ImPlotLocation_North);
  685. # ...
  686. # ImPlot3D::SetupFinish(); 3) [Optional] Explicitly finish setup
  687. # ImPlot3D::PlotLine(...); 4) Plot items
  688. # ...
  689. # ImPlot3D::EndPlot(); 5) End the plot
  690. # }
  691. #
  692. # Important notes:
  693. #
  694. # - Always call Setup code at the top of your BeginPlot conditional statement.
  695. # - Setup is locked once you start plotting or explicitly call SetupFinish.
  696. # Do NOT call Setup code after you begin plotting or after you make
  697. # any non-Setup API calls (e.g. utils like PlotToPixels also lock Setup).
  698. # - Calling SetupFinish is OPTIONAL, but probably good practice. If you do not
  699. # call it yourself, then the first subsequent plotting or utility function will
  700. # call it for you.
  701. # IMPLOT3D_API void SetupAxis(ImAxis3D axis, const char* label = nullptr, ImPlot3DAxisFlags flags = 0); /* original C++ signature */
  702. def setup_axis(axis: ImAxis3D, label: Optional[str] = None, flags: AxisFlags = 0) -> None:
  703. """Enables an axis or sets the label and/or flags for an existing axis. Leave #label = None for no label"""
  704. pass
  705. # IMPLOT3D_API void SetupAxisLimits(ImAxis3D axis, double v_min, double v_max, ImPlot3DCond cond = ImPlot3DCond_Once); /* original C++ signature */
  706. def setup_axis_limits(axis: ImAxis3D, v_min: float, v_max: float, cond: Optional[Cond] = None) -> None:
  707. """Sets an axis range limits. If ImPlot3DCond_Always is used, the axis limits will be locked.
  708. Note: To invert an axis, use ImPlot3DAxisFlags_Invert with SetupAxis instead of swapping min/max
  709. Python bindings defaults:
  710. If cond is None, then its default value will be: Cond_Once
  711. """
  712. pass
  713. # IMPLOT3D_API void SetupAxisScale(ImAxis3D axis, ImPlot3DScale scale); /* original C++ signature */
  714. def setup_axis_scale(axis: ImAxis3D, scale: Scale) -> None:
  715. """Sets an axis' scale using built-in options"""
  716. pass
  717. # IMPLOT3D_API void SetupAxisLimitsConstraints(ImAxis3D axis, double v_min, double v_max); /* original C++ signature */
  718. def setup_axis_limits_constraints(axis: ImAxis3D, v_min: float, v_max: float) -> None:
  719. """Sets an axis' limits constraints. The axis will be constrained to never go below #v_min or above #v_max"""
  720. pass
  721. # IMPLOT3D_API void SetupAxisZoomConstraints(ImAxis3D axis, double zoom_min, double zoom_max); /* original C++ signature */
  722. def setup_axis_zoom_constraints(axis: ImAxis3D, zoom_min: float, zoom_max: float) -> None:
  723. """Sets an axis' zoom constraints. The zoom (axis range size: range.max - range.min) will be constrained between #zoom_min and #zoom_max"""
  724. pass
  725. # IMPLOT3D_API void SetupAxes(const char* x_label, const char* y_label, const char* z_label, ImPlot3DAxisFlags x_flags = 0, /* original C++ signature */
  726. # ImPlot3DAxisFlags y_flags = 0, ImPlot3DAxisFlags z_flags = 0);
  727. def setup_axes(
  728. x_label: str, y_label: str, z_label: str, x_flags: AxisFlags = 0, y_flags: AxisFlags = 0, z_flags: AxisFlags = 0
  729. ) -> None:
  730. """Sets the label and/or flags for primary X/Y/Z axes (shorthand for three calls to SetupAxis)"""
  731. pass
  732. # IMPLOT3D_API void SetupAxesLimits(double x_min, double x_max, double y_min, double y_max, double z_min, double z_max, /* original C++ signature */
  733. # ImPlot3DCond cond = ImPlot3DCond_Once);
  734. def setup_axes_limits(
  735. x_min: float, x_max: float, y_min: float, y_max: float, z_min: float, z_max: float, cond: Optional[Cond] = None
  736. ) -> None:
  737. """Sets the X/Y/Z axes range limits. If ImPlot3DCond_Always is used, the axes limits will be locked (shorthand for three calls to SetupAxisLimits)
  738. Python bindings defaults:
  739. If cond is None, then its default value will be: Cond_Once
  740. """
  741. pass
  742. # IMPLOT3D_API void SetupBoxRotation(double elevation, double azimuth, bool animate = false, ImPlot3DCond cond = ImPlot3DCond_Once); /* original C++ signature */
  743. @overload
  744. def setup_box_rotation(elevation: float, azimuth: float, animate: bool = False, cond: Optional[Cond] = None) -> None:
  745. """Sets the plot box rotation given the elevation and azimuth angles in degrees. If ImPlot3DCond_Always is used, the rotation will be locked
  746. Python bindings defaults:
  747. If cond is None, then its default value will be: Cond_Once
  748. """
  749. pass
  750. # IMPLOT3D_API void SetupBoxRotation(ImPlot3DQuat rotation, bool animate = false, ImPlot3DCond cond = ImPlot3DCond_Once); /* original C++ signature */
  751. @overload
  752. def setup_box_rotation(rotation: Quat, animate: bool = False, cond: Optional[Cond] = None) -> None:
  753. """Sets the plot box rotation given a quaternion. If ImPlot3DCond_Always is used, the rotation will be locked
  754. Python bindings defaults:
  755. If cond is None, then its default value will be: Cond_Once
  756. """
  757. pass
  758. # IMPLOT3D_API void SetupBoxInitialRotation(double elevation, double azimuth); /* original C++ signature */
  759. @overload
  760. def setup_box_initial_rotation(elevation: float, azimuth: float) -> None:
  761. """Sets the plot box initial rotation given the elevation and azimuth angles in degrees. The initial rotation is the rotation the plot goes back to
  762. when a left mouse button double click happens
  763. """
  764. pass
  765. # IMPLOT3D_API void SetupBoxInitialRotation(ImPlot3DQuat rotation); /* original C++ signature */
  766. @overload
  767. def setup_box_initial_rotation(rotation: Quat) -> None:
  768. """Sets the plot box initial rotation given a quaternion. The initial rotation is the rotation the plot goes back to when a left mouse button double
  769. click happens
  770. """
  771. pass
  772. # IMPLOT3D_API void SetupBoxScale(double x, double y, double z); /* original C++ signature */
  773. def setup_box_scale(x: float, y: float, z: float) -> None:
  774. """Sets the plot box X/Y/Z scale. A scale of 1.0 is the default. Values greater than 1.0 enlarge the plot, while values between 0.0 and 1.0 shrink it"""
  775. pass
  776. # IMPLOT3D_API void SetupLegend(ImPlot3DLocation location, ImPlot3DLegendFlags flags = 0); /* original C++ signature */
  777. def setup_legend(location: Location, flags: LegendFlags = 0) -> None:
  778. """Sets up the plot legend location and flags"""
  779. pass
  780. # -----------------------------------------------------------------------------
  781. # [SECTION] Plot Items
  782. # -----------------------------------------------------------------------------
  783. # The plotting API is provided below. Call these functions between
  784. # BeginPlot/EndPlot and after any Setup API calls.
  785. #
  786. # The templated functions are explicitly instantiated in implot3_items.cpp.
  787. # They are not intended to be used generically with custom types. You will get
  788. # a linker error if you try! All functions support the following scalar types:
  789. #
  790. # float, double, ImS8, ImU8, ImS16, ImU16, ImS32, ImU32, ImS64, ImU64
  791. #
  792. # If you need to plot custom or non-homogenous data you have a few options:
  793. #
  794. # 1. If your data is a simple struct/class (e.g. Vector3), you can use striding.
  795. # This is the most performant option if applicable.
  796. #
  797. # struct Vector3 { float X, Y, Z; };
  798. # ...
  799. # Vector3 data[42];
  800. # ImPlot3D::PlotLine("line", &data[0].X, &data[0].Y, &data[0].Z, 42, {ImPlot3DProp_Stride, sizeof(Vector2)});
  801. #
  802. # 2. If your data is in separate arrays or requires computation, you can copy/transform
  803. # it into temporary float or double arrays before plotting.
  804. #
  805. # NB: All types are converted to double before plotting. You may lose information
  806. # if you try plotting extremely large 64-bit integral types. Proceed with caution!
  807. # IMPLOT3D_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, const T* zs, int count, const ImPlot3DSpec& spec = ImPlot3DSpec()); /* original C++ signature */
  808. def plot_scatter(label_id: str, xs: np.ndarray, ys: np.ndarray, zs: np.ndarray, spec: Optional[Spec] = None) -> None:
  809. """Plots a scatter plot in 3D. Points are rendered as markers at the specified coordinates
  810. Python bindings defaults:
  811. If spec is None, then its default value will be: Spec()
  812. """
  813. pass
  814. # IMPLOT3D_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, const T* zs, int count, const ImPlot3DSpec& spec = ImPlot3DSpec()); /* original C++ signature */
  815. def plot_line(label_id: str, xs: np.ndarray, ys: np.ndarray, zs: np.ndarray, spec: Optional[Spec] = None) -> None:
  816. """Plots a line in 3D. Consecutive points are connected with line segments
  817. Python bindings defaults:
  818. If spec is None, then its default value will be: Spec()
  819. """
  820. pass
  821. # IMPLOT3D_TMP void PlotTriangle(const char* label_id, const T* xs, const T* ys, const T* zs, int count, const ImPlot3DSpec& spec = ImPlot3DSpec()); /* original C++ signature */
  822. def plot_triangle(label_id: str, xs: np.ndarray, ys: np.ndarray, zs: np.ndarray, spec: Optional[Spec] = None) -> None:
  823. """Plots triangles in 3D. Every 3 consecutive points define a triangle
  824. Python bindings defaults:
  825. If spec is None, then its default value will be: Spec()
  826. """
  827. pass
  828. # IMPLOT3D_TMP void PlotQuad(const char* label_id, const T* xs, const T* ys, const T* zs, int count, const ImPlot3DSpec& spec = ImPlot3DSpec()); /* original C++ signature */
  829. def plot_quad(label_id: str, xs: np.ndarray, ys: np.ndarray, zs: np.ndarray, spec: Optional[Spec] = None) -> None:
  830. """Plots quads in 3D. Every 4 consecutive points define a quadrilateral
  831. Python bindings defaults:
  832. If spec is None, then its default value will be: Spec()
  833. """
  834. pass
  835. # [ADAPT_IMGUI_BUNDLE]
  836. # #ifdef IMGUI_BUNDLE_PYTHON_API
  837. #
  838. # A version of PlotSurface whose API is easier to port to Python
  839. # (params xs_count, ys_count and zs_count are removed in the Python API, but are used in the bindings code generation)
  840. # IMPLOT3D_TMP void PlotSurface( /* original C++ signature */
  841. # const char* label_id,
  842. # const T* xs, int xs_count,
  843. # const T* ys, int ys_count,
  844. # const T* zs, int zs_count,
  845. # int x_count, int y_count,
  846. # double scale_min = 0.0, double scale_max = 0.0,
  847. # const ImPlot3DSpec& spec = ImPlot3DSpec()
  848. # );
  849. def plot_surface(
  850. label_id: str,
  851. xs: np.ndarray,
  852. ys: np.ndarray,
  853. zs: np.ndarray,
  854. x_count: int,
  855. y_count: int,
  856. scale_min: float = 0.0,
  857. scale_max: float = 0.0,
  858. spec: Optional[Spec] = None,
  859. ) -> None:
  860. """Plot the surface defined by a grid of vertices. The grid is defined by the x and y arrays,
  861. and the z array contains the height of each vertex.
  862. A total of x_count * y_count vertices are expected for each array.
  863. Leave #scale_min and #scale_max both at 0 for automatic color scaling, or set them to a predefined range.
  864. Python bindings defaults:
  865. If spec is None, then its default value will be: Spec()
  866. """
  867. pass
  868. # #endif
  869. #
  870. # [/ADAPT_IMGUI_BUNDLE]
  871. # [ADAPT_IMGUI_BUNDLE]
  872. # #ifdef IMGUI_BUNDLE_PYTHON_API
  873. #
  874. class Mesh:
  875. # std::vector<ImPlot3DPoint> Points; /* original C++ signature */
  876. points: List[Point]
  877. # std::vector<UInt> Idx; /* original C++ signature */
  878. idx: List[UInt] # Triangles are defined by the index buffer (every 3 indices form a triangle)
  879. # Mesh(std::vector<ImPlot3DPoint> Points = std::vector<ImPlot3DPoint>(), std::vector<UInt> Idx = std::vector<UInt>()); /* original C++ signature */
  880. def __init__(self, points: Optional[List[Point]] = None, idx: Optional[List[UInt]] = None) -> None:
  881. """Auto-generated default constructor with named params
  882. Python bindings defaults:
  883. If any of the params below is None, then its default value below will be used:
  884. * Points: List[Point]()
  885. * Idx: List[UInt]()
  886. """
  887. pass
  888. # IMPLOT3D_API void PlotMesh(const char* label_id, const Mesh& mesh, const ImPlot3DSpec& spec = ImPlot3DSpec()); /* original C++ signature */
  889. def plot_mesh(label_id: str, mesh: Mesh, spec: Optional[Spec] = None) -> None:
  890. """Python bindings defaults:
  891. If spec is None, then its default value will be: Spec()
  892. """
  893. pass
  894. # #endif
  895. #
  896. # [/ADAPT_IMGUI_BUNDLE]
  897. # IMPLOT3D_API void PlotImage(const char* label_id, ImTextureRef tex_ref, const ImPlot3DPoint& center, const ImPlot3DPoint& axis_u, /* original C++ signature */
  898. # const ImPlot3DPoint& axis_v, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1),
  899. # const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImPlot3DSpec& spec = ImPlot3DSpec());
  900. @overload
  901. def plot_image(
  902. label_id: str,
  903. tex_ref: ImTextureRef,
  904. center: Point,
  905. axis_u: Point,
  906. axis_v: Point,
  907. uv0: Optional[ImVec2Like] = None,
  908. uv1: Optional[ImVec2Like] = None,
  909. tint_col: Optional[ImVec4Like] = None,
  910. spec: Optional[Spec] = None,
  911. ) -> None:
  912. """Plots a rectangular image in 3D defined by its center and two direction vectors (axes).
  913. #center is the center of the rectangle in plot coordinates.
  914. #axis_u and #axis_v define the local axes and half-extents of the rectangle in 3D space.
  915. The rectangle is formed by moving from the center along ±axis_u and ±axis_v.
  916. #uv0 and #uv1 define the texture mapping.
  917. #tint_col can be used to tint the image.
  918. Python bindings defaults:
  919. If any of the params below is None, then its default value below will be used:
  920. * uv0: ImVec2(0, 0)
  921. * uv1: ImVec2(1, 1)
  922. * tint_col: ImVec4(1, 1, 1, 1)
  923. * spec: Spec()
  924. """
  925. pass
  926. # IMPLOT3D_API void PlotImage(const char* label_id, ImTextureRef tex_ref, const ImPlot3DPoint& p0, const ImPlot3DPoint& p1, const ImPlot3DPoint& p2, /* original C++ signature */
  927. # const ImPlot3DPoint& p3, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 0),
  928. # const ImVec2& uv2 = ImVec2(1, 1), const ImVec2& uv3 = ImVec2(0, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1),
  929. # const ImPlot3DSpec& spec = ImPlot3DSpec());
  930. @overload
  931. def plot_image(
  932. label_id: str,
  933. tex_ref: ImTextureRef,
  934. p0: Point,
  935. p1: Point,
  936. p2: Point,
  937. p3: Point,
  938. uv0: Optional[ImVec2Like] = None,
  939. uv1: Optional[ImVec2Like] = None,
  940. uv2: Optional[ImVec2Like] = None,
  941. uv3: Optional[ImVec2Like] = None,
  942. tint_col: Optional[ImVec4Like] = None,
  943. spec: Optional[Spec] = None,
  944. ) -> None:
  945. """Plots an image using four arbitrary 3D points that define a quad in space.
  946. Each corner (p0 to p3) corresponds to a corner in the image, and #uv0 to #uv3 are the texture coordinates for each.
  947. This overload allows full control over orientation, shape, and distortion.
  948. Note: The quad is internally split into two triangles, so non-rectangular quads may produce rendering artifacts
  949. since distortion is interpolated per triangle rather than over the full quad.
  950. Python bindings defaults:
  951. If any of the params below is None, then its default value below will be used:
  952. * uv0: ImVec2(0, 0)
  953. * uv1: ImVec2(1, 0)
  954. * uv2: ImVec2(1, 1)
  955. * uv3: ImVec2(0, 1)
  956. * tint_col: ImVec4(1, 1, 1, 1)
  957. * spec: Spec()
  958. """
  959. pass
  960. # IMPLOT3D_API void PlotText(const char* text, double x, double y, double z, double angle = 0.0, const ImVec2& pix_offset = ImVec2(0, 0)); /* original C++ signature */
  961. def plot_text(
  962. text: str, x: float, y: float, z: float, angle: float = 0.0, pix_offset: Optional[ImVec2Like] = None
  963. ) -> None:
  964. """Plots a centered text label at point x,y,z with optional rotation angle (in radians) and pixel offset
  965. Python bindings defaults:
  966. If pix_offset is None, then its default value will be: ImVec2(0, 0)
  967. """
  968. pass
  969. # IMPLOT3D_API void PlotDummy(const char* label_id, const ImPlot3DSpec& spec = ImPlot3DSpec()); /* original C++ signature */
  970. def plot_dummy(label_id: str, spec: Optional[Spec] = None) -> None:
  971. """Plots a dummy item (can be used to modify legend entry appearance when called after plotting an item, or add a dummy legend entry)
  972. Python bindings defaults:
  973. If spec is None, then its default value will be: Spec()
  974. """
  975. pass
  976. # -----------------------------------------------------------------------------
  977. # [SECTION] Plot Utils
  978. # -----------------------------------------------------------------------------
  979. # Convert a position in the current plot's coordinate system to pixels
  980. # IMPLOT3D_API ImVec2 PlotToPixels(const ImPlot3DPoint& point); /* original C++ signature */
  981. @overload
  982. def plot_to_pixels(point: Point) -> ImVec2:
  983. pass
  984. # IMPLOT3D_API ImVec2 PlotToPixels(double x, double y, double z); /* original C++ signature */
  985. @overload
  986. def plot_to_pixels(x: float, y: float, z: float) -> ImVec2:
  987. pass
  988. # Convert a pixel coordinate to a ray in the current plot's coordinate system. Useful for 3D picking and intersection tests
  989. # IMPLOT3D_API ImPlot3DRay PixelsToPlotRay(const ImVec2& pix); /* original C++ signature */
  990. @overload
  991. def pixels_to_plot_ray(pix: ImVec2Like) -> Ray:
  992. pass
  993. # IMPLOT3D_API ImPlot3DRay PixelsToPlotRay(double x, double y); /* original C++ signature */
  994. @overload
  995. def pixels_to_plot_ray(x: float, y: float) -> Ray:
  996. pass
  997. # Convert a pixel coordinate to a point on one of the plot box's axis-aligned planes (XY, XZ, or YZ).
  998. # By default, the result is masked to the axis ranges. Set #mask=False to project to the infinite plane.
  999. # Returns ImPlot3DPoint(NAN, NAN, NAN) if the ray does not intersect the plane
  1000. # IMPLOT3D_API ImPlot3DPoint PixelsToPlotPlane(const ImVec2& pix, ImPlane3D plane, bool mask = true); /* original C++ signature */
  1001. @overload
  1002. def pixels_to_plot_plane(pix: ImVec2Like, plane: ImPlane3D, mask: bool = True) -> Point:
  1003. pass
  1004. # IMPLOT3D_API ImPlot3DPoint PixelsToPlotPlane(double x, double y, ImPlane3D plane, bool mask = true); /* original C++ signature */
  1005. @overload
  1006. def pixels_to_plot_plane(x: float, y: float, plane: ImPlane3D, mask: bool = True) -> Point:
  1007. pass
  1008. # IMPLOT3D_API ImVec2 GetPlotRectPos(); /* original C++ signature */
  1009. def get_plot_rect_pos() -> ImVec2:
  1010. """Get the current plot rect position (top-left) in absolute screen coordinates"""
  1011. pass
  1012. # IMPLOT3D_API ImVec2 GetPlotRectSize(); /* original C++ signature */
  1013. def get_plot_rect_size() -> ImVec2:
  1014. """Get the current plot rect size in pixels"""
  1015. pass
  1016. # -----------------------------------------------------------------------------
  1017. # [SECTION] Miscellaneous
  1018. # -----------------------------------------------------------------------------
  1019. # IMPLOT3D_API ImDrawList* GetPlotDrawList(); /* original C++ signature */
  1020. def get_plot_draw_list() -> ImDrawList:
  1021. """Returns the ImDrawList used for rendering plot items. Use this to add custom rendering inside plots"""
  1022. pass
  1023. # -----------------------------------------------------------------------------
  1024. # [SECTION] Styles API (legacy)
  1025. # -----------------------------------------------------------------------------
  1026. # Get current style
  1027. # IMPLOT3D_API ImPlot3DStyle& GetStyle(); /* original C++ signature */
  1028. def get_style() -> Style:
  1029. pass
  1030. # IMPLOT3D_API void SetStyle(const ImPlot3DStyle& style); /* original C++ signature */
  1031. def set_style(style: Style) -> None:
  1032. pass
  1033. # Set color styles
  1034. # IMPLOT3D_API void StyleColorsAuto(ImPlot3DStyle* dst = nullptr); /* original C++ signature */
  1035. def style_colors_auto(dst: Optional[Style] = None) -> None:
  1036. """Set colors with ImGui style"""
  1037. pass
  1038. # IMPLOT3D_API void StyleColorsDark(ImPlot3DStyle* dst = nullptr); /* original C++ signature */
  1039. def style_colors_dark(dst: Optional[Style] = None) -> None:
  1040. """Set colors with dark style"""
  1041. pass
  1042. # IMPLOT3D_API void StyleColorsLight(ImPlot3DStyle* dst = nullptr); /* original C++ signature */
  1043. def style_colors_light(dst: Optional[Style] = None) -> None:
  1044. """Set colors with light style"""
  1045. pass
  1046. # IMPLOT3D_API void StyleColorsClassic(ImPlot3DStyle* dst = nullptr); /* original C++ signature */
  1047. def style_colors_classic(dst: Optional[Style] = None) -> None:
  1048. """Set colors with classic style"""
  1049. pass
  1050. # Temporarily modify a style color. Don't forget to call PopStyleColor!
  1051. # IMPLOT3D_API void PushStyleColor(ImPlot3DCol idx, ImU32 col); /* original C++ signature */
  1052. @overload
  1053. def push_style_color(idx: Col, col: ImU32) -> None:
  1054. pass
  1055. # IMPLOT3D_API void PushStyleColor(ImPlot3DCol idx, const ImVec4& col); /* original C++ signature */
  1056. @overload
  1057. def push_style_color(idx: Col, col: ImVec4Like) -> None:
  1058. pass
  1059. # IMPLOT3D_API void PopStyleColor(int count = 1); /* original C++ signature */
  1060. def pop_style_color(count: int = 1) -> None:
  1061. """Undo temporary style color modification(s). Undo multiple pushes at once by increasing count"""
  1062. pass
  1063. # IMPLOT3D_API void PushStyleVar(ImPlot3DStyleVar idx, int val); /* original C++ signature */
  1064. @overload
  1065. def push_style_var(idx: StyleVar, val: int) -> None:
  1066. """Temporarily modify a style variable of int type. Don't forget to call PopStyleVar!"""
  1067. pass
  1068. # IMPLOT3D_API void PushStyleVar(ImPlot3DStyleVar idx, float val); /* original C++ signature */
  1069. @overload
  1070. def push_style_var(idx: StyleVar, val: float) -> None:
  1071. """Temporarily modify a style variable of float type. Don't forget to call PopStyleVar!"""
  1072. pass
  1073. # IMPLOT3D_API void PushStyleVar(ImPlot3DStyleVar idx, const ImVec2& val); /* original C++ signature */
  1074. @overload
  1075. def push_style_var(idx: StyleVar, val: ImVec2Like) -> None:
  1076. """Temporarily modify a style variable of ImVec2 type. Don't forget to call PopStyleVar!"""
  1077. pass
  1078. # IMPLOT3D_API void PopStyleVar(int count = 1); /* original C++ signature */
  1079. def pop_style_var(count: int = 1) -> None:
  1080. """Undo temporary style variable modification(s). Undo multiple pushes at once by increasing count"""
  1081. pass
  1082. # Get color
  1083. # IMPLOT3D_API ImVec4 GetStyleColorVec4(ImPlot3DCol idx); /* original C++ signature */
  1084. def get_style_color_vec4(idx: Col) -> ImVec4:
  1085. pass
  1086. # IMPLOT3D_API ImU32 GetStyleColorU32(ImPlot3DCol idx); /* original C++ signature */
  1087. def get_style_color_u32(idx: Col) -> ImU32:
  1088. pass
  1089. # IMPLOT3D_API ImPlot3DMarker NextMarker(); /* original C++ signature */
  1090. def next_marker() -> Marker:
  1091. """Returns the next marker and advances the marker for the current plot. You need to call this between Begin/EndPlot!"""
  1092. pass
  1093. # -----------------------------------------------------------------------------
  1094. # [SECTION] Colormaps
  1095. # -----------------------------------------------------------------------------
  1096. # Item styling is based on colormaps when the relevant ImPlot3DCol_XXX is set to
  1097. # IMPLOT3D_AUTO_COL (default). Several built-in colormaps are available. You can
  1098. # add and then push/pop your own colormaps as well. To permanently set a colormap,
  1099. # modify the Colormap index member of your ImPlot3DStyle.
  1100. # Colormap data will be ignored and a custom color will be used if you have done one of the following:
  1101. # 1) Modified an item style color in your ImPlot3DStyle to anything other than IMPLOT3D_AUTO_COL.
  1102. # Add a new colormap. The color data will be copied. The colormap can be used by pushing either the returned index or the
  1103. # string name with PushColormap. The colormap name must be unique and the size must be greater than 1. You will receive
  1104. # an assert otherwise! By default colormaps are considered to be qualitative (i.e. discrete). If you want to create a
  1105. # continuous colormap, set #qual=False. This will treat the colors you provide as keys, and ImPlot3D will build a linearly
  1106. # interpolated lookup table. The memory footprint of this table will be exactly ((size-1)*255+1)*4 bytes.
  1107. # IMPLOT3D_API ImPlot3DColormap AddColormap(const char* name, const ImVec4* cols, int size, bool qual = true); /* original C++ signature */
  1108. @overload
  1109. def add_colormap(name: str, cols: ImVec4Like, size: int, qual: bool = True) -> Colormap:
  1110. pass
  1111. # IMPLOT3D_API ImPlot3DColormap AddColormap(const char* name, const ImU32* cols, int size, bool qual = true); /* original C++ signature */
  1112. @overload
  1113. def add_colormap(name: str, cols: ImU32, size: int, qual: bool = True) -> Colormap:
  1114. pass
  1115. # IMPLOT3D_API int GetColormapCount(); /* original C++ signature */
  1116. def get_colormap_count() -> int:
  1117. """Returns the number of available colormaps (i.e. the built-in + user-added count)"""
  1118. pass
  1119. # IMPLOT3D_API const char* GetColormapName(ImPlot3DColormap cmap); /* original C++ signature */
  1120. def get_colormap_name(cmap: Colormap) -> str:
  1121. """Returns a null terminated string name for a colormap given an index. Returns None if index is invalid"""
  1122. pass
  1123. # IMPLOT3D_API ImPlot3DColormap GetColormapIndex(const char* name); /* original C++ signature */
  1124. def get_colormap_index(name: str) -> Colormap:
  1125. """Returns an index number for a colormap given a valid string name. Returns -1 if name is invalid"""
  1126. pass
  1127. # IMPLOT3D_API void PushColormap(ImPlot3DColormap cmap); /* original C++ signature */
  1128. @overload
  1129. def push_colormap(cmap: Colormap) -> None:
  1130. """Temporarily switch to one of the built-in (i.e. ImPlot3DColormap_XXX) or user-added colormaps (i.e. a return value of AddColormap). Don't forget to
  1131. call PopColormap!
  1132. """
  1133. pass
  1134. # IMPLOT3D_API void PushColormap(const char* name); /* original C++ signature */
  1135. @overload
  1136. def push_colormap(name: str) -> None:
  1137. """Push a colormap by string name. Use built-in names such as "Default", "Deep", "Jet", etc. or a string you provided to AddColormap. Don't forget to
  1138. call PopColormap!
  1139. """
  1140. pass
  1141. # IMPLOT3D_API void PopColormap(int count = 1); /* original C++ signature */
  1142. def pop_colormap(count: int = 1) -> None:
  1143. """Undo temporary colormap modification(s). Undo multiple pushes at once by increasing count"""
  1144. pass
  1145. # IMPLOT3D_API ImVec4 NextColormapColor(); /* original C++ signature */
  1146. def next_colormap_color() -> ImVec4:
  1147. """Returns the next color from the current colormap and advances the colormap for the current plot
  1148. Can also be used with no return value to skip colors if desired. You need to call it between Begin/EndPlot!
  1149. """
  1150. pass
  1151. # IMPLOT3D_API int GetColormapSize(ImPlot3DColormap cmap = IMPLOT3D_AUTO); /* original C++ signature */
  1152. def get_colormap_size(cmap: Optional[Colormap] = None) -> int:
  1153. """Returns the size of a colormap
  1154. Python bindings defaults:
  1155. If cmap is None, then its default value will be: IMPLOT3D_AUTO
  1156. """
  1157. pass
  1158. # IMPLOT3D_API ImVec4 GetColormapColor(int idx, ImPlot3DColormap cmap = IMPLOT3D_AUTO); /* original C++ signature */
  1159. def get_colormap_color(idx: int, cmap: Optional[Colormap] = None) -> ImVec4:
  1160. """Returns a color from a colormap given an index >= 0 (modulo will be performed)
  1161. Python bindings defaults:
  1162. If cmap is None, then its default value will be: IMPLOT3D_AUTO
  1163. """
  1164. pass
  1165. # IMPLOT3D_API ImVec4 SampleColormap(float t, ImPlot3DColormap cmap = IMPLOT3D_AUTO); /* original C++ signature */
  1166. def sample_colormap(t: float, cmap: Optional[Colormap] = None) -> ImVec4:
  1167. """Sample a color from the current colormap given t between 0 and 1
  1168. Python bindings defaults:
  1169. If cmap is None, then its default value will be: IMPLOT3D_AUTO
  1170. """
  1171. pass
  1172. # -----------------------------------------------------------------------------
  1173. # [SECTION] Demo
  1174. # -----------------------------------------------------------------------------
  1175. # Add implot3_demo.cpp to your sources to use methods in this section
  1176. # IMPLOT3D_API void ShowDemoWindow(bool* p_open = nullptr); /* original C++ signature */
  1177. def show_demo_window(p_open: Optional[bool] = None) -> Optional[bool]:
  1178. """Shows the ImPlot3D demo window"""
  1179. pass
  1180. # Shows all ImPlot3D demos, without enclosing window
  1181. # IMPLOT3D_API void ShowAllDemos(); /* original C++ signature */
  1182. def show_all_demos() -> None:
  1183. pass
  1184. # IMPLOT3D_API void ShowDemoWindow_MaybeDocked(bool create_window, bool* p_open = NULL, ImGuiWindowFlags initial_extra_flags = 0, ImVec2 window_pos = ImVec2(0, 0), ImVec2 window_size = ImVec2(0, 0)); /* original C++ signature */
  1185. def show_demo_window_maybe_docked(
  1186. create_window: bool,
  1187. p_open: Optional[bool] = None,
  1188. initial_extra_flags: WindowFlags = 0,
  1189. window_pos: Optional[ImVec2Like] = None,
  1190. window_size: Optional[ImVec2Like] = None,
  1191. ) -> Optional[bool]:
  1192. """Python bindings defaults:
  1193. If any of the params below is None, then its default value below will be used:
  1194. * window_pos: ImVec2(0, 0)
  1195. * window_size: ImVec2(0, 0)
  1196. """
  1197. pass
  1198. # IMPLOT3D_API void ShowStyleEditor(ImPlot3DStyle* ref = nullptr); /* original C++ signature */
  1199. def show_style_editor(ref: Optional[Style] = None) -> None:
  1200. """Shows ImPlot3D style editor block (not a window)"""
  1201. pass
  1202. # IMPLOT3D_API bool ShowStyleSelector(const char* label); /* original C++ signature */
  1203. def show_style_selector(label: str) -> bool:
  1204. """Shows ImPlot3D style selector and returns True if selection is changed (not a window)"""
  1205. pass
  1206. # IMPLOT3D_API bool ShowColormapSelector(const char* label); /* original C++ signature */
  1207. def show_colormap_selector(label: str) -> bool:
  1208. """Shows ImPlot3D colormap selector and returns True if selection is changed (not a window)"""
  1209. pass
  1210. # IMPLOT3D_API void ShowMetricsWindow(bool* p_popen = nullptr); /* original C++ signature */
  1211. def show_metrics_window(p_popen: Optional[bool] = None) -> Optional[bool]:
  1212. """Shows ImPlot3D metrics/debug information window."""
  1213. pass
  1214. # IMPLOT3D_API void ShowAboutWindow(bool* p_open = nullptr); /* original C++ signature */
  1215. def show_about_window(p_open: Optional[bool] = None) -> Optional[bool]:
  1216. """Shows ImPlot3D about window."""
  1217. pass
  1218. # -----------------------------------------------------------------------------
  1219. # [SECTION] ImPlot3DPoint
  1220. # -----------------------------------------------------------------------------
  1221. class Point:
  1222. """ImPlot3DPoint: 3D vector to store points in 3D space"""
  1223. # double x, /* original C++ signature */
  1224. x: float # Coordinates
  1225. # y, /* original C++ signature */
  1226. y: float # Coordinates
  1227. # z; /* original C++ signature */
  1228. z: float # Coordinates
  1229. # constexpr ImPlot3DPoint() : x(0.0), y(0.0), z(0.0) {} /* original C++ signature */
  1230. @overload
  1231. def __init__(self) -> None:
  1232. pass
  1233. # constexpr ImPlot3DPoint(double _x, double _y, double _z) : x(_x), y(_y), z(_z) {} /* original C++ signature */
  1234. @overload
  1235. def __init__(self, _x: float, _y: float, _z: float) -> None:
  1236. pass
  1237. # Accessors
  1238. # double& operator[](size_t idx) { /* original C++ signature */
  1239. # IM_ASSERT(idx == 0 || idx == 1 || idx == 2);
  1240. # return ((double*)(void*)(char*)this)[idx];
  1241. # }
  1242. def __getitem__(self, idx: int) -> float:
  1243. """(private API)"""
  1244. pass
  1245. # Binary operators
  1246. # IMPLOT3D_API ImPlot3DPoint operator*(double rhs) const; /* original C++ signature */
  1247. @overload
  1248. def __mul__(self, rhs: float) -> Point:
  1249. pass
  1250. # IMPLOT3D_API ImPlot3DPoint operator*(const ImPlot3DPoint& rhs) const; /* original C++ signature */
  1251. @overload
  1252. def __mul__(self, rhs: Point) -> Point:
  1253. pass
  1254. # IMPLOT3D_API ImPlot3DPoint operator/(double rhs) const; /* original C++ signature */
  1255. @overload
  1256. def __truediv__(self, rhs: float) -> Point:
  1257. pass
  1258. # IMPLOT3D_API ImPlot3DPoint operator/(const ImPlot3DPoint& rhs) const; /* original C++ signature */
  1259. @overload
  1260. def __truediv__(self, rhs: Point) -> Point:
  1261. pass
  1262. # IMPLOT3D_API ImPlot3DPoint operator+(const ImPlot3DPoint& rhs) const; /* original C++ signature */
  1263. def __add__(self, rhs: Point) -> Point:
  1264. pass
  1265. # IMPLOT3D_API ImPlot3DPoint operator-(const ImPlot3DPoint& rhs) const; /* original C++ signature */
  1266. def __sub__(self, rhs: Point) -> Point:
  1267. pass
  1268. # IMPLOT3D_API ImPlot3DPoint operator-() const; /* original C++ signature */
  1269. def __neg__(self) -> Point:
  1270. """Unary operator"""
  1271. pass
  1272. # Compound assignment operators
  1273. # IMPLOT3D_API ImPlot3DPoint& operator*=(double rhs); /* original C++ signature */
  1274. @overload
  1275. def __imul__(self, rhs: float) -> Point:
  1276. pass
  1277. # IMPLOT3D_API ImPlot3DPoint& operator*=(const ImPlot3DPoint& rhs); /* original C++ signature */
  1278. @overload
  1279. def __imul__(self, rhs: Point) -> Point:
  1280. pass
  1281. # IMPLOT3D_API ImPlot3DPoint& operator/=(double rhs); /* original C++ signature */
  1282. @overload
  1283. def __itruediv__(self, rhs: float) -> Point:
  1284. pass
  1285. # IMPLOT3D_API ImPlot3DPoint& operator/=(const ImPlot3DPoint& rhs); /* original C++ signature */
  1286. @overload
  1287. def __itruediv__(self, rhs: Point) -> Point:
  1288. pass
  1289. # IMPLOT3D_API ImPlot3DPoint& operator+=(const ImPlot3DPoint& rhs); /* original C++ signature */
  1290. def __iadd__(self, rhs: Point) -> Point:
  1291. pass
  1292. # IMPLOT3D_API ImPlot3DPoint& operator-=(const ImPlot3DPoint& rhs); /* original C++ signature */
  1293. def __isub__(self, rhs: Point) -> Point:
  1294. pass
  1295. # Comparison operators
  1296. # IMPLOT3D_API bool operator==(const ImPlot3DPoint& rhs) const; /* original C++ signature */
  1297. def __eq__(self, rhs: object) -> bool:
  1298. pass
  1299. # IMPLOT3D_API bool operator!=(const ImPlot3DPoint& rhs) const; /* original C++ signature */
  1300. def __ne__(self, rhs: object) -> bool:
  1301. pass
  1302. # IMPLOT3D_API double Dot(const ImPlot3DPoint& rhs) const; /* original C++ signature */
  1303. def dot(self, rhs: Point) -> float:
  1304. """Dot product"""
  1305. pass
  1306. # IMPLOT3D_API ImPlot3DPoint Cross(const ImPlot3DPoint& rhs) const; /* original C++ signature */
  1307. def cross(self, rhs: Point) -> Point:
  1308. """Cross product"""
  1309. pass
  1310. # IMPLOT3D_API double Length() const; /* original C++ signature */
  1311. def length(self) -> float:
  1312. """Get vector length"""
  1313. pass
  1314. # IMPLOT3D_API double LengthSquared() const; /* original C++ signature */
  1315. def length_squared(self) -> float:
  1316. """Get vector squared length"""
  1317. pass
  1318. # IMPLOT3D_API void Normalize(); /* original C++ signature */
  1319. def normalize(self) -> None:
  1320. """Normalize to unit length"""
  1321. pass
  1322. # IMPLOT3D_API ImPlot3DPoint Normalized() const; /* original C++ signature */
  1323. def normalized(self) -> Point:
  1324. """Return vector normalized to unit length"""
  1325. pass
  1326. # IMPLOT3D_API bool IsNaN() const; /* original C++ signature */
  1327. def is_nan(self) -> bool:
  1328. """Check if the point is NaN"""
  1329. pass
  1330. # -----------------------------------------------------------------------------
  1331. # [SECTION] ImPlot3DRay
  1332. # -----------------------------------------------------------------------------
  1333. class Ray:
  1334. """ImPlot3DRay: Represents a ray in 3D space with an origin and direction"""
  1335. # ImPlot3DPoint Origin; /* original C++ signature */
  1336. origin: Point # Ray origin point
  1337. # ImPlot3DPoint Direction; /* original C++ signature */
  1338. direction: Point # Ray direction (not necessarily normalized)
  1339. # ImPlot3DRay(ImPlot3DPoint Origin = ImPlot3DPoint(), ImPlot3DPoint Direction = ImPlot3DPoint()); /* original C++ signature */
  1340. def __init__(self, origin: Optional[Point] = None, direction: Optional[Point] = None) -> None:
  1341. """Auto-generated default constructor with named params
  1342. Python bindings defaults:
  1343. If any of the params below is None, then its default value below will be used:
  1344. * Origin: Point()
  1345. * Direction: Point()
  1346. """
  1347. pass
  1348. # -----------------------------------------------------------------------------
  1349. # [SECTION] ImPlot3DPlane
  1350. # -----------------------------------------------------------------------------
  1351. class Plane:
  1352. """ImPlot3DPlane: Represents a plane in 3D space defined by a point and normal vector"""
  1353. # ImPlot3DPoint Point; /* original C++ signature */
  1354. point: Point # A point on the plane
  1355. # ImPlot3DPoint Normal; /* original C++ signature */
  1356. normal: Point # Plane normal vector
  1357. # ImPlot3DPlane(ImPlot3DPoint Point = ImPlot3DPoint(), ImPlot3DPoint Normal = ImPlot3DPoint()); /* original C++ signature */
  1358. def __init__(self, point: Optional[Point] = None, normal: Optional[Point] = None) -> None:
  1359. """Auto-generated default constructor with named params
  1360. Python bindings defaults:
  1361. If any of the params below is None, then its default value below will be used:
  1362. * Point: Point()
  1363. * Normal: Point()
  1364. """
  1365. pass
  1366. # -----------------------------------------------------------------------------
  1367. # [SECTION] ImPlot3DBox
  1368. # -----------------------------------------------------------------------------
  1369. class Box:
  1370. """ImPlot3DBox: Axis-aligned bounding box in 3D space"""
  1371. # ImPlot3DPoint Min; /* original C++ signature */
  1372. min: Point # Minimum corner of the box
  1373. # ImPlot3DPoint Max; /* original C++ signature */
  1374. max: Point # Maximum corner of the box
  1375. # constexpr ImPlot3DBox() : Min(ImPlot3DPoint()), Max(ImPlot3DPoint()) {} /* original C++ signature */
  1376. @overload
  1377. def __init__(self) -> None:
  1378. """Default constructor"""
  1379. pass
  1380. # constexpr ImPlot3DBox(const ImPlot3DPoint& min, const ImPlot3DPoint& max) : Min(min), Max(max) {} /* original C++ signature */
  1381. @overload
  1382. def __init__(self, min: Point, max: Point) -> None:
  1383. """Constructor with two points"""
  1384. pass
  1385. # IMPLOT3D_API void Expand(const ImPlot3DPoint& point); /* original C++ signature */
  1386. def expand(self, point: Point) -> None:
  1387. """Method to expand the box to include a point"""
  1388. pass
  1389. # IMPLOT3D_API bool Contains(const ImPlot3DPoint& point) const; /* original C++ signature */
  1390. def contains(self, point: Point) -> bool:
  1391. """Method to check if a point is inside the box"""
  1392. pass
  1393. # IMPLOT3D_API bool ClipLineSegment(const ImPlot3DPoint& p0, const ImPlot3DPoint& p1, ImPlot3DPoint& p0_clipped, ImPlot3DPoint& p1_clipped) const; /* original C++ signature */
  1394. def clip_line_segment(self, p0: Point, p1: Point, p0_clipped: Point, p1_clipped: Point) -> bool:
  1395. """Method to clip a line segment against the box"""
  1396. pass
  1397. # -----------------------------------------------------------------------------
  1398. # [SECTION] ImPlot3DRange
  1399. # -----------------------------------------------------------------------------
  1400. class Range:
  1401. """ImPlot3DRange: Represents a 1D range with min and max values"""
  1402. # double Min; /* original C++ signature */
  1403. min: float # Minimum value
  1404. # double Max; /* original C++ signature */
  1405. max: float # Maximum value
  1406. # constexpr ImPlot3DRange() : Min(0.0), Max(0.0) {} /* original C++ signature */
  1407. @overload
  1408. def __init__(self) -> None:
  1409. pass
  1410. # constexpr ImPlot3DRange(double min, double max) : Min(min), Max(max) {} /* original C++ signature */
  1411. @overload
  1412. def __init__(self, min: float, max: float) -> None:
  1413. pass
  1414. # IMPLOT3D_API void Expand(double value); /* original C++ signature */
  1415. def expand(self, value: float) -> None:
  1416. """Expand range to include value"""
  1417. pass
  1418. # IMPLOT3D_API bool Contains(double value) const; /* original C++ signature */
  1419. def contains(self, value: float) -> bool:
  1420. """Check if value is within range"""
  1421. pass
  1422. # double Size() const { return Max - Min; } /* original C++ signature */
  1423. def size(self) -> float:
  1424. """(private API)
  1425. Get range size
  1426. """
  1427. pass
  1428. # -----------------------------------------------------------------------------
  1429. # [SECTION] ImPlot3DQuat
  1430. # -----------------------------------------------------------------------------
  1431. class Quat:
  1432. """ImPlot3DQuat: Quaternion for representing 3D rotations"""
  1433. # double x, /* original C++ signature */
  1434. x: float # Quaternion components
  1435. # y, /* original C++ signature */
  1436. y: float # Quaternion components
  1437. # z, /* original C++ signature */
  1438. z: float # Quaternion components
  1439. # w; /* original C++ signature */
  1440. w: float # Quaternion components
  1441. # Constructors
  1442. # constexpr ImPlot3DQuat() : x(0.0), y(0.0), z(0.0), w(1.0) {} /* original C++ signature */
  1443. @overload
  1444. def __init__(self) -> None:
  1445. pass
  1446. # constexpr ImPlot3DQuat(double _x, double _y, double _z, double _w) : x(_x), y(_y), z(_z), w(_w) {} /* original C++ signature */
  1447. @overload
  1448. def __init__(self, _x: float, _y: float, _z: float, _w: float) -> None:
  1449. pass
  1450. # IMPLOT3D_API ImPlot3DQuat(double _angle, const ImPlot3DPoint& _axis); /* original C++ signature */
  1451. @overload
  1452. def __init__(self, _angle: float, _axis: Point) -> None:
  1453. """Construct quaternion from angle-axis representation (angle in radians)"""
  1454. pass
  1455. # IMPLOT3D_API static ImPlot3DQuat FromTwoVectors(const ImPlot3DPoint& v0, const ImPlot3DPoint& v1); /* original C++ signature */
  1456. @staticmethod
  1457. def from_two_vectors(v0: Point, v1: Point) -> Quat:
  1458. """Create quaternion that rotates from v0 to v1"""
  1459. pass
  1460. # IMPLOT3D_API static ImPlot3DQuat FromElAz(double elevation, double azimuth); /* original C++ signature */
  1461. @staticmethod
  1462. def from_el_az(elevation: float, azimuth: float) -> Quat:
  1463. """Create quaternion from elevation and azimuth angles (in radians)"""
  1464. pass
  1465. # IMPLOT3D_API double Length() const; /* original C++ signature */
  1466. def length(self) -> float:
  1467. """Get quaternion length"""
  1468. pass
  1469. # IMPLOT3D_API ImPlot3DQuat Normalized() const; /* original C++ signature */
  1470. def normalized(self) -> Quat:
  1471. """Get normalized quaternion"""
  1472. pass
  1473. # IMPLOT3D_API ImPlot3DQuat Conjugate() const; /* original C++ signature */
  1474. def conjugate(self) -> Quat:
  1475. """Conjugate of the quaternion"""
  1476. pass
  1477. # IMPLOT3D_API ImPlot3DQuat Inverse() const; /* original C++ signature */
  1478. def inverse(self) -> Quat:
  1479. """Inverse of the quaternion"""
  1480. pass
  1481. # Binary operators
  1482. # IMPLOT3D_API ImPlot3DQuat operator*(const ImPlot3DQuat& rhs) const; /* original C++ signature */
  1483. @overload
  1484. def __mul__(self, rhs: Quat) -> Quat:
  1485. """Quaternion multiplication"""
  1486. pass
  1487. # IMPLOT3D_API ImPlot3DPoint operator*(const ImPlot3DPoint& point) const; /* original C++ signature */
  1488. @overload
  1489. def __mul__(self, point: Point) -> Point:
  1490. """Rotate a 3D point using the quaternion"""
  1491. pass
  1492. # IMPLOT3D_API ImPlot3DQuat& Normalize(); /* original C++ signature */
  1493. def normalize(self) -> Quat:
  1494. """Normalize the quaternion in place"""
  1495. pass
  1496. # Comparison operators
  1497. # IMPLOT3D_API bool operator==(const ImPlot3DQuat& rhs) const; /* original C++ signature */
  1498. def __eq__(self, rhs: object) -> bool:
  1499. pass
  1500. # IMPLOT3D_API bool operator!=(const ImPlot3DQuat& rhs) const; /* original C++ signature */
  1501. def __ne__(self, rhs: object) -> bool:
  1502. pass
  1503. # IMPLOT3D_API static ImPlot3DQuat Slerp(const ImPlot3DQuat& q1, const ImPlot3DQuat& q2, double t); /* original C++ signature */
  1504. @staticmethod
  1505. def slerp(q1: Quat, q2: Quat, t: float) -> Quat:
  1506. """Spherical linear interpolation between two quaternions (t in [0,1])"""
  1507. pass
  1508. # IMPLOT3D_API double Dot(const ImPlot3DQuat& rhs) const; /* original C++ signature */
  1509. def dot(self, rhs: Quat) -> float:
  1510. """Get quaternion dot product"""
  1511. pass
  1512. # -----------------------------------------------------------------------------
  1513. # [SECTION] ImPlot3DStyle
  1514. # -----------------------------------------------------------------------------
  1515. class Style:
  1516. """
  1517. (has support for copy.copy)
  1518. """
  1519. # Item style
  1520. # float LineWeight; /* original C++ signature */
  1521. line_weight: float # Line weight in pixels
  1522. # int Marker; /* original C++ signature */
  1523. marker: int # Default marker type (ImPlot3DMarker_None)
  1524. # float MarkerSize; /* original C++ signature */
  1525. marker_size: float # Marker size in pixels (roughly the marker's "radius")
  1526. # float FillAlpha; /* original C++ signature */
  1527. fill_alpha: float # Alpha modifier applied to plot fills
  1528. # Plot style
  1529. # ImVec2 PlotDefaultSize; /* original C++ signature */
  1530. plot_default_size: ImVec2 # Default size used when ImVec2(0,0) is passed to BeginPlot
  1531. # ImVec2 PlotMinSize; /* original C++ signature */
  1532. plot_min_size: ImVec2 # Minimum size plot frame can be when shrunk
  1533. # ImVec2 PlotPadding; /* original C++ signature */
  1534. plot_padding: ImVec2 # Padding between widget frame and plot area
  1535. # ImVec2 LabelPadding; /* original C++ signature */
  1536. label_padding: ImVec2 # Padding between axes labels, tick labels, and plot edge
  1537. # float ViewScaleFactor; /* original C++ signature */
  1538. view_scale_factor: float # Scale factor for 3D view
  1539. # Legend style
  1540. # ImVec2 LegendPadding; /* original C++ signature */
  1541. legend_padding: ImVec2 # Legend padding from plot edges
  1542. # ImVec2 LegendInnerPadding; /* original C++ signature */
  1543. legend_inner_padding: ImVec2 # Legend inner padding from legend edges
  1544. # ImVec2 LegendSpacing; /* original C++ signature */
  1545. legend_spacing: ImVec2 # Spacing between legend entries
  1546. # Colors
  1547. # inline ImVec4 GetColor(ImPlot3DCol idx) const { return Colors[idx]; } /* original C++ signature */
  1548. def get_color(self, idx: Col) -> ImVec4:
  1549. """(private API)"""
  1550. pass
  1551. # inline void SetColor(ImPlot3DCol idx, const ImVec4& col) { Colors[idx] = col; } /* original C++ signature */
  1552. def set_color(self, idx: Col, col: ImVec4Like) -> None:
  1553. """(private API)"""
  1554. pass
  1555. # Colormap
  1556. # ImPlot3DColormap Colormap; /* original C++ signature */
  1557. colormap: Colormap # The current colormap (ImPlot3DColormap_ enum or index from AddColormap)
  1558. # IMPLOT3D_API ImPlot3DStyle(); /* original C++ signature */
  1559. @overload
  1560. def __init__(self) -> None:
  1561. """Constructor"""
  1562. pass
  1563. # ImPlot3DStyle(const ImPlot3DStyle& other) = default; /* original C++ signature */
  1564. @overload
  1565. def __init__(self, other: Style) -> None:
  1566. pass
  1567. # -----------------------------------------------------------------------------
  1568. # [SECTION] Meshes
  1569. # -----------------------------------------------------------------------------
  1570. # Cube
  1571. # Sphere
  1572. # Duck (Rubber Duck by Poly by Google [CC-BY] via Poly Pizza)
  1573. # -----------------------------------------------------------------------------
  1574. # [SECTION] Obsolete API
  1575. # -----------------------------------------------------------------------------
  1576. # The following functions will be removed! Keep your copy of ImPlot3D up to date!
  1577. # Occasionally set '#define IMPLOT3D_DISABLE_OBSOLETE_FUNCTIONS' to stay ahead.
  1578. # If you absolutely must use these functions and do not want to receive compiler
  1579. # warnings, set '#define IMPLOT3D_DISABLE_OBSOLETE_WARNINGS'.
  1580. # #endif
  1581. #################### </generated_from:implot3d.h> ####################
  1582. # </litgen_stub>
  1583. # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AUTOGENERATED CODE END !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  1584. ###############################################################################
  1585. # MANUAL BINDINGS BELOW
  1586. ###############################################################################
  1587. # Sets an axis' ticks and optionally the labels for the next plot. To keep the default ticks, set #keep_default=true.
  1588. # IMPLOT3D_API void SetupAxisTicks(ImAxis3D axis, double v_min, double v_max, int n_ticks, const char* const labels[] = nullptr, bool keep_default = false);
  1589. @overload
  1590. def setup_axis_ticks(
  1591. axis: ImAxis3D,
  1592. v_min: float,
  1593. v_max: float,
  1594. n_ticks: int,
  1595. labels: List[str] | None = None,
  1596. keep_default: bool = False,
  1597. ) -> None:
  1598. pass
  1599. # Sets an axis' ticks and optionally the labels for the next plot. To keep the default ticks, set #keep_default=true.
  1600. # IMPLOT3D_API void SetupAxisTicks(ImAxis3D axis, const double* values, int n_ticks, const char* const labels[] = nullptr, bool keep_default = false);
  1601. @overload
  1602. def setup_axis_ticks(
  1603. axis: ImAxis3D,
  1604. values: List[float],
  1605. labels: List[str] | None = None,
  1606. keep_default: bool = False,
  1607. ) -> None:
  1608. pass
  1609. # OBSOLETED in v0.4 (from February 2026)
  1610. # ============================================================================
  1611. # The following functions have been REMOVED. Use Spec objects instead:
  1612. #
  1613. # set_next_line_style(col, weight)
  1614. # -> Use: spec=implot3d.Spec(line_color=col, line_weight=weight)
  1615. #
  1616. # set_next_fill_style(col, alpha_mod)
  1617. # -> Use: spec=implot3d.Spec(fill_color=col, fill_alpha=alpha_mod)
  1618. #
  1619. # set_next_marker_style(marker, size, fill, weight, outline)
  1620. # -> Use: spec=implot3d.Spec(marker=marker, marker_size=size,
  1621. # marker_fill_color=fill, line_weight=weight,
  1622. # marker_line_color=outline)
  1623. #
  1624. # Example migration:
  1625. # # OLD (removed):
  1626. # implot3d.set_next_line_style(ImVec4(1,0,0,1), 2.0)
  1627. # implot3d.plot_line("data", xs, ys, zs)
  1628. #
  1629. # # NEW:
  1630. # implot3d.plot_line("data", xs, ys, zs,
  1631. # spec=implot3d.Spec(line_color=ImVec4(1,0,0,1),
  1632. # line_weight=2.0))
  1633. # ============================================================================