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

Function CopyVector3ToTriVector

trinity/TriValueBinding.cpp:235–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235static bool CopyVector3ToTriVector( void* srcVar, void* dstVar, float scale, const Vector4& offset )
236{
237 if( ITriVectorPtr vp = BlueCastPtr( static_cast<IRoot*>( srcVar ) ) )
238 {
239 Vector3 src = *static_cast<Vector3*>( srcVar ) * scale + offset.GetXYZ();
240 auto dest = *vp->GetVector();
241 if( src != dest )
242 {
243 vp->SetXYZ( src.x, src.y, src.z );
244 return true;
245 }
246 }
247 return false;
248}
249
250static bool CopyFloatArrayToTriColor( void* srcVar, void* dstVar, float scale, const Vector4& offset )
251{

Callers

nothing calls this directly

Calls 2

GetVectorMethod · 0.80
SetXYZMethod · 0.80

Tested by

no test coverage detected