RobWorkProject
23.9.11-
|
Interface for implicit surfaces. An implicit surface is given by an expression of the form \( F(\mathbf{x})=0, \mathbf{x} \in \mathbb{R}^3\). More...
#include <ImplicitSurface.hpp>
Inherits Surface.
Inherited by ImplicitTorus, and QuadraticSurface.
Public Types | |
typedef rw::core::Ptr< ImplicitSurface > | Ptr |
Smart pointer type for ImplicitSurface. | |
typedef rw::core::Ptr< const ImplicitSurface > | CPtr |
Smart pointer type for const ImplicitSurface. | |
Public Types inherited from Surface | |
typedef rw::core::Ptr< Surface > | Ptr |
Smart pointer type for Surface. | |
typedef rw::core::Ptr< const Surface > | CPtr |
Smart pointer type for const Surface. | |
Public Member Functions | |
ImplicitSurface () | |
Constructor. | |
virtual | ~ImplicitSurface () |
Destructor. | |
ImplicitSurface::Ptr | transform (const rw::math::Transform3D< double > &T) const |
Move the surface. More... | |
ImplicitSurface::Ptr | transform (const rw::math::Vector3D< double > &P) const |
Move the surface without rotation. More... | |
ImplicitSurface::Ptr | scale (double factor) const |
Get a scaled version of the surface. More... | |
ImplicitSurface::Ptr | clone () const |
Clone the surface. More... | |
virtual std::pair< double, double > | extremums (const rw::math::Vector3D< double > &direction) const =0 |
Find the extent of the surface along a specific direction. More... | |
virtual rw::core::Ptr< TriMesh > | getTriMesh (const std::vector< rw::math::Vector3D< double >> &border=std::vector< rw::math::Vector3D< double >>()) const =0 |
Discretize the surface into a triangle mesh representation. More... | |
virtual void | setDiscretizationResolution (double resolution)=0 |
Set the resolution used for discretization in the getTriMesh function. More... | |
virtual bool | equals (const Surface &surface, double threshold) const =0 |
Check if this surface is identical to other surface . More... | |
virtual double | operator() (const rw::math::Vector3D< double > &x) const =0 |
Evaluate the implicit function, \( F(\mathbf{x}) \), for the surface. More... | |
virtual bool | insideTrimmingRegion (const rw::math::Vector3D< double > &P) const |
Check if point, P, on surface lies inside the trimming region. More... | |
virtual rw::math::Vector3D< double > | normal (const rw::math::Vector3D< double > &x) const |
Get the normal of the surface at a specific point, x, lying on the surface. More... | |
virtual rw::math::Vector3D< double > | gradient (const rw::math::Vector3D< double > &x) const =0 |
Get the gradient, \(\nabla \mathbf{F}\), of the surface at a specific point, x, lying on the surface. More... | |
virtual void | reuseTrimmingRegions (ImplicitSurface::Ptr surface) const |
Let other surface reuse this surfaces trimming regions, if there are identical region definitions. More... | |
Public Member Functions inherited from Surface | |
Surface () | |
Constructor. | |
virtual | ~Surface () |
Destructor. | |
Surface::Ptr | transform (const rw::math::Transform3D< double > &T) const |
Move the surface. More... | |
Surface::Ptr | transform (const rw::math::Vector3D< double > &P) const |
Move the surface without rotation. More... | |
Surface::Ptr | scale (double factor) const |
Get a scaled version of the surface. More... | |
Surface::Ptr | clone () const |
Clone the surface. More... | |
Interface for implicit surfaces. An implicit surface is given by an expression of the form \( F(\mathbf{x})=0, \mathbf{x} \in \mathbb{R}^3\).
|
inline |
Clone the surface.
|
pure virtual |
Check if this surface is identical to other surface .
surface | [in] other surface to compare to. |
threshold | [in] threshold for when surfaces can be considered identical. |
Implements Surface.
Implemented in QuadraticSurface, and ImplicitTorus.
|
pure virtual |
Find the extent of the surface along a specific direction.
If the surface has no lower bound, the value -std::numeric_limits<double>::max() can be returned to indicate that the surface has unbounded minimum value in the given direction.
If the surface has no upper bound, the value std::numeric_limits<double>::max() can be returned to indicate that the surface has unbounded maximum value in the given direction.
direction | [in] a normalized direction vector. |
Implements Surface.
Implemented in QuadraticSurface, and ImplicitTorus.
|
pure virtual |
Discretize the surface into a triangle mesh representation.
If the border of a trimmed surface must fit with other surface triangulations, a discretized border must be given to this triangulation function.
If the same border points are used for different surfaces for their common edges, the triangulations will fit together.
border | [in] (optional) an ordered list of points on the surface, that forms the border of the patch to triangulate. |
Implements Surface.
Implemented in QuadraticSurface, and ImplicitTorus.
|
pure virtual |
Get the gradient, \(\nabla \mathbf{F}\), of the surface at a specific point, x, lying on the surface.
The gradient is the vector of partial derivatives \( \nabla \mathbf{F} = \begin{bmatrix}\frac{\partial F}{\partial x} & \frac{\partial F}{\partial y} & \frac{\partial F}{\partial z} \end{bmatrix}^T \)
x | [in] a point on the surface. |
Implemented in QuadraticSurface, and ImplicitTorus.
|
inlinevirtual |
Check if point, P, on surface lies inside the trimming region.
P | [in] the point to check. |
Reimplemented in QuadraticSurface, and ImplicitTorus.
|
inlinevirtual |
Get the normal of the surface at a specific point, x, lying on the surface.
For the point on the implicit surface, where \( F(\mathbf{x})=0 \) , the normal is the direction of the gradient \(\frac{\nabla \mathbf{F}}{\|\nabla \mathbf{F}\|}\) .
x | [in] a point on the surface. |
Reimplemented in QuadraticSurface, and ImplicitTorus.
|
pure virtual |
Evaluate the implicit function, \( F(\mathbf{x}) \), for the surface.
x | [in] the point to evaluate. |
Implemented in QuadraticSurface, and ImplicitTorus.
|
inlinevirtual |
Let other surface reuse this surfaces trimming regions, if there are identical region definitions.
This allows for some implementations to save a small amount of memory.
surface | [in/out] the other surface. |
Reimplemented in QuadraticSurface, and ImplicitTorus.
|
inline |
Get a scaled version of the surface.
factor | [in] the factor to scale with. |
|
pure virtual |
Set the resolution used for discretization in the getTriMesh function.
The meaning of this parameter depends on the type of surface.
resolution | [in] the resolution parameter. |
Implements Surface.
Implemented in QuadraticSurface, and ImplicitTorus.
|
inline |
Move the surface.
T | [in] the transform to the new surface. |
|
inline |
Move the surface without rotation.
If there is no rotation, this function is better to use than transform(const rw::math::Transform3D<>&) const for some surfaces. This is because certain properties can be preserved.
P | [in] the translation vector to the new surface. |