Transforms vector and returns Z component (convenience wrapper for b3dTFormVector + b3dTFormedZ).
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 Z component (Double).
3D Graphics
Parameters & Returns
Parameters
xDouble
yDouble
zDouble
sourceEntityInt
destEntityInt
Returns
Double
Quick Summary
Transforms vector and returns Z component (convenience wrapper for b3dTFormVector + b3dTFormedZ).
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 Z component (Double).
Technical Exegesis...
Transforms vector and returns Z component (convenience wrapper for b3dTFormVector + b3dTFormedZ). 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 Z component (Double). Calls b3dTFormVector(x, y, z, sourceEntity, destEntity) then returns g_lastTFormedResult.z. Convenience function combining transform and retrieval.
This function combines transform and Z retrieval.
Transforms vector and returns Z component (convenience wrapper for b3dTFormVector + b3dTFormedZ). 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 Z component (Double). Calls b3dTFormVector(x, y, z, sourceEntity, destEntity) then returns g_lastTFormedResult.z. Convenience function combining transform and retrieval.
This function combines transform and Z retrieval. Equivalent code: b3dTFormVector(x, y, z, src, dest), result=b3dTFormedZ(), 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 Z (b3dTFormVectorZ(0,0,1, entity, 0) for world forward Z), (2) Get entity right Z (b3dTFormVectorZ(1,0,0, entity, 0) for world right Z), (3) Depth component extraction (get Z of transformed direction), (4) Velocity transforms (get transformed velocity Z component), (5) Simplified code (single call instead of two). Common patterns: forwardZ=b3dTFormVectorZ(0,0,1, entity, 0) for entity forward Z, rightZ=b3dTFormVectorZ(1,0,0, entity, 0) for entity right Z. 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 X/Y with b3dTFormedX/Y if needed). Related: b3dTFormVectorX/Y return X and Y components, b3dTFormVector performs transform without returning component, b3dTFormedZ retrieves Z without transform.