Fix Basis::get_axis() was renamed to get_column()

master
Marc Gilleron 2022-05-07 21:27:41 +01:00
parent 0924514adc
commit 35ddc51f18
3 changed files with 13 additions and 13 deletions

View File

@ -91,7 +91,7 @@ Ref<VoxelRaycastResult> VoxelToolTerrain::raycast(
const Transform3D to_local = to_world.affine_inverse();
const Vector3 local_pos = to_local.xform(p_pos);
const Vector3 local_dir = to_local.basis.xform(p_dir).normalized();
const float to_world_scale = to_world.basis.get_axis(0).length();
const float to_world_scale = to_world.basis.get_column(Vector3::AXIS_X).length();
const float max_distance = p_max_distance / to_world_scale;
if (try_get_as(_terrain->get_mesher(), mesher_blocky)) {

View File

@ -152,9 +152,9 @@ void extract_model_instances(const Data &vox_data, std::vector<ModelInstance> &o
src_color_indices = to_span_const(model.color_indexes);
} else {
IntBasis basis;
basis.x = to_vec3i(args.basis.get_axis(Vector3::AXIS_X));
basis.y = to_vec3i(args.basis.get_axis(Vector3::AXIS_Y));
basis.z = to_vec3i(args.basis.get_axis(Vector3::AXIS_Z));
basis.x = to_vec3i(args.basis.get_column(Vector3::AXIS_X));
basis.y = to_vec3i(args.basis.get_column(Vector3::AXIS_Y));
basis.z = to_vec3i(args.basis.get_column(Vector3::AXIS_Z));
temp_voxels.resize(model.color_indexes.size());
dst_size =
transform_3d_array_zxy(to_span_const(model.color_indexes), to_span(temp_voxels), model.size, basis);

View File

@ -88,19 +88,19 @@ void DirectMultiMeshInstance::set_cast_shadows_setting(RenderingServer::ShadowCa
}
inline void write_bulk_array_transform(float *dst, const Transform3D &t) {
dst[0] = t.basis.elements[0].x;
dst[1] = t.basis.elements[0].y;
dst[2] = t.basis.elements[0].z;
dst[0] = t.basis.rows[0].x;
dst[1] = t.basis.rows[0].y;
dst[2] = t.basis.rows[0].z;
dst[3] = t.origin.x;
dst[4] = t.basis.elements[1].x;
dst[5] = t.basis.elements[1].y;
dst[6] = t.basis.elements[1].z;
dst[4] = t.basis.rows[1].x;
dst[5] = t.basis.rows[1].y;
dst[6] = t.basis.rows[1].z;
dst[7] = t.origin.y;
dst[8] = t.basis.elements[2].x;
dst[9] = t.basis.elements[2].y;
dst[10] = t.basis.elements[2].z;
dst[8] = t.basis.rows[2].x;
dst[9] = t.basis.rows[2].y;
dst[10] = t.basis.rows[2].z;
dst[11] = t.origin.z;
}