Class 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.
    • 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 -