public BodyPathMeshViewer(Messager messager, ExecutorService executorService)
{
isExecutorServiceProvided = executorService == null;
if (isExecutorServiceProvided)
this.executorService = Executors.newSingleThreadExecutor(ThreadTools.getNamedThreadFactory(getClass().getSimpleName()));
else
this.executorService = executorService;
bodyPathMeshView.setMouseTransparent(true);
bodyPathMeshView.setMaterial(new PhongMaterial(Color.YELLOW));
Vector3D defaultSize = new Vector3D(1.0, 1.0, 1.0);
defaultSize.scale(1.5 * BODYPATH_LINE_THICKNESS);
walkerSize = messager.createInput(UIVisibilityGraphsTopics.WalkerSize, defaultSize);
walkerOffsetHeight = messager.createInput(UIVisibilityGraphsTopics.WalkerOffsetHeight, 0.0);
walker.setMaterial(new PhongMaterial(Color.YELLOW));
walker.setRadius(1.0);
resetRequested = messager.createInput(UIVisibilityGraphsTopics.GlobalReset, false);
show = messager.createInput(UIVisibilityGraphsTopics.ShowBodyPath, true);
messager.registerTopicListener(UIVisibilityGraphsTopics.BodyPathData, this::processBodyPathOnThread);
walkerPosition = messager.createInput(UIVisibilityGraphsTopics.WalkerPosition, null);
enableWalkerAnimation = messager.createInput(UIVisibilityGraphsTopics.EnableWalkerAnimation, true);
root.getChildren().addAll(bodyPathMeshView, walker);
}