Package net.wigis.graph.dnv.utilities

Examples of net.wigis.graph.dnv.utilities.Vector3D.dotProduct()


            {
              anyNodes = true;
              Vector3D color = new Vector3D( LIGHT_GREEN );
              Vector3D difference = new Vector3D( LIGHT_RED );
              difference.subtract( color );
              difference.dotProduct( (float)( distance - 1 ) / (float)maxDistance );
              color.add( difference );
              Vector3D outlineColor = new Vector3D( color );
              outlineColor.setX( (float)Math.max( 0, outlineColor.getX() - 0.3 ) );
              outlineColor.setY( (float)Math.max( 0, outlineColor.getY() - 0.3 ) );
              outlineColor.setZ( (float)Math.max( 0, outlineColor.getZ() - 0.3 ) );
View Full Code Here


          }
          else
          {
            color = new Vector3D( node.getColor() );
            color.add( fillColor );
            color.dotProduct( 0.5f );
          }
          node.setColor( color );
        }
      }
View Full Code Here

      Vector3D color = new Vector3D( LIGHT_GREEN );
      if( tempNode.hasProperty( "numDocuments" ) )
      {
        Vector3D difference = new Vector3D( LIGHT_RED );
        difference.subtract( color );
        difference.dotProduct( (float)(Integer.parseInt( tempNode.getProperty( "numDocuments" ) ) )/(float)maxNumDocuments );
        color.add( difference );
        color.setX( (float)Math.max( 0, color.getX() ) );
        color.setY( (float)Math.max( 0, color.getY() ) );
        color.setZ( (float)Math.max( 0, color.getZ() ) );
        color.setX( (float)Math.min( 1, color.getX() ) );
View Full Code Here

          position.add( childNode.getPosition() );
          color.add( childNode.getColor() );
          childNode.setParentNode( newNode );
        }
        position.dotProduct( 1.0f / (float)tempList.size() );
        color.dotProduct( 1.0f / (float)tempList.size() );
        if( tempList.size() == 1 )
        {
          newNode.setLabel( tempList.get( 0 ).getLabel() );
          newNode.setIcon( tempList.get( 0 ).getIcon() );
          newNode.setLabelColor( tempList.get( 0 ).getLabelColor() );
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.