Class Index | File Index

Classes


Class TKSegment

The TKSegment provides a TuneKit data type to deal with segments in 2D space and some utilities to work with them, such as figuring out the shortest distance between a segment and a point.


Defined in: Utils.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
TKSegment(a, b)
Field Summary
Field Attributes Field Name and Description
 
a
The first extremity of the segment.
 
b
The other extremity of the segment.
 
The segment's length.
Method Summary
Method Attributes Method Name and Description
 
Computes the shortest distance between this segment and the given point.
Class Detail
TKSegment(a, b)
Parameters:
{TKPoint} a
The first extremity of the segment.
{TKPoint} b
The other extremity of the segment.
Since:
TuneKit 1.0
Field Detail
{TKPoint} a
The first extremity of the segment.

{TKPoint} b
The other extremity of the segment.

{float} length
The segment's length.
Method Detail
{float} distanceToPoint(aPoint)
Computes the shortest distance between this segment and the given point.
Parameters:
{TKPoint} aPoint
Returns:
{float} The shortest distance between this segment and the given point.

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Nov 12 2009 16:54:54 GMT+0100 (CET)