@Test public void testScaleAdd() { final CCVector3 vec1 = new CCVector3(1, 1, 1); final CCVector3 vec2 = vec1.scaleAdd(2.0f, new CCVector3(1, 2, 3)); assertEquals(new CCVector3(3.0f, 4.0f, 5.0f), vec2); vec1.scaleAddLocal(2.0f, new CCVector3(1, 2, 3)); assertEquals(vec2, vec1); }
public CCVector3 scaleAdd(final double theScale, final CCVector3 theAdd, CCVector3 theStore) { if(theStore == null)theStore = new CCVector3(); theStore.set( x * theScale + theAdd.x, y * theScale + theAdd.y, z * theScale + theAdd.z ); return theStore; }
CCVector3 implements Cloneable, Externalizable, CCDataSerializable, CCBlendable<CCVector3> { public CCVector3 scaleAdd(final double theScale, final CCVector3 theAdd, CCVector3 theStore) { if(theStore == null)theStore = new CCVector3(); theStore.set( x * theScale + theAdd.x, y * theScale + theAdd.y, z * theScale + theAdd.z ); return theStore; } }
CCVector3 implements Cloneable, Externalizable, CCDataSerializable, CCBlendable<CCVector3> { public CCVector3 scaleAdd(final double theScale, final CCVector3 theAdd, CCVector3 theStore) { if(theStore == null)theStore = new CCVector3(); theStore.set( x * theScale + theAdd.x, y * theScale + theAdd.y, z * theScale + theAdd.z ); return theStore; } CCVector3();  CCVector3(final CCVector2 theSource);  CCVector3(final CCVector3 theSource);  CCVector3(final CCVector4 theSource);  CCVector3(final double theX, final double theY, final double theZ);  CCVector3(final double theX, final double theY); }
CCVector3 implements Cloneable, Externalizable, CCDataSerializable, CCBlendable<CCVector3> { public CCVector3 scaleAdd(final double theScale, final CCVector3 theAdd, CCVector3 theStore) { if(theStore == null)theStore = new CCVector3(); theStore.set( x * theScale + theAdd.x, y * theScale + theAdd.y, z * theScale + theAdd.z ); return theStore; } CCVector3();  CCVector3(final CCVector2 theSource);  CCVector3(final CCVector3 theSource);  CCVector3(final CCVector4 theSource);  CCVector3(final double theX, final double theY, final double theZ);  CCVector3(final double theX, final double theY); static CCVector3 add(final CCVector3 ...theVector3fs); final static void orthonormalize(CCVector3 vec0, CCVector3 vec1, CCVector3 vec2); final static void orthonormalize(CCVector3... theVectors); final static void generateOrthonormalBasis(CCVector3 vec0, CCVector3 vec1, CCVector3 vec2); final static void generateComplementBasis(CCVector3 vec0, CCVector3 vec1, final CCVector3 vec2); static CCVector3 normal(final CCVector3 theV1, final CCVector3 theV2, final CCVector3 theV3); static CCVector3 reflect(CCVector3 theVector, CCVector3 theNormal); static double angle(final CCVector3 v1, final CCVector3 v2); static CCVector3 sphere(double theLat, double theLon, double theRadius); double getValue(final int theIndex); void setValue(final int theIndex, final double theValue); double[] toArray(double[] theStore); double[] toArray(); CCVector3 set(final double theX, final double theY, final double theZ); CCVector3 set(final CCVector3 theSource); CCVector3 set(final CCVector2 theSource); CCVector3 zero(); CCVector3 add(final double theX, final double theY, final double theZ, CCVector3 theStore); CCVector3 add(final double theX, final double theY, final double theZ); CCVector3 addLocal(final double theX, final double theY, final double theZ); CCVector3 add(final CCVector3 theSource, CCVector3 theStore); CCVector3 add(final CCVector3 theSource); CCVector3 addLocal(final CCVector3 theSource); CCVector3 subtract(final double theX, final double theY, final double theZ, CCVector3 theStore); CCVector3 subtract(final double theX, final double theY, final double theZ); CCVector3 subtractLocal(final double theX, final double theY, final double theZ); CCVector3 subtract(final CCVector3 theSource, CCVector3 theStore); CCVector3 subtract(final CCVector3 theSource); CCVector3 subtractLocal(final CCVector3 theSource); CCVector3 multiply(final double theX, final double theY, final double theZ, CCVector3 theStore); CCVector3 multiply(final double theX, final double theY, final double theZ); CCVector3 multiply(final double theScalar, CCVector3 theStore); CCVector3 multiply(final double theScalar); CCVector3 multiplyLocal(final double theScalar); CCVector3 multiply(final CCVector3 theScale, CCVector3 theStore); CCVector3 multiply(final CCVector3 theScale); CCVector3 multiplyLocal(final CCVector3 theScale); CCVector3 multiplyLocal(final double theX, final double theY, final double theZ); CCVector3 divide(final double theX, final double theY, final double theZ, CCVector3 theStore); CCVector3 divide(final double theX, final double theY, final double theZ); CCVector3 divide(final double theScalar, CCVector3 theStore); CCVector3 divide(final double theScalar); CCVector3 divideLocal(final double theScalar); CCVector3 divide(final CCVector3 theScale, CCVector3 theStore); CCVector3 divide(final CCVector3 theScale); CCVector3 divideLocal(final CCVector3 theScale); CCVector3 divideLocal(final double theX, final double theY, final double theZ); CCVector3 scaleAdd(final double theScale, final CCVector3 theAdd, CCVector3 theStore); CCVector3 scaleAdd(final double theScale, final CCVector3 theAdd); CCVector3 scaleAddLocal(final double theScale, final CCVector3 theAdd); CCVector3 negate(CCVector3 theStore); CCVector3 negate(); CCVector3 negateLocal(); CCVector3 normalize(CCVector3 theStore); CCVector3 normalize(); CCVector3 normalizeLocal(); CCVector3 randomize(); CCVector3 randomize(double radius); CCVector3 perp(); CCVector3 blend(final CCVector3 theEndVector, final double theScalar, CCVector3 theStore); CCVector3 blend(final CCVector3 theEndVector, final double theScalar); CCVector3 blendLocal(final CCVector3 theEndVector, final double theScalar); static CCVector3 blend(final CCVector3 theBeginVector, final CCVector3 theEndVector, final double theScalar, CCVector3 theStore); static CCVector3 blend(final CCVector3 theBeginVector, final CCVector3 theEndVector, final double theScalar); CCVector3 blendLocal(final CCVector3 theBeginVector, final CCVector3 theEndVector, final double theScalar); static CCVector3 bezierPoint(
		final CCVector3 theStartPoint, final CCVector3 theStartAnchor, 
		final CCVector3 theEndAnchor, final CCVector3 theEndPoint, 
		final double t
	); static CCVector3 catmulRomPoint(CCVector3 theP0, CCVector3 theP1, CCVector3 theP2, CCVector3 theP3, double theU, double theT); double length(); double lengthSquared(); double distanceSquared(final double theX, final double theY, final double theZ); double distanceSquared(final CCVector3 destination); double distance(final double theX, final double theY, final double theZ); double distance(final CCVector3 theDestination); double dot(final double theX, final double theY, final double theZ); double dot(final CCVector3 theVector); CCVector3 cross(final double theX, final double theY, final double theZ, CCVector3 theStore); CCVector3 cross(final double theX, final double theY, final double theZ); CCVector3 cross(final CCVector3 theVector, CCVector3 theStore); CCVector3 cross(final CCVector3 theVector); CCVector3 crossLocal(final double theX, final double theY, final double theZ); CCVector3 crossLocal(final CCVector3 vec); double smallestAngleBetween(final CCVector3 theOtherVector); static boolean isValid(final CCVector3 theVector); CCVector3 rotate(final double theX, final double theY, final double theZ, final double theAngle); static boolean isInfinite(final CCVector3 theVector); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object theObject); @Override CCVector3 clone(); @Override void readExternal(final ObjectInput theInput); @Override void writeExternal(final ObjectOutput theOutput); @Override Map<String, Object> data(); @Override void data(Map<String, Object> theData); CCVector2 xy(); CCVector2 xz(); CCVector2 yz(); }
CCVector3 implements Cloneable, Externalizable, CCDataSerializable, CCBlendable<CCVector3> { public CCVector3 scaleAdd(final double theScale, final CCVector3 theAdd, CCVector3 theStore) { if(theStore == null)theStore = new CCVector3(); theStore.set( x * theScale + theAdd.x, y * theScale + theAdd.y, z * theScale + theAdd.z ); return theStore; } CCVector3();  CCVector3(final CCVector2 theSource);  CCVector3(final CCVector3 theSource);  CCVector3(final CCVector4 theSource);  CCVector3(final double theX, final double theY, final double theZ);  CCVector3(final double theX, final double theY); static CCVector3 add(final CCVector3 ...theVector3fs); final static void orthonormalize(CCVector3 vec0, CCVector3 vec1, CCVector3 vec2); final static void orthonormalize(CCVector3... theVectors); final static void generateOrthonormalBasis(CCVector3 vec0, CCVector3 vec1, CCVector3 vec2); final static void generateComplementBasis(CCVector3 vec0, CCVector3 vec1, final CCVector3 vec2); static CCVector3 normal(final CCVector3 theV1, final CCVector3 theV2, final CCVector3 theV3); static CCVector3 reflect(CCVector3 theVector, CCVector3 theNormal); static double angle(final CCVector3 v1, final CCVector3 v2); static CCVector3 sphere(double theLat, double theLon, double theRadius); double getValue(final int theIndex); void setValue(final int theIndex, final double theValue); double[] toArray(double[] theStore); double[] toArray(); CCVector3 set(final double theX, final double theY, final double theZ); CCVector3 set(final CCVector3 theSource); CCVector3 set(final CCVector2 theSource); CCVector3 zero(); CCVector3 add(final double theX, final double theY, final double theZ, CCVector3 theStore); CCVector3 add(final double theX, final double theY, final double theZ); CCVector3 addLocal(final double theX, final double theY, final double theZ); CCVector3 add(final CCVector3 theSource, CCVector3 theStore); CCVector3 add(final CCVector3 theSource); CCVector3 addLocal(final CCVector3 theSource); CCVector3 subtract(final double theX, final double theY, final double theZ, CCVector3 theStore); CCVector3 subtract(final double theX, final double theY, final double theZ); CCVector3 subtractLocal(final double theX, final double theY, final double theZ); CCVector3 subtract(final CCVector3 theSource, CCVector3 theStore); CCVector3 subtract(final CCVector3 theSource); CCVector3 subtractLocal(final CCVector3 theSource); CCVector3 multiply(final double theX, final double theY, final double theZ, CCVector3 theStore); CCVector3 multiply(final double theX, final double theY, final double theZ); CCVector3 multiply(final double theScalar, CCVector3 theStore); CCVector3 multiply(final double theScalar); CCVector3 multiplyLocal(final double theScalar); CCVector3 multiply(final CCVector3 theScale, CCVector3 theStore); CCVector3 multiply(final CCVector3 theScale); CCVector3 multiplyLocal(final CCVector3 theScale); CCVector3 multiplyLocal(final double theX, final double theY, final double theZ); CCVector3 divide(final double theX, final double theY, final double theZ, CCVector3 theStore); CCVector3 divide(final double theX, final double theY, final double theZ); CCVector3 divide(final double theScalar, CCVector3 theStore); CCVector3 divide(final double theScalar); CCVector3 divideLocal(final double theScalar); CCVector3 divide(final CCVector3 theScale, CCVector3 theStore); CCVector3 divide(final CCVector3 theScale); CCVector3 divideLocal(final CCVector3 theScale); CCVector3 divideLocal(final double theX, final double theY, final double theZ); CCVector3 scaleAdd(final double theScale, final CCVector3 theAdd, CCVector3 theStore); CCVector3 scaleAdd(final double theScale, final CCVector3 theAdd); CCVector3 scaleAddLocal(final double theScale, final CCVector3 theAdd); CCVector3 negate(CCVector3 theStore); CCVector3 negate(); CCVector3 negateLocal(); CCVector3 normalize(CCVector3 theStore); CCVector3 normalize(); CCVector3 normalizeLocal(); CCVector3 randomize(); CCVector3 randomize(double radius); CCVector3 perp(); CCVector3 blend(final CCVector3 theEndVector, final double theScalar, CCVector3 theStore); CCVector3 blend(final CCVector3 theEndVector, final double theScalar); CCVector3 blendLocal(final CCVector3 theEndVector, final double theScalar); static CCVector3 blend(final CCVector3 theBeginVector, final CCVector3 theEndVector, final double theScalar, CCVector3 theStore); static CCVector3 blend(final CCVector3 theBeginVector, final CCVector3 theEndVector, final double theScalar); CCVector3 blendLocal(final CCVector3 theBeginVector, final CCVector3 theEndVector, final double theScalar); static CCVector3 bezierPoint(
		final CCVector3 theStartPoint, final CCVector3 theStartAnchor, 
		final CCVector3 theEndAnchor, final CCVector3 theEndPoint, 
		final double t
	); static CCVector3 catmulRomPoint(CCVector3 theP0, CCVector3 theP1, CCVector3 theP2, CCVector3 theP3, double theU, double theT); double length(); double lengthSquared(); double distanceSquared(final double theX, final double theY, final double theZ); double distanceSquared(final CCVector3 destination); double distance(final double theX, final double theY, final double theZ); double distance(final CCVector3 theDestination); double dot(final double theX, final double theY, final double theZ); double dot(final CCVector3 theVector); CCVector3 cross(final double theX, final double theY, final double theZ, CCVector3 theStore); CCVector3 cross(final double theX, final double theY, final double theZ); CCVector3 cross(final CCVector3 theVector, CCVector3 theStore); CCVector3 cross(final CCVector3 theVector); CCVector3 crossLocal(final double theX, final double theY, final double theZ); CCVector3 crossLocal(final CCVector3 vec); double smallestAngleBetween(final CCVector3 theOtherVector); static boolean isValid(final CCVector3 theVector); CCVector3 rotate(final double theX, final double theY, final double theZ, final double theAngle); static boolean isInfinite(final CCVector3 theVector); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object theObject); @Override CCVector3 clone(); @Override void readExternal(final ObjectInput theInput); @Override void writeExternal(final ObjectOutput theOutput); @Override Map<String, Object> data(); @Override void data(Map<String, Object> theData); CCVector2 xy(); CCVector2 xz(); CCVector2 yz(); static final double ALLOWED_DEVIANCE; final static CCVector3 ZERO; final static CCVector3 ONE; final static CCVector3 NEG_ONE; final static CCVector3 UNIT_X; final static CCVector3 NEG_UNIT_X; final static CCVector3 UNIT_Y; final static CCVector3 NEG_UNIT_Y; final static CCVector3 UNIT_Z; final static CCVector3 NEG_UNIT_Z; @CCProperty(name = "x", readBack= true)
    public double x; @CCProperty(name = "y", readBack= true)
	public double y; @CCProperty(name = "z", readBack= true)
	public double z; }