| 1818 | } |
| 1819 | |
| 1820 | mat4 PlantComponent::GetTransform(float scale) const { |
| 1821 | mat4 rotation; |
| 1822 | float angle_len2 = length_squared(angle); |
| 1823 | if (angle_len2 > 0.00001f) { |
| 1824 | float angle_len = sqrtf(angle_len2); |
| 1825 | rotation.SetRotationAxisRad(angle_len / max(1.0f, scale * 0.6f), angle / angle_len); |
| 1826 | } |
| 1827 | return rotation; |
| 1828 | } |
| 1829 | |
| 1830 | quaternion PlantComponent::GetQuaternion(float scale) const { |
| 1831 | quaternion result; |
no test coverage detected