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