Package org.robwork.sdurw_geometry
Class QuadraticSurfacePtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.QuadraticSurfacePtr
-
public class QuadraticSurfacePtr extends java.lang.Object
Ptr 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__Vector3d
a()
Get the 3d vector for the first order term in the implicit formulation.SWIGTYPE_p_Eigen__Matrix3d
A()
Get the 3 x 3 symmetric matrix for the second order term in the implicit formulation.void
addTrimmingCondition(ImplicitSurfaceCPtr condition)
Add a trimming condition to this surface.double
call(Vector3D in)
QuadraticSurfacePtr
clone()
QuadraticSurfaceCPtr
cptr()
void
delete()
QuadraticSurface
deref()
The pointer stored in the object.double
determinantA()
Get the determinant of the \mathbf{A} matrix.SWIGTYPE_p_std__pairT_rw__geometry__QuadraticSurface_rw__math__Rotation3DT_t_t
diagonalize()
Get a diagonalization of the surface.boolean
diagonalized()
Check if this surface is diagonalized.boolean
equals(QuadraticSurface p)
pair_d_d
extremums(Vector3D direction)
static long
getCPtr(QuadraticSurfacePtr obj)
QuadraticSurface
getDeref()
Member access operator.TriMeshPtr
getTriMesh()
TriMeshPtr
getTriMesh(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t border)
SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__geometry__ImplicitSurface_const_t_t
getTrimmingConditions()
Get the trimming conditions for the surface.Vector3D
gradient(Vector3D x)
boolean
insideTrimmingRegion(Vector3D P)
boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipQuadraticSurfacePtr
makeCircularCone(double a, double b)
QuadraticSurfacePtr
makeCircularCylinder(double radius)
QuadraticSurfacePtr
makeCircularCylinder(double radius, boolean outward)
QuadraticSurfacePtr
makeCircularHyperboloidOneSheet(double a, double b)
QuadraticSurfacePtr
makeCircularHyperboloidTwoSheets(double a, double b)
QuadraticSurfacePtr
makeCircularParaboloid(double a)
QuadraticSurfacePtr
makeEllipsoid(double a, double b, double c)
QuadraticSurfacePtr
makeEllipticCone(double a, double b, double c)
QuadraticSurfacePtr
makeEllipticCylinder(double a, double b)
QuadraticSurfacePtr
makeEllipticHyperboloidOneSheet(double a, double b, double c)
QuadraticSurfacePtr
makeEllipticHyperboloidTwoSheets(double a, double b, double c)
QuadraticSurfacePtr
makeEllipticParaboloid(double a, double b)
QuadraticSurfacePtr
makeHyperbolicCylinder(double a, double b)
QuadraticSurfacePtr
makeHyperbolicParaboloid(double a, double b)
QuadraticSurfacePtr
makeParabolicCylinder(double a)
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.
QuadraticSurfacePtr
makeSphere(double radius)
QuadraticSurfacePtr
makeSpheroid(double a, double b)
Vector3D
normal(Vector3D x)
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.void
reuseTrimmingRegions(ImplicitSurfacePtr surface)
QuadraticSurfacePtr
scale(double factor)
void
setDiscretizationResolution(double resolution)
void
setTrimmingConditions(SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__geometry__ImplicitSurface_const_t_t conditions)
Set the trimming conditions of this surface.boolean
SurfaceEqual(Surface surface, double threshold)
QuadraticSurfacePtr
transform(Transform3D T)
rw::math::Transform3D<double>&) constQuadraticSurfacePtr
transform(Vector3D P)
rw::math::Vector3D<double>&) constdouble
u()
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.
-
-