]> gerrit.simantics Code Review - simantics/3d.git/blob - org.jcae.opencascade/src-java/org/jcae/opencascade/jni/GeomLProp_SLProps.java
Include old 64-bit versions of org.jcae.opencascade and vtk bundles
[simantics/3d.git] / org.jcae.opencascade / src-java / org / jcae / opencascade / jni / GeomLProp_SLProps.java
1 /* ----------------------------------------------------------------------------\r
2  * This file was automatically generated by SWIG (http://www.swig.org).\r
3  * Version 2.0.4\r
4  *\r
5  * Do not make changes to this file unless you know what you are doing--modify\r
6  * the SWIG interface file instead.\r
7  * ----------------------------------------------------------------------------- */\r
8 \r
9 package org.jcae.opencascade.jni;\r
10 \r
11 public class GeomLProp_SLProps {\r
12   private long swigCPtr;\r
13   protected boolean swigCMemOwn;\r
14 \r
15   public GeomLProp_SLProps(long cPtr, boolean cMemoryOwn) {\r
16     swigCMemOwn = cMemoryOwn;\r
17     swigCPtr = cPtr;\r
18   }\r
19 \r
20   public static long getCPtr(GeomLProp_SLProps obj) {\r
21     return (obj == null) ? 0 : obj.swigCPtr;\r
22   }\r
23 \r
24   protected void finalize() {\r
25     delete();\r
26   }\r
27 \r
28   public synchronized void delete() {\r
29     if (swigCPtr != 0) {\r
30       if (swigCMemOwn) {\r
31         swigCMemOwn = false;\r
32         OccJavaJNI.delete_GeomLProp_SLProps(swigCPtr);\r
33       }\r
34       swigCPtr = 0;\r
35     }\r
36   }\r
37 \r
38         /**\r
39          * @deprecated Typo mistake in the previous version\r
40          */\r
41         public void setParameter(double u, double v)\r
42         {\r
43                 setParameters(u, v);\r
44         }\r
45         \r
46         public double[] normal()\r
47         {\r
48                 double[] toReturn=new double[3];\r
49                 normal(toReturn);\r
50                 return toReturn;\r
51         }\r
52         \r
53         /**Return the normal on the uv nodes.<br>\r
54          *Invalid ones are set to zero.\r
55          */\r
56         public double[] normalArray(double[] uvNodes)\r
57         {\r
58                 if(uvNodes==null)\r
59                         throw new NullPointerException();\r
60                 \r
61                 if(uvNodes.length%2!=0)\r
62                         throw new IllegalArgumentException("uvNodes array length must be peer");\r
63                         \r
64                 int numNodes=uvNodes.length/2;\r
65                 double[] toReturn=new double[numNodes*3];\r
66                 normalArray(uvNodes,toReturn,numNodes);\r
67                 \r
68                 return toReturn;\r
69         }\r
70         \r
71         public double[] curvatureDirections()\r
72         {\r
73                 double[] toReturn=new double[6];\r
74                 if(isCurvatureDefined())\r
75                 {\r
76                         double[] max=new double[3];\r
77                         double[] min=new double[3];\r
78                         curvatureDirection(max, min);\r
79                         System.arraycopy(max, 0, toReturn, 0, 3);\r
80                         System.arraycopy(min, 0, toReturn, 3, 3);\r
81                 }\r
82                 return toReturn;\r
83         }\r
84 \r
85   \r
86         /**\r
87          * The current point and the derivatives are computed at the same time,\r
88          * which allows an optimization of the computation time.\r
89          * @param degree The maximum number of derivations to be done (0, 1, or 2).\r
90          * For example, to compute only the tangent, N should be equal to 1.\r
91          * @param resolution The linear tolerance (it is used to test if a vector is null).\r
92          */\r
93         public GeomLProp_SLProps(int degree, double resolution) {\r
94     this(OccJavaJNI.new_GeomLProp_SLProps(degree, resolution), true);\r
95   }\r
96 \r
97   public void setParameters(double u, double v) {\r
98     OccJavaJNI.GeomLProp_SLProps_setParameters(swigCPtr, this, u, v);\r
99   }\r
100 \r
101   public double[] value() {\r
102         return OccJavaJNI.GeomLProp_SLProps_value(swigCPtr, this);\r
103 }\r
104 \r
105   public double[] d1U() {\r
106         return OccJavaJNI.GeomLProp_SLProps_d1U(swigCPtr, this);\r
107 }\r
108 \r
109   public double[] d1V() {\r
110         return OccJavaJNI.GeomLProp_SLProps_d1V(swigCPtr, this);\r
111 }\r
112 \r
113   public double[] d2U() {\r
114         return OccJavaJNI.GeomLProp_SLProps_d2U(swigCPtr, this);\r
115 }\r
116 \r
117   public double[] d2V() {\r
118         return OccJavaJNI.GeomLProp_SLProps_d2V(swigCPtr, this);\r
119 }\r
120 \r
121   public double[] dUV() {\r
122         return OccJavaJNI.GeomLProp_SLProps_dUV(swigCPtr, this);\r
123 }\r
124 \r
125   public boolean isTangentUDefined() {\r
126         return OccJavaJNI.GeomLProp_SLProps_isTangentUDefined(swigCPtr, this);\r
127 }\r
128 \r
129   public void tangentU(double[] D) {\r
130     OccJavaJNI.GeomLProp_SLProps_tangentU(swigCPtr, this, D);\r
131   }\r
132 \r
133   public boolean isTangentVDefined() {\r
134         return OccJavaJNI.GeomLProp_SLProps_isTangentVDefined(swigCPtr, this);\r
135 }\r
136 \r
137   public void tangentV(double[] D) {\r
138     OccJavaJNI.GeomLProp_SLProps_tangentV(swigCPtr, this, D);\r
139   }\r
140 \r
141   public boolean isNormalDefined() {\r
142         return OccJavaJNI.GeomLProp_SLProps_isNormalDefined(swigCPtr, this);\r
143 }\r
144 \r
145   public boolean isCurvatureDefined() {\r
146         return OccJavaJNI.GeomLProp_SLProps_isCurvatureDefined(swigCPtr, this);\r
147 }\r
148 \r
149   public boolean isUmbilic() {\r
150         return OccJavaJNI.GeomLProp_SLProps_isUmbilic(swigCPtr, this);\r
151 }\r
152 \r
153   public double meanCurvature() {\r
154     return OccJavaJNI.GeomLProp_SLProps_meanCurvature(swigCPtr, this);\r
155   }\r
156 \r
157   public double gaussianCurvature() {\r
158     return OccJavaJNI.GeomLProp_SLProps_gaussianCurvature(swigCPtr, this);\r
159   }\r
160 \r
161   public void setSurface(Geom_Surface S) {\r
162     OccJavaJNI.GeomLProp_SLProps_setSurface(swigCPtr, this, Geom_Surface.getCPtr(S), S);\r
163   }\r
164 \r
165   public void normal(double[] normal) {\r
166     OccJavaJNI.GeomLProp_SLProps_normal(swigCPtr, this, normal);\r
167   }\r
168 \r
169   private void normalArray(double[] uvNodes, double[] normalArray, int numNodes) {\r
170     OccJavaJNI.GeomLProp_SLProps_normalArray(swigCPtr, this, uvNodes, normalArray, numNodes);\r
171   }\r
172 \r
173   public double minCurvature() {\r
174     return OccJavaJNI.GeomLProp_SLProps_minCurvature(swigCPtr, this);\r
175   }\r
176 \r
177   public double maxCurvature() {\r
178     return OccJavaJNI.GeomLProp_SLProps_maxCurvature(swigCPtr, this);\r
179   }\r
180 \r
181   public void curvatureDirection(double[] jmax, double[] jmin) {\r
182     OccJavaJNI.GeomLProp_SLProps_curvatureDirection(swigCPtr, this, jmax, jmin);\r
183   }\r
184 \r
185 }\r