Transform constructor
Transform([
- Vector3? pos,
- Quaternion? rot,
- Vector3? scale
Implementation
Transform([Vector3? pos, Quaternion? rot, Vector3? scale]) {
if(scale != null) {
this.scale = scale;
} else {
this.scale = Vector3.all(1.0);
}
if(rot != null) {
this.rot = rot;
}else {
this.rot = Quaternion(0, 0, 0, 1);
}
if(pos != null) {
this.pos = pos;
}else {
this.pos = Vector3.zero();
}
transformMatrix.scale(1.0);
transformMatrix.setRotation(Quaternion(0, 0, 0, 1).asRotationMatrix());
transformMatrix.translate(0.0);
forceUpdate = true;
}