### Hierarchy

- Drawable
  - RotatedRectangle

## Index

### Constructors

- constructor

### Properties

- center
- rotation
- size

### Methods

- getObjectToSerialize
- minDistance

### Object literals

- descriptor

## Constructors

### constructor

- new RotatedRectangle(center: vec2, size: vec2, rotation: number): RotatedRectangle

- - Defined in drawables/shapes/rotated-rectangle.ts:46

  #### Parameters

  - ##### center: vec2

  - ##### size: vec2

  - ##### rotation: number

  #### Returns RotatedRectangle

## Properties

### center

center: vec2

- Defined in drawables/shapes/rotated-rectangle.ts:48

### rotation

rotation: number

- Defined in drawables/shapes/rotated-rectangle.ts:48

### size

size: vec2

- Defined in drawables/shapes/rotated-rectangle.ts:48

## Methods

### Protected getObjectToSerialize

- getObjectToSerialize(transform2d: mat2d, transform1d: number): any

- Overrides Drawable.getObjectToSerialize

  - Defined in drawables/shapes/rotated-rectangle.ts:60

  #### Parameters

  - ##### transform2d: mat2d

  - ##### transform1d: number

  #### Returns any

### minDistance

- minDistance(target: vec2): number

- Overrides Drawable.minDistance

  - Defined in drawables/shapes/rotated-rectangle.ts:56

  It is just an estimate by calculating a bounding circle

  #### Parameters

  - ##### target: vec2

  #### Returns number

## Object literals

### Static descriptor

descriptor: object

Overrides Drawable.descriptor

- Defined in drawables/shapes/rotated-rectangle.ts:9

### empty

empty: RotatedRectangle = new RotatedRectangle(vec2.create(), vec2.create(), 0)

- Defined in drawables/shapes/rotated-rectangle.ts:45

### shaderCombinationSteps

shaderCombinationSteps: number[] = [0, 1, 2, 3, 8, 16]

- Defined in drawables/shapes/rotated-rectangle.ts:44

### uniformCountMacroName

uniformCountMacroName: string = "ROTATED_RECTANGLE_COUNT"

- Defined in drawables/shapes/rotated-rectangle.ts:43

### propertyUniformMapping

propertyUniformMapping: object

- Defined in drawables/shapes/rotated-rectangle.ts:38

### bottomCenter

bottomCenter: string = "rotatedRectangleBottomCenters"

- Defined in drawables/shapes/rotated-rectangle.ts:40

### topCenter

topCenter: string = "rotatedRectangleTopCenters"

- Defined in drawables/shapes/rotated-rectangle.ts:39

### width

width: string = "rotatedRectangleWidths"

- Defined in drawables/shapes/rotated-rectangle.ts:41

### sdf

sdf: object

- Defined in drawables/shapes/rotated-rectangle.ts:10

### distanceFunctionName

distanceFunctionName: string = "rotatedRectangleMinDistance"

- Defined in drawables/shapes/rotated-rectangle.ts:36

### shader

shader: string = `uniform vec2 rotatedRectangleTopCenters[ROTATED_RECTANGLE_COUNT];uniform vec2 rotatedRectangleBottomCenters[ROTATED_RECTANGLE_COUNT];uniform float rotatedRectangleWidths[ROTATED_RECTANGLE_COUNT];float rotatedRectangleMinDistance(vec2 target, out float colorIndex) {colorIndex = 4.0;float minDistance = 1000.0;for (int i = 0; i < ROTATED_RECTANGLE_COUNT; i++) {vec2 top = rotatedRectangleTopCenters[i];vec2 bottom = rotatedRectangleBottomCenters[i];float height = length(bottom - top);vec2 d = (bottom - top) / height;vec2 q = (target - (top + bottom) * 0.5);q = mat2(d.x, -d.y, d.y, d.x) * q;q = abs(q) - vec2(height, rotatedRectangleWidths[i]) * 0.5;float dist = length(max(q, 0.0)) + min(max(q.x, q.y), 0.0);minDistance = min(minDistance, dist);}return minDistance;}`

- Defined in drawables/shapes/rotated-rectangle.ts:12