Simulate: Make sure all class members are initialized
This commit is contained in:
+21
-26
@@ -43,12 +43,6 @@ class MJSIMULATEAPI Simulate {
|
|||||||
// create object and initialize the simulate ui
|
// create object and initialize the simulate ui
|
||||||
Simulate(void);
|
Simulate(void);
|
||||||
|
|
||||||
// Start the Simulate UI thread
|
|
||||||
// void startthread(void);
|
|
||||||
|
|
||||||
// Stop the Simulate UI thread
|
|
||||||
void stopthread(void);
|
|
||||||
|
|
||||||
// Apply UI pose perturbations to model and data
|
// Apply UI pose perturbations to model and data
|
||||||
void applyposepertubations(int flg_paused);
|
void applyposepertubations(int flg_paused);
|
||||||
|
|
||||||
@@ -126,31 +120,32 @@ class MJSIMULATEAPI Simulate {
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
// physics: need sync
|
// physics: need sync
|
||||||
int disable[mjNDISABLE];
|
int disable[mjNDISABLE] = {0};
|
||||||
int enable[mjNENABLE];
|
int enable[mjNENABLE] = {0};
|
||||||
|
|
||||||
// rendering: need sync
|
// rendering: need sync
|
||||||
int camera = 0;
|
int camera = 0;
|
||||||
|
|
||||||
// abstract visualization
|
// abstract visualization
|
||||||
mjvScene scn;
|
mjvScene scn = {};
|
||||||
mjvCamera cam;
|
mjvCamera cam = {};
|
||||||
mjvOption vopt;
|
mjvOption vopt = {};
|
||||||
mjvPerturb pert;
|
mjvPerturb pert = {};
|
||||||
mjvFigure figconstraint;
|
mjvFigure figconstraint = {};
|
||||||
mjvFigure figcost;
|
mjvFigure figcost = {};
|
||||||
mjvFigure figtimer;
|
mjvFigure figtimer = {};
|
||||||
mjvFigure figsize;
|
mjvFigure figsize = {};
|
||||||
mjvFigure figsensor;
|
mjvFigure figsensor = {};
|
||||||
|
|
||||||
// OpenGL rendering and UI
|
// OpenGL rendering and UI
|
||||||
GLFWvidmode vmode;
|
GLFWvidmode vmode = {};
|
||||||
int windowpos[2];
|
int windowpos[2] = {0};
|
||||||
int windowsize[2];
|
int windowsize[2] = {0};
|
||||||
mjrContext con;
|
mjrContext con = {};
|
||||||
GLFWwindow* window;
|
GLFWwindow* window = nullptr;
|
||||||
mjuiState uistate;
|
mjuiState uistate = {};
|
||||||
mjUI ui0, ui1;
|
mjUI ui0 = {};
|
||||||
|
mjUI ui1 = {};
|
||||||
|
|
||||||
// Constant arrays needed for the option section of UI and the UI interface
|
// Constant arrays needed for the option section of UI and the UI interface
|
||||||
// TODO setting the size here is not ideal
|
// TODO setting the size here is not ideal
|
||||||
@@ -203,8 +198,8 @@ class MJSIMULATEAPI Simulate {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// info strings
|
// info strings
|
||||||
char info_title[Simulate::kMaxFilenameLength];
|
char info_title[Simulate::kMaxFilenameLength] = {0};
|
||||||
char info_content[Simulate::kMaxFilenameLength];
|
char info_content[Simulate::kMaxFilenameLength] = {0};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mujoco
|
} // namespace mujoco
|
||||||
|
|||||||
Reference in New Issue
Block a user