- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中us.ihmc.yoVariables.variable.YoFrameConvexPolygon2D.getMaxNumberOfVertices()
方法的一些代码示例,展示了YoFrameConvexPolygon2D.getMaxNumberOfVertices()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoFrameConvexPolygon2D.getMaxNumberOfVertices()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoFrameConvexPolygon2D
类名称:YoFrameConvexPolygon2D
方法名:getMaxNumberOfVertices
[英]Gets the maximum size that this polygon can reach.
This value is immutable.
[中]
代码示例来源:origin: us.ihmc/ihmc-graphics-description
@Override
public YoVariable<?>[] getVariables()
{
YoVariable<?>[] vars = new YoVariable[1 + 2 * convexPolygon.getMaxNumberOfVertices()];
int i = 0;
vars[i++] = convexPolygon.getYoNumberOfVertices();
for (YoFramePoint2D p : convexPolygon.getVertexBuffer())
{
vars[i++] = p.getYoX();
vars[i++] = p.getYoY();
}
return vars;
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
private YoGraphicPolygon(String name, YoVariable<?>[] yoVariables, double[] constants, AppearanceDefinition appearance)
{
/*
* 2 * (int) constants[1] + 1 => constants[1] is the size of the 2D vertex
* buffer so we have 2 * YoVariables, the "+ 1" is for the YoInteger that
* keeps track of the actual polygon size.
*/
super(name, Arrays.copyOfRange(yoVariables, 2 * (int) constants[1] + 1, yoVariables.length), constants[0]);
int constantIndex = 1; // 0 corresponds to the scale factor
int vertexBufferSize = (int) constants[constantIndex++];
// Ensuring backward compatibility
this.height = constants.length == 3 ? constants[constantIndex++] : DEFAULT_HEIGHT;
int yoIndex = 0;
YoInteger numberOfVertices = (YoInteger) yoVariables[yoIndex++];
List<YoFramePoint2D> yoFrameVertices = new ArrayList<>();
while (yoFrameVertices.size() < vertexBufferSize)
{
YoDouble xVariable = (YoDouble) yoVariables[yoIndex++];
YoDouble yVariable = (YoDouble) yoVariables[yoIndex++];
yoFrameVertices.add(new YoFramePoint2D(xVariable, yVariable, worldFrame));
}
yoFrameConvexPolygon2d = new YoFrameConvexPolygon2D(yoFrameVertices, numberOfVertices, worldFrame);
verticesToDisplay = new ArrayList<>(yoFrameConvexPolygon2d.getMaxNumberOfVertices());
this.appearance = appearance;
graphics3dObject = new Graphics3DObject();
graphics3dObject.setChangeable(true);
MeshDataHolder meshDataHolder = MeshDataGenerator.ExtrudedPolygon(yoFrameConvexPolygon2d, height);
instruction = new Graphics3DAddMeshDataInstruction(meshDataHolder, appearance);
graphics3dObject.addInstruction(instruction);
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
@Override
public YoVariable<?>[] getVariables()
{
//poly + framePoint + frameOrientation
YoVariable<?>[] superYoVariables = super.getVariables();
YoVariable<?>[] yoVariables = new YoVariable[1 + 2 * yoFrameConvexPolygon2d.getMaxNumberOfVertices() + superYoVariables.length];
int i = 0;
yoVariables[i++] = yoFrameConvexPolygon2d.getYoNumberOfVertices();
for (YoFramePoint2D p : yoFrameConvexPolygon2d.getVertexBuffer())
{
yoVariables[i++] = p.getYoX();
yoVariables[i++] = p.getYoY();
}
for (YoVariable<?> superYoVariable : superYoVariables)
{
yoVariables[i++] = superYoVariable;
}
return yoVariables;
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
private YoGraphicPolygon(String name, YoFrameConvexPolygon2D yoFrameConvexPolygon2d, YoFramePoint3D framePoint, YoFrameYawPitchRoll yawPitchRoll,
YoFrameQuaternion quaternion, double scale, double height, AppearanceDefinition appearance)
{
super(name, framePoint, yawPitchRoll, quaternion, scale);
if (yoFrameConvexPolygon2d.getNumberOfVertices() <= 0)
yoFrameConvexPolygon2d.set(Vertex2DSupplier.emptyVertex2DSupplier());
this.yoFrameConvexPolygon2d = yoFrameConvexPolygon2d;
this.appearance = appearance;
this.height = height;
verticesToDisplay = new ArrayList<>(yoFrameConvexPolygon2d.getMaxNumberOfVertices());
graphics3dObject = new Graphics3DObject();
graphics3dObject.setChangeable(true);
MeshDataHolder meshDataHolder = MeshDataGenerator.ExtrudedPolygon(yoFrameConvexPolygon2d, height);
instruction = new Graphics3DAddMeshDataInstruction(meshDataHolder, appearance);
graphics3dObject.addInstruction(instruction);
}
代码示例来源:origin: us.ihmc/ihmc-path-planning-test
if (planarRegion.getConvexHull().getNumberOfVertices() > visiblePolygons.get(polygonIdx).getMaxNumberOfVertices())
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test
if (planarRegion.getConvexHull().getNumberOfVertices() > visiblePolygons.get(polygonIdx).getMaxNumberOfVertices())
我是一名优秀的程序员,十分优秀!