public static AppearanceDefinition Glass(double transparency) { AppearanceDefinition glass = SkyBlue(); makeTransparent(glass, transparency);//0.5); return glass; }
public static AppearanceDefinition Glass(double transparency) { AppearanceDefinition glass = SkyBlue(); makeTransparent(glass, transparency);//0.5); return glass; }
private void addFalseStair() { final double courseAngle = 3 * 45. / 2; final double startDistance = 6.75; AppearanceDefinition app = YoAppearance.Red(); YoAppearance.makeTransparent(app, 1); final double stepWidth = 0.812; final double stepTread = stepWidth; final double stepThickness = 0.0381; final double stepRise = 0.3048; double[] centerPointLocal = {startDistance + stepTread / 2, 0}; double[] centerPoint; double stairTopHeight = stepRise; centerPoint = rotateAroundOrigin(centerPointLocal, courseAngle); setUpFloatingStair(combinedTerrainObject3D, centerPoint, stepWidth, stepTread, stepThickness, stairTopHeight, courseAngle, app); }
private void addFalseStair() { final double courseAngle = 3 * 45. / 2; final double startDistance = 6.75; AppearanceDefinition app = YoAppearance.Red(); YoAppearance.makeTransparent(app, 1); final double stepWidth = 0.812; final double stepTread = stepWidth; final double stepThickness = 0.0381; final double stepRise = 0.3048; double[] centerPointLocal = {startDistance + stepTread / 2, 0}; double[] centerPoint; double stairTopHeight = stepRise; centerPoint = rotateAroundOrigin(centerPointLocal, courseAngle); setUpFloatingStair(combinedTerrainObject3D, centerPoint, stepWidth, stepTread, stepThickness, stairTopHeight, courseAngle, app); }
private CombinedTerrainObject3D setUpInclinedSurface(int startRow, int endRow, int startColumn, int endColumn) { CombinedTerrainObject3D combinedTerrainObject = new CombinedTerrainObject3D("InclinedSurface"); AppearanceDefinition inclinedSurfaceAppearance = YoAppearance.Grey(); AppearanceDefinition wallAppearance = new YoAppearanceTexture("Textures/cinderBlock2.jpeg"); YoAppearance.makeTransparent(wallAppearance, 0.7f); int rampLengthDimension = (endColumn - startColumn + 1); int rampWidthDimension = (endRow - startRow + 1); double wallThickness = 0.05; double wallHeight = gridWidth; double rampWidth = rampWidthDimension * gridLength - wallThickness; double rampLength = rampLengthDimension * gridWidth; double centerX = (getWorldCoordinate(startRow, startColumn).getX() + getWorldCoordinate(endRow, endColumn).getX()) / 2 + wallThickness / 2; double centerY = (getWorldCoordinate(startRow, startColumn).getY() + getWorldCoordinate(endRow, endColumn).getY()) / 2; RotatableRampTerrainObject inclinedSurface = new RotatableRampTerrainObject(centerX, centerY, rampLength, rampWidth, flatGridHeight, -90, inclinedSurfaceAppearance); combinedTerrainObject.addTerrainObject(inclinedSurface); for (int i = 0; i < rampLengthDimension; i++) { RigidBodyTransform wallLocation = new RigidBodyTransform(); wallLocation.appendTranslation(centerX, centerY, 0.0); wallLocation.appendTranslation(-wallThickness / 2 - rampWidth / 2, 0.0, wallHeight / 2); wallLocation.appendTranslation(0.0, rampLength / 2, 0.0); wallLocation.appendTranslation(0.0, -wallHeight * (i + 0.5), 0.0); combinedTerrainObject.addTerrainObject(new RotatableBoxTerrainObject(wallLocation, wallThickness, wallHeight, wallHeight, wallAppearance)); } return combinedTerrainObject; }
YoAppearance.makeTransparent(transparantBlue, 0.5); boxGhostGraphics.translate(0.0, 0.0, -0.5); boxGhostGraphics.addCube(1.0, 1.0, 1.0, transparantBlue);