public void addChild(Graphics3DNode child) { if (viewportAdapter == null) { rootNode.addChild(child); } else { graphics3DNodesToAddPostFrame.add(child); } }
public void addChild(Graphics3DNode child) { if (viewportAdapter == null) { rootNode.addChild(child); } else { graphics3DNodesToAddPostFrame.add(child); } }
public static void addJiggle(Graphics3DNode node,Graphics3DAdapter adapter,ArrayList<Runnable> runnables) { // adapter.removeRootNode(node); Graphics3DNode jiggleNode = new Graphics3DNode("jiggle", Graphics3DNodeType.JOINT); jiggleNode.addChild(node); // adapter.addRootNode(jiggleNode); RotateAndScaleNodeRunnable jiggler = new RotateAndScaleNodeRunnable(node); runnables.add(jiggler); } public static void addFirstCamera(Graphics3DAdapter graphics3DAdapter, PanBackAndForthTrackingAndDollyPositionHolder cameraTrackAndDollyVariablesHolder)
public static void addJiggle(Graphics3DNode node,Graphics3DAdapter adapter,ArrayList<Runnable> runnables) { // adapter.removeRootNode(node); Graphics3DNode jiggleNode = new Graphics3DNode("jiggle", Graphics3DNodeType.JOINT); jiggleNode.addChild(node); // adapter.addRootNode(jiggleNode); RotateAndScaleNodeRunnable jiggler = new RotateAndScaleNodeRunnable(node); runnables.add(jiggler); } public static void addFirstCamera(Graphics3DAdapter graphics3DAdapter, PanBackAndForthTrackingAndDollyPositionHolder cameraTrackAndDollyVariablesHolder)
public static Graphics3DNode createPointCloud(String name, List<Point3D> worldPoints, double pointRadius, AppearanceDefinition appearance) { // TODO Change to point sprite mesh Graphics3DNode pointCloud = new Graphics3DNode("PointCloud" + name); for (int i = 0; i < worldPoints.size(); i++) { Graphics3DNode worldPointNode = new Graphics3DNode(name + "point" + i, Graphics3DNodeType.VISUALIZATION, new Graphics3DObject(new Sphere3D(pointRadius), appearance)); worldPointNode.translate(worldPoints.get(i).getX(), worldPoints.get(i).getY(), worldPoints.get(i).getZ()); pointCloud.addChild(worldPointNode); } return pointCloud; }
public static Graphics3DNode createPointCloud(String name, List<Point3d> worldPoints, double pointRadius, AppearanceDefinition appearance) { // TODO Change to point sprite mesh Graphics3DNode pointCloud = new Graphics3DNode("PointCloud" + name); for (int i = 0; i < worldPoints.size(); i++) { Graphics3DNode worldPointNode = new Graphics3DNode(name + "point" + i, Graphics3DNodeType.VISUALIZATION, new Graphics3DObject(new Sphere3d(pointRadius), appearance)); worldPointNode.translate(worldPoints.get(i).getX(), worldPoints.get(i).getY(), worldPoints.get(i).getZ()); pointCloud.addChild(worldPointNode); } return pointCloud; }
public GraphicsIDRobot(String name, RigidBodyBasics rootBody, GraphicsObjectsHolder graphicsObjectsHolder, boolean useCollisionMeshes) { super(new Graphics3DNode(name, Graphics3DNodeType.TRANSFORM)); for (JointBasics joint : rootBody.getChildrenJoints()) { GraphicsJoint rootGraphicsJoint = createJoint(joint, Graphics3DNodeType.ROOTJOINT, graphicsObjectsHolder, useCollisionMeshes); getRootNode().addChild(rootGraphicsJoint); addInverseDynamicsJoints(joint.getSuccessor().getChildrenJoints(), rootGraphicsJoint, graphicsObjectsHolder, useCollisionMeshes); } update(); }
public void addPoints(List<Point3D> points) { if(!disableGraphics) { for(Point3D point : points) { Graphics3DObject testCubeGraphicObject = new Graphics3DObject(); testCubeGraphicObject.addCube(VOXEL_SIZE, VOXEL_SIZE, VOXEL_SIZE, YoAppearance.Aqua()); Graphics3DNode cubeNode = scs.addStaticLinkGraphics(testCubeGraphicObject, Graphics3DNodeType.VISUALIZATION); cubeNode.translate(point.getX(), point.getY(), point.getZ()); if(rootNode == null) rootNode = cubeNode; else rootNode.addChild(cubeNode); } } }