1 /* ----------------------------------------------------------------------------
\r
2 * This file was automatically generated by SWIG (http://www.swig.org).
\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
9 package org.jcae.opencascade.jni;
\r
11 public class GeomLProp_SLProps {
\r
12 private long swigCPtr;
\r
13 protected boolean swigCMemOwn;
\r
15 public GeomLProp_SLProps(long cPtr, boolean cMemoryOwn) {
\r
16 swigCMemOwn = cMemoryOwn;
\r
20 public static long getCPtr(GeomLProp_SLProps obj) {
\r
21 return (obj == null) ? 0 : obj.swigCPtr;
\r
24 protected void finalize() {
\r
28 public synchronized void delete() {
\r
29 if (swigCPtr != 0) {
\r
31 swigCMemOwn = false;
\r
32 OccJavaJNI.delete_GeomLProp_SLProps(swigCPtr);
\r
39 * @deprecated Typo mistake in the previous version
\r
41 public void setParameter(double u, double v)
\r
43 setParameters(u, v);
\r
46 public double[] normal()
\r
48 double[] toReturn=new double[3];
\r
53 /**Return the normal on the uv nodes.<br>
\r
54 *Invalid ones are set to zero.
\r
56 public double[] normalArray(double[] uvNodes)
\r
59 throw new NullPointerException();
\r
61 if(uvNodes.length%2!=0)
\r
62 throw new IllegalArgumentException("uvNodes array length must be peer");
\r
64 int numNodes=uvNodes.length/2;
\r
65 double[] toReturn=new double[numNodes*3];
\r
66 normalArray(uvNodes,toReturn,numNodes);
\r
71 public double[] curvatureDirections()
\r
73 double[] toReturn=new double[6];
\r
74 if(isCurvatureDefined())
\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
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
93 public GeomLProp_SLProps(int degree, double resolution) {
\r
94 this(OccJavaJNI.new_GeomLProp_SLProps(degree, resolution), true);
\r
97 public void setParameters(double u, double v) {
\r
98 OccJavaJNI.GeomLProp_SLProps_setParameters(swigCPtr, this, u, v);
\r
101 public double[] value() {
\r
102 return OccJavaJNI.GeomLProp_SLProps_value(swigCPtr, this);
\r
105 public double[] d1U() {
\r
106 return OccJavaJNI.GeomLProp_SLProps_d1U(swigCPtr, this);
\r
109 public double[] d1V() {
\r
110 return OccJavaJNI.GeomLProp_SLProps_d1V(swigCPtr, this);
\r
113 public double[] d2U() {
\r
114 return OccJavaJNI.GeomLProp_SLProps_d2U(swigCPtr, this);
\r
117 public double[] d2V() {
\r
118 return OccJavaJNI.GeomLProp_SLProps_d2V(swigCPtr, this);
\r
121 public double[] dUV() {
\r
122 return OccJavaJNI.GeomLProp_SLProps_dUV(swigCPtr, this);
\r
125 public boolean isTangentUDefined() {
\r
126 return OccJavaJNI.GeomLProp_SLProps_isTangentUDefined(swigCPtr, this);
\r
129 public void tangentU(double[] D) {
\r
130 OccJavaJNI.GeomLProp_SLProps_tangentU(swigCPtr, this, D);
\r
133 public boolean isTangentVDefined() {
\r
134 return OccJavaJNI.GeomLProp_SLProps_isTangentVDefined(swigCPtr, this);
\r
137 public void tangentV(double[] D) {
\r
138 OccJavaJNI.GeomLProp_SLProps_tangentV(swigCPtr, this, D);
\r
141 public boolean isNormalDefined() {
\r
142 return OccJavaJNI.GeomLProp_SLProps_isNormalDefined(swigCPtr, this);
\r
145 public boolean isCurvatureDefined() {
\r
146 return OccJavaJNI.GeomLProp_SLProps_isCurvatureDefined(swigCPtr, this);
\r
149 public boolean isUmbilic() {
\r
150 return OccJavaJNI.GeomLProp_SLProps_isUmbilic(swigCPtr, this);
\r
153 public double meanCurvature() {
\r
154 return OccJavaJNI.GeomLProp_SLProps_meanCurvature(swigCPtr, this);
\r
157 public double gaussianCurvature() {
\r
158 return OccJavaJNI.GeomLProp_SLProps_gaussianCurvature(swigCPtr, this);
\r
161 public void setSurface(Geom_Surface S) {
\r
162 OccJavaJNI.GeomLProp_SLProps_setSurface(swigCPtr, this, Geom_Surface.getCPtr(S), S);
\r
165 public void normal(double[] normal) {
\r
166 OccJavaJNI.GeomLProp_SLProps_normal(swigCPtr, this, normal);
\r
169 private void normalArray(double[] uvNodes, double[] normalArray, int numNodes) {
\r
170 OccJavaJNI.GeomLProp_SLProps_normalArray(swigCPtr, this, uvNodes, normalArray, numNodes);
\r
173 public double minCurvature() {
\r
174 return OccJavaJNI.GeomLProp_SLProps_minCurvature(swigCPtr, this);
\r
177 public double maxCurvature() {
\r
178 return OccJavaJNI.GeomLProp_SLProps_maxCurvature(swigCPtr, this);
\r
181 public void curvatureDirection(double[] jmax, double[] jmin) {
\r
182 OccJavaJNI.GeomLProp_SLProps_curvatureDirection(swigCPtr, this, jmax, jmin);
\r