Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.Vector3.times()


      if (++segment > segments) {
        break;
      }

      pos = pos.plus(vel.times(dt));
      pos = pos.plus(RandomUtil.uniformInsideSphere(roughness, adapter).toCartesian());
    }

    return strand;
  }
View Full Code Here


      Vector3 n;
      if (normalIndices != null) {
        Vector3 na = normals.get(normalIndices[decomp[3 * tri]]);
        Vector3 nb = normals.get(normalIndices[decomp[3 * tri + 1]]);
        Vector3 nc = normals.get(normalIndices[decomp[3 * tri + 2]]);
        n = na.times(A).plus(nb.times(B)).plus(nc.times(C));
      } else {
        n = plane.normal();
      }

      Point3 pa = vertices.get(indices[decomp[3 * tri]]);
 
View Full Code Here

          na = nf.dot(na) < minVertexNormalDotProduct ? nf : na;
          nb = nf.dot(nb) < minVertexNormalDotProduct ? nf : nb;
          nc = nf.dot(nc) < minVertexNormalDotProduct ? nf : nc;
        }

        return na.times(A).plus(nb.times(B)).plus(nc.times(C)).unit();
      }

      return nf;
    }
View Full Code Here

    double  length = rel.length();

    if (length > 0.0)
    {
      rel = rel.times(major / length);
      return p.vectorFrom(Point3.ORIGIN.plus(rel));
    }
    else
      return Vector3.K;
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.