5#define IM3D_VERSION "1.16"
13 #define IM3D_ASSERT(e) assert(e)
16#ifndef IM3D_VERTEX_ALIGNMENT
17 #define IM3D_VERTEX_ALIGNMENT 4
24typedef unsigned int U32;
145IM3D_API void Text(
const Vec3& _position,
U32 _textFlags,
const char* _text, ...);
146IM3D_API void Text(
const Vec3& _position,
float _size,
Color _color,
U32 _textFlags,
const char* _text, ...);
176IM3D_API bool Gizmo(
const char* _id,
float _translation_[3],
float _rotation_[3*3],
float _scale_[3]);
184IM3D_API bool Gizmo(
Id _id,
float _translation_[3],
float _rotation_[3*3],
float _scale_[3]);
208 Vec2(
float _xy): x(_xy), y(_xy) {}
209 Vec2(
float _x,
float _y): x(_x), y(_y) {}
211 operator float*() {
return &x; }
212 operator const float*()
const {
return &x; }
224 Vec3(
float _xyz): x(_xyz), y(_xyz), z(_xyz) {}
225 Vec3(
float _x,
float _y,
float _z): x(_x), y(_y), z(_z) {}
226 Vec3(
const Vec2& _xy,
float _z): x(_xy.x), y(_xy.y), z(_z) {}
229 operator float*() {
return &x; }
230 operator const float*()
const {
return &x; }
242 Vec4(
float _xyzw): x(_xyzw), y(_xyzw), z(_xyzw), w(_xyzw) {}
243 Vec4(
float _x,
float _y,
float _z,
float _w): x(_x), y(_y), z(_z), w(_w) {}
244 Vec4(
const Vec3& _xyz,
float _w): x(_xyz.x), y(_xyz.y), z(_xyz.z), w(_w) {}
247 operator float*() {
return &x; }
248 operator const float*()
const {
return &x; }
260 Mat3(
float _diagonal);
262 float m00,
float m01,
float m02,
263 float m10,
float m11,
float m12,
264 float m20,
float m21,
float m22
269 operator float*() {
return m; }
270 operator const float*()
const {
return m; }
272 Vec3 getCol(
int _i)
const;
273 Vec3 getRow(
int _i)
const;
274 void setCol(
int _i,
const Vec3& _v);
275 void setRow(
int _i,
const Vec3& _v);
277 Vec3 getScale()
const;
278 void setScale(
const Vec3& _scale);
282 #ifdef IM3D_MATRIX_ROW_MAJOR
283 int i = _row * 3 + _col;
285 int i = _col * 3 + _row;
291 #ifdef IM3D_MATRIX_ROW_MAJOR
292 int i = _row * 3 + _col;
294 int i = _col * 3 + _row;
309 Mat4(
float _diagonal);
311 float m00,
float m01,
float m02,
float m03,
312 float m10,
float m11,
float m12,
float m13,
313 float m20,
float m21,
float m22,
float m23,
314 float m30 = 0.0f,
float m31 = 0.0f,
float m32 = 0.0f,
float m33 = 1.0f
319 operator float*() {
return m; }
320 operator const float*()
const {
return m; }
322 Vec4 getCol(
int _i)
const;
323 Vec4 getRow(
int _i)
const;
324 void setCol(
int _i,
const Vec4& _v);
325 void setRow(
int _i,
const Vec4& _v);
327 Vec3 getTranslation()
const;
328 void setTranslation(
const Vec3& _translation);
329 Mat3 getRotation()
const;
330 void setRotation(
const Mat3& _rotation);
331 Vec3 getScale()
const;
332 void setScale(
const Vec3& _scale);
336 #ifdef IM3D_MATRIX_ROW_MAJOR
337 int i = _row * 4 + _col;
339 int i = _col * 4 + _row;
345 #ifdef IM3D_MATRIX_ROW_MAJOR
346 int i = _row * 4 + _col;
348 int i = _col * 4 + _row;
366 Color(
float _r,
float _g,
float _b,
float _a = 1.0f);
368 operator U32()
const {
return v; }
370 void set(
int _i,
float _val)
373 U32 mask = 0xff << _i;
374 v = (v & ~mask) | (
U32(_val * 255.0f) << _i);
376 void setR(
float _val) { set(3, _val); }
377 void setG(
float _val) { set(2, _val); }
378 void setB(
float _val) { set(1, _val); }
379 void setA(
float _val) { set(0, _val); }
384 U32 mask = 0xff << _i;
385 return float((v & mask) >> _i) / 255.0f;
387 float getR()
const {
return get(3); }
388 float getG()
const {
return get(2); }
389 float getB()
const {
return get(1); }
390 float getA()
const {
return get(0); }
395 | ((v & (0xff << 24)) >> 24)
396 | ((v & (0xff << 16)) >> 8)
397 | ((v & (0xff << 8)) << 8)
398 | ((v & (0xff )) << 24)
427 VertexData(
const Vec3& _position,
float _size,
Color _color): m_positionSize(_position, _size), m_color(_color) {}
447typedef void (DrawPrimitivesCallback)(
const DrawList& _drawList);
452 TextFlags_AlignRight = (1 << 1),
454 TextFlags_AlignBottom = (1 << 4),
518 float m_projScaleY = 1.0f;
519 bool m_projOrtho =
false;
520 float m_deltaTime = 0.0f;
521 float m_snapTranslation = 0.0f;
522 float m_snapRotation = 0.0f;
523 float m_snapScale = 0.0f;
524 bool m_flipGizmoWhenBehind =
true;
525 void* m_appData =
nullptr;
531 void setCullFrustum(
const Mat4& _viewProj,
bool _ndcZNegativeOneToOne);
544 const T*
data()
const {
return m_data; }
546 T&
push_back() {
if (m_size == m_capacity) { reserve(m_capacity + m_capacity / 2); }
return m_data[m_size++]; }
547 void push_back(
const T& _v) { T tmp = _v;
if (m_size == m_capacity) { reserve(m_capacity + m_capacity / 2); } m_data[m_size++] = tmp; }
549 void append(
const T* _v,
U32 _count);
553 const T*
begin()
const {
return m_data; }
554 T*
end() {
return m_data + m_size; }
555 const T*
end()
const {
return m_data + m_size; }
563 bool empty()
const {
return m_size == 0; }
566 void reserve(
U32 _capacity);
567 void resize(
U32 _size,
const T& _val);
568 void resize(
U32 _size);
606 void vertex(
const Vec3& _position,
float _size,
Color _color);
609 void text(
const Vec3& _position,
float _size,
Color _color,
TextFlags _flags,
const char* _textStart,
const char* _textEnd);
610 void text(
const Vec3& _position,
float _size,
Color _color,
TextFlags _flags,
const char* _text, va_list _args);
613 void merge(
const Context& _src);
629 void setAlpha(
float _alpha) { m_alphaStack.back() = _alpha; }
630 float getAlpha()
const {
return m_alphaStack.back(); }
631 void pushAlpha(
float _alpha) { m_alphaStack.push_back(_alpha); }
634 void setSize(
float _size) { m_sizeStack.back() = _size; }
635 float getSize()
const {
return m_sizeStack.back(); }
636 void pushSize(
float _size) { m_sizeStack.push_back(_size); }
639 void setEnableSorting(
bool _enable);
641 void pushEnableSorting(
bool _enable);
642 void popEnableSorting();
645 void pushLayerId(
Id _layer);
653 void setId(
Id _id) { m_idStack.back() = _id; }
662 bool gizmoAxisTranslation_Behavior(
Id _id,
const Vec3& _origin,
const Vec3& _axis,
float _snap,
float _worldHeight,
float _worldSize,
Vec3* _out_);
663 void gizmoAxisTranslation_Draw(
Id _id,
const Vec3& _origin,
const Vec3& _axis,
float _worldHeight,
float _worldSize,
Color _color);
665 bool gizmoPlaneTranslation_Behavior(
Id _id,
const Vec3& _origin,
const Vec3& _normal,
float _snap,
float _worldSize,
Vec3* _out_);
666 void gizmoPlaneTranslation_Draw(
Id _id,
const Vec3& _origin,
const Vec3& _normal,
float _worldSize,
Color _color);
668 bool gizmoAxislAngle_Behavior(
Id _id,
const Vec3& _origin,
const Vec3& _axis,
float _snap,
float _worldRadius,
float _worldSize,
float* _out_);
669 void gizmoAxislAngle_Draw(
Id _id,
const Vec3& _origin,
const Vec3& _axis,
float _worldRadius,
float _angle,
Color _color,
float _minAlpha);
671 bool gizmoAxisScale_Behavior(
Id _id,
const Vec3& _origin,
const Vec3& _axis,
float _snap,
float _worldHeight,
float _worldSize,
float *_out_);
672 void gizmoAxisScale_Draw(
Id _id,
const Vec3& _origin,
const Vec3& _axis,
float _worldHeight,
float _worldSize,
Color _color);
675 float pixelsToWorldSize(
const Vec3& _position,
float _pixels);
677 float worldSizeToPixels(
const Vec3& _position,
float _pixels);
679 int estimateLevelOfDetail(
const Vec3& _position,
float _worldSize,
int _min = 4,
int _max = 256);
682 bool makeHot(
Id _id,
float _depth,
bool _intersects);
684 void makeActive(
Id _id);
694 bool isVisible(
const Vec3& _origin,
float _radius);
695 bool isVisible(
const Vec3& _min,
const Vec3& _max);
720 U32 getTextCount()
const;
771 int findLayerIndex(
Id _id)
const;
780#if IM3D_THREAD_LOCAL_CONTEXT_PTR
781 #define IM3D_THREAD_LOCAL thread_local
783 #define IM3D_THREAD_LOCAL
815inline void Vertex(
float _x,
float _y,
float _z,
float _size) {
Vertex(
Vec3(_x, _y, _z), _size); }
816inline void Vertex(
float _x,
float _y,
float _z,
float _size,
Color _color) {
Vertex(
Vec3(_x, _y, _z), _size, _color); }
818inline void PushDrawState() {
Context& ctx =
GetContext(); ctx.pushColor(ctx.getColor()); ctx.pushAlpha(ctx.getAlpha()); ctx.pushSize(ctx.getSize()); ctx.pushEnableSorting(ctx.getEnableSorting()); }
868inline bool Gizmo(
const char* _id,
float _translation_[3],
float _rotation_[3*3],
float _scale_[3]) {
return Gizmo(
MakeId(_id), _translation_, _rotation_, _scale_); }
869inline bool Gizmo(
const char* _id,
float _transform_[4*4]) {
return Gizmo(
MakeId(_id), _transform_); }
#define IM3D_API
Definition im3d.h:8
#define IM3D_THREAD_LOCAL
Definition im3d.h:783
#define IM3D_VEC4_APP
Definition im3d_config.h:47
#define IM3D_VEC2_APP
Definition im3d_config.h:37
#define IM3D_VEC3_APP
Definition im3d_config.h:40
#define IM3D_ASSERT(e)
Definition im3d_config.h:13
#define IM3D_MAT3_APP
Definition im3d_config.h:52
#define IM3D_MAT4_APP
Definition im3d_config.h:55
IM3D_API void PushDrawState()
Definition im3d.h:818
IM3D_API AppData & GetAppData()
Definition im3d.h:790
IM3D_API void NewFrame()
Definition im3d.h:791
IM3D_API void DrawXyzAxes()
Definition im3d.cpp:144
IM3D_API void DrawCapsule(const Vec3 &_start, const Vec3 &_end, float _radius, int _detail=-1)
Definition im3d.cpp:502
IM3D_API void Vertex(const Vec3 &_position)
Definition im3d.h:809
IM3D_API void PushLayerId(Id _layer)
Definition im3d.h:860
IM3D_API void PopEnableSorting()
Definition im3d.h:842
IM3D_API void End()
Definition im3d.h:807
constexpr Color Color_Red
Definition im3d.h:406
IM3D_API void DrawArrow(const Vec3 &_start, const Vec3 &_end, float _headLength=-1.0f, float _headThickness=-1.0f)
Definition im3d.cpp:596
IM3D_API void BeginLines()
Definition im3d.h:802
constexpr Color Color_White
Definition im3d.h:404
IM3D_API void EnableSorting(bool _enable)
Definition im3d.h:843
IM3D_API void SetMatrix(const Mat4 &_mat4)
Definition im3d.h:848
GizmoMode
Definition im3d.h:591
@ GizmoMode_Rotation
Definition im3d.h:593
@ GizmoMode_Translation
Definition im3d.h:592
@ GizmoMode_Scale
Definition im3d.h:594
IM3D_API float GetSize()
Definition im3d.h:838
U32 Id
Definition im3d.h:37
constexpr Color Color_Orange
Definition im3d.h:414
IM3D_API Id GetLayerId()
Definition im3d.h:863
constexpr Color Color_Magenta
Definition im3d.h:409
IM3D_API void BeginTriangles()
Definition im3d.h:805
IM3D_API void BeginLineLoop()
Definition im3d.h:803
IM3D_API Id GetId()
Definition im3d.h:857
IM3D_API void Draw()
Definition im3d.h:793
constexpr Color Color_Purple
Definition im3d.h:417
IM3D_API Id GetHotId()
Definition im3d.h:871
IM3D_API void EndFrame()
Definition im3d.h:792
IM3D_API void MulMatrix(const Mat4 &_mat4)
Definition im3d.cpp:112
IM3D_API void DrawSphereFilled(const Vec3 &_origin, float _radius, int _detail=-1)
Definition im3d.cpp:322
IM3D_API void PushMatrix()
Definition im3d.h:845
IM3D_API void PopColor()
Definition im3d.h:823
IM3D_API U32 GetDrawListCount()
Definition im3d.h:796
IM3D_API void PopDrawState()
Definition im3d.h:819
IM3D_API U32 GetTextDrawListCount()
Definition im3d.h:799
IM3D_API void BeginPoints()
Definition im3d.h:801
IM3D_API void DrawCylinder(const Vec3 &_start, const Vec3 &_end, float _radius, int _detail=-1)
Definition im3d.cpp:459
IM3D_API void SetIdentity()
Definition im3d.h:849
IM3D_API void PushColor()
Definition im3d.h:821
constexpr Id Id_Invalid
Definition im3d.h:38
IM3D_API bool IsVisible(const Vec3 &_origin, float _radius)
Definition im3d.h:873
IM3D_API void SetContext(Context &_ctx)
Definition im3d.h:877
constexpr Color Color_Teal
Definition im3d.h:418
constexpr Color Color_Gold
Definition im3d.h:415
constexpr Color Color_Brown
Definition im3d.h:416
IM3D_API void DrawQuadFilled(const Vec3 &_a, const Vec3 &_b, const Vec3 &_c, const Vec3 &_d)
Definition im3d.cpp:196
IM3D_API Context & GetContext()
Definition im3d.h:876
IM3D_API void Translate(float _x, float _y, float _z)
Definition im3d.cpp:117
IM3D_API const DrawList * GetDrawLists()
Definition im3d.h:795
IM3D_API bool GizmoRotation(const char *_id, float _rotation_[3 *3], bool _local=false)
Definition im3d.h:866
constexpr Color Color_Pink
Definition im3d.h:413
constexpr Color Color_Green
Definition im3d.h:407
IM3D_API void BeginLineStrip()
Definition im3d.h:804
constexpr Color Color_Blue
Definition im3d.h:408
IM3D_API void PopAlpha()
Definition im3d.h:830
IM3D_API void PopMatrix()
Definition im3d.h:847
DrawPrimitiveType
Definition im3d.h:431
@ DrawPrimitive_Lines
Definition im3d.h:434
@ DrawPrimitive_Count
Definition im3d.h:437
@ DrawPrimitive_Points
Definition im3d.h:435
@ DrawPrimitive_Triangles
Definition im3d.h:433
IM3D_API void BeginTriangleStrip()
Definition im3d.h:806
IM3D_API void PushEnableSorting()
Definition im3d.h:840
constexpr Color Color_Yellow
Definition im3d.h:410
IM3D_API void SetAlpha(float _alpha)
Definition im3d.h:831
IM3D_API void DrawCircle(const Vec3 &_origin, const Vec3 &_normal, float _radius, int _detail=-1)
Definition im3d.cpp:220
IM3D_API Id GetActiveId()
Definition im3d.h:870
IM3D_API void DrawQuad(const Vec3 &_a, const Vec3 &_b, const Vec3 &_c, const Vec3 &_d)
Definition im3d.cpp:174
constexpr Color Color_Gray
Definition im3d.h:405
void PushLayerId()
Definition im3d.h:859
IM3D_API void PushId()
Definition im3d.h:851
IM3D_API void DrawLine(const Vec3 &_a, const Vec3 &_b, float _size, Color _color)
Definition im3d.cpp:166
PrimitiveMode
Definition im3d.h:581
@ PrimitiveMode_Triangles
Definition im3d.h:587
@ PrimitiveMode_None
Definition im3d.h:582
@ PrimitiveMode_LineLoop
Definition im3d.h:586
@ PrimitiveMode_Lines
Definition im3d.h:584
@ PrimitiveMode_Points
Definition im3d.h:583
@ PrimitiveMode_TriangleStrip
Definition im3d.h:588
@ PrimitiveMode_LineStrip
Definition im3d.h:585
IM3D_API bool GizmoTranslation(const char *_id, float _translation_[3], bool _local=false)
Definition im3d.h:865
constexpr Color Color_Black
Definition im3d.h:403
IM3D_API void PopSize()
Definition im3d.h:836
IM3D_API void DrawAlignedBoxFilled(const Vec3 &_min, const Vec3 &_max)
Definition im3d.cpp:404
IM3D_API void SetSize(float _size)
Definition im3d.h:837
IM3D_API void DrawPrism(const Vec3 &_start, const Vec3 &_end, float _radius, int _sides)
Definition im3d.cpp:560
constexpr Color Color_Cyan
Definition im3d.h:411
IM3D_API Id MakeId(const char *_str)
Definition im3d.cpp:662
IM3D_API void Rotate(const Vec3 &_axis, float _angle)
Definition im3d.cpp:127
IM3D_API bool GizmoScale(const char *_id, float _scale_[3])
Definition im3d.h:867
IM3D_API void PopLayerId()
Definition im3d.h:862
unsigned int U32
Definition im3d.h:24
TextFlags
Definition im3d.h:450
@ TextFlags_AlignLeft
Definition im3d.h:451
@ TextFlags_AlignTop
Definition im3d.h:453
@ TextFlags_Default
Definition im3d.h:456
IM3D_API void PushAlpha()
Definition im3d.h:828
FrustumPlane
Definition im3d.h:497
@ FrustumPlane_Right
Definition im3d.h:501
@ FrustumPlane_Near
Definition im3d.h:498
@ FrustumPlane_Count
Definition im3d.h:505
@ FrustumPlane_Bottom
Definition im3d.h:502
@ FrustumPlane_Top
Definition im3d.h:500
@ FrustumPlane_Left
Definition im3d.h:503
@ FrustumPlane_Far
Definition im3d.h:499
@ Action_GizmoTranslation
Definition im3d.h:491
@ Action_GizmoLocal
Definition im3d.h:488
@ Action_Select
Definition im3d.h:487
@ Action_GizmoRotation
Definition im3d.h:489
@ Key_Count
Definition im3d.h:484
@ Action_GizmoScale
Definition im3d.h:490
@ Key_S
Definition im3d.h:481
@ Key_R
Definition im3d.h:480
@ Key_L
Definition im3d.h:479
@ Mouse_Left
Definition im3d.h:478
@ Action_Count
Definition im3d.h:493
@ Key_T
Definition im3d.h:482
IM3D_API void PopId()
Definition im3d.h:856
IM3D_API Color GetColor()
Definition im3d.h:826
IM3D_API float GetAlpha()
Definition im3d.h:832
IM3D_API void DrawPoint(const Vec3 &_position, float _size, Color _color)
Definition im3d.cpp:159
constexpr Color Color_Navy
Definition im3d.h:419
IM3D_API void MergeContexts(Context &_dst_, const Context &_src)
Definition im3d.h:878
IM3D_API const TextDrawList * GetTextDrawLists()
Definition im3d.h:798
IM3D_API bool Gizmo(const char *_id, float _translation_[3], float _rotation_[3 *3], float _scale_[3])
Definition im3d.h:868
void DrawPrimitivesCallback(const DrawList &_drawList)
Definition im3d.h:447
IM3D_API void PushSize()
Definition im3d.h:834
IM3D_API void SetColor(Color _color)
Definition im3d.h:824
IM3D_API void DrawAlignedBox(const Vec3 &_min, const Vec3 &_max)
Definition im3d.cpp:372
IM3D_API void DrawSphere(const Vec3 &_origin, float _radius, int _detail=-1)
Definition im3d.cpp:281
IM3D_API void DrawCircleFilled(const Vec3 &_origin, const Vec3 &_normal, float _radius, int _detail=-1)
Definition im3d.cpp:247
IM3D_API void Scale(float _x, float _y, float _z)
Definition im3d.cpp:137
void set(int _i, float _val)
Definition im3d.h:370
float getB() const
Definition im3d.h:389
void setG(float _val)
Definition im3d.h:377
float getR() const
Definition im3d.h:387
void setB(float _val)
Definition im3d.h:378
constexpr Color(U32 _rgba)
Definition im3d.h:363
constexpr Color()
Definition im3d.h:362
void setR(float _val)
Definition im3d.h:376
float getA() const
Definition im3d.h:390
U32 getABGR() const
Definition im3d.h:392
U32 v
Definition im3d.h:360
float getG() const
Definition im3d.h:388
void setA(float _val)
Definition im3d.h:379
float get(int _i) const
Definition im3d.h:381
bool getEnableSorting() const
Definition im3d.h:640
DrawPrimitiveType m_primType
Definition im3d.h:754
bool isKeyDown(Key _key) const
Definition im3d.h:689
Vector< char > m_textBuffer
Definition im3d.h:749
float getAlpha() const
Definition im3d.h:630
Vector< TextList * > m_textData
Definition im3d.h:748
bool m_sortCalled
Definition im3d.h:743
Vector< bool > m_enableSortingStack
Definition im3d.h:731
U32 m_vertCountThisPrim
Definition im3d.h:756
Vector< float > m_alphaStack
Definition im3d.h:729
void setColor(Color _color)
Definition im3d.h:624
void endFrame()
Definition im3d.cpp:1772
void popEnableSorting()
Definition im3d.cpp:1828
void popColor()
Definition im3d.h:627
void popLayerId()
Definition im3d.cpp:1862
void vertex(const Vec3 &_position, float _size, Color _color)
Definition im3d.cpp:1503
void popId()
Definition im3d.h:656
void setMatrix(const Mat4 &_mat4)
Definition im3d.h:648
void pushMatrix(const Mat4 &_mat4)
Definition im3d.h:650
Id m_appActiveId
Definition im3d.h:705
float m_gizmoHeightPixels
Definition im3d.h:710
void pushLayerId(Id _layer)
Definition im3d.cpp:1841
Vector< Mat4 > m_matrixStack
Definition im3d.h:732
void pushSize(float _size)
Definition im3d.h:636
void begin(PrimitiveMode _mode)
Definition im3d.cpp:1418
PrimitiveMode m_primMode
Definition im3d.h:753
float m_hotDepth
Definition im3d.h:703
U32 m_firstVertThisPrim
Definition im3d.h:755
void reset()
Definition im3d.cpp:1651
Id getLayerId() const
Definition im3d.h:644
U32 getTextDrawListCount() const
Definition im3d.h:621
void merge(const Context &_src)
Definition im3d.cpp:1728
Id getId() const
Definition im3d.h:654
void pushEnableSorting(bool _enable)
Definition im3d.cpp:1822
void setSize(float _size)
Definition im3d.h:634
int m_cullFrustumCount
Definition im3d.h:765
Vector< Id > m_layerIdMap
Definition im3d.h:740
Vec3 m_gizmoStateVec3
Definition im3d.h:707
int m_vertexDataIndex
Definition im3d.h:739
void setId(Id _id)
Definition im3d.h:653
Vector< TextDrawList > m_textDrawLists
Definition im3d.h:750
Vector< TextData > TextList
Definition im3d.h:747
Vec3 m_maxVertThisPrim
Definition im3d.h:758
void end()
Definition im3d.cpp:1444
void draw()
Definition im3d.cpp:1808
bool m_gizmoLocal
Definition im3d.h:699
const Mat4 & getMatrix() const
Definition im3d.h:649
Vector< float > m_sizeStack
Definition im3d.h:730
void pushColor(Color _color)
Definition im3d.h:626
float m_gizmoSizePixels
Definition im3d.h:711
AppData & getAppData()
Definition im3d.h:658
Id m_appId
Definition im3d.h:704
GizmoMode m_gizmoMode
Definition im3d.h:700
Vector< Id > m_idStack
Definition im3d.h:733
Mat3 m_gizmoStateMat3
Definition im3d.h:708
Id m_hotId
Definition im3d.h:702
void setAlpha(float _alpha)
Definition im3d.h:629
void vertex(const Vec3 &_position)
Definition im3d.h:607
float getSize() const
Definition im3d.h:635
Id m_appHotId
Definition im3d.h:706
bool isVisible(const VertexData *_vdata, DrawPrimitiveType _prim)
Definition im3d.cpp:2085
Vector< VertexData > VertexList
Definition im3d.h:737
Vector< Color > m_colorStack
Definition im3d.h:728
void popMatrix()
Definition im3d.h:651
Vector< DrawList > m_drawLists
Definition im3d.h:742
const DrawList * getDrawLists() const
Definition im3d.h:617
void popSize()
Definition im3d.h:637
void pushAlpha(float _alpha)
Definition im3d.h:631
Vector< Id > m_layerIdStack
Definition im3d.h:734
void pushId(Id _id)
Definition im3d.h:655
void setEnableSorting(bool _enable)
Definition im3d.cpp:1834
AppData m_appData
Definition im3d.h:761
bool wasKeyPressed(Key _key) const
Definition im3d.h:690
void popAlpha()
Definition im3d.h:632
float m_gizmoStateFloat
Definition im3d.h:709
U32 getLayerCount() const
Definition im3d.h:723
Color getColor() const
Definition im3d.h:625
bool m_endFrameCalled
Definition im3d.h:744
const TextDrawList * getTextDrawLists() const
Definition im3d.h:620
Id m_activeId
Definition im3d.h:701
U32 getDrawListCount() const
Definition im3d.h:618
Vec3 m_minVertThisPrim
Definition im3d.h:757
int m_layerIndex
Definition im3d.h:741
const VertexData * m_vertexData
Definition im3d.h:444
Id m_layerId
Definition im3d.h:442
DrawPrimitiveType m_primType
Definition im3d.h:443
U32 m_vertexCount
Definition im3d.h:445
Mat3()
Definition im3d.h:259
float operator()(int _row, int _col) const
Definition im3d.h:280
float & operator()(int _row, int _col)
Definition im3d.h:289
Mat4()
Definition im3d.h:308
float & operator()(int _row, int _col)
Definition im3d.h:343
float operator()(int _row, int _col) const
Definition im3d.h:334
Vec4 m_positionSize
Definition im3d.h:461
U32 m_flags
Definition im3d.h:463
U32 m_textLength
Definition im3d.h:464
Color m_color
Definition im3d.h:462
U32 m_textBufferOffset
Definition im3d.h:465
Id m_layerId
Definition im3d.h:470
const TextData * m_textData
Definition im3d.h:471
const char * m_textBuffer
Definition im3d.h:473
U32 m_textDataCount
Definition im3d.h:472
Vec2(float _xy)
Definition im3d.h:208
Vec2(float _x, float _y)
Definition im3d.h:209
Vec2()
Definition im3d.h:207
float x
Definition im3d.h:205
Vec3(float _xyz)
Definition im3d.h:224
Vec3(const Vec2 &_xy, float _z)
Definition im3d.h:226
float x
Definition im3d.h:221
Vec3(float _x, float _y, float _z)
Definition im3d.h:225
Vec3()
Definition im3d.h:223
Vec4()
Definition im3d.h:241
Vec4(float _x, float _y, float _z, float _w)
Definition im3d.h:243
Vec4(const Vec3 &_xyz, float _w)
Definition im3d.h:244
Vec4(float _xyzw)
Definition im3d.h:242
float w
Definition im3d.h:239
U32 size() const
Definition im3d.h:561
bool empty() const
Definition im3d.h:563
const T & front() const
Definition im3d.h:557
T * end()
Definition im3d.h:554
void append(const Vector< T > &_other)
Definition im3d.h:550
T & push_back()
Definition im3d.h:546
void push_back(const T &_v)
Definition im3d.h:547
T * begin()
Definition im3d.h:552
T & front()
Definition im3d.h:556
const T * begin() const
Definition im3d.h:553
Vector()
Definition im3d.h:538
void pop_back()
Definition im3d.h:548
U32 capacity() const
Definition im3d.h:562
const T * data() const
Definition im3d.h:544
const T & back() const
Definition im3d.h:559
const T * end() const
Definition im3d.h:555
T & operator[](U32 _i)
Definition im3d.h:541
T & back()
Definition im3d.h:558
void clear()
Definition im3d.h:565
T * data()
Definition im3d.h:543
const T & operator[](U32 _i) const
Definition im3d.h:542
VertexData()
Definition im3d.h:426
Color m_color
Definition im3d.h:424
VertexData(const Vec3 &_position, float _size, Color _color)
Definition im3d.h:427
Vec4 m_positionSize
Definition im3d.h:423