[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/library/ezc/Graph/src/math/ -> vector.php (summary)

File containing the ezcGraphVector class

Copyright: Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
License: http://ez.no/licenses/new_bsd New BSD License
Version: 1.5
File Size: 194 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ezcGraphVector:: (11 methods):
  rotateCounterClockwise()
  rotateClockwise()
  unify()
  length()
  scalar()
  mul()
  angle()
  add()
  sub()
  fromCoordinate()
  transform()


Class: ezcGraphVector  - X-Ref

Represents two dimensional vectors

This class is internally used to represent vectors for geometric calculation
in the two dimensional cartesian coordinate system.

Vectors are an extension of the basic coordinate class, and add methods to
calculate the length of a vector, perform various operations on angles, like
rotations and the calculation of angles between two vectors.

rotateCounterClockwise()   X-Ref
Rotates vector to the left by 90 degrees

return: void

rotateClockwise()   X-Ref
Rotates vector to the right by 90 degrees

return: void

unify()   X-Ref
Unifies vector length to 1

return: void

length()   X-Ref
Returns length of vector

return: float

scalar( $value )   X-Ref
Multiplies vector with a scalar

param: float $value
return: void

mul( ezcGraphCoordinate $vector )   X-Ref
Calculates scalar product of two vectors

param: ezcGraphCoordinate $vector
return: void

angle( ezcGraphCoordinate $vector )   X-Ref
Returns the angle between two vectors in radian

param: ezcGraphCoordinate $vector
return: float

add( ezcGraphCoordinate $vector )   X-Ref
Adds a vector to another vector

param: ezcGraphCoordinate $vector
return: void

sub( ezcGraphCoordinate $vector )   X-Ref
Subtracts a vector from another vector

param: ezcGraphCoordinate $vector
return: void

fromCoordinate( ezcGraphCoordinate $coordinate )   X-Ref
Creates a vector from a coordinate object

param: ezcGraphCoordinate $coordinate
return: ezcGraphVector

transform( ezcGraphTransformation $transformation )   X-Ref
Transform vector using transformation matrix

param: ezcGraphTransformation $transformation
return: ezcGraphVector



Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7