- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中us.ihmc.graphicsDescription.appearance.YoAppearance.DarkGrey()
方法的一些代码示例,展示了YoAppearance.DarkGrey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoAppearance.DarkGrey()
方法的具体详情如下:
包路径:us.ihmc.graphicsDescription.appearance.YoAppearance
类名称:YoAppearance
方法名:DarkGrey
暂无
代码示例来源:origin: us.ihmc/robot-environment-awareness-application
private Graphics3DObject createBlocks()
{
CombinedTerrainObject3D blocksTerrain = new CombinedTerrainObject3D("Blocks");
Random random = new Random(453L);
double lx = 0.5;
double ly = 0.5;
double maxHeight = 0.7;
int numberOfHeights = 8;
double[] heights = new double[numberOfHeights];
for (int i = 0; i < heights.length; i++)
heights[i] = i * maxHeight / (numberOfHeights - 1);
for (double x = -2.0; x <= 5.0; x += lx)
{
for (double y = -4.0; y <= 4.0; y += ly)
{
double height = heights[random.nextInt(numberOfHeights)];
blocksTerrain.addBox(x - lx / 2.0, y - ly / 2.0, x + lx / 2.0, y + ly / 2.0, height, YoAppearance.DarkGrey());
}
}
return blocksTerrain.getLinkGraphics();
}
代码示例来源:origin: us.ihmc/robot-environment-awareness-application
private Graphics3DObject createBlocks2()
{
CombinedTerrainObject3D blocksTerrain = new CombinedTerrainObject3D("Blocks");
double lx = 0.5;
double ly = 0.5;
double zOffset = -0.5;
double maxHeight = 2.0;
for (double x = 0.0; x <= 5.0; x += lx)
{
for (double y = -5.0; y <= 5.0; y += ly)
{
double r = Math.sqrt(x * x + y * y) / 5.0;
double height = r * maxHeight;
blocksTerrain.addBox(x - lx / 2.0, y - ly / 2.0, x + lx / 2.0, y + ly / 2.0, zOffset, height + zOffset, YoAppearance.DarkGrey());
}
}
return blocksTerrain.getLinkGraphics();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
private TerrainObject3D createBump(int row, int column, Point2D positionInGrid, double height, double run, double width, double rotateYaw)
{
AppearanceDefinition bumpAppearance = YoAppearance.DarkGrey();
double radius = height / 2 + run * run / 8 / height;
double alpha = Math.asin(run / 2 / radius);
double depth = radius * Math.cos(alpha);
RigidBodyTransform location = new RigidBodyTransform();
location.appendTranslation(getWorldCoordinate(row, column));
location.appendTranslation(positionInGrid.getX(), positionInGrid.getY(), -depth);
location.appendYawRotation(rotateYaw);
location.appendPitchRotation(Math.PI / 2);
return new CylinderTerrainObject(location, width - bumpSideMargin, radius, bumpAppearance);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
private CombinedTerrainObject3D setUpStormGrate(int row, int column)
{
CombinedTerrainObject3D combinedTerrainObject = new CombinedTerrainObject3D("StormGrate");
AppearanceDefinition crossLineAppearance = YoAppearance.DarkGrey();
double depthCrossLine = 0.05;
double thickCrossLine = 0.02;
int numberOfCrossLines = 15;
double intervalOfCrossLines = gridLength / (numberOfCrossLines + 1);
for (int i = 0; i < numberOfCrossLines; i++)
{
RigidBodyTransform location = new RigidBodyTransform();
location.appendTranslation(getWorldCoordinate(row, column));
location.appendTranslation(gridLength / 2 - intervalOfCrossLines * (i + 1), 0.0, -depthCrossLine / 2);
Box3D crossLine = new Box3D(location, thickCrossLine, gridWidth, depthCrossLine);
combinedTerrainObject.addRotatableBox(crossLine, crossLineAppearance);
}
return combinedTerrainObject;
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
AppearanceDefinition flatAppearance = YoAppearance.DarkGrey();
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
AppearanceDefinition potholeAppearance = YoAppearance.DarkGrey();
AppearanceDefinition flatAppearance = YoAppearance.Grey();
代码示例来源:origin: us.ihmc/ihmc-quadruped-robotics-test
public SimpleMazeEnvironment()
{
super("SimpleMazeEnvironment");
// ground
RotatableBoxTerrainObject ground = new RotatableBoxTerrainObject(new Box3D(new Point3D(2.0, 0.0, -0.5), new Quaternion(), 6, 4, 1), YoAppearance.Grey());
addTerrainObject(ground);
// front-left wall
RotatableBoxTerrainObject wall1 = new RotatableBoxTerrainObject(new Box3D(new Point3D(1.5, 0.75, 0.5), new Quaternion(), 0.1, 2.5, 1.0), YoAppearance.DarkGrey());
addTerrainObject(wall1);
// front-right wall
RotatableBoxTerrainObject wall2 = new RotatableBoxTerrainObject(new Box3D(new Point3D(1.5, -1.625, 0.5), new Quaternion(), 0.1, 0.75, 1.0), YoAppearance.DarkGrey());
addTerrainObject(wall2);
// back-left wall
RotatableBoxTerrainObject wall3 = new RotatableBoxTerrainObject(new Box3D(new Point3D(3.0, 1.625, 0.5), new Quaternion(), 0.1, 0.75, 1.0), YoAppearance.DarkGrey());
addTerrainObject(wall3);
// back-right wall
RotatableBoxTerrainObject wall4 = new RotatableBoxTerrainObject(new Box3D(new Point3D(3.0, -0.75, 0.5), new Quaternion(), 0.1, 2.5, 1.0), YoAppearance.DarkGrey());
addTerrainObject(wall4);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
private CombinedTerrainObject3D setUpCurb(int row, int column)
{
CombinedTerrainObject3D combinedTerrainObject = new CombinedTerrainObject3D("CurbGrid");
combinedTerrainObject.addTerrainObject(setUpFlatGrid(row, column));
AppearanceDefinition curbAppearance = new YoAppearanceTexture("Textures/cinderBlockRotated.png");
AppearanceDefinition edgeAppearance = YoAppearance.DarkGrey();
RigidBodyTransform location = new RigidBodyTransform();
location.appendTranslation(getWorldCoordinate(row, column));
location.appendTranslation(0.0, 0.0, curbHeight / 2);
combinedTerrainObject.addRotatableBox(location, gridLength, gridWidth - curbHeight * 2, curbHeight, curbAppearance);
for (RobotSide robotSide : RobotSide.values)
{
double filletRadius = curbHeight * fillet;
Cylinder3D sideEdgeFillet = new Cylinder3D(location, gridLength, filletRadius);
sideEdgeFillet.appendTranslation(0.0, robotSide.negateIfRightSide(gridWidth / 2 - filletRadius), curbHeight / 2 - filletRadius);
sideEdgeFillet.appendPitchRotation(Math.PI / 2);
RigidBodyTransform sideEdgeFilletTransform = new RigidBodyTransform();
sideEdgeFillet.getPose(sideEdgeFilletTransform);
combinedTerrainObject.addTerrainObject(new CylinderTerrainObject(sideEdgeFilletTransform, gridLength, filletRadius, edgeAppearance));
Box3D sideEdge = new Box3D(location, gridLength, curbHeight, curbHeight - filletRadius);
sideEdge.appendTranslation(0.0, robotSide.negateIfRightSide(gridWidth / 2 - sideEdge.getWidth() / 2), -filletRadius / 2);
combinedTerrainObject.addRotatableBox(sideEdge, edgeAppearance);
Box3D sideEdgeTop = new Box3D(location, gridLength, curbHeight - filletRadius, filletRadius);
sideEdgeTop.appendTranslation(0.0, robotSide.negateIfRightSide(gridWidth / 2 - sideEdgeTop.getWidth() / 2 - filletRadius),
curbHeight / 2 - sideEdgeTop.getHeight() / 2);
combinedTerrainObject.addRotatableBox(sideEdgeTop, edgeAppearance);
}
return combinedTerrainObject;
}
本文整理了Java中us.ihmc.graphicsDescription.appearance.YoAppearance.DarkGrey()方法的一些代码示例,展示了YoAppearance.Da
我是一名优秀的程序员,十分优秀!