Examples of Point3d


Examples of javax.vecmath.Point3d

   * @param width    the width of the box
   */
  public TransformGroup getNormalizedTransformGroup(Node node, float [][] modelRotation, float width) {
    // Get model bounding box size
    BoundingBox modelBounds = getBounds(node);
    Point3d lower = new Point3d();
    modelBounds.getLower(lower);
    Point3d upper = new Point3d();
    modelBounds.getUpper(upper);
   
    // Translate model to its center
    Transform3D translation = new Transform3D();
    translation.setTranslation(
View Full Code Here

Examples of javax.vecmath.Point3d

                ((flags & PickInfo.CLOSEST_DISTANCE) == 0) &&
                ((flags & PickInfo.CLOSEST_GEOM_INFO) == 0) &&
                ((flags & PickInfo.ALL_GEOM_INFO) == 0)) {
            return geo.intersect(newPS, null, 0, null, null, 0);
        } else {
            Point3d closestIPnt = new Point3d();
            Point3d iPnt = new Point3d();
            Point3d iPntVW = new Point3d();

            if (geo.intersect(newPS, pickInfo, flags, iPnt, geo, 0)) {

                iPntVW.set(iPnt);
                localToVworld.transform(iPntVW);
                double distance = pickShape.distance(iPntVW);

                if ((flags & PickInfo.CLOSEST_DISTANCE) != 0) {
                    pickInfo.setClosestDistance(distance);
View Full Code Here

Examples of javax.vecmath.Point3d

      int[] gCodes = {glyphCode};
      GlyphVector gVec = font.createGlyphVector(frc, gCodes);
      Rectangle2D.Float bounds2d = (Rectangle2D.Float)
  (((GlyphMetrics)(gVec.getGlyphMetrics(0))).getBounds2D());

      Point3d lower = new Point3d(bounds2d.x, bounds2d.y, 0.0);
      Point3d upper;
      if (fontExtrusion != null) {
          upper = new Point3d(bounds2d.x + bounds2d.width,
              bounds2d.y + bounds2d.height,
              fontExtrusion.length);
      } else {
          upper = new Point3d(bounds2d.x + bounds2d.width,
              bounds2d.y + bounds2d.height,
              0.0);
      }
      bounds.setLower(lower);
      bounds.setUpper(upper);
View Full Code Here

Examples of javax.vecmath.Point3d

    }

    @Override
    boolean intersect(PickShape pickShape, PickInfo pickInfo, int flags, Point3d iPnt,
                      GeometryRetained geom, int geomIndex) {
  Point3d pnts[] = new Point3d[2];
  double sdist[] = new double[1];
  double minDist = Double.MAX_VALUE;
  double x = 0, y = 0, z = 0;
  int scount, j, i = 0;
  int count = 0;
        int[] vtxIndexArr = new int[2];

  pnts[0] = new Point3d();
  pnts[1] = new Point3d();

  switch (pickShape.getPickType()) {
  case PickShape.PICKRAY:
      PickRay pickRay= (PickRay) pickShape;
View Full Code Here

Examples of javax.vecmath.Point3d

  int scount;
  Point3d[] points = new Point3d[2];
  double dist[] = new double[1];
  Vector3d dir;

  points[0] = new Point3d();
  points[1] = new Point3d();

  switch (pnts.length) {
  case 3:
  case 4: // Triangle, Quad
     while (i < stripIndexCounts.length) {
View Full Code Here

Examples of javax.vecmath.Point3d

          GeometryRetained geom) {
  int i = 0;
  int j, count=0;
  Point3d[] pnts = new Point3d[2];
  int scount;
  pnts[0] = new Point3d();
  pnts[1] = new Point3d();

  while (i < stripIndexCounts.length) {
      getVertexData(indexCoord[count++], pnts[0]);
      thisToOtherVworld.transform(pnts[0]);
      scount = stripIndexCounts[i++];
View Full Code Here

Examples of javax.vecmath.Point3d

    boolean intersect(Bounds targetBound) {
  int i = 0;
  int j, count=0;
  Point3d[] pnts = new Point3d[2];
  int scount;
  pnts[0] = new Point3d();
  pnts[1] = new Point3d();

  switch(targetBound.getPickType()) {
  case PickShape.PICKBOUNDINGBOX:
      BoundingBox box = (BoundingBox) targetBound;
View Full Code Here

Examples of javax.vecmath.Point3d

    @Override
    boolean intersect(PickShape pickShape, PickInfo pickInfo, int flags, Point3d iPnt,
                      GeometryRetained geom, int geomIndex) {

  Point3d pnts[] = new Point3d[4];
  double sdist[] = new double[1];
  double minDist = Double.MAX_VALUE;
  double x = 0, y = 0, z = 0;
        int[] vtxIndexArr = new int[4];

  int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
     initialVertexIndex : initialCoordIndex);
  pnts[0] = new Point3d();
  pnts[1] = new Point3d();
  pnts[2] = new Point3d();
  pnts[3] = new Point3d();

  switch (pickShape.getPickType()) {
  case PickShape.PICKRAY:
      PickRay pickRay= (PickRay) pickShape;
View Full Code Here

Examples of javax.vecmath.Point3d

  Point3d[] points = new Point3d[4];
  double dist[] = new double[1];
  int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
     initialVertexIndex : initialCoordIndex);

  points[0] = new Point3d();
  points[1] = new Point3d();
  points[2] = new Point3d();
  points[3] = new Point3d();

  switch (pnts.length) {
  case 3: // Triangle
      while (i < validVertexCount) {
    getVertexData(i++, points[0]);
View Full Code Here

Examples of javax.vecmath.Point3d

  Point3d[] points = new Point3d[4];
  int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
     initialVertexIndex : initialCoordIndex);

  points[0] = new Point3d();
  points[1] = new Point3d();
  points[2] = new Point3d();
  points[3] = new Point3d();

  while (i < validVertexCount) {
      getVertexData(i++, points[0]);
      getVertexData(i++, points[1]);
      getVertexData(i++, points[2]);
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.