Refactor PhysX vehicles and cloth simulation code to be more readable
#2796
This commit is contained in:
@@ -27,6 +27,11 @@ Cloth::Cloth(const SpawnParams& params)
|
||||
_drawCategory = SceneRendering::SceneDrawAsync;
|
||||
}
|
||||
|
||||
void* Cloth::GetPhysicsCloth() const
|
||||
{
|
||||
return _cloth;
|
||||
}
|
||||
|
||||
ModelInstanceActor::MeshReference Cloth::GetMesh() const
|
||||
{
|
||||
auto value = _mesh;
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
/// </summary>
|
||||
API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Cloth\"), ActorToolbox(\"Physics\")") class FLAXENGINE_API Cloth : public Actor
|
||||
{
|
||||
friend class PhysicsBackend;
|
||||
DECLARE_SCENE_OBJECT(Cloth);
|
||||
|
||||
/// <summary>
|
||||
@@ -231,6 +230,11 @@ private:
|
||||
Array<float> _paint;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// Gets the native physics backend object.
|
||||
/// </summary>
|
||||
void* GetPhysicsCloth() const;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the mesh to use for the cloth simulation (single mesh from specific LOD). Always from the parent static or animated model actor.
|
||||
/// </summary>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Wheeled Vehicle\"), ActorToolbox(\"Physics\")") class FLAXENGINE_API WheeledVehicle : public RigidBody
|
||||
{
|
||||
friend class PhysicsBackend;
|
||||
friend struct ScenePhysX;
|
||||
DECLARE_SCENE_OBJECT(WheeledVehicle);
|
||||
|
||||
/// <summary>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user