public static void makeTransparent(AppearanceDefinition appearance, double f) { appearance.setTransparency(f); }
public static void makeTransparent(AppearanceDefinition appearance, double f) { appearance.setTransparency(f); }
private void addIntertialEllipsoidsToVisualizer(FloatingRootJointRobot valkyrieRobot) { ArrayList<Joint> joints = new ArrayList<>(); joints.add(valkyrieRobot.getRootJoint()); HashSet<Link> links = getAllLinks(joints, new HashSet<Link>()); for (Link l : links) { AppearanceDefinition appearance = YoAppearance.Green(); appearance.setTransparency(0.6); l.addEllipsoidFromMassProperties(appearance); l.addCoordinateSystemToCOM(0.5); // l.addBoxFromMassProperties(appearance); } }
private CombinedTerrainObject3D setupWallSlightlyInFront(String name) { CombinedTerrainObject3D combinedTerrainObject = new CombinedTerrainObject3D(name); double xStart = 0.6; AppearanceDefinition appearance = YoAppearance.Green(); appearance.setTransparency(0.25); combinedTerrainObject.addBox(xStart, wallMinY, xStart + 0.1, wallMaxY, 0.5, 1.8, appearance); return combinedTerrainObject; }
private static void setUpTruss(CombinedTerrainObject3D combinedTerrainObject, double[] newPoint, double trussLength, double trussSide, double courseAngleDeg, AppearanceDefinition color) { AppearanceDefinition overrideColor = YoAppearance.White(); // color; overrideColor.setTransparency(0.95); TrussWithSimpleCollisions truss = new TrussWithSimpleCollisions(newPoint, trussLength, trussSide, courseAngleDeg, overrideColor); combinedTerrainObject.addTerrainObject(truss); }
private static void setUpTruss(CombinedTerrainObject3D combinedTerrainObject, double[] newPoint, double trussLength, double trussSide, double courseAngleDeg, AppearanceDefinition color) { AppearanceDefinition overrideColor = YoAppearance.White(); // color; overrideColor.setTransparency(0.95); TrussWithSimpleCollisions truss = new TrussWithSimpleCollisions(newPoint, trussLength, trussSide, courseAngleDeg, overrideColor); combinedTerrainObject.addTerrainObject(truss); }
private CombinedTerrainObject3D setupStepInFront(String name, double stepHeight) { CombinedTerrainObject3D combinedTerrainObject = new CombinedTerrainObject3D(name); double xStart = 0.3; double stepWidth = 0.5; AppearanceDefinition appearance = YoAppearance.Green(); appearance.setTransparency(0.25); combinedTerrainObject.addBox(xStart, -stepWidth/2.0, xStart + stepWidth, stepWidth/2.0, 0.0, stepHeight, appearance); return combinedTerrainObject; }
private CombinedTerrainObject3D setupWall(String name) { CombinedTerrainObject3D combinedTerrainObject = new CombinedTerrainObject3D(name); double xStart = wallDistance; double wallMinY = -1000; double wallMaxY = 1000; double wallZStart = -1000; double wallZEnd = 1000; AppearanceDefinition appearance = YoAppearance.Green(); appearance.setTransparency(0.25); combinedTerrainObject.addBox(xStart, wallMinY, xStart + 0.1, wallMaxY, wallZStart, wallZEnd, appearance); return combinedTerrainObject; }
private CombinedTerrainObject3D setupHandHolds(String name) { double height = 0.9; double radius = 0.1; CombinedTerrainObject3D combinedTerrainObject = new CombinedTerrainObject3D(name); AppearanceDefinition appearance = YoAppearance.Gold(); appearance.setTransparency(0.25); double xCenter = 0.5; double yCenter = 0.4; RigidBodyTransform location = new RigidBodyTransform(); location.setTranslation(new Vector3D(xCenter, -yCenter, height/2.0)); combinedTerrainObject.addCylinder(location, height, radius, appearance); location = new RigidBodyTransform(); location.setTranslation(new Vector3D(xCenter, yCenter, height/2.0)); combinedTerrainObject.addCylinder(location, height, radius, appearance); return combinedTerrainObject; }
appearance.setTransparency(0.6);
appearanceDefinition.setTransparency(0.8);
public static void visualizePointsOnSphereUsingSpiralBasedAlgorithm() { SimulationConstructionSet scs = new SimulationConstructionSet(new Robot("Dummy")); scs.startOnAThread(); Point3D sphereOrigin = new Point3D(0.0, 0.0, 1.0); double sphereRadius = 0.10; int numberOfPointsToGenerate = 200; Point3D[] pointsOnSphere = SpiralBasedAlgorithm.generatePointsOnSphere(sphereOrigin, sphereRadius, numberOfPointsToGenerate); Graphics3DObject staticLinkGraphics = new Graphics3DObject(); staticLinkGraphics.translate(sphereOrigin); AppearanceDefinition red = YoAppearance.Red(); red.setTransparency(0.7); staticLinkGraphics.addSphere(sphereRadius, red); scs.addStaticLinkGraphics(staticLinkGraphics); for (int i = 0; i < numberOfPointsToGenerate; i++) { staticLinkGraphics = new Graphics3DObject(); staticLinkGraphics.translate(pointsOnSphere[i]); staticLinkGraphics.addSphere(0.005); scs.addStaticLinkGraphics(staticLinkGraphics); } }
appearance.setTransparency(Double.parseDouble(sdfVisual.getTransparency()));
bubble.setTransparency(0.5); collisionSphere = new YoGraphicEllipsoid("CollisionSphere", solePose.getPosition(), solePose.getOrientation(), bubble, new Vector3D()); stanceFootGraphic = new YoGraphicPolygon("StanceFootGraphic", footPolygon.getNumberOfVertices(), registry, true, 1.0, YoAppearance.Blue());
appearance.setTransparency(0.8);