def getGunMatrixProvider(vehicleTypeDescriptor, turretMatrixProvider, gunPitchMatrixProvider): gunOffset = vehicleTypeDescriptor.turret['gunPosition'] return MatrixProviders.product( gunPitchMatrixProvider, MatrixProviders.product(mathUtils.createTranslationMatrix(gunOffset), turretMatrixProvider))
def getTurretMatrixProvider(vehicleTypeDescriptor, vehicleMatrixProvider, turretYawMatrixProvider): turretOffset = vehicleTypeDescriptor.chassis[ 'hullPosition'] + vehicleTypeDescriptor.hull['turretPositions'][0] return MatrixProviders.product( turretYawMatrixProvider, MatrixProviders.product( mathUtils.createTranslationMatrix(turretOffset), vehicleMatrixProvider))
def getGunMatrixProvider(vehicleTypeDescriptor, turretMatrixProvider, gunPitchMatrixProvider): gunOffset = vehicleTypeDescriptor.turret['gunPosition'] return MatrixProviders.product(gunPitchMatrixProvider, MatrixProviders.product(mathUtils.createTranslationMatrix(gunOffset), turretMatrixProvider))
def getTurretMatrixProvider(vehicleTypeDescriptor, vehicleMatrixProvider, turretYawMatrixProvider): turretOffset = vehicleTypeDescriptor.chassis['hullPosition'] + vehicleTypeDescriptor.hull['turretPositions'][0] return MatrixProviders.product(turretYawMatrixProvider, MatrixProviders.product(mathUtils.createTranslationMatrix(turretOffset), vehicleMatrixProvider))