Add ReadVector function to touch_grid plugin, use it for size and field-of-view attributes.

PiperOrigin-RevId: 528783871
Change-Id: Icf3d060116826b01f68c9818a5153be4ce9511b0
This commit is contained in:
Alessio Quaglino
2023-05-02 08:00:16 -07:00
committed by Copybara-Service
parent 8686339726
commit e59720833e
5 changed files with 95 additions and 82 deletions
+6 -8
View File
@@ -57,16 +57,14 @@ class TouchGrid {
static void RegisterPlugin();
int nchannel_; // number of channels (1-6)
int size_x_; // horizontal resolution
int size_y_; // vertical resolution
mjtNum fov_x_; // horizontal field of view, in degrees
mjtNum fov_y_; // vertical field of view, in degrees
mjtNum gamma_; // foveal deformation
int nchannel_; // number of channels (1-6)
int size_[2]; // horizontal and vertical resolution
mjtNum fov_[2]; // horizontal and vertical field of view, in degrees
mjtNum gamma_; // foveal deformation
private:
TouchGrid(const mjModel* m, mjData* d, int instance, int nchannel, int size_x,
int size_y, mjtNum fov_x, mjtNum fov_y, mjtNum gamma);
TouchGrid(const mjModel* m, mjData* d, int instance, int nchannel, int* size,
mjtNum* fov_x, mjtNum gamma);
std::vector<mjtNum> distance_;
};