Package net.wigis.graph.dnv.utilities

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


            if( nodes != null && nodes.size() > 0 )
            {
              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 ) );
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() ) );
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.