All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hu.kazocsaba.math.geometry.Plane Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package hu.kazocsaba.math.geometry;

import hu.kazocsaba.math.matrix.Vector;
import hu.kazocsaba.math.matrix.immutable.ImmutableMatrixFactory;
import hu.kazocsaba.math.matrix.immutable.ImmutableVector;

/**
 * An infinite plane. It is specified with a point and a normal vector.
 * The normal is not necessarily unit length.
 * @author Kazó Csaba
 */
public class Plane {
	protected static final double EPS=1e-8;

	private final ImmutableVector point;
	private final ImmutableVector normal;
	private final ImmutableVector unitNormal;
	
	Plane(Vector point, Vector normal) {
		this.point=ImmutableMatrixFactory.copy(point);
		this.normal=ImmutableMatrixFactory.copy(normal);
		double length=this.normal.norm();
		if (length




© 2015 - 2025 Weber Informatics LLC | Privacy Policy