private ArrayList<Graphics3DObject> createGroundLinkGraphicsFromGroundProfile(GroundProfile3D groundProfile) { ArrayList<Graphics3DObject> ret = new ArrayList<Graphics3DObject>(); Graphics3DObject texturedGroundLinkGraphics = new Graphics3DObject(); HeightMap heightMap = null; if (groundProfile != null) heightMap = groundProfile.getHeightMapIfAvailable(); else if (groundProfile3D != null) heightMap = groundProfile3D.getHeightMapIfAvailable(); texturedGroundLinkGraphics.addHeightMap(heightMap, 300, 300, YoAppearance.DarkGreen()); ret.add(texturedGroundLinkGraphics); return ret; }
private Graphics3DObject createGroundLinkGraphicsFromGroundProfile(GroundProfile3D groundProfile) { Graphics3DObject texturedGroundLinkGraphics = new Graphics3DObject(); HeightMap heightMap = null; if (groundProfile != null) heightMap = groundProfile.getHeightMapIfAvailable(); texturedGroundLinkGraphics.addHeightMap(heightMap, 300, 300, YoAppearance.DarkGreen()); return texturedGroundLinkGraphics; }
public Graphics3DObject createLinkGraphics(AppearanceDefinition yoAppearance) { Graphics3DObject ret = new Graphics3DObject(); double polygonExtrusionHeight = height-baseZ; ret.translate(new Vector3D(0.0, 0.0, baseZ)); ret.addExtrudedPolygon(convexPolygon2d, polygonExtrusionHeight, yoAppearance); if (this.shrunkenPolygon != null) { // ret.translate(new Vector3d(0.0, 0.0, baseZ)); ret.addExtrudedPolygon(shrunkenPolygon, polygonExtrusionHeight + 0.001, YoAppearance.DarkGreen()); } return ret; }
private Link exampleConeShape() { Link ret = new Link("exampleArcTorusShape"); Graphics3DObject linkGraphics = new Graphics3DObject(); // Cone linkGraphics.translate(OFFSET, 0.0, 0.0); linkGraphics.addCoordinateSystem(COORD_LENGTH); linkGraphics.addCone(CONE_H, CONE_R, YoAppearance.DarkGreen()); ret.setLinkGraphics(linkGraphics); return ret; }
double zOffsetLowerArm = getChildJoint().getJointOffset().getZ() / 2.0; lowerArmGraphics.translate(0.0, 0.0, zOffsetLowerArm); lowerArmGraphics.addEllipsoid(0.05, 0.05, Math.abs(zOffsetLowerArm), YoAppearance.DarkGreen()); return lowerArmGraphics; case WRIST:
linkGraphics.addCone(CONE_H, CONE_R, YoAppearance.DarkGreen());
rightFootstepToExpandViz = new YoGraphicPolygon("rightFootstepToExpandViz", rightFootstepUnderConsideration, "rightFootstepToExpandPose", "", registry, 1.0, YoAppearance.Yellow()); leftAcceptedFootstepViz = new YoGraphicPolygon("leftAcceptedFootstepViz", leftAcceptedFootstep, "leftAcceptedFootstepPose", "", registry, 1.0, YoAppearance.Green()); rightAcceptedFootstepViz = new YoGraphicPolygon("rightAcceptedFootstepViz", rightAcceptedFootstep, "rightAcceptedFootstepPose", "", registry, 1.0, YoAppearance.DarkGreen()); leftRejectedFootstepViz = new YoGraphicPolygon("leftRejectedFootstepViz", leftRejectedFootstep, "leftRejectedFootstepPose", "", registry, 1.0, YoAppearance.Red()); rightRejectedFootstepViz = new YoGraphicPolygon("rightRejectedFootstepViz", rightRejectedFootstep, "rightRejectedFootstepPose", "", registry, 1.0, YoAppearance.DarkRed());
coneGraphic.translate(0.0, 0.0, coneHeight); coneGraphic.rotate(Math.PI, Axis.Y); coneGraphic.addCone(coneHeight, coneBaseRadius, YoAppearance.DarkGreen()); scs.addStaticLinkGraphics(coneGraphic);
stanceFramePose.setPosition(0.2, 0.26, 0.31); stanceFramePose.setOrientationYawPitchRoll(0.0, stanceFootPitch.getDoubleValue(), 0.0); YoGraphicPolygon stanceFootPolygon = createStaticFootstep("stance", stanceFramePose, YoAppearance.DarkGreen(), registry, yoGraphicsListRegistry);
heightMapGraphics.addHeightMap(heightMap, 300, 300, YoAppearance.DarkGreen()); scs.addStaticLinkGraphics(heightMapGraphics);