Package org.robwork.sdurw_geometry
Class LineCPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.LineCPtr
-
public class LineCPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Line__ref__()Dereferencing operator.Vector3DclosestPoint(Vector3D point)Finds a point on the line closest to specified point.
For the purposes of this calculation, the line is treated as infinitely extending
geometric entity, without begining nor end.TriMeshPtrcreateMesh(int resolution)voiddelete()Linederef()The pointer stored in the object.Vector3Ddir()Get a direction vector u = normalize(p2 - p1).doubledistance(Line line)Calculates the shortest distance to another line.
For the purposes of this calculation, the lines are treated as infinitely extending
geometric entity, without begining nor end.doubledistance(Vector3D point)Calculates the shortest distance from a point to the line.
For the purposes of this calculation, the line is treated as infinitely extending
geometric entity, without begining nor end.booleanequals(Line p)static longgetCPtr(LineCPtr obj)LinegetDeref()Member access operator.QgetParameters()GeometryData.GeometryTypegetType()booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
LineCPtr
public LineCPtr(long cPtr, boolean cMemoryOwn)
-
LineCPtr
public LineCPtr()
Default constructor yielding a NULL-pointer.
-
LineCPtr
public LineCPtr(Line ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(LineCPtr obj)
-
delete
public void delete()
-
deref
public Line deref()
The pointer stored in the object.
-
__ref__
public Line __ref__()
Dereferencing operator.
-
getDeref
public Line getDeref()
Member access operator.
-
equals
public boolean equals(Line 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
-
dir
public Vector3D dir()
Get a direction vector u = normalize(p2 - p1).
-
distance
public double distance(Vector3D point)
Calculates the shortest distance from a point to the line.
For the purposes of this calculation, the line is treated as infinitely extending
geometric entity, without begining nor end.
-
distance
public double distance(Line line)
Calculates the shortest distance to another line.
For the purposes of this calculation, the lines are treated as infinitely extending
geometric entity, without begining nor end.
-
closestPoint
public Vector3D closestPoint(Vector3D point)
Finds a point on the line closest to specified point.
For the purposes of this calculation, the line is treated as infinitely extending
geometric entity, without begining nor end.
-
createMesh
public TriMeshPtr createMesh(int resolution)
-
getParameters
public Q getParameters()
-
getType
public GeometryData.GeometryType getType()
-
-