/*
* $Id$
* This file is a part of the Arakhne Foundation Classes, http://www.arakhne.org/afc
*
* Copyright (c) 2000-2012 Stephane GALLAND.
* Copyright (c) 2005-10, Multiagent Team, Laboratoire Systemes et Transports,
* Universite de Technologie de Belfort-Montbeliard.
* Copyright (c) 2013-2016 The original authors, and other authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.arakhne.afc.math.generic;
/** 3D Vector.
*
* @author $Author: sgalland$
* @version $FullVersion$
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
* @deprecated see {@link org.arakhne.afc.math.geometry.d3.Vector3D}
*/
@Deprecated
@SuppressWarnings("all")
public interface Vector3D extends Tuple3D<Vector3D> {
/**
* Sets the value of this tuple to the sum of tuples t1 and t2.
* @param t1 the first tuple
* @param t2 the second tuple
*/
public void add(Vector3D t1, Vector3D t2);
/**
* Sets the value of this tuple to the sum of itself and t1.
* @param t1 the other tuple
*/
public void add(Vector3D t1);
/**
* Sets the value of this tuple to the scalar multiplication
* of tuple t1 plus tuple t2 (this = s*t1 + t2).
* @param s the scalar value
* @param t1 the tuple to be multipled
* @param t2 the tuple to be added
*/
public void scaleAdd(int s, Vector3D t1, Vector3D t2);
/**
* Sets the value of this tuple to the scalar multiplication
* of tuple t1 plus tuple t2 (this = s*t1 + t2).
* @param s the scalar value
* @param t1 the tuple to be multipled
* @param t2 the tuple to be added
*/
public void scaleAdd(float s, Vector3D t1, Vector3D t2);
/**
* Sets the value of this tuple to the scalar multiplication
* of itself and then adds tuple t1 (this = s*this + t1).
* @param s the scalar value
* @param t1 the tuple to be added
*/
public void scaleAdd(int s, Vector3D t1);
/**
* Sets the value of this tuple to the scalar multiplication
* of itself and then adds tuple t1 (this = s*this + t1).
* @param s the scalar value
* @param t1 the tuple to be added
*/
public void scaleAdd(float s, Vector3D t1);
/**
* Sets the value of this tuple to the difference
* of tuples t1 and t2 (this = t1 - t2).
* @param t1 the first tuple
* @param t2 the second tuple
*/
public void sub(Vector3D t1, Vector3D t2);
/**
* Sets the value of this tuple to the difference
* of tuples t1 and t2 (this = t1 - t2).
* @param t1 the first tuple
* @param t2 the second tuple
*/
public void sub(Point3D t1, Point3D t2);
/**
* Sets the value of this tuple to the difference
* of itself and t1 (this = this - t1).
* @param t1 the other tuple
*/
public void sub(Vector3D t1);
/**
* Computes the dot product of the this vector and vector v1.
* @param v1 the other vector
* @return the dot product.
*/
public float dot(Vector3D v1);
/**
* Computes the cross product of the this vector and vector v1.
* The coordinate system's standard depends on the underlying
* implementation of the API.
* One of {@link #crossLeftHand(Vector3D)} or {@link #crossRightHand(Vector3D)}
* will be invoked by this function.
*
* @param v1 the other vector
* @return the dot product.
* @see #crossLeftHand(Vector3D)
* @see #crossRightHand(Vector3D)
*/
public Vector3D cross(Vector3D v1);
/**
* Computes the cross product of the vectors v1 and v2 and
* put the result in this vector.
* The coordinate system's standard depends on the underlying
* implementation of the API.
* One of {@link #crossLeftHand(Vector3D, Vector3D)} or
* {@link #crossRightHand(Vector3D, Vector3D)}
* will be invoked by this function.
*
* @param v1
* @param v2
* @see #crossLeftHand(Vector3D, Vector3D)
* @see #crossRightHand(Vector3D, Vector3D)
*/
public void cross(Vector3D v1, Vector3D v2);
/**
* Computes the cross product of the this vector and vector v1
* as if the vectors are inside a left-hand coordinate system.
* @param v1 the other vector
* @return the dot product.
*/
public Vector3D crossLeftHand(Vector3D v1);
/**
* Computes the cross product of the vectors v1 and v2
* as if the vectors are inside a left-hand coordinate system;
* and put the result in this vector.
* @param v1
* @param v2
*/
public void crossLeftHand(Vector3D v1, Vector3D v2);
/**
* Computes the cross product of the this vector and vector v1
* as if the vectors are inside a left-hand coordinate system.
* @param v1 the other vector
* @return the dot product.
*/
public Vector3D crossRightHand(Vector3D v1);
/**
* Computes the cross product of the vectors v1 and v2
* as if the vectors are inside a left-hand coordinate system;
* and put the result in this vector.
* @param v1
* @param v2
*/
public void crossRightHand(Vector3D v1, Vector3D v2);
/**
* Returns the length of this vector.
* @return the length of this vector
*/
public float length();
/**
* Returns the squared length of this vector.
* @return the squared length of this vector
*/
public float lengthSquared();
/**
* Sets the value of this vector to the normalization of vector v1.
* @param v1 the un-normalized vector
*/
public void normalize(Vector3D v1);
/**
* Normalizes this vector in place.
*/
public void normalize();
/**
* Returns the angle in radians between this vector and the vector
* parameter; the return value is constrained to the range [0,PI].
* @param v1 the other vector
* @return the angle in radians in the range [0,PI]
*/
public float angle(Vector3D v1);
/** Turn this vector about the given rotation angle.
*
* @param axis is the axis of rotation.
* @param angle is the rotation angle in radians.
*/
public void turnVector(Vector3D axis, float angle);
}