Skip to content

Commit

Permalink
Added GetColor that returns FColor opposed to a vector
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernveit committed Aug 13, 2018
1 parent 8389876 commit ac6c6ee
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Source/UROSBridge/Public/std_msgs/ColorRGBA.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ namespace std_msgs
R = Vector.X; G = Vector.Y; B = Vector.Z; A = Vector.W;
}

FColor GetColor()
{
return FColor(R,G,B,A);
}

void SetColor(const FColor Color)
{
R = Color.R; G = Color.G; B = Color.B; A = Color.A;
}

virtual void FromJson(TSharedPtr<FJsonObject> JsonObject) override
{
R = (float)(JsonObject->GetNumberField(TEXT("r")));
Expand Down

0 comments on commit ac6c6ee

Please sign in to comment.