Package org.robwork.sdurw_geometry
Class QuadraticSurfacePtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.QuadraticSurfacePtr
-
public class QuadraticSurfacePtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description QuadraticSurfacePtr()Default constructor yielding a NULL-pointer.QuadraticSurfacePtr(long cPtr, boolean cMemoryOwn)QuadraticSurfacePtr(QuadraticSurface ptr)Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description QuadraticSurface__ref__()Dereferencing operator.SWIGTYPE_p_Eigen__Vector3da()Get the 3d vector for the first order term in the implicit formulation.SWIGTYPE_p_Eigen__Matrix3dA()Get the 3 x 3 symmetric matrix for the second order term in the implicit formulation.voidaddTrimmingCondition(ImplicitSurfaceCPtr condition)Add a trimming condition to this surface.doublecall(Vector3D in)QuadraticSurfacePtrclone()QuadraticSurfaceCPtrcptr()voiddelete()QuadraticSurfacederef()The pointer stored in the object.doubledeterminantA()Get the determinant of the \mathbf{A} matrix.SWIGTYPE_p_std__pairT_rw__geometry__QuadraticSurface_rw__math__Rotation3DT_t_tdiagonalize()Get a diagonalization of the surface.booleandiagonalized()Check if this surface is diagonalized.booleanequals(QuadraticSurface p)pair_d_dextremums(Vector3D direction)static longgetCPtr(QuadraticSurfacePtr obj)QuadraticSurfacegetDeref()Member access operator.TriMeshPtrgetTriMesh()TriMeshPtrgetTriMesh(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t border)SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__geometry__ImplicitSurface_const_t_tgetTrimmingConditions()Get the trimming conditions for the surface.Vector3Dgradient(Vector3D x)booleaninsideTrimmingRegion(Vector3D P)booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipQuadraticSurfacePtrmakeCircularCone(double a, double b)QuadraticSurfacePtrmakeCircularCylinder(double radius)QuadraticSurfacePtrmakeCircularCylinder(double radius, boolean outward)QuadraticSurfacePtrmakeCircularHyperboloidOneSheet(double a, double b)QuadraticSurfacePtrmakeCircularHyperboloidTwoSheets(double a, double b)QuadraticSurfacePtrmakeCircularParaboloid(double a)QuadraticSurfacePtrmakeEllipsoid(double a, double b, double c)QuadraticSurfacePtrmakeEllipticCone(double a, double b, double c)QuadraticSurfacePtrmakeEllipticCylinder(double a, double b)QuadraticSurfacePtrmakeEllipticHyperboloidOneSheet(double a, double b, double c)QuadraticSurfacePtrmakeEllipticHyperboloidTwoSheets(double a, double b, double c)QuadraticSurfacePtrmakeEllipticParaboloid(double a, double b)QuadraticSurfacePtrmakeHyperbolicCylinder(double a, double b)QuadraticSurfacePtrmakeHyperbolicParaboloid(double a, double b)QuadraticSurfacePtrmakeParabolicCylinder(double a)QuadraticSurfacePtrmakePlane(Vector3D n, double d)Represent a plane as a QuadraticSurface.
A plane is a particularly simple type of quadratic surface, where
\mathbf{A}=\mathbf{0} .
Even though a plane is not strictly a quadratic surface, is is often convenient to be
able to treat it like a quadratic surface.
QuadraticSurfacePtrmakeSphere(double radius)QuadraticSurfacePtrmakeSpheroid(double a, double b)Vector3Dnormal(Vector3D x)QuadraticSurfacePtrnormalize()Normalize the implicit expression such that the largest coefficient becomes one.
For a quadratic surface, a scaling of \mathbf{A}, \mathbf{a} and u with a common
factor, will give the exact same surface.voidreuseTrimmingRegions(ImplicitSurfacePtr surface)QuadraticSurfacePtrscale(double factor)voidsetDiscretizationResolution(double resolution)voidsetTrimmingConditions(SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__geometry__ImplicitSurface_const_t_t conditions)Set the trimming conditions of this surface.booleanSurfaceEqual(Surface surface, double threshold)QuadraticSurfacePtrtransform(Transform3D T)rw::math::Transform3D<double>&) constQuadraticSurfacePtrtransform(Vector3D P)rw::math::Vector3D<double>&) constdoubleu()Get the scalar for the zero order term in the implicit formulation.
-
-
-
Constructor Detail
-
QuadraticSurfacePtr
public QuadraticSurfacePtr(long cPtr, boolean cMemoryOwn)
-
QuadraticSurfacePtr
public QuadraticSurfacePtr()
Default constructor yielding a NULL-pointer.
-
QuadraticSurfacePtr
public QuadraticSurfacePtr(QuadraticSurface ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(QuadraticSurfacePtr obj)
-
delete
public void delete()
-
deref
public QuadraticSurface deref()
The pointer stored in the object.
-
__ref__
public QuadraticSurface __ref__()
Dereferencing operator.
-
getDeref
public QuadraticSurface getDeref()
Member access operator.
-
equals
public boolean equals(QuadraticSurface p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
cptr
public QuadraticSurfaceCPtr cptr()
-
transform
public QuadraticSurfacePtr transform(Transform3D T)
rw::math::Transform3D<double>&) const
-
transform
public QuadraticSurfacePtr transform(Vector3D P)
rw::math::Vector3D<double>&) const
-
scale
public QuadraticSurfacePtr scale(double factor)
-
clone
public QuadraticSurfacePtr clone()
-
getTriMesh
public TriMeshPtr getTriMesh(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t border)
-
getTriMesh
public TriMeshPtr getTriMesh()
-
setDiscretizationResolution
public void setDiscretizationResolution(double resolution)
-
SurfaceEqual
public boolean SurfaceEqual(Surface surface, double threshold)
-
call
public double call(Vector3D in)
-
insideTrimmingRegion
public boolean insideTrimmingRegion(Vector3D P)
-
reuseTrimmingRegions
public void reuseTrimmingRegions(ImplicitSurfacePtr surface)
-
A
public SWIGTYPE_p_Eigen__Matrix3d A()
Get the 3 x 3 symmetric matrix for the second order term in the implicit formulation.
-
a
public SWIGTYPE_p_Eigen__Vector3d a()
Get the 3d vector for the first order term in the implicit formulation.
-
u
public double u()
Get the scalar for the zero order term in the implicit formulation.
-
determinantA
public double determinantA()
Get the determinant of the \mathbf{A} matrix.- Returns:
- the determinant.
-
normalize
public QuadraticSurfacePtr normalize()
Normalize the implicit expression such that the largest coefficient becomes one.
For a quadratic surface, a scaling of \mathbf{A}, \mathbf{a} and u with a common
factor, will give the exact same surface. This means that the numerical values can get
arbitrarily big or small. This functions scales the expression such that the largest
element becomes 1.
- Returns:
- a mathematically identical surface, where the coefficients of the defining
equation is normalized.
-
getTrimmingConditions
public SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__geometry__ImplicitSurface_const_t_t getTrimmingConditions()
Get the trimming conditions for the surface.- Returns:
- ImplicitSurface vector specifying the boundary of the surface. If surface is
unbounded, the length of the vector is zero.
-
setTrimmingConditions
public void setTrimmingConditions(SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__geometry__ImplicitSurface_const_t_t conditions)
Set the trimming conditions of this surface.- Parameters:
conditions- [in] a vector of conditions.
-
addTrimmingCondition
public void addTrimmingCondition(ImplicitSurfaceCPtr condition)
Add a trimming condition to this surface.- Parameters:
condition- [in] the condition to add.
-
diagonalize
public SWIGTYPE_p_std__pairT_rw__geometry__QuadraticSurface_rw__math__Rotation3DT_t_t diagonalize()
Get a diagonalization of the surface.- Returns:
- the diagonalized surface, and the rotation transforming this surface into the
diagonalized surface.
-
diagonalized
public boolean diagonalized()
Check if this surface is diagonalized.- Returns:
- true if A is digaonalized, false otherwise.
-
makeEllipsoid
public QuadraticSurfacePtr makeEllipsoid(double a, double b, double c)
-
makeSpheroid
public QuadraticSurfacePtr makeSpheroid(double a, double b)
-
makeSphere
public QuadraticSurfacePtr makeSphere(double radius)
-
makeEllipticParaboloid
public QuadraticSurfacePtr makeEllipticParaboloid(double a, double b)
-
makeCircularParaboloid
public QuadraticSurfacePtr makeCircularParaboloid(double a)
-
makeHyperbolicParaboloid
public QuadraticSurfacePtr makeHyperbolicParaboloid(double a, double b)
-
makeEllipticHyperboloidOneSheet
public QuadraticSurfacePtr makeEllipticHyperboloidOneSheet(double a, double b, double c)
-
makeCircularHyperboloidOneSheet
public QuadraticSurfacePtr makeCircularHyperboloidOneSheet(double a, double b)
-
makeEllipticHyperboloidTwoSheets
public QuadraticSurfacePtr makeEllipticHyperboloidTwoSheets(double a, double b, double c)
-
makeCircularHyperboloidTwoSheets
public QuadraticSurfacePtr makeCircularHyperboloidTwoSheets(double a, double b)
-
makeEllipticCone
public QuadraticSurfacePtr makeEllipticCone(double a, double b, double c)
-
makeCircularCone
public QuadraticSurfacePtr makeCircularCone(double a, double b)
-
makeEllipticCylinder
public QuadraticSurfacePtr makeEllipticCylinder(double a, double b)
-
makeCircularCylinder
public QuadraticSurfacePtr makeCircularCylinder(double radius, boolean outward)
-
makeCircularCylinder
public QuadraticSurfacePtr makeCircularCylinder(double radius)
-
makeHyperbolicCylinder
public QuadraticSurfacePtr makeHyperbolicCylinder(double a, double b)
-
makeParabolicCylinder
public QuadraticSurfacePtr makeParabolicCylinder(double a)
-
makePlane
public QuadraticSurfacePtr makePlane(Vector3D n, double d)
Represent a plane as a QuadraticSurface.
A plane is a particularly simple type of quadratic surface, where
\mathbf{A}=\mathbf{0} .
Even though a plane is not strictly a quadratic surface, is is often convenient to be
able to treat it like a quadratic surface.
- Parameters:
n- [in] the normal of the plane.d- [in] the distance from the plane to the origo.- Returns:
- a QuadraticSurface representing a plane.
-
-