Package org.robwork.sdurw_geometry
Class GenericFacePtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.GenericFacePtr
-
public class GenericFacePtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description GenericFacePtr()Default constructor yielding a NULL-pointer.GenericFacePtr(long cPtr, boolean cMemoryOwn)GenericFacePtr(GenericFace 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 GenericFace__ref__()Dereferencing operator.GenericFaceCPtrcptr()longcurveCount()voiddelete()GenericFacederef()The pointer stored in the object.booleanequals(GenericFace p)pair_d_dextremums(Vector3D dir)Find the extent of the surface along a specific direction.static longgetCPtr(GenericFacePtr obj)CurvegetCurve(long i)GenericFacegetDeref()Member access operator.TriMeshPtrgetTriMesh()Create a TriMesh representation of the face.
This function relies on the resolution set with setMeshResolution.
The resolution is passed on to Curve::discretizeAdaptive and
Surface::setDiscretizationResolution.
TriMeshPtrgetTriMesh(boolean forceCopy)Create a TriMesh representation of the face.
This function relies on the resolution set with setMeshResolution.
The resolution is passed on to Curve::discretizeAdaptive and
Surface::setDiscretizationResolution.
booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipOBBobb()Create Oriented Bounding Box.
The default implementation forms a TriMesh in order to estimate the directions for the
OBB.
voidsetCurve(long vertex, CurveCPtr curve)Set curve (a curve has direction)voidsetCurves(SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__geometry__Curve_const_t_t curves)Set the curves.voidsetMeshResolution(double resolution)Set the resolution used for discretization in the getTriMesh and faceTriMesh
functions.
The meaning of this parameter depends on the type of surface.
voidsetSurface(Surface surface)Set surface.voidsetSurface(SurfaceCPtr surface)Set surface.voidsetVertex(long index, Vector3D vertex)Set vertex.voidsetVertices(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t vertices)Set the vertices.Surfacesurface()voidtransform(Transform3D T)rw::math::Transform3D<>&)voidtransform(Vector3D P)rw::math::Vector3D<double>&)SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_tvertices()
-
-
-
Constructor Detail
-
GenericFacePtr
public GenericFacePtr(long cPtr, boolean cMemoryOwn)
-
GenericFacePtr
public GenericFacePtr()
Default constructor yielding a NULL-pointer.
-
GenericFacePtr
public GenericFacePtr(GenericFace ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(GenericFacePtr obj)
-
delete
public void delete()
-
deref
public GenericFace deref()
The pointer stored in the object.
-
__ref__
public GenericFace __ref__()
Dereferencing operator.
-
getDeref
public GenericFace getDeref()
Member access operator.
-
equals
public boolean equals(GenericFace 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 GenericFaceCPtr cptr()
-
surface
public Surface surface()
-
curveCount
public long curveCount()
-
getCurve
public Curve getCurve(long i)
-
vertices
public SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t vertices()
-
transform
public void transform(Vector3D P)
rw::math::Vector3D<double>&)
-
transform
public void transform(Transform3D T)
rw::math::Transform3D<>&)
-
setSurface
public void setSurface(SurfaceCPtr surface)
Set surface.- Parameters:
surface- [in] the surface.
-
setSurface
public void setSurface(Surface surface)
Set surface.- Parameters:
surface- [in] the surface.
-
setCurve
public void setCurve(long vertex, CurveCPtr curve)Set curve (a curve has direction)- Parameters:
vertex- [in] the start vertex.curve- [in] the curve.
-
setCurves
public void setCurves(SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__geometry__Curve_const_t_t curves)
Set the curves.- Parameters:
curves- [in] vector of directed curves.
-
setVertex
public void setVertex(long index, Vector3D vertex)Set vertex.- Parameters:
index- [in] vertex index to set.vertex- [in] the vertex point.
-
setVertices
public void setVertices(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t vertices)
Set the vertices.- Parameters:
vertices- [in] vector of vertices.
-
getTriMesh
public TriMeshPtr getTriMesh(boolean forceCopy)
Create a TriMesh representation of the face.
This function relies on the resolution set with setMeshResolution.
The resolution is passed on to Curve::discretizeAdaptive and
Surface::setDiscretizationResolution.
- Parameters:
forceCopy- [in] (not currently used in default implementation)- Returns:
- a new TriMesh.
-
getTriMesh
public TriMeshPtr getTriMesh()
Create a TriMesh representation of the face.
This function relies on the resolution set with setMeshResolution.
The resolution is passed on to Curve::discretizeAdaptive and
Surface::setDiscretizationResolution.
- Returns:
- a new TriMesh.
-
extremums
public pair_d_d extremums(Vector3D dir)
Find the extent of the surface along a specific direction.- Parameters:
dir- [in] a normalized direction vector.- Returns:
- the minimum and maximum values along the given direction.
-
obb
public OBB obb()
Create Oriented Bounding Box.
The default implementation forms a TriMesh in order to estimate the directions for the
OBB.
- Returns:
- an OBB around the Face.
-
setMeshResolution
public void setMeshResolution(double resolution)
Set the resolution used for discretization in the getTriMesh and faceTriMesh
functions.
The meaning of this parameter depends on the type of surface.
- Parameters:
resolution- [in] the resolution parameter.
-
-