Examples of Line


Examples of com.jme.scene.Line

                markerVertices.add(new Vector3f(i * spacing, 0, size));
                markerVertices.add(new Vector3f(-i * spacing, 0, -size));
                markerVertices.add(new Vector3f(-i * spacing, 0, size));
            }
        }
        Geometry regularGrid = new Line("regularLine", regularVertices.toArray(new Vector3f[] {}), null, null, null);
        regularGrid.getDefaultColor().set(new ColorRGBA(1, 1, 1, 0.05f));
        regularGrid.setModelBound(new BoundingBox());
        regularGrid.updateModelBound();
        lines.attachChild(regularGrid);
        Geometry markerGrid = new Line("markerLine", markerVertices.toArray(new Vector3f[] {}), null, null, null);
        markerGrid.getDefaultColor().set(new ColorRGBA(1, 1, 1, 0.1f));
        markerGrid.setModelBound(new BoundingBox());
        markerGrid.updateModelBound();
        lines.attachChild(markerGrid);
        if (rotation != null) lines.getLocalRotation().fromAngles(rotation.x, rotation.y, rotation.z);

        Node axis = new Node("axis");
        this.attachChild(axis);
        Vector3f xAxis = new Vector3f(size + (marker * spacing), 0, 0); // red
        Vector3f yAxis = new Vector3f(0, size + (marker * spacing), 0); // green
        Vector3f zAxis = new Vector3f(0, 0, size + (marker * spacing)); // blue
        Vector3f zero = new Vector3f();
        ColorRGBA red = new ColorRGBA(1, 0, 0, 0.8f);
        ColorRGBA green = new ColorRGBA(0, 1, 0, 0.8f);
        ColorRGBA blue = new ColorRGBA(0, 0, 1, 0.8f);
        Line lx = new Line("xAxis", new Vector3f[] { zero, xAxis }, null, new ColorRGBA[] { red, red }, null);
        Line ly = new Line("yAxis", new Vector3f[] { zero, yAxis }, null, new ColorRGBA[] { green, green }, null);
        Line lz = new Line("zAxis", new Vector3f[] { zero, zAxis }, null, new ColorRGBA[] { blue, blue }, null);
        lx.setModelBound(new BoundingBox());
        lx.updateModelBound();
        ly.setModelBound(new BoundingBox());
        ly.updateModelBound();
        lz.setModelBound(new BoundingBox());
        lz.updateModelBound();
        axis.attachChild(lx);
        axis.attachChild(ly);
        axis.attachChild(lz);

        TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
View Full Code Here

Examples of com.jme3.scene.shape.Line

            inputManager.getCursorPosition(), 0.0f);
        Vector3f direction = cam.getWorldCoordinates(
            inputManager.getCursorPosition(), 0.3f);
        direction.subtractLocal(origin).normalizeLocal();
       
        Line li = new Line(origin.clone(), origin.add(direction.mult(30f)));
//        li.setLineWidth(3f);
        Geometry g = new Geometry(null, li);
      g.setMaterial(matWireframe);
      bboxes.attachChild(g);
View Full Code Here

Examples of com.lastcalc.db.Line

            final TreeMap<Integer, String> orderedQuestions = Maps.newTreeMap();
            orderedQuestions.putAll(request.questions);
            for (final Entry<Integer, String> question : orderedQuestions.entrySet()) {
                final int pos = question.getKey() - 1;
                if (pos < qaPairs.size()) {
                    final Line qaPair = qaPairs.get(pos);
                    qaPair.lineNum=question.getKey();
                    qaPair.question = question.getValue();
                    //earliestModified = Math.min(earliestModified, pos);
                } else {
                    qaPairs.add(new Line(question.getKey(),question.getValue(), null));
                }
            }
            for (int x = 0; x < qaPairs.size(); x++) {
                final Line qaPair = qaPairs.get(x);
                qaPair.answer = null;
            }
            // Remove any qaPairs that have been removed from the browser DOM
            if (!orderedQuestions.isEmpty()) {
                while (qaPairs.size() > orderedQuestions.lastKey()) {
View Full Code Here

Examples of com.positive.charts.util.Line

  protected void drawRangeLine(final GC gc, final Rectangle dataArea,
      final double value, final Stroke stroke, final Color paint) {

    final double java2D = this.getRangeAxis().valueToJava2D(value,
        dataArea, this.getRangeAxisEdge());
    Line line = null;
    if (this.orientation == PlotOrientation.HORIZONTAL) {
      line = Line.Double(java2D, RectangleUtil.getMinY(dataArea), java2D,
          RectangleUtil.getMaxY(dataArea));
    } else if (this.orientation == PlotOrientation.VERTICAL) {
      line = Line.Double(RectangleUtil.getMinX(dataArea), java2D,
View Full Code Here

Examples of cranks.geom.Line

    }
    else if (step.getConstructionType() == THREE_POINTS) {
      Point point1 = (Point)step.getInputs()[0];
      Point point2 = (Point)step.getInputs()[1];
      Point point3 = (Point)step.getInputs()[2];
      Line line12 = new Line(point1, point2);
      Line line23 = new Line(point2, point3);
      if (!((line12.isParallel(line23))||(point1.equalTo(point2))
          || (point2.equalTo(point3)) || (point3.equalTo(point1))))  {
        Circle newCircle = new Circle(point1, point2, point3);
        newCircle.addToObjects(objects);
        clearAndHide();
View Full Code Here

Examples of data.Line

            b = Math.min(lineBuffer.size() - 1, i + lineTolerance);
            line = "";
            linesToCheck.clear();

            for (int j = a; j <= b; j++) {
                linesToCheck.add(new Line(lineBuffer.get(j), j + 1)); //j+1 represents the line number
                line += lineBuffer.get(j) + "\f";
            }

            if (lineMatcher.match(pattern, line)) {
                LineMatch lineMatch = new LineMatch(pattern);
View Full Code Here

Examples of dwlab.shapes.Line

  public void toLine( Line line ) {
    line.usePoints( x, y, x + Math.cos( angle ), y + Math.sin( angle ) );
  }
 
  public Line toLine() {
    Line line = new Line();
    toLine( line );
    return line;
  }
View Full Code Here

Examples of eas.simulation.spatial.sim2D.physicalSimulation.physicsEngine.net.phys2d.raw.shapes.Line

      if ( noContacts >= contacts.length )
        return contacts.length;
     
      Vector2f lineStartA = vertsA[collPairs[i][0]];
      Vector2f lineEndA = vertsA[(collPairs[i][0]+1) % vertsA.length ];
      Line line = new Line(lineStartA, lineEndA);
           
      float dis2 = line.distanceSquared(bodyB.getPosition());
      float r2 = circle.getRadius() * circle.getRadius();

      if ( dis2 < r2 ) {
        Vector2f pt = new Vector2f();
       
        line.getClosestPoint(bodyB.getPosition(), pt);
        Vector2f normal = new Vector2f(bodyB.getPosition());
        normal.sub(pt);
        float sep = circle.getRadius() - normal.length();
        normal.normalise();
       
View Full Code Here

Examples of engine.geometry.Line

        if (shape instanceof Point) {
            Point point = (Point) shape;
            point.setX(point.getX() + x);
            point.setY(point.getY() + y);
        } else if (shape instanceof Line) {
            Line line = (Line) shape;
            line.setX1(line.getX1() + x);
            line.setY1(line.getY1() + y);
            line.setX2(line.getX2() + x);
            line.setY2(line.getY2() + y);
        } else if (shape instanceof Rectangle) {
            Rectangle rectangle = (Rectangle) shape;
            rectangle.setX(rectangle.getX() + x);
            rectangle.setY(rectangle.getY() + y);
        } else if (shape instanceof Circle) {
View Full Code Here

Examples of framework.spacial.Line

    return line != null ? line.getFrom() : null;
  }

  @Override
  public void renderForDebug(Graphics g, Vector2f pos) {
    Line l = getLine().translate(pos);
    int x1 = Math.round(l.getFrom().getX());
    int y1 = Math.round(l.getFrom().getY());
    int x2 = Math.round(l.getTo().getX());
    int y2 = Math.round(l.getTo().getY());
    g.drawLine(x1, y1, x2, y2);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.