Changeset 135 in flairsrc for trunk/lib/FlairMeta/src
 Timestamp:
 02/13/17 11:38:33 (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/lib/FlairMeta/src/MetaVrpnObject.cpp
r122 r135 51 51 52 52 void MetaVrpnObject::ConstructorCommon(string name) { 53 cvmatrix_descriptor *desc = new cvmatrix_descriptor( 6, 1);54 for (int i = 0; i < 6; i++) {53 cvmatrix_descriptor *desc = new cvmatrix_descriptor(7, 1); 54 for (int i = 0; i < desc>Rows(); i++) { 55 55 desc>SetElementName(i, 0, Output()>Name(i, 0)); 56 56 } 57 57 cvmatrix *prev_value = new cvmatrix(this, desc, elementDataType, name); 58 for (int i = 0; i < 6; i++) {58 for (int i = 0; i < prev_value>Rows(); i++) { 59 59 prev_value>SetValue(i, 0, 0); 60 60 } … … 63 63 name + " Passe bas", prev_value); 64 64 65 desc = new cvmatrix_descriptor( 6, 1);66 for (int i = 0; i < 6; i++) {65 desc = new cvmatrix_descriptor(7, 1); 66 for (int i = 0; i < desc>Rows(); i++) { 67 67 desc>SetElementName(i, 0, "d" + Output()>Name(i, 0)); 68 68 } 69 69 prev_value = new cvmatrix(this, desc, elementDataType, name); 70 for (int i = 0; i < 6; i++) {70 for (int i = 0; i < prev_value>Rows(); i++) { 71 71 prev_value>SetValue(i, 0, 0); 72 72 } … … 76 76 77 77 vx_opti_plot = new DataPlot1D(GetPlotTab()>NewRow(), "vx", 3, 3); 78 vx_opti_plot>AddCurve(euler>Matrix()>Element( 3));78 vx_opti_plot>AddCurve(euler>Matrix()>Element(4)); 79 79 vy_opti_plot = new DataPlot1D(GetPlotTab()>LastRowLastCol(), "vy", 3, 3); 80 vy_opti_plot>AddCurve(euler>Matrix()>Element( 4));80 vy_opti_plot>AddCurve(euler>Matrix()>Element(5)); 81 81 vz_opti_plot = new DataPlot1D(GetPlotTab()>LastRowLastCol(), "vz", 2, 2); 82 vz_opti_plot>AddCurve(euler>Matrix()>Element( 5));82 vz_opti_plot>AddCurve(euler>Matrix()>Element(6)); 83 83 84 84 plot_tab = new Tab(GetVrpnClient()>GetTabWidget(), "Mesures (xy) " + name); 85 85 xy_plot = new DataPlot2D(plot_tab>NewRow(), "xy", "y", 5, 5, "x", 5, 5); 86 xy_plot>AddCurve(Output()>Element( 4, 0), Output()>Element(3, 0));86 xy_plot>AddCurve(Output()>Element(5, 0), Output()>Element(4, 0)); 87 87 } 88 88 … … 98 98 99 99 void MetaVrpnObject::GetSpeed(Vector3D &speed) const { 100 speed.x = euler>Output( 3, 0);101 speed.y = euler>Output( 4, 0);102 speed.z = euler>Output( 5, 0);100 speed.x = euler>Output(4, 0); 101 speed.y = euler>Output(5, 0); 102 speed.z = euler>Output(6, 0); 103 103 } 104 104
Note:
See TracChangeset
for help on using the changeset viewer.