@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; }
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; } }
/* * (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); }
/* * (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); }
/* * (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(); }