You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-04 19:21:46 +00:00
Rename Transform to Transform3D in core
This commit is contained in:
@@ -60,7 +60,7 @@ Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_
|
||||
return ret;
|
||||
}
|
||||
|
||||
Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform> *p_transforms, int p_preview_size) {
|
||||
Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform3D> *p_transforms, int p_preview_size) {
|
||||
int size = p_preview_size;
|
||||
|
||||
RID scenario = RS::get_singleton()->scenario_create();
|
||||
@@ -94,7 +94,7 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh
|
||||
continue;
|
||||
}
|
||||
|
||||
Transform mesh_xform;
|
||||
Transform3D mesh_xform;
|
||||
if (p_transforms != nullptr) {
|
||||
mesh_xform = (*p_transforms)[i];
|
||||
}
|
||||
@@ -105,7 +105,7 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh
|
||||
AABB aabb = mesh->get_aabb();
|
||||
Vector3 ofs = aabb.position + aabb.size * 0.5;
|
||||
aabb.position -= ofs;
|
||||
Transform xform;
|
||||
Transform3D xform;
|
||||
xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI / 6);
|
||||
xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI / 6) * xform.basis;
|
||||
AABB rot_aabb = xform.xform(aabb);
|
||||
@@ -119,11 +119,11 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh
|
||||
xform.invert();
|
||||
xform = mesh_xform * xform;
|
||||
|
||||
RS::get_singleton()->camera_set_transform(camera, xform * Transform(Basis(), Vector3(0, 0, 3)));
|
||||
RS::get_singleton()->camera_set_transform(camera, xform * Transform3D(Basis(), Vector3(0, 0, 3)));
|
||||
RS::get_singleton()->camera_set_orthogonal(camera, m * 2, 0.01, 1000.0);
|
||||
|
||||
RS::get_singleton()->instance_set_transform(light_instance, xform * Transform().looking_at(Vector3(-2, -1, -1), Vector3(0, 1, 0)));
|
||||
RS::get_singleton()->instance_set_transform(light_instance2, xform * Transform().looking_at(Vector3(+1, -1, -2), Vector3(0, 1, 0)));
|
||||
RS::get_singleton()->instance_set_transform(light_instance, xform * Transform3D().looking_at(Vector3(-2, -1, -1), Vector3(0, 1, 0)));
|
||||
RS::get_singleton()->instance_set_transform(light_instance2, xform * Transform3D().looking_at(Vector3(+1, -1, -2), Vector3(0, 1, 0)));
|
||||
|
||||
ep.step(TTR("Thumbnail..."), i);
|
||||
Main::iteration();
|
||||
|
||||
Reference in New Issue
Block a user