Пример #1
0
 @Override
 protected List<Vector3> getRayDirectionSuperSampledList(int i, int j, int r) {
   final int count = AbstractCamera.getSuperSampledCount(r);
   final List<Vector3> directionList = new ArrayList<>(count);
   for (int k = 0; k < count; k++) {
     directionList.add(
         new Vector3(getRayOrigin(screenWidth - 1 - i, screenHeight - 1 - j), pinhole)
             .normalized());
   }
   return directionList;
 }
Пример #2
0
 public List<Ray> getPimaryRaySuperSampledList(int i, int j, int r) {
   final int count = AbstractCamera.getSuperSampledCount(r);
   final List<Point3D> rayOriginList = getRayOriginSuperSampledList(i, j, r);
   final List<Vector3> rayDirectionList = getRayDirectionSuperSampledList(i, j, r);
   if (rayDirectionList != null) {
     final List<Ray> primaryRayList = new ArrayList<>(count);
     Vector3 currentDirection = null;
     for (int k = 0; k < count; k++) {
       currentDirection = rayDirectionList.get(k);
       if (currentDirection != null) {
         primaryRayList.add(new Ray(rayOriginList.get(k), currentDirection));
       } else {
         primaryRayList.add(null);
       }
     }
     return primaryRayList;
   } else {
     return null;
   }
 }
Пример #3
0
 /*
  * (non-Javadoc)
  *
  * @see net.macsewer.graphics.sewerrt.camera.AbstractCamera#setRealWidth(float)
  */
 @Override
 public void setRealHeight(float realHeight) {
   // TODO Auto-generated method stub
   super.setRealHeight(realHeight);
   setFieldOfView(fieldOfView);
 }
Пример #4
0
 /*
  * (non-Javadoc)
  *
  * @see net.macsewer.graphics.sewerrt.camera.AbstractCamera#setRealWidth(float)
  */
 @Override
 public void setRealWidth(float realWidth) {
   // TODO Auto-generated method stub
   super.setRealWidth(realWidth);
   setFieldOfView(fieldOfView);
 }
Пример #5
0
 /*
  * (non-Javadoc)
  *
  * @see net.macsewer.graphics.sewerrt.camera.AbstractCamera#setPosition(net.macsewer.graphics.sewerrt.geometry.Point3D)
  */
 @Override
 public void setPosition(Point3D position) {
   // TODO Auto-generated method stub
   super.setPosition(position);
   computePinhole();
 }