geomUtils.Line Class

Module: cc Parent Module: cc

line

Index

Properties
  • s Vec3 Start points.
  • e Vec3 End points.
Methods
  • create create a new line
  • clone Creates a new line initialized with values from an existing line
  • copy Copy the values from one line to another
  • fromPoints create a line from two points
  • set Set the components of a Vec3 to the given values
  • len Calculate the length of the line.
  • length Calculate the length of the line.

Details

Properties

s

Start points.

meta description
Type Vec3
Defined in cocos2d/core/geom-utils/line.ts:147
e

End points.

meta description
Type Vec3
Defined in cocos2d/core/geom-utils/line.ts:156

Methods

create

create a new line

meta description
Returns Line
Defined in cocos2d/core/geom-utils/line.ts:40
Parameters
  • sx Number The x part of the starting point.
  • sy Number The y part of the starting point.
  • sz Number The z part of the starting point.
  • ex Number The x part of the end point.
  • ey Number The y part of the end point.
  • ez Number The z part of the end point.
clone

Creates a new line initialized with values from an existing line

meta description
Returns Line
Defined in cocos2d/core/geom-utils/line.ts:58
Parameters
  • a Line The source of cloning.
copy

Copy the values from one line to another

meta description
Returns Line
Defined in cocos2d/core/geom-utils/line.ts:74
Parameters
  • out Line The object that accepts the action.
  • a Line The source of the copy.
fromPoints

create a line from two points

meta description
Returns Line
Defined in cocos2d/core/geom-utils/line.ts:91
Parameters
  • out Line The object that accepts the action.
  • start Vec3 The starting point.
  • end Vec3 At the end.
set

Set the components of a Vec3 to the given values

meta description
Returns Line
Defined in cocos2d/core/geom-utils/line.ts:108
Parameters
  • out Line The object that accepts the action.
  • sx Number The x part of the starting point.
  • sy Number The y part of the starting point.
  • sz Number The z part of the starting point.
  • ex Number The x part of the end point.
  • ey Number The y part of the end point.
  • ez Number The z part of the end point.
len

Calculate the length of the line.

meta description
Returns Number
Defined in cocos2d/core/geom-utils/line.ts:134
Parameters
  • a Line The line to calculate.
length

Calculate the length of the line.

meta description
Returns Number
Defined in cocos2d/core/geom-utils/line.ts:184

results matching ""

    No results matching ""