Uses of Record Class
cit244.api.geom.Vec2
Packages that use Vec2
Package
Description
Main API for CIT AViz sketches, including drawing, input, timing, and controls.
Two-dimensional geometry and vector operations.
Images, sprite regions, sprite sheets, and frame-based animation.
-
Uses of Vec2 in cit244.api
Methods in cit244.api that return Vec2Modifier and TypeMethodDescriptiondefault Vec2Input.mousePosition()Returns the mouse position in viewport coordinates.Methods in cit244.api with parameters of type Vec2Modifier and TypeMethodDescriptiondefault voidRuns a drawing block with its origin at the given position, restoring the previous state afterward.default voidDraws a circle centered at a vector at.default voidGraphics.curveVertex(Vec2 position) Adds a smooth curve vertex at the given position.default voidDraws a line between two positions.default voidDraws a point at a vector position.default voidDraws a rectangle at the given top-left position.default voidDraws a rectangle using vectors for its position and dimensions.default voidGraphics.rectCenter(Vec2 center, double width, double height) Draws a rectangle centered at the given position.default voidTranslates the coordinate system by a vector.default voidAdds a vertex at the given position to the current shape. -
Uses of Vec2 in cit244.api.geom
Fields in cit244.api.geom declared as Vec2Modifier and TypeFieldDescriptionstatic final Vec2Vec2.ZEROThe zero vector, with both components equal to zero.Methods in cit244.api.geom that return Vec2Modifier and TypeMethodDescriptionAdds another vector component-wise.static Vec2Blends between two vectors.Vec2.scaled(double factor) Multiplies both components by a scalar.Subtracts another vector component-wise.Vec2.translated(double dx, double dy) Returns this vector displaced by the given horizontal and vertical amounts.Methods in cit244.api.geom with parameters of type Vec2Modifier and TypeMethodDescriptionAdds another vector component-wise.doubleVec2.distanceTo(Vec2 other) Returns the Euclidean distance to another position.static Vec2Blends between two vectors.Subtracts another vector component-wise. -
Uses of Vec2 in cit244.api.image
Methods in cit244.api.image with parameters of type Vec2Modifier and TypeMethodDescriptionCreates drawing instructions at the given screen position.Returns drawing instructions at the given position.Moves the anchor by a displacement in screen coordinates.