Nebula
Loading...
Searching...
No Matches
im3d.h File Reference
#include "im3d_config.h"
#include <cstdarg>

Go to the source code of this file.

Classes

struct  Im3d::Vec2
 
struct  Im3d::Vec3
 
struct  Im3d::Vec4
 
struct  Im3d::Mat3
 
struct  Im3d::Mat4
 
struct  Im3d::Color
 
struct  Im3d::VertexData
 
struct  Im3d::DrawList
 
struct  Im3d::TextData
 
struct  Im3d::TextDrawList
 
struct  Im3d::AppData
 
struct  Im3d::Vector< T >
 
struct  Im3d::Context
 

Namespaces

namespace  Im3d
 
namespace  Im3d::internal
 

Macros

#define IM3D_VERSION   "1.16"
 
#define IM3D_API
 
#define IM3D_THREAD_LOCAL
 

Typedefs

typedef unsigned int Im3d::U32
 
typedef U32 Im3d::Id
 
typedef void Im3d::DrawPrimitivesCallback(const DrawList &_drawList)
 

Enumerations

enum  Im3d::DrawPrimitiveType { Im3d::DrawPrimitive_Triangles , Im3d::DrawPrimitive_Lines , Im3d::DrawPrimitive_Points , Im3d::DrawPrimitive_Count }
 
enum  Im3d::TextFlags {
  Im3d::TextFlags_AlignLeft = (1 << 0) , Im3d::TextFlags_AlignRight = (1 << 1) , Im3d::TextFlags_AlignTop = (1 << 3) , Im3d::TextFlags_AlignBottom = (1 << 4) ,
  Im3d::TextFlags_Default = 0
}
 
enum  Im3d::Key {
  Im3d::Mouse_Left , Im3d::Key_L , Im3d::Key_R , Im3d::Key_S ,
  Im3d::Key_T , Im3d::Key_Count , Im3d::Action_Select = Mouse_Left , Im3d::Action_GizmoLocal = Key_L ,
  Im3d::Action_GizmoRotation = Key_R , Im3d::Action_GizmoScale = Key_S , Im3d::Action_GizmoTranslation = Key_T , Im3d::Action_Count
}
 
enum  Im3d::FrustumPlane {
  Im3d::FrustumPlane_Near , Im3d::FrustumPlane_Far , Im3d::FrustumPlane_Top , Im3d::FrustumPlane_Right ,
  Im3d::FrustumPlane_Bottom , Im3d::FrustumPlane_Left , Im3d::FrustumPlane_Count
}
 
enum  Im3d::PrimitiveMode {
  Im3d::PrimitiveMode_None , Im3d::PrimitiveMode_Points , Im3d::PrimitiveMode_Lines , Im3d::PrimitiveMode_LineStrip ,
  Im3d::PrimitiveMode_LineLoop , Im3d::PrimitiveMode_Triangles , Im3d::PrimitiveMode_TriangleStrip
}
 
enum  Im3d::GizmoMode { Im3d::GizmoMode_Translation , Im3d::GizmoMode_Rotation , Im3d::GizmoMode_Scale }
 

Functions

IM3D_API AppDataIm3d::GetAppData ()
 
IM3D_API void Im3d::NewFrame ()
 
IM3D_API void Im3d::EndFrame ()
 
IM3D_API const DrawListIm3d::GetDrawLists ()
 
IM3D_API U32 Im3d::GetDrawListCount ()
 
IM3D_API const TextDrawListIm3d::GetTextDrawLists ()
 
IM3D_API U32 Im3d::GetTextDrawListCount ()
 
IM3D_API void Im3d::Draw ()
 
IM3D_API void Im3d::BeginPoints ()
 
IM3D_API void Im3d::BeginLines ()
 
IM3D_API void Im3d::BeginLineLoop ()
 
IM3D_API void Im3d::BeginLineStrip ()
 
IM3D_API void Im3d::BeginTriangles ()
 
IM3D_API void Im3d::BeginTriangleStrip ()
 
IM3D_API void Im3d::End ()
 
IM3D_API void Im3d::Vertex (const Vec3 &_position)
 
IM3D_API void Im3d::Vertex (const Vec3 &_position, Color _color)
 
IM3D_API void Im3d::Vertex (const Vec3 &_position, float _size)
 
IM3D_API void Im3d::Vertex (const Vec3 &_position, float _size, Color _color)
 
IM3D_API void Im3d::Vertex (float _x, float _y, float _z)
 
IM3D_API void Im3d::Vertex (float _x, float _y, float _z, Color _color)
 
IM3D_API void Im3d::Vertex (float _x, float _y, float _z, float _size)
 
IM3D_API void Im3d::Vertex (float _x, float _y, float _z, float _size, Color _color)
 
IM3D_API void Im3d::PushColor ()
 
IM3D_API void Im3d::PushColor (Color _color)
 
IM3D_API void Im3d::PopColor ()
 
IM3D_API void Im3d::SetColor (Color _color)
 
IM3D_API void Im3d::SetColor (float _r, float _g, float _b, float _a=1.0f)
 
IM3D_API Color Im3d::GetColor ()
 
IM3D_API void Im3d::PushAlpha ()
 
IM3D_API void Im3d::PushAlpha (float _alpha)
 
IM3D_API void Im3d::PopAlpha ()
 
IM3D_API void Im3d::SetAlpha (float _alpha)
 
IM3D_API float Im3d::GetAlpha ()
 
IM3D_API void Im3d::PushSize ()
 
IM3D_API void Im3d::PushSize (float _size)
 
IM3D_API void Im3d::PopSize ()
 
IM3D_API void Im3d::SetSize (float _size)
 
IM3D_API float Im3d::GetSize ()
 
IM3D_API void Im3d::PushEnableSorting ()
 
IM3D_API void Im3d::PushEnableSorting (bool _enable)
 
IM3D_API void Im3d::PopEnableSorting ()
 
IM3D_API void Im3d::EnableSorting (bool _enable)
 
IM3D_API void Im3d::PushDrawState ()
 
IM3D_API void Im3d::PopDrawState ()
 
IM3D_API void Im3d::PushMatrix ()
 
IM3D_API void Im3d::PushMatrix (const Mat4 &_mat4)
 
IM3D_API void Im3d::PopMatrix ()
 
IM3D_API void Im3d::SetMatrix (const Mat4 &_mat4)
 
IM3D_API void Im3d::SetIdentity ()
 
IM3D_API void Im3d::MulMatrix (const Mat4 &_mat4)
 
IM3D_API void Im3d::Translate (float _x, float _y, float _z)
 
IM3D_API void Im3d::Translate (const Vec3 &_vec3)
 
IM3D_API void Im3d::Rotate (const Vec3 &_axis, float _angle)
 
IM3D_API void Im3d::Rotate (const Mat3 &_rotation)
 
IM3D_API void Im3d::Scale (float _x, float _y, float _z)
 
IM3D_API void Im3d::DrawXyzAxes ()
 
IM3D_API void Im3d::DrawPoint (const Vec3 &_position, float _size, Color _color)
 
IM3D_API void Im3d::DrawLine (const Vec3 &_a, const Vec3 &_b, float _size, Color _color)
 
IM3D_API void Im3d::DrawQuad (const Vec3 &_a, const Vec3 &_b, const Vec3 &_c, const Vec3 &_d)
 
IM3D_API void Im3d::DrawQuad (const Vec3 &_origin, const Vec3 &_normal, const Vec2 &_size)
 
IM3D_API void Im3d::DrawQuadFilled (const Vec3 &_a, const Vec3 &_b, const Vec3 &_c, const Vec3 &_d)
 
IM3D_API void Im3d::DrawQuadFilled (const Vec3 &_origin, const Vec3 &_normal, const Vec2 &_size)
 
IM3D_API void Im3d::DrawCircle (const Vec3 &_origin, const Vec3 &_normal, float _radius, int _detail=-1)
 
IM3D_API void Im3d::DrawCircleFilled (const Vec3 &_origin, const Vec3 &_normal, float _radius, int _detail=-1)
 
IM3D_API void Im3d::DrawSphere (const Vec3 &_origin, float _radius, int _detail=-1)
 
IM3D_API void Im3d::DrawSphereFilled (const Vec3 &_origin, float _radius, int _detail=-1)
 
IM3D_API void Im3d::DrawAlignedBox (const Vec3 &_min, const Vec3 &_max)
 
IM3D_API void Im3d::DrawAlignedBoxFilled (const Vec3 &_min, const Vec3 &_max)
 
IM3D_API void Im3d::DrawCylinder (const Vec3 &_start, const Vec3 &_end, float _radius, int _detail=-1)
 
IM3D_API void Im3d::DrawCapsule (const Vec3 &_start, const Vec3 &_end, float _radius, int _detail=-1)
 
IM3D_API void Im3d::DrawPrism (const Vec3 &_start, const Vec3 &_end, float _radius, int _sides)
 
IM3D_API void Im3d::DrawArrow (const Vec3 &_start, const Vec3 &_end, float _headLength=-1.0f, float _headThickness=-1.0f)
 
IM3D_API void Im3d::Text (const Vec3 &_position, U32 _textFlags, const char *_text,...)
 
IM3D_API void Im3d::Text (const Vec3 &_position, float _size, Color _color, U32 _textFlags, const char *_text,...)
 
IM3D_API Id Im3d::MakeId (const char *_str)
 
IM3D_API Id Im3d::MakeId (const void *_ptr)
 
IM3D_API Id Im3d::MakeId (int _i)
 
IM3D_API void Im3d::PushId ()
 
IM3D_API void Im3d::PushId (Id _id)
 
IM3D_API void Im3d::PushId (const char *_str)
 
IM3D_API void Im3d::PushId (const void *_ptr)
 
IM3D_API void Im3d::PushId (int _i)
 
IM3D_API void Im3d::PopId ()
 
IM3D_API Id Im3d::GetId ()
 
IM3D_API void Im3d::PushLayerId (Id _layer)
 
IM3D_API void Im3d::PushLayerId (const char *_str)
 
IM3D_API void Im3d::PopLayerId ()
 
IM3D_API Id Im3d::GetLayerId ()
 
IM3D_API bool Im3d::GizmoTranslation (const char *_id, float _translation_[3], bool _local=false)
 
IM3D_API bool Im3d::GizmoRotation (const char *_id, float _rotation_[3 *3], bool _local=false)
 
IM3D_API bool Im3d::GizmoScale (const char *_id, float _scale_[3])
 
IM3D_API bool Im3d::Gizmo (const char *_id, float _translation_[3], float _rotation_[3 *3], float _scale_[3])
 
IM3D_API bool Im3d::Gizmo (const char *_id, float _transform_[4 *4])
 
IM3D_API bool Im3d::GizmoTranslation (Id _id, float _translation_[3], bool _local=false)
 
IM3D_API bool Im3d::GizmoRotation (Id _id, float _rotation_[3 *3], bool _local=false)
 
IM3D_API bool Im3d::GizmoScale (Id _id, float _scale_[3])
 
IM3D_API bool Im3d::Gizmo (Id _id, float _transform_[4 *4])
 
IM3D_API bool Im3d::Gizmo (Id _id, float _translation_[3], float _rotation_[3 *3], float _scale_[3])
 
IM3D_API Id Im3d::GetActiveId ()
 
IM3D_API Id Im3d::GetHotId ()
 
IM3D_API bool Im3d::IsVisible (const Vec3 &_origin, float _radius)
 
IM3D_API bool Im3d::IsVisible (const Vec3 &_min, const Vec3 &_max)
 
IM3D_API ContextIm3d::GetContext ()
 
IM3D_API void Im3d::SetContext (Context &_ctx)
 
IM3D_API void Im3d::MergeContexts (Context &_dst_, const Context &_src)
 
void Im3d::PushLayerId ()
 

Variables

constexpr Id Im3d::Id_Invalid = 0
 
constexpr Color Im3d::Color_Black = Color(0x000000ff)
 
constexpr Color Im3d::Color_White = Color(0xffffffff)
 
constexpr Color Im3d::Color_Gray = Color(0x808080ff)
 
constexpr Color Im3d::Color_Red = Color(0xff0000ff)
 
constexpr Color Im3d::Color_Green = Color(0x00ff00ff)
 
constexpr Color Im3d::Color_Blue = Color(0x0000ffff)
 
constexpr Color Im3d::Color_Magenta = Color(0xff00ffff)
 
constexpr Color Im3d::Color_Yellow = Color(0xffff00ff)
 
constexpr Color Im3d::Color_Cyan = Color(0x00ffffff)
 
constexpr Color Im3d::Color_Pink = Color(0xffc0cbff)
 
constexpr Color Im3d::Color_Orange = Color(0xffa500ff)
 
constexpr Color Im3d::Color_Gold = Color(0xffd700ff)
 
constexpr Color Im3d::Color_Brown = Color(0x8b4513ff)
 
constexpr Color Im3d::Color_Purple = Color(0x800080ff)
 
constexpr Color Im3d::Color_Teal = Color(0x008080ff)
 
constexpr Color Im3d::Color_Navy = Color(0x000080ff)
 
IM3D_THREAD_LOCAL ContextIm3d::internal::g_CurrentContext = &g_DefaultContext
 

Macro Definition Documentation

◆ IM3D_API

#define IM3D_API

◆ IM3D_THREAD_LOCAL

#define IM3D_THREAD_LOCAL

◆ IM3D_VERSION

#define IM3D_VERSION   "1.16"