|
@@ -121,6 +121,7 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable
|
|
* @return the (modified) current instance (for chaining)
|
|
* @return the (modified) current instance (for chaining)
|
|
*/
|
|
*/
|
|
public Transform setRotation(Quaternion rot) {
|
|
public Transform setRotation(Quaternion rot) {
|
|
|
|
+ assert Quaternion.isValidQuaternion(rot) : "Invalid rotation " + rot;
|
|
this.rot.set(rot);
|
|
this.rot.set(rot);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
@@ -132,6 +133,7 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable
|
|
* @return the (modified) current instance (for chaining)
|
|
* @return the (modified) current instance (for chaining)
|
|
*/
|
|
*/
|
|
public Transform setTranslation(Vector3f trans) {
|
|
public Transform setTranslation(Vector3f trans) {
|
|
|
|
+ assert Vector3f.isValidVector(trans) : "Invalid translation " + trans;
|
|
this.translation.set(trans);
|
|
this.translation.set(trans);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
@@ -152,6 +154,7 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable
|
|
* @return the (modified) current instance (for chaining)
|
|
* @return the (modified) current instance (for chaining)
|
|
*/
|
|
*/
|
|
public Transform setScale(Vector3f scale) {
|
|
public Transform setScale(Vector3f scale) {
|
|
|
|
+ assert Vector3f.isValidVector(scale) : "Invalid scale " + scale;
|
|
this.scale.set(scale);
|
|
this.scale.set(scale);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
@@ -163,6 +166,7 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable
|
|
* @return the (modified) current instance (for chaining)
|
|
* @return the (modified) current instance (for chaining)
|
|
*/
|
|
*/
|
|
public Transform setScale(float scale) {
|
|
public Transform setScale(float scale) {
|
|
|
|
+ assert Float.isFinite(scale) : "Invalid scale " + scale;
|
|
this.scale.set(scale, scale, scale);
|
|
this.scale.set(scale, scale, scale);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
@@ -286,6 +290,7 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable
|
|
* @return the (modified) current instance (for chaining)
|
|
* @return the (modified) current instance (for chaining)
|
|
*/
|
|
*/
|
|
public Transform setTranslation(float x, float y, float z) {
|
|
public Transform setTranslation(float x, float y, float z) {
|
|
|
|
+ assert Float.isFinite(x) && Float.isFinite(y) && Float.isFinite(z) : "Invalid translation " + x + ", " + y + ", " + z;
|
|
translation.set(x, y, z);
|
|
translation.set(x, y, z);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
@@ -299,6 +304,7 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable
|
|
* @return the (modified) current instance (for chaining)
|
|
* @return the (modified) current instance (for chaining)
|
|
*/
|
|
*/
|
|
public Transform setScale(float x, float y, float z) {
|
|
public Transform setScale(float x, float y, float z) {
|
|
|
|
+ assert Float.isFinite(x) && Float.isFinite(y) && Float.isFinite(z) : "Invalid scale " + x + ", " + y + ", " + z;
|
|
scale.set(x, y, z);
|
|
scale.set(x, y, z);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|