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