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

Function CopyTriVectorToVector3

trinity/TriValueBinding.cpp:152–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152static bool CopyTriVectorToVector3( void* srcVar, void* dstVar, float scale, const Vector4& offset )
153{
154 ITriVectorPtr vp;
155 if( static_cast<IRoot*>( srcVar )->QueryInterface( BlueInterfaceIID<ITriVector>(), (void**)&vp, BEQI_SILENT ) )
156 {
157 Vector3 src;
158 vp->CopyVector( &src );
159 src = src * scale + offset.GetXYZ();
160 auto& dst = *static_cast<Vector3*>( dstVar );
161 if( src != dst )
162 {
163 dst = src;
164 return true;
165 }
166 }
167 return false;
168}
169
170static bool CopyTriVectorToVector2( void* srcVar, void* dstVar, float scale, const Vector4& offset )
171{

Callers

nothing calls this directly

Calls 2

QueryInterfaceMethod · 0.80
CopyVectorMethod · 0.80

Tested by

no test coverage detected