mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Use const ref parameters in the GLTF module
This commit is contained in:
@@ -85,7 +85,7 @@ void GLTFNode::_bind_methods() {
|
||||
String GLTFNode::get_original_name() {
|
||||
return original_name;
|
||||
}
|
||||
void GLTFNode::set_original_name(String p_name) {
|
||||
void GLTFNode::set_original_name(const String &p_name) {
|
||||
original_name = p_name;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ Transform3D GLTFNode::get_xform() {
|
||||
return transform;
|
||||
}
|
||||
|
||||
void GLTFNode::set_xform(Transform3D p_xform) {
|
||||
void GLTFNode::set_xform(const Transform3D &p_xform) {
|
||||
transform = p_xform;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ Vector3 GLTFNode::get_position() {
|
||||
return transform.origin;
|
||||
}
|
||||
|
||||
void GLTFNode::set_position(Vector3 p_position) {
|
||||
void GLTFNode::set_position(const Vector3 &p_position) {
|
||||
transform.origin = p_position;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ Quaternion GLTFNode::get_rotation() {
|
||||
return transform.basis.get_rotation_quaternion();
|
||||
}
|
||||
|
||||
void GLTFNode::set_rotation(Quaternion p_rotation) {
|
||||
void GLTFNode::set_rotation(const Quaternion &p_rotation) {
|
||||
transform.basis.set_quaternion_scale(p_rotation, transform.basis.get_scale());
|
||||
}
|
||||
|
||||
@@ -165,16 +165,16 @@ Vector3 GLTFNode::get_scale() {
|
||||
return transform.basis.get_scale();
|
||||
}
|
||||
|
||||
void GLTFNode::set_scale(Vector3 p_scale) {
|
||||
void GLTFNode::set_scale(const Vector3 &p_scale) {
|
||||
transform.basis = transform.basis.orthonormalized() * Basis::from_scale(p_scale);
|
||||
}
|
||||
|
||||
Vector<int> GLTFNode::get_children() {
|
||||
return children;
|
||||
return Vector<int>(children);
|
||||
}
|
||||
|
||||
void GLTFNode::set_children(Vector<int> p_children) {
|
||||
children = p_children;
|
||||
void GLTFNode::set_children(const Vector<int> &p_children) {
|
||||
children = Vector<int>(p_children);
|
||||
}
|
||||
|
||||
void GLTFNode::append_child_index(int p_child_index) {
|
||||
|
||||
Reference in New Issue
Block a user