39 for (
int32 i = 0; i < N; ++i)
41 vertices[i].
Set(0.0
f, L * (N - i));
103 const char* bendModels[] = {
"Spring",
"PBD Ang",
"XPBD Ang",
"PBD Dist",
"PBD Height",
"PBD Triangle" };
104 const char* stretchModels[] = {
"PBD",
"XPBD" };
112 bool isSelected = (bendModel1 == i);
136 if (
ImGui::BeginCombo(
"Stretch Model##1", stretchModels[stretchModel1], comboFlags))
140 bool isSelected = (stretchModel1 == i);
169 bool isSelected = (bendModel2 == i);
193 if (
ImGui::BeginCombo(
"Stretch Model##2", stretchModels[stretchModel2], comboFlags))
197 bool isSelected = (stretchModel2 == i);
237 float dt = settings.
m_hertz > 0.0f ? 1.0f / settings.
m_hertz : 0.0f;
IMGUI_API void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond=0)
b2BendingModel bendingModel
IMGUI_API bool BeginCombo(const char *label, const char *preview_value, ImGuiComboFlags flags=0)
void Reset(const b2Vec2 &position)
b2StretchingModel stretchingModel
void Step(Settings &settings) override
IMGUI_API void SetItemDefaultFocus()
#define IM_ARRAYSIZE(_ARR)
IMGUI_API float GetWindowWidth()
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
void SetTuning(const b2RopeTuning &tuning)
void Draw(b2Draw *draw) const
void Set(float x_, float y_)
Set this vector to some specified coordinates.
IMGUI_API void EndCombo()
IMGUI_API void PushItemWidth(float item_width)
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
IMGUI_API void Separator()
void Step(float timeStep, int32 iterations, const b2Vec2 &position)
IMGUI_API void SetNextWindowPos(const ImVec2 &pos, ImGuiCond cond=0, const ImVec2 &pivot=ImVec2(0, 0))
IMGUI_API bool SliderInt(const char *label, int *v, int v_min, int v_max, const char *format="%d")
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API bool SliderFloat(const char *label, float *v, float v_min, float v_max, const char *format="%.3f", float power=1.0f)
IMGUI_API void PopItemWidth()
int RegisterTest(const char *category, const char *name, TestCreateFcn *fcn)
IMGUI_API bool Selectable(const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
IMGUI_API bool Checkbox(const char *label, bool *v)
void DrawString(int x, int y, const char *string,...)
GLFWwindow * g_mainWindow
virtual void Step(Settings &settings)
void Create(const b2RopeDef &def)