get the origin Z and consider whether Z is fetched from the extrabyte (z_from_attrib)
| 134 | |
| 135 | /// get the origin Z and consider whether Z is fetched from the extrabyte (z_from_attrib) |
| 136 | I32 LASoperation::get_Z(LASpoint* point) { |
| 137 | I64 Z = 0; |
| 138 | |
| 139 | if (offset_adjust && point->quantizer != nullptr && point->quantizer->z_from_attrib >= 0) { |
| 140 | // get Z from extrabyte |
| 141 | F64 z_tmp = (point->get_Z() * scale_factor_z) + adjusted_offset_z; |
| 142 | if (z_tmp >= orig_z_offset) |
| 143 | Z = (I64)(((z_tmp - orig_z_offset) / orig_z_scale_factor) + 0.5); |
| 144 | else |
| 145 | Z = (I64)(((z_tmp - orig_z_offset) / orig_z_scale_factor) - 0.5); |
| 146 | } else { |
| 147 | // Default case or no offset adjustment |
| 148 | Z = point->get_Z(); |
| 149 | } |
| 150 | |
| 151 | return I32_CLAMP(Z); |
| 152 | }; |
| 153 | |
| 154 | /// sets the new offset based on the points if point coordinates were not changed during the operation or transformed |
| 155 | void LASoperation::set_offset_adjust_coord_without_trafo_changes(LASpoint* point){ |
no outgoing calls
no test coverage detected