/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package org.jcae.opencascade.jni; public class GeomLProp_SLProps { private transient long swigCPtr; protected transient boolean swigCMemOwn; protected GeomLProp_SLProps(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(GeomLProp_SLProps obj) { return (obj == null) ? 0 : obj.swigCPtr; } protected void finalize() { delete(); } public synchronized void delete() { if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; OccJavaJNI.delete_GeomLProp_SLProps(swigCPtr); } swigCPtr = 0; } } /** * @deprecated Typo mistake in the previous version */ public void setParameter(double u, double v) { setParameters(u, v); } public double[] normal() { double[] toReturn=new double[3]; normal(toReturn); return toReturn; } /**Return the normal on the uv nodes.
*Invalid ones are set to zero. */ public double[] normalArray(double[] uvNodes) { if(uvNodes==null) throw new NullPointerException(); if(uvNodes.length%2!=0) throw new IllegalArgumentException("uvNodes array length must be peer"); int numNodes=uvNodes.length/2; double[] toReturn=new double[numNodes*3]; normalArray(uvNodes,toReturn,numNodes); return toReturn; } public double[] curvatureDirections() { double[] toReturn=new double[6]; if(isCurvatureDefined()) { double[] max=new double[3]; double[] min=new double[3]; curvatureDirection(max, min); System.arraycopy(max, 0, toReturn, 0, 3); System.arraycopy(min, 0, toReturn, 3, 3); } return toReturn; } /** * The current point and the derivatives are computed at the same time, * which allows an optimization of the computation time. * @param degree The maximum number of derivations to be done (0, 1, or 2). * For example, to compute only the tangent, N should be equal to 1. * @param resolution The linear tolerance (it is used to test if a vector is null). */ public GeomLProp_SLProps(int degree, double resolution) { this(OccJavaJNI.new_GeomLProp_SLProps(degree, resolution), true); } public void setParameters(double u, double v) { OccJavaJNI.GeomLProp_SLProps_setParameters(swigCPtr, this, u, v); } public double[] value() { return OccJavaJNI.GeomLProp_SLProps_value(swigCPtr, this); } public double[] d1U() { return OccJavaJNI.GeomLProp_SLProps_d1U(swigCPtr, this); } public double[] d1V() { return OccJavaJNI.GeomLProp_SLProps_d1V(swigCPtr, this); } public double[] d2U() { return OccJavaJNI.GeomLProp_SLProps_d2U(swigCPtr, this); } public double[] d2V() { return OccJavaJNI.GeomLProp_SLProps_d2V(swigCPtr, this); } public double[] dUV() { return OccJavaJNI.GeomLProp_SLProps_dUV(swigCPtr, this); } public boolean isTangentUDefined() { return OccJavaJNI.GeomLProp_SLProps_isTangentUDefined(swigCPtr, this); } public void tangentU(double[] D) { OccJavaJNI.GeomLProp_SLProps_tangentU(swigCPtr, this, D); } public boolean isTangentVDefined() { return OccJavaJNI.GeomLProp_SLProps_isTangentVDefined(swigCPtr, this); } public void tangentV(double[] D) { OccJavaJNI.GeomLProp_SLProps_tangentV(swigCPtr, this, D); } public boolean isNormalDefined() { return OccJavaJNI.GeomLProp_SLProps_isNormalDefined(swigCPtr, this); } public boolean isCurvatureDefined() { return OccJavaJNI.GeomLProp_SLProps_isCurvatureDefined(swigCPtr, this); } public boolean isUmbilic() { return OccJavaJNI.GeomLProp_SLProps_isUmbilic(swigCPtr, this); } public double meanCurvature() { return OccJavaJNI.GeomLProp_SLProps_meanCurvature(swigCPtr, this); } public double gaussianCurvature() { return OccJavaJNI.GeomLProp_SLProps_gaussianCurvature(swigCPtr, this); } public void setSurface(Geom_Surface S) { OccJavaJNI.GeomLProp_SLProps_setSurface(swigCPtr, this, Geom_Surface.getCPtr(S), S); } public void normal(double[] normal) { OccJavaJNI.GeomLProp_SLProps_normal(swigCPtr, this, normal); } private void normalArray(double[] uvNodes, double[] normalArray, int numNodes) { OccJavaJNI.GeomLProp_SLProps_normalArray(swigCPtr, this, uvNodes, normalArray, numNodes); } public double minCurvature() { return OccJavaJNI.GeomLProp_SLProps_minCurvature(swigCPtr, this); } public double maxCurvature() { return OccJavaJNI.GeomLProp_SLProps_maxCurvature(swigCPtr, this); } public void curvatureDirection(double[] jmax, double[] jmin) { OccJavaJNI.GeomLProp_SLProps_curvatureDirection(swigCPtr, this, jmax, jmin); } }