MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / GetTransform

Method GetTransform

Source/Objects/envobject.cpp:1820–1828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1818}
1819
1820mat4 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
1830quaternion PlantComponent::GetQuaternion(float scale) const {
1831 quaternion result;

Callers 15

EnvObjectUpdateMethod · 0.45
ItemUpdateMethod · 0.45
DrawGPUParticleFieldFunction · 0.45
DrawMethod · 0.45
CreatePhysicsSkeletonMethod · 0.45
UpdateTwistBonesMethod · 0.45
DrawMethod · 0.45
AddSceneToNavmeshMethod · 0.45
PlaceLightProbesFunction · 0.45
UpdateShadowCacheFunction · 0.45
DrawMethod · 0.45

Calls 4

maxFunction · 0.85
SetRotationAxisRadMethod · 0.80
length_squaredFunction · 0.50
sqrtfFunction · 0.50

Tested by

no test coverage detected