100KDrawable_SingleView_ExampleComponent.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Performance/100KDrawable_SingleView_ExampleComponent.h>
  9. #include <SampleComponentManager.h>
  10. #include <SampleComponentConfig.h>
  11. #include <AzCore/Serialization/SerializeContext.h>
  12. AZ_DECLARE_BUDGET(AtomSampleViewer);
  13. namespace AtomSampleViewer
  14. {
  15. using namespace AZ;
  16. void _100KDrawableExampleComponent::Reflect(AZ::ReflectContext* context)
  17. {
  18. if (AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  19. {
  20. serializeContext->Class<_100KDrawableExampleComponent, HighInstanceTestComponent>()
  21. ->Version(0)
  22. ;
  23. }
  24. }
  25. _100KDrawableExampleComponent::_100KDrawableExampleComponent()
  26. {
  27. m_sampleName = "100KEntityTest";
  28. InitDefaultValues(m_testParameters);
  29. }
  30. void _100KDrawableExampleComponent::InitDefaultValues(HighInstanceTestParameters& defaultParameters)
  31. {
  32. defaultParameters.m_latticeSize[0] = 46;
  33. defaultParameters.m_latticeSize[1] = 46;
  34. defaultParameters.m_latticeSize[2] = 46;
  35. defaultParameters.m_latticeSpacing[0] = 3.0f;
  36. defaultParameters.m_latticeSpacing[1] = 3.0f;
  37. defaultParameters.m_latticeSpacing[2] = 3.0f;
  38. defaultParameters.m_numShadowCastingSpotLights = 0;
  39. defaultParameters.m_activateDirectionalLight = false;
  40. defaultParameters.m_cameraPosition[0] = -173.0f;
  41. defaultParameters.m_cameraPosition[1] = 66.0f;
  42. defaultParameters.m_cameraPosition[2] = 68.0f;
  43. defaultParameters.m_cameraHeadingDeg = -90.0f;
  44. defaultParameters.m_cameraPitchDeg = 0.0f;
  45. defaultParameters.m_iblExposure = 0.0f;
  46. }
  47. } // namespace AtomSampleViewer