Skip to content
Snippets Groups Projects
Commit e0b9ae74 authored by legoc's avatar legoc
Browse files

Change B matrix for trajectory used for edition

parent 3ae2eb0c
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ class TrajectoryController extends Controller {
// Event handlers.
PubSub.subscribe('change-trajectory', () => { this.trajectoryChange(); });
PubSub.subscribe('change-sample', () => { this.sampleChange(); });
}
init() {
......@@ -243,6 +244,10 @@ class TrajectoryController extends Controller {
});
}
sampleChange() {
this._trajectory3D.changeSample();
}
/**
* Inits the scan spy configuration.
*/
......
......@@ -52,6 +52,10 @@ class TrajectoryLine {
this._scene.add(this._deltaSphereGroup);
}
setBMatrix(bMatrix) {
this._bMatrix = bMatrix.clone();
}
_setIntervals() {
this._intervals = this._steps - 1;
if (this._intervals == 0) {
......
......@@ -355,6 +355,13 @@ class TrajectoryView3D extends View3D {
let line = this._trajectoryLines[id];
line.end = position;
}
/**
* Update the trajectory line used for edition.
*/
changeSample() {
this._visualLine.setBMatrix(matrix.bMatrix);
}
}
module.exports = TrajectoryView3D;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment