/** * modifie la boite englobante. */ public void setBoite(final GrPoint _o, final GrPoint _e) { bbox_ = new BoundingBox(); bbox_.setLower(new Point3d(_o.x_, _o.y_, _o.z_)); bbox_.setUpper(new Point3d(_e.x_, _e.y_, _e.z_)); }
protected void calculeBBox(final GeometryArray _geometrie) { if (_geometrie == null) { return; } if (bbox_ == null) { bbox_ = new BoundingBox(); } final int compte = _geometrie.getVertexCount(); final Point3d pts = new Point3d(); for (int i = 0; i < compte; i++) { _geometrie.getCoordinate(i, pts); bbox_.combine(pts); } }
bbox_=new BoundingBox(); bbox_.combine(_points); final Point3d low = new Point3d(); final Point3d up = new Point3d(); bbox_.getLower(low); bbox_.getUpper(up); npoints_ = _points.length; final PointArray pointarray = new PointArray(npoints_, GeometryArray.COORDINATES | GeometryArray.COLOR_3);
/** * recupere la boite englobante. */ public GrBoite getBoite() { final Point3d point = new Point3d(); final Transform3D t3d = new Transform3D(); tg_.getTransform(t3d); final Vector3d echelle = new Vector3d(); t3d.getScale(echelle); bbox_.getLower(point); final GrPoint o = new GrPoint(point.x * echelle.x, point.y * echelle.y, point.z * echelle.z); bbox_.getUpper(point); final GrPoint e = new GrPoint(point.x * echelle.x, point.y * echelle.y, point.z * echelle.z); final GrBoite boite = new GrBoite(); boite.ajuste(e); boite.ajuste(o); return boite; }
/** * calcule la boitze englobante partir de la geometrie de l'objet. */ public void calculeBBox() { bbox_ = new BoundingBox(); final GeometryArray geometrie = (GeometryArray) shape_.getGeometry(); calculeBBox(geometrie); }
/** * applique une transformation a l'objet. */ public void autoApplique(final GrMorphisme _t) { // boite_.autoApplique(_t); GrMorphisme matrice = GrMorphisme.identite(); matrice.initFrom(getMatrice()); matrice = matrice.composition(_t); final double[] m = new double[16]; final double[] mb = new double[16]; for (int j = 0; j < 4; j++) { for (int i = 0; i < 4; i++) { m[(j * 4) + i] = matrice.a_[i][j]; mb[(j * 4) + i] = _t.a_[i][j]; } } final Transform3D t = new Transform3D(m); final Transform3D tb = new Transform3D(mb); tg_.setTransform(t); bbox_.transform(tb); }
private void boite() { bbox_ = new BoundingBox(); final List lines = new ArrayList(30); final double minZ = boite_.getMinZ(); final Point3d[] toArray = (Point3d[]) lines.toArray(new Point3d[lines.size()]); for (int i = 0; i < toArray.length; i++) { bbox_.combine(toArray[i]); final Point3d low = new Point3d(); final Point3d up = new Point3d(); bbox_.getLower(low); bbox_.getUpper(up); boiteEnglobante_ = new com.sun.j3d.utils.geometry.Box((float) (up.x - low.x) / 2, (float) (up.y - low.y) / 2, (float) (up.z - low.z) / 2, ap);
bbox_ = new BoundingBox(); lignes[6 * i + 5] = lignesTempo[4]; for (int k = 0; k < 6; k++) { bbox_.combine(lignesTempo[k]); bbox_.getLower(low); bbox_.getUpper(up); final int nvecteurs = _points.length; final IndexedLineArray linearray = new IndexedLineArray(6 * nvecteurs, GeometryArray.COORDINATES | GeometryArray.COLOR_4,
bbox_=new BoundingBox(); bbox_.combine(_noeuds); final Point3f[] texpoints= new Point3f[_nbNds]; for (int i= 0; i < _nbNds; i++) {
public void setGeometrie(final int _nbNoeuds, final Point3d[] _noeuds, final int _nbIndices, final int[] _indices) { bbox_ = new BoundingBox(); bbox_.combine(_noeuds);
bbox_ = new BoundingBox(); bbox_.combine(points); final Vector3d[] normales = new Vector3d[_nbpointx * _nbpointy]; final Vector3d[] vecteurs = new Vector3d[8];