new Ray(start, direction, length)
Ray.
Parameters:
Name | Type | Description |
---|---|---|
start |
Grape2D.Vector | Start of the ray. |
direction |
Grape2D.Vector | Direction of the ray. |
length |
number | Direction of the ray. |
- Source:
Methods
-
getDirection() → {Grape2D.Vector}
-
Gets the direction of the ray.
- Source:
Returns:
Direction of the ray.- Type
- Grape2D.Vector
-
getEnd() → {Grape2D.Vector}
-
Gets the end position of the ray. This is computed, resulting from from the scalar multiplication of the direction by the length, added by the start position.
- Source:
Returns:
End of the ray.- Type
- Grape2D.Vector
-
getLength() → {number}
-
Gets the length of the ray.
- Source:
Returns:
Length of the ray.- Type
- number
-
getStart() → {Grape2D.Vector}
-
Gets the start position of the ray.
- Source:
Returns:
Start of the ray.- Type
- Grape2D.Vector
-
getStaticType() → {string}
-
Gets the static type
- Source:
Returns:
Type.- Type
- string