Cleaning up NvCloth gem. Removed any reference to LmbrCentral and legacy renderer since now it uses Atom. (#154)
- Removed any usage of LmbCentral and legacy renderer from NvCloth gem. - Cloth rule can only be added to Mesh groups, not allowed in Actor groups anymore. - Removed ActorAssetHelper since actors now share the mesh model format and therefore they also use MeshAssetHelper. - Updated NvCloth gem.json file with the fields from the template. - Updated cloth chicken asset to not convert axis.
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
|
||||
#include <AzFramework/Viewport/ViewportColors.h>
|
||||
#include <LmbrCentral/Geometry/GeometrySystemComponentBus.h>
|
||||
|
||||
#include <Components/ClothComponentMesh/ClothDebugDisplay.h>
|
||||
#include <Components/ClothComponentMesh/ActorClothColliders.h>
|
||||
@@ -285,29 +284,11 @@ namespace NvCloth
|
||||
AzFramework::DebugDisplayRequests& debugDisplay,
|
||||
float radius, float height,
|
||||
const AZ::Transform& transform,
|
||||
const AZ::Color& color)
|
||||
[[maybe_unused]] const AZ::Color& color)
|
||||
{
|
||||
debugDisplay.PushMatrix(transform);
|
||||
const float heightStraightSection = AZStd::max(AZ::Constants::FloatEpsilon, height - 2.0f * radius);
|
||||
|
||||
AZStd::vector<AZ::Vector3> capsuleVertexBuffer;
|
||||
AZStd::vector<AZ::u32> capsuleIndexBuffer;
|
||||
AZStd::vector<AZ::Vector3> capsuleLineBuffer;
|
||||
const AZ::u32 sides = 16;
|
||||
const AZ::u32 capSegments = 8;
|
||||
|
||||
LmbrCentral::CapsuleGeometrySystemRequestBus::Broadcast(
|
||||
&LmbrCentral::CapsuleGeometrySystemRequestBus::Events::GenerateCapsuleMesh,
|
||||
radius,
|
||||
height,
|
||||
sides, capSegments,
|
||||
capsuleVertexBuffer,
|
||||
capsuleIndexBuffer,
|
||||
capsuleLineBuffer
|
||||
);
|
||||
|
||||
debugDisplay.DrawTrianglesIndexed(capsuleVertexBuffer, capsuleIndexBuffer, color);
|
||||
debugDisplay.DrawLines(capsuleLineBuffer, AzFramework::ViewportColors::WireColor);
|
||||
|
||||
debugDisplay.PopMatrix();
|
||||
debugDisplay.SetColor(AzFramework::ViewportColors::WireColor);
|
||||
debugDisplay.DrawWireCapsule(transform.GetTranslation(), transform.GetBasisZ(), radius, heightStraightSection);
|
||||
}
|
||||
} // namespace NvCloth
|
||||
|
||||
Reference in New Issue
Block a user