com.vividsolutions.jts.triangulate.quadedge.Vertex.equals()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(112)

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

Vertex.equals介绍

暂无

代码示例

代码示例来源:origin: com.vividsolutions/jts

/**
 * Tests whether a vertex is a vertex of the outer triangle.
 * 
 * @param v
 *          the vertex to test
 * @return true if the vertex is an outer triangle vertex
 */
public boolean isFrameVertex(Vertex v) {
  if (v.equals(frameVertex[0]))
    return true;
  if (v.equals(frameVertex[1]))
    return true;
  if (v.equals(frameVertex[2]))
    return true;
  return false;
}

代码示例来源:origin: com.vividsolutions/jts

/**
 * Tests whether a {@link Vertex} is the start or end vertex of a
 * {@link QuadEdge}, up to the subdivision tolerance distance.
 * 
 * @param e
 * @param v
 * @return true if the vertex is a endpoint of the edge
 */
public boolean isVertexOfEdge(QuadEdge e, Vertex v) {
  if ((v.equals(e.orig(), tolerance)) || (v.equals(e.dest(), tolerance))) {
    return true;
  }
  return false;
}

代码示例来源:origin: com.vividsolutions/jts

public int classify(Vertex p0, Vertex p1) {
  Vertex p2 = this;
  Vertex a = p1.sub(p0);
  Vertex b = p2.sub(p0);
  double sa = a.crossProduct(b);
  if (sa > 0.0)
    return LEFT;
  if (sa < 0.0)
    return RIGHT;
  if ((a.getX() * b.getX() < 0.0) || (a.getY() * b.getY() < 0.0))
    return BEHIND;
  if (a.magn() < b.magn())
    return BEYOND;
  if (p0.equals(p2))
    return ORIGIN;
  if (p1.equals(p2))
    return DESTINATION;
  return BETWEEN;
}

代码示例来源:origin: com.vividsolutions/jts

QuadEdge e = locate(v);
if ((v.equals(e.orig(), tolerance)) || (v.equals(e.dest(), tolerance))) {
  return e; // point already in subdivision.

代码示例来源:origin: com.vividsolutions/jts

if ((v.equals(e.orig())) || (v.equals(e.dest()))) {
  break;
} else if (v.rightOf(e)) {

代码示例来源:origin: com.vividsolutions/jts-core

/**
 * Tests whether a vertex is a vertex of the outer triangle.
 * 
 * @param v
 *          the vertex to test
 * @return true if the vertex is an outer triangle vertex
 */
public boolean isFrameVertex(Vertex v) {
  if (v.equals(frameVertex[0]))
    return true;
  if (v.equals(frameVertex[1]))
    return true;
  if (v.equals(frameVertex[2]))
    return true;
  return false;
}

代码示例来源:origin: com.vividsolutions/jts-core

/**
 * Tests whether a {@link Vertex} is the start or end vertex of a
 * {@link QuadEdge}, up to the subdivision tolerance distance.
 * 
 * @param e
 * @param v
 * @return true if the vertex is a endpoint of the edge
 */
public boolean isVertexOfEdge(QuadEdge e, Vertex v) {
  if ((v.equals(e.orig(), tolerance)) || (v.equals(e.dest(), tolerance))) {
    return true;
  }
  return false;
}

代码示例来源:origin: com.vividsolutions/jts-core

public int classify(Vertex p0, Vertex p1) {
  Vertex p2 = this;
  Vertex a = p1.sub(p0);
  Vertex b = p2.sub(p0);
  double sa = a.crossProduct(b);
  if (sa > 0.0)
    return LEFT;
  if (sa < 0.0)
    return RIGHT;
  if ((a.getX() * b.getX() < 0.0) || (a.getY() * b.getY() < 0.0))
    return BEHIND;
  if (a.magn() < b.magn())
    return BEYOND;
  if (p0.equals(p2))
    return ORIGIN;
  if (p1.equals(p2))
    return DESTINATION;
  return BETWEEN;
}

代码示例来源:origin: com.vividsolutions/jts-core

QuadEdge e = locate(v);
if ((v.equals(e.orig(), tolerance)) || (v.equals(e.dest(), tolerance))) {
  return e; // point already in subdivision.

代码示例来源:origin: us.ihmc/robot-environment-awareness

if (currentDestVertex.equals(startVertex))
 break;

代码示例来源:origin: com.vividsolutions/jts-core

if ((v.equals(e.orig())) || (v.equals(e.dest()))) {
  break;
} else if (v.rightOf(e)) {

相关文章