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

Function CopyTriVectorToVector2

trinity/TriValueBinding.cpp:170–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170static bool CopyTriVectorToVector2( void* srcVar, void* dstVar, float scale, const Vector4& offset )
171{
172 if( ITriVectorPtr vp = BlueCastPtr( static_cast<IRoot*>( srcVar ) ) )
173 {
174 const Vector3* p = vp->GetVector();
175 Vector2 src( p->x * scale + offset.x, p->y * scale + offset.y );
176 Vector2& dst = *static_cast<Vector2*>( dstVar );
177 if( src != dst )
178 {
179 dst = src;
180 return true;
181 }
182 }
183 return false;
184}
185
186static bool CopyTriColorToFloatArray( void* srcVar, void* dstVar, float scale, const Vector4& offset )
187{

Callers

nothing calls this directly

Calls 1

GetVectorMethod · 0.80

Tested by

no test coverage detected