Package org.robwork.sdurw_geometry
Class PlaneCPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.PlaneCPtr
-
public class PlaneCPtr extends java.lang.Object
Ptr 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 Plane
__ref__()
Dereferencing operator.TriMeshPtr
createMesh(int resolution)
TriMeshPtr
createMesh(int resolution, double size)
Create a triangle mesh representing the plane.
Provides the posibility to specify the size of the plan.void
delete()
Plane
deref()
The pointer stored in the object.double
distance(Plane plane)
Default metric for computing the difference between 2 planesdouble
distance(Vector3D point)
Calculates the shortest distance from point to plane.
The distance includes the sign s.t.boolean
equals(Plane p)
static long
getCPtr(PlaneCPtr obj)
Plane
getDeref()
Member access operator.Q
getParameters()
GeometryData.GeometryType
getType()
Vector3D
intersection(Vector3D p1, Vector3D p2)
Calculates the intersection between the line and plane.
The line defined by p1 and p2 is considered infinitely long.
Throws a rw::core::Exception if the line is parallel to the plane.
boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
PlaneCPtr
public PlaneCPtr(long cPtr, boolean cMemoryOwn)
-
PlaneCPtr
public PlaneCPtr()
Default constructor yielding a NULL-pointer.
-
PlaneCPtr
public PlaneCPtr(Plane ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(PlaneCPtr obj)
-
delete
public void delete()
-
deref
public Plane deref()
The pointer stored in the object.
-
__ref__
public Plane __ref__()
Dereferencing operator.
-
getDeref
public Plane getDeref()
Member access operator.
-
equals
public boolean equals(Plane 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
-
distance
public double distance(Vector3D point)
Calculates the shortest distance from point to plane.
The distance includes the sign s.t. a negative distance corresponds to point
being behind the plane and a positive distance in front of the plane.
- Parameters:
point
-
-
distance
public double distance(Plane plane)
Default metric for computing the difference between 2 planes- Parameters:
plane
- [in]
-
intersection
public Vector3D intersection(Vector3D p1, Vector3D p2)
Calculates the intersection between the line and plane.
The line defined by p1 and p2 is considered infinitely long.
Throws a rw::core::Exception if the line is parallel to the plane.
- Parameters:
p1
- [in] point 1 on the linep2
- [in] point 2 on the line
-
createMesh
public TriMeshPtr createMesh(int resolution)
-
createMesh
public TriMeshPtr createMesh(int resolution, double size)
Create a triangle mesh representing the plane.
Provides the posibility to specify the size of the plan.- Parameters:
resolution
- [in] Resolution of the mesh (not applicable for a plane)size
- [in] Size of the plane.
-
getParameters
public Q getParameters()
-
getType
public GeometryData.GeometryType getType()
-
-