I am currently working on transitioning my camera view state from Point A to Point B within the Autodesk viewer. To achieve this, I am creating a path using LineDashedMaterial and have successfully displayed the line connecting Point A and B.
Below is the relevant code snippet:
geometry = new THREE.Geometry();
geometry.vertices.push(getBoundingBox([2112]).center(),
getBoundingBox([2109]).center());
material = new THREE.LineDashedMaterial({color: 0xFF0000,
dashSize: 3,
gapSize: 1,
transparent: true,
depthWrite: false,
depthTest: true,
});
checkLineDistance = geometry.computeLineDistances();
geometry.lineDistancesNeedUpdate = true;
NOP_VIEWER.impl.matman().addMaterial('material', material, true);
line= new THREE.Line(geometry, material);
NOP_VIEWER.impl.sceneAfter.skipDepthTarget = true;
NOP_VIEWER.impl.sceneAfter.skipIdTarget = true;
NOP_VIEWER.impl.sceneAfter.add(line);
This implementation has resulted in the following output: https://i.sstatic.net/gUN9I.jpg
My current challenge lies in navigating or moving the camera along the direction of the path created (from point A to B). The scenario involves a sample model resembling a building with rooms labeled A and B.
1. Is there a method to obtain all vectors intersecting the line, specifically requiring position, target, and upVector information for camera movement?
2. Can I retrieve all vectors or points between A and B using dbid in the Forge Viewer API?
3. I attempted integrating Three.js with the Forge Viewer but encountered complexities in the process.
Here is an example showcasing what I aspire to accomplish, albeit involving viewport display in the Forge Viewer application instead of moving geometry objects.