improved initialization

This commit is contained in:
Pascal Serrarens 2023-12-28 09:38:26 +01:00
parent 30c74c44a4
commit e0230a7684

View File

@ -5,17 +5,14 @@ Placement::Placement() {
this->thing = nullptr; this->thing = nullptr;
} }
Placement::Placement(Thing* thing, Placement::Placement(Thing *thing, Vector3 position, float horizontalDirection,
Vector3 position, float verticalDirection)
float horizontalDirection, : horizontalDirection(horizontalDirection),
float verticalDirection) { verticalDirection(verticalDirection) {
this->thing = thing; this->thing = thing;
this->position = position; this->position = position;
this->horizontalDirection = horizontalDirection;
this->verticalDirection = verticalDirection;
} }
Placement::Placement(Thing* thing, Placement::Placement(Thing *thing, float horizontalDirection,
float horizontalDirection,
float verticalDirection) float verticalDirection)
: Placement(thing, Vector3::zero, horizontalDirection, verticalDirection) {} : Placement(thing, Vector3::zero, horizontalDirection, verticalDirection) {}