2 * Project Info: http://jcae.sourceforge.net
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 2.1 of the License, or (at your option)
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18 * (C) Copyright 2005, by EADS CRC
21 %{#include <Poly_Triangulation.hxx>%}
23 %typemap(jni) Poly_Array1OfTriangle& "jintArray"
24 %typemap(jtype) Poly_Array1OfTriangle& "int[]"
25 %typemap(jstype) Poly_Array1OfTriangle& "int[]"
26 %typemap(javaout) Poly_Array1OfTriangle&
31 %typemap(out) const Poly_Array1OfTriangle&
34 const Poly_Array1OfTriangle &Triangles = *$1;
35 s=Triangles.Length()*3;
36 jint * iarray=new jint[s];
37 Standard_Integer n1,n2,n3;
39 for(j=0,i=Triangles.Lower();i<=Triangles.Upper();j+=3,i++)
41 Triangles(i).Get(n1,n2,n3);
47 jintArray array=JCALL1(NewIntArray, jenv, s);
48 JCALL4(SetIntArrayRegion, jenv, array, 0, s, iarray);
53 class Poly_Triangulation
55 %rename(deflection) Deflection;
56 %rename(removeUVNodes) RemoveUVNodes;
57 %rename(nbNodes) NbNodes;
58 %rename(hasUVNodes) HasUVNodes;
59 %rename(nbTriangles) NbTriangles;
60 %rename(triangles) Triangles;
62 %rename(uvNodes) UVNodes;
65 Poly_Triangulation(const Standard_Integer nbNodes,
66 const Standard_Integer nbTriangles,const Standard_Boolean UVNodes);
67 Standard_Real Deflection() const;
68 void Deflection(const Standard_Real D) ;
69 void RemoveUVNodes() ;
70 Standard_Integer NbNodes() const;
71 Standard_Integer NbTriangles() const;
72 Standard_Boolean HasUVNodes() const;
73 const Poly_Array1OfTriangle& Triangles() const;
74 const TColgp_Array1OfPnt& Nodes() const;
75 const TColgp_Array1OfPnt2d& UVNodes() const;