<commit_before>/**
 *
 */
package org.jmist.packages;

import org.jmist.framework.AbstractAffineTransformable3;
import org.jmist.framework.Lens;
import org.jmist.toolkit.Box2;
import org.jmist.toolkit.Point2;
import org.jmist.toolkit.Ray3;

/**
 * A <code>Lens</code> to which affine transformations may be applied.
 * @author bkimmel
 */
public abstract class TransformableLens extends AbstractAffineTransformable3
		implements Lens {

	/* (non-Javadoc)
	 * @see org.jmist.framework.Lens#rayAt(org.jmist.toolkit.Point2)
	 */
	@Override
	public final Ray3 rayAt(Point2 p) {

		Ray3 ray = this.viewRayAt(p);

		if (this.isTransformed()) {
			ray = ray.transform(this.getTransformationMatrix());
		}

		return ray;

	}

	/**
	 * Gets a ray indicating from which point and direction the camera is
	 * sensitive to incoming light at the specified point on its image plane.
	 * This will correspond to the direction to cast a ray in order to shade
	 * the specified point on the image plane.  This method must return the
	 * ray in view coordinate space:  The center of the image plane
	 * (corresponding to the point (0.5, 0.5)) should map to a ray originating
	 * at the origin looking along the negative z-axis.
	 * @param p The point on the image plane in normalized device coordinates
	 * 		(must fall within {@code Box2.UNIT}).
	 * @return The ray to cast for ray shading.
	 * @see {@link Box2#UNIT}
	 */
	protected abstract Ray3 viewRayAt(Point2 p);

}
<commit_msg>Added to TransformableLens.viewRayAt Javadoc comments.<commit_after>/**
 *
 */
package org.jmist.packages;

import org.jmist.framework.AbstractAffineTransformable3;
import org.jmist.framework.Lens;
import org.jmist.toolkit.Box2;
import org.jmist.toolkit.Point2;
import org.jmist.toolkit.Ray3;

/**
 * A <code>Lens</code> to which affine transformations may be applied.
 * @author bkimmel
 */
public abstract class TransformableLens extends AbstractAffineTransformable3
		implements Lens {

	/* (non-Javadoc)
	 * @see org.jmist.framework.Lens#rayAt(org.jmist.toolkit.Point2)
	 */
	@Override
	public final Ray3 rayAt(Point2 p) {

		Ray3 ray = this.viewRayAt(p);

		if (this.isTransformed()) {
			ray = ray.transform(this.getTransformationMatrix());
		}

		return ray;

	}

	/**
	 * Gets a ray indicating from which point and direction the camera is
	 * sensitive to incoming light at the specified point on its image plane.
	 * This will correspond to the direction to cast a ray in order to shade
	 * the specified point on the image plane.  This method must return the
	 * ray in view coordinate space:  The center of the image plane
	 * (corresponding to the point (0.5, 0.5)) should map to a ray originating
	 * at the origin looking along the negative z-axis.  The positive y-axis
	 * should be the up direction and the positive x-axis should be to the
	 * right.
	 * @param p The point on the image plane in normalized device coordinates
	 * 		(must fall within {@code Box2.UNIT}).
	 * @return The ray to cast for ray shading.
	 * @see {@link Box2#UNIT}
	 */
	protected abstract Ray3 viewRayAt(Point2 p);

}

{'fraction_non_alphanumeric': 0.09191295875284183, 'fraction_numerical': 0.01104254628126015, 'mean_word_length': 3.7678018575851393, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3098121', 'n_tokens_mistral': 1015, 'n_tokens_neox': 922, 'n_words': 349}