us.ihmc.graphics3DAdapter.graphics.appearances.YoAppearance.Blue()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中us.ihmc.graphics3DAdapter.graphics.appearances.YoAppearance.Blue()方法的一些代码示例,展示了YoAppearance.Blue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoAppearance.Blue()方法的具体详情如下:
包路径:us.ihmc.graphics3DAdapter.graphics.appearances.YoAppearance
类名称:YoAppearance
方法名:Blue

YoAppearance.Blue介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

private void setupGroundPlane()
{
 terrain.addBox(-10, -10, 10, 10, -0.1, 0.0, YoAppearance.Blue());
}

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

private CombinedTerrainObject3D setUpGround(String name)
{
 CombinedTerrainObject3D combinedTerrainObject = new CombinedTerrainObject3D(name);
 combinedTerrainObject.addBox(-5.0, -5.0, 5.0, 5.0, -0.05, 0.0, YoAppearance.Blue());
 return combinedTerrainObject;
}

代码示例来源:origin: us.ihmc/IHMCGraphics3DDescription

public void addCoordinateSystem(double length, AppearanceDefinition arrowAppearance)
{
 addCoordinateSystem(length, YoAppearance.Red(), YoAppearance.White(), YoAppearance.Blue(), arrowAppearance);
}

代码示例来源:origin: us.ihmc/IHMCGraphics3DDescription

public static AppearanceDefinition[] getStandardRoyGBivRainbow()
{
 AppearanceDefinition[] rainbow = new AppearanceDefinition[] { YoAppearance.Red(), YoAppearance.OrangeRed(), YoAppearance.Yellow(),
    YoAppearance.Green(), YoAppearance.Blue(), YoAppearance.Indigo(), YoAppearance.Purple()};
 
 return rainbow;
}

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

public FootstepGeneratorVisualizer(int maxNumberOfContacts, int maxPointsPerContact, YoVariableRegistry parentRegistry,
   YoGraphicsListRegistry yoGraphicsListRegistry)
{
 YoGraphicsList yoGraphicsList = new YoGraphicsList("FootstepGeneratorVisualizer");
 AppearanceDefinition[] appearances = new AppearanceDefinition[] { YoAppearance.Red(), YoAppearance.Green(), YoAppearance.Blue(), YoAppearance.Purple() };
 for (int i = 0; i < maxNumberOfContacts; i++)
 {
   YoFramePose contactPose = new YoFramePose("contactPose" + i, "", worldFrame, registry);
   contactPoses.add(contactPose);
   YoFrameConvexPolygon2d contactPolygon = new YoFrameConvexPolygon2d("contactPolygon" + i, "", worldFrame, maxPointsPerContact, registry);
   contactPolygonsWorld.add(contactPolygon);
   YoGraphicPolygon dynamicGraphicPolygon = new YoGraphicPolygon("contactPolygon" + i, contactPolygon, contactPose, 1.0, appearances[i
      % appearances.length]);
   yoGraphicsList.add(dynamicGraphicPolygon);
 }
 yoGraphicsListRegistry.registerYoGraphicsList(yoGraphicsList);
 parentRegistry.addChild(registry);
}

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

private void addSupportBaseGraphics(YoGraphicsListRegistry yoGraphicsListRegistry,YoFramePoint[] basePoints, ArrayList<YoGraphic> basePointsList, ArrayList<YoGraphic> linesList, String namePrefix,AppearanceDefinition appearance)
{
 AppearanceDefinition[] colors = { YoAppearance.Red(), YoAppearance.Green(), YoAppearance.Blue(), YoAppearance.Yellow() };
 YoGraphicsList yoGraphicsList = new YoGraphicsList(namePrefix + "Points");
 for (int i = 0; i < basePoints.length; i++)
 {
   YoGraphicPosition baseControlPointViz = new YoGraphicPosition(namePrefix + "Point" + i, basePoints[i], 0.01, colors[i]);
   yoGraphicsList.add(baseControlPointViz);
   basePointsList.add(baseControlPointViz);
      for (int j = i + 1; j < basePoints.length; j++)
   {
    YoGraphicLineSegment dynamicGraphicLineSegment = new YoGraphicLineSegment(namePrefix + "SupportLine", basePoints[i], basePoints[j],
       1.0, appearance, false);
    yoGraphicsList.add(dynamicGraphicLineSegment);
    linesList.add(dynamicGraphicLineSegment);
   }
 }
 if (yoGraphicsListRegistry != null)
   yoGraphicsListRegistry.registerYoGraphicsList(yoGraphicsList);
 yoGraphicsList.hideYoGraphics();
}

代码示例来源:origin: us.ihmc/IHMCGraphics3DDescription

/**
* Creates a graphical representation of the x, y, and z axis of the current coordinate
* system centered at its origin.  In the image below red, white and blue represent the
* x, y and z axies respectively.<br /><br />
* <img src="doc-files/LinkGraphics.addCoordinateSystem.jpg">
*
* @param length the length in meters of each axis arrow.
*/
public void addCoordinateSystem(double length, AppearanceDefinition xAxisAppearance, AppearanceDefinition yAxisAppearance,
                AppearanceDefinition zAxisAppearance, AppearanceDefinition arrowAppearance)
{
 rotate(Math.PI / 2.0, Axis.Y);
 addArrow(length, YoAppearance.Red(), arrowAppearance);
 rotate(-Math.PI / 2.0, Axis.Y);
 rotate(-Math.PI / 2.0, Axis.X);
 addArrow(length, YoAppearance.White(), arrowAppearance);
 rotate(Math.PI / 2.0, Axis.X);
 addArrow(length, YoAppearance.Blue(), arrowAppearance);
}

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

public ReachabilitySphereMapCalculator(OneDoFJoint[] robotArmJoints, SimulationConstructionSet scs)
{
 this.robotArmJoints = robotArmJoints;
 this.scs = scs;
 lastJoint = robotArmJoints[robotArmJoints.length - 1];
 jacobian = new GeometricJacobian(robotArmJoints, lastJoint.getSuccessor().getBodyFixedFrame());
 int maxIterations = 500;
 spatialInverseKinematicsCalculator = createNumericalInverseKinematicsCalculator(jacobian, maxIterations, true);
 linearInverseKinematicsCalculator = createNumericalInverseKinematicsCalculator(jacobian, maxIterations, false);
 ReferenceFrame frameBeforeRootJoint = robotArmJoints[0].getFrameBeforeJoint();
 RigidBodyTransform gridTransformToParent = new RigidBodyTransform(new AxisAngle4d(), new Vector3d(gridSizeInNumberOfVoxels * voxelSize / 3.0, 0.0, 0.0));
 ReferenceFrame gridFrame = ReferenceFrame.constructFrameWithUnchangingTransformToParent("gridFrame", frameBeforeRootJoint, gridTransformToParent);
 Graphics3DObject gridFrameViz = new Graphics3DObject();
 gridFrameViz.transform(gridFrame.getTransformToDesiredFrame(ReferenceFrame.getWorldFrame()));
 gridFrameViz.addCoordinateSystem(1.0, YoAppearance.Blue());
 scs.addStaticLinkGraphics(gridFrameViz);
 sphereVoxelShape = new SphereVoxelShape(gridFrame, voxelSize, numberOfRays, numberOfRotationsAroundRay, SphereVoxelType.graspOrigin);
 voxel3dGrid = new Voxel3DGrid(gridFrame, sphereVoxelShape, gridSizeInNumberOfVoxels, voxelSize);
 scs.addYoVariableRegistry(registry);
}

相关文章