API Docs for: 1.1.0
Show:

Kiwi.Geom.Ray Class

Defined in: src\geom\Ray.ts:9
Module: Geom
Parent Module: Kiwi

Represents a halfline. The ray starts at the first point and extends infinitely in the direction of the second.

Constructor

Kiwi.Geom.Ray

(
  • [x1
  • [y1
  • [x2
  • [y2
)
Kiwi.Geom.Ray

Defined in src\geom\Ray.ts:9

Parameters:

  • [x1 Number

    = 0] x1

  • [y1 Number

    = 0] y1

  • [x2 Number

    = 0] x2

  • [y2 Number

    = 0] y2

Returns:

Kiwi.Geom.Ray:

This Object

Methods

clone

(
  • [output
)
Kiwi.Geom.Ray public

Defined in src\geom\Ray.ts:71

Makes a copy of this Ray either as a new Ray object or, makes a passed Ray a copy of this one.

Parameters:

Returns:

copyFrom

(
  • source
)
Kiwi.Geom.Ray public

Defined in src\geom\Ray.ts:85

Makes this Ray the same as a passed Ray.

Parameters:

Returns:

copyTo

(
  • target
)
Kiwi.Geom.Ray public

Defined in src\geom\Ray.ts:98

Makes a passed Ray the same as this Ray object.

Parameters:

Returns:

isPointOnRay

(
  • x
  • y
)
Boolean

Defined in src\geom\Ray.ts:169

Check if the Ray passes through a point.

Parameters:

  • x Number
  • y Number

Returns:

Boolean:

objType

() String public

Defined in src\geom\Ray.ts:29

The type of this object.

Returns:

String:

setTo

(
  • x1
  • y1
  • x2
  • y2
)
Kiwi.Geom.Ray public

Defined in src\geom\Ray.ts:111

Sets the origin and the direction of this Ray.

Parameters:

  • x1 Number
  • y1 Number
  • x2 Number
  • y2 Number

Returns:

toString

() String

Defined in src\geom\Ray.ts:192

Get a string representation of the ray.

Returns:

String:

Properties

angle

Unknown public

Defined in src\geom\Ray.ts:132

Get the angle of the ray.

slope

Unknown public

Defined in src\geom\Ray.ts:144

Get the slope of the ray.

x1

Number public

Defined in src\geom\Ray.ts:39

The x component of the initial point of the ray

x2

Number public

Defined in src\geom\Ray.ts:55

The x component of the direction point of the ray

y1

Number public

Defined in src\geom\Ray.ts:47

The y component of the initial point of the ray

y2

Number public

Defined in src\geom\Ray.ts:63

The y component of the direction point of the ray

yIntercept

Unknown public

Defined in src\geom\Ray.ts:156