Swizzle.h 582 B

123456789101112131415161718
  1. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  2. // SPDX-License-Identifier: MIT
  3. #pragma once
  4. JPH_NAMESPACE_BEGIN
  5. /// Enum indicating which component to use when swizzling
  6. enum
  7. {
  8. SWIZZLE_X = 0, ///< Use the X component
  9. SWIZZLE_Y = 1, ///< Use the Y component
  10. SWIZZLE_Z = 2, ///< Use the Z component
  11. SWIZZLE_W = 3, ///< Use the W component
  12. SWIZZLE_UNUSED = 2, ///< We always use the Z component when we don't specifically want to initialize a value, this is consistent with what is done in Vec3(x, y, z), Vec3(Float3 &) and Vec3::sLoadFloat3Unsafe
  13. };
  14. JPH_NAMESPACE_END