MCPcopy Create free account
hub / github.com/carbonengine/trinity / CopyFloatArrayToTriQuaternion

Function CopyFloatArrayToTriQuaternion

trinity/TriValueBinding.cpp:265–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265static bool CopyFloatArrayToTriQuaternion( void* srcVar, void* dstVar, float scale, const Vector4& offset )
266{
267 if( ITriQuaternionPtr cp = BlueCastPtr( static_cast<IRoot*>( srcVar ) ) )
268 {
269 Vector4 src = *static_cast<Vector4*>( srcVar ) * scale + offset;
270 Vector4 dst = *reinterpret_cast<const Vector4*>( cp->GetQuaternion() );
271 if( src != dst )
272 {
273 cp->SetXYZW( src.x, src.y, src.z, src.w );
274 return true;
275 }
276 }
277 return false;
278}
279
280const Be::VarEntry* TriValueBinding::FindEntry( const char* name, const Be::ClassInfo* type, ssize_t& offs )
281{

Callers

nothing calls this directly

Calls 2

GetQuaternionMethod · 0.80
SetXYZWMethod · 0.80

Tested by

no test coverage detected