Преглед изворни кода

Added accessor to get the vehicle constraint

Jorrit Rouwe пре 11 месеци
родитељ
комит
2d7176a2d2
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      Jolt/Physics/Vehicle/VehicleController.h

+ 4 - 0
Jolt/Physics/Vehicle/VehicleController.h

@@ -46,6 +46,10 @@ public:
 	explicit					VehicleController(VehicleConstraint &inConstraint) : mConstraint(inConstraint) { }
 	virtual						~VehicleController() = default;
 
+	/// Access the vehicle constraint that this controller is part of
+	VehicleConstraint &			GetConstraint()								{ return mConstraint; }
+	const VehicleConstraint &	GetConstraint() const						{ return mConstraint; }
+
 protected:
 	// The functions below are only for the VehicleConstraint
 	friend class VehicleConstraint;