Gems/PhysX
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -47,14 +47,12 @@ namespace PhysX::Benchmarks
|
||||
, public PhysX::GenericPhysicsFixture
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
//! Spawns box entities in unique locations in 1/8 of sphere with all non-negative dimensions between radii[2, max radius].
|
||||
//! Accepts 2 parameters from \state.
|
||||
//!
|
||||
//! \state.range(0) - number of box entities to spawn
|
||||
//! \state.range(1) - max radius
|
||||
void SetUp(const ::benchmark::State& state) override
|
||||
void internalSetUp(const ::benchmark::State& state)
|
||||
{
|
||||
PhysX::GenericPhysicsFixture::SetUpInternal();
|
||||
|
||||
@@ -100,13 +98,32 @@ namespace PhysX::Benchmarks
|
||||
}
|
||||
}
|
||||
|
||||
void TearDown([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalTearDown()
|
||||
{
|
||||
m_boxes.clear();
|
||||
m_entities.clear();
|
||||
PhysX::GenericPhysicsFixture::TearDownInternal();
|
||||
}
|
||||
|
||||
public:
|
||||
void SetUp(const benchmark::State& state) override
|
||||
{
|
||||
internalSetUp(state);
|
||||
}
|
||||
void SetUp(benchmark::State& state) override
|
||||
{
|
||||
internalSetUp(state);
|
||||
}
|
||||
|
||||
void TearDown(const benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
void TearDown(benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
|
||||
protected:
|
||||
std::vector<EntityPtr> m_entities;
|
||||
std::vector<AZ::Vector3> m_boxes;
|
||||
|
||||
Reference in New Issue
Block a user