Transforms vector and returns X component (convenience wrapper for b3dTFormVector + b3dTFormedX).
Takes x/y/z (vector direction in src space), sourceEntity (source coordinate system, 0=world space), destEntity (destination coordinate system, 0=world space).
Returns transformed X component (Double).
3D Graphics
Parameters & Returns
Parameters
xDouble
yDouble
zDouble
sourceEntityInt
destEntityInt
Returns
Double
Quick Summary
Transforms vector and returns X component (convenience wrapper for b3dTFormVector + b3dTFormedX).
Takes x/y/z (vector direction in src space), sourceEntity (source coordinate system, 0=world space), destEntity (destination coordinate system, 0=world space).
Returns transformed X component (Double).
Technical Exegesis...
Transforms vector and returns X component (convenience wrapper for b3dTFormVector + b3dTFormedX). Takes x/y/z (vector direction in src space), sourceEntity (source coordinate system, 0=world space), destEntity (destination coordinate system, 0=world space). Returns transformed X component (Double). Calls b3dTFormVector(x, y, z, sourceEntity, destEntity) then returns g_lastTFormedResult.x. Convenience function combining transform and retrieval.
This function combines transform and X retrieval.
Transforms vector and returns X component (convenience wrapper for b3dTFormVector + b3dTFormedX). Takes x/y/z (vector direction in src space), sourceEntity (source coordinate system, 0=world space), destEntity (destination coordinate system, 0=world space). Returns transformed X component (Double). Calls b3dTFormVector(x, y, z, sourceEntity, destEntity) then returns g_lastTFormedResult.x. Convenience function combining transform and retrieval.
This function combines transform and X retrieval. Equivalent code: b3dTFormVector(x, y, z, src, dest), result=b3dTFormedX(), combined into single call for convenience. Vector transformation: applies rotation only (no scale/translation), uses XMVector3TransformNormal, preserves vector length (no normalization). Use cases: (1) Get entity forward X (b3dTFormVectorX(0,0,1, entity, 0) for world forward X), (2) Get entity right X (b3dTFormVectorX(1,0,0, entity, 0) for world right X), (3) Direction component extraction (get single component of transformed direction), (4) Velocity transforms (get transformed velocity X component), (5) Simplified code (single call instead of two). Common patterns: forwardX=b3dTFormVectorX(0,0,1, entity, 0) for entity forward X, rightX=b3dTFormVectorX(1,0,0, entity, 0) for entity right X, upX=b3dTFormVectorX(0,1,0, entity, 0) for entity up X. Typical usage: extract single component of transformed vector without needing separate retrieval call, cleaner code for common operations. Coordinate systems: sourceEntity=0 for world space, destEntity=0 for world space, else uses entity rotation. Y-axis negation: input/output in user space (+Y up), internal calculations in DirectX space (-Y up), automatic negation both directions. Performance: O(1) transform + read (same cost as b3dTFormVector, just combined with retrieval). Side effect: updates g_lastTFormedResult (can retrieve Y/Z with b3dTFormedY/Z if needed). Related: b3dTFormVectorY/Z return Y and Z components, b3dTFormVector performs transform without returning component, b3dTFormedX retrieves X without transform.