Package net.wigis.graph.dnv.utilities

Examples of net.wigis.graph.dnv.utilities.Vector3D


   
    shownFrames++;
   
    if( this.hasCompleted() )
    {
      Vector3D color = endNode.getColor();
      if( endNode.isSelected() )
      {
        color = new Vector3D( 1, 0, 0 );
      }
      if( color == null )
      {
        color = new Vector3D( 0, 0, 0 );
      }
      int radius = pb.getNodeWidthOnScreen( endNode ) / 2;
      Text t = null;
      boolean playSound = false;
      synchronized( handledDistances )
      {
        if( handledDistances.get( currentDistance ) == null )
        {
          handledDistances.put( currentDistance, true );
          t = new Text( "Dist " + currentDistance, new Vector2D( 45, pb.getHeightInt() - 30 ), new Vector3D(1,1,1), endNode.getColor(), 15, true, true, true, false, false, false, true );
          Animation a = new NodeGlowAnimation( 10, color, t.getNode(), radius, radius + 40, 2, true, t );
          endNode.getGraph().addAnimation( a );
          if( pb.isPlaySound() )
          {
            try
View Full Code Here


          throw new IllegalArgumentException( "Invalid color string [" + colorStr + "]" );         
        }
      }
      else if( colorStr.startsWith( "[" ) )
      {
        setColor( new Vector3D( colorStr ) );
      }
      else if( colorStr.equals( "null" ) )
      {
        if( this instanceof DNVEdge )
        {
          color =  null;
        }
        else
        {
          setColor( new Vector3D( 0, 0, 0 ) );
        }
      }
      else
      {
        throw new IllegalArgumentException( "Invalid color string [" + colorStr + "]" );
      }
    }
    else
    {
      if( this instanceof DNVEdge )
      {
        color =  null;
      }
      else
      {
        setColor( new Vector3D( 0, 0, 0 ) );       
      }
    }

     
  }
View Full Code Here

    if( color != null )
    {
      hasSetColor = true;
      if( this.color == null )
      {
        this.color = new Vector3D();
      }
      this.color.set( color );
     
      if( color.getX() > 1 )
        color.setX( 1 );
View Full Code Here

  public void setColor( float red, float green, float blue )
  {
    hasSetColor = true;
    if( this.color == null )
    {
      this.color = new Vector3D();
    }
    color.setX( red );
    color.setY( green );
    color.setZ( blue );
  }
View Full Code Here

    int maxX = (int)Math.round( OVERVIEW_SIZE * pb.getMaxX() );
    int minY = (int)Math.round( OVERVIEW_SIZE * pb.getMinY() );
    int maxY = (int)Math.round( OVERVIEW_SIZE * pb.getMaxY() );
   
    g2d.setStroke( new BasicStroke( 2 ) );
    Vector3D color = GraphFunctions.convertColor( "#4a75b5" );
    g2d.setColor( new Color( color.getX(), color.getY(), color.getZ() ) );
    g2d.drawRect( minX, minY, maxX - minX - 1, maxY - minY - 1 );
   
    g2d.drawLine( maxX-10, maxY-1, maxX-1, maxY-10 );
    g2d.drawLine( maxX-6, maxY-1, maxX-1, maxY-6 );
   
View Full Code Here

TOP

Related Classes of net.wigis.graph.dnv.utilities.Vector3D

Copyright © 2018 www.massapicom. 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.