From b1b55abc00fa50b167fa7e20ff2f79506caaeea7 Mon Sep 17 00:00:00 2001 From: bruno-f-cruz <7049351+bruno-f-cruz@users.noreply.github.com> Date: Tue, 31 Mar 2026 08:39:31 -0700 Subject: [PATCH] Add Size and Vector2 common class --- src/aind_behavior_services/common.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/aind_behavior_services/common.py b/src/aind_behavior_services/common.py index cf33974a..7e63bb9e 100644 --- a/src/aind_behavior_services/common.py +++ b/src/aind_behavior_services/common.py @@ -19,6 +19,15 @@ class Rect(BaseModel): height: int = Field(default=0, ge=0, description="Height of the rectangle") +class Size(BaseModel): + """ + Represents 2D dimensions with width and height. + """ + + width: float = Field(default=0, description="Width of the texture") + height: float = Field(default=0, description="Height of the texture") + + class Circle(BaseModel): """Represents a circle defined by its center point and radius.""" @@ -26,6 +35,15 @@ class Circle(BaseModel): radius: float = Field(default=1, ge=0, description="Radius of the circle (px)") +class Vector2(BaseModel): + """ + Represents a 2D vector with float coordinates. + """ + + x: float = Field(default=0, description="X coordinate of the vector") + y: float = Field(default=0, description="Y coordinate of the vector") + + class Vector3(BaseModel): """Represents a 3D vector with float coordinates."""