Package org.robwork.sdurw_proximity
Class Raycaster
- java.lang.Object
-
- org.robwork.sdurw_proximity.Raycaster
-
public class Raycaster extends java.lang.Object
a raycast implementation that relies on a collision strategy for finding the
collision between the ray and the scene.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Raycaster.QueryType
result structure of ray caststatic class
Raycaster.RaycasterQueryResult
result of a Raycast query.
-
Constructor Summary
Constructors Constructor Description Raycaster(long cPtr, boolean cMemoryOwn)
Raycaster(CollisionStrategyPtr cdstrategy)
constructor - only the frames in the vector are tested against each
other.Raycaster(CollisionStrategyPtr cdstrategy, double ray_length)
constructor - only the frames in the vector are tested against each
other.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(Raycaster obj)
void
setCalculateNormals(boolean enabled)
set to true if normals should also be calculatedvoid
setRayFrame(FramePtr rayframe)
boolean
shoot(Vector3D pos, Vector3D direction, Raycaster.RaycasterQueryResult result, State state)
shoots a ray in the direction of the vector direction starting from
the position vector pos.
-
-
-
Constructor Detail
-
Raycaster
public Raycaster(long cPtr, boolean cMemoryOwn)
-
Raycaster
public Raycaster(CollisionStrategyPtr cdstrategy, double ray_length)
constructor - only the frames in the vector are tested against each
other.
-
Raycaster
public Raycaster(CollisionStrategyPtr cdstrategy)
constructor - only the frames in the vector are tested against each
other.
-
-
Method Detail
-
getCPtr
public static long getCPtr(Raycaster obj)
-
delete
public void delete()
-
setRayFrame
public void setRayFrame(FramePtr rayframe)
-
shoot
public boolean shoot(Vector3D pos, Vector3D direction, Raycaster.RaycasterQueryResult result, State state)
shoots a ray in the direction of the vector direction starting from
the position vector pos. The frame associated with the geometry that is hit
first by the ray is returned along with the intersection point described in
world frame.
-
setCalculateNormals
public void setCalculateNormals(boolean enabled)
set to true if normals should also be calculated- Parameters:
enabled
-
-
-