Script
Public Slots | Public Member Functions | Properties | List of all members
Vector2d Class Reference

#include <math.h>

Inheritance diagram for Vector2d:
Inheritance graph
[legend]
Collaboration diagram for Vector2d:
Collaboration graph
[legend]

Public Slots

bool isZero ()
 Test if Vector2d is zero.
 
bool isEqual (Vector2d v2)
 Test if the two vectors are equals.
 
bool isNotEqual (Vector2d v2)
 Test if the two vectors are not equals.
 
double length ()
 Retrieve length of Vector2d.
 
double lengthSq ()
 Retrieve square length of Vector2d.
 
double radianAngle ()
 Retrieve radian angle defined by Vector2d.
 
double degreeAngle ()
 Retrieve degree angle defined by Vector2d.
 
double dot (Vector2d v2)
 Calculate dot product between current Vector2d and specified Vector2d.
 
Vector2drotate (double rad)
 Rotate Vector2d counter-clockwise of specified radian angle.
 
Vector2drotate90 ()
 Rotate Vector2d counter-clockwise of 90 degrees.
 
Vector2drotate270 ()
 Rotate Vector2d counter-clockwise of 270 degrees.
 
Vector2dproject (Vector2d v2)
 Project current Vector2d onto specified Vector2d.
 
Vector2d getProjection (Vector2d v2)
 Project current Vector2d onto specified Vector2d.
 
Vector2dnormalize ()
 Normalize current Vector2d.
 
Vector2d getNormalized ()
 Normalize current Vector2d.
 
Vector2dnegate ()
 Negate current Vector2d.
 

Public Member Functions

 Vector2d ()
 Create a new empty Vector2d.
 
 Vector2d (double x, double y)
 Create a new Vector2d.
 

Properties

double x
 x value
 
double y
 y value
 

Detailed Description

The Vector2d class defines a bi-dimensional vector container. Vector2d objects can be instantiated in the scripting environment.

You can use it in both Script Editor and scriptModule.

Constructor & Destructor Documentation

Vector2d::Vector2d ( )

Create a new empty Vector2d.

Vector2d::Vector2d ( double  x,
double  y 
)

Create a new Vector2d.

Parameters
xX value
yY value

Member Function Documentation

double Vector2d::degreeAngle ( )
slot

Retrieve degree angle defined by Vector2d.

Returns
Degree value
double Vector2d::dot ( Vector2d  v2)
slot

Calculate dot product between current Vector2d and specified Vector2d.

Parameters
v2Second Vector2d
Returns
Dot product value
Vector2d Vector2d::getNormalized ( )
slot

Normalize current Vector2d.

Returns
new normalized Vector2d
Vector2d Vector2d::getProjection ( Vector2d  v2)
slot

Project current Vector2d onto specified Vector2d.

Parameters
v2Vector2d to project onto
Returns
new projected Vector2d
bool Vector2d::isEqual ( Vector2d  v2)
slot

Test if the two vectors are equals.

Parameters
v2Second Vector2d
Returns
Result of test
bool Vector2d::isNotEqual ( Vector2d  v2)
slot

Test if the two vectors are not equals.

Parameters
v2Second Vector2d
Returns
Result of test
bool Vector2d::isZero ( )
slot

Test if Vector2d is zero.

Returns
Result of test
double Vector2d::length ( )
slot

Retrieve length of Vector2d.

Returns
Length
double Vector2d::lengthSq ( )
slot

Retrieve square length of Vector2d.

Returns
Square length
Vector2d& Vector2d::negate ( )
slot

Negate current Vector2d.

Returns
Vector2d reference
Vector2d& Vector2d::normalize ( )
slot

Normalize current Vector2d.

Returns
Vector2d reference
Vector2d& Vector2d::project ( Vector2d  v2)
slot

Project current Vector2d onto specified Vector2d.

Parameters
v2Vector2d to project onto
Returns
Vector2d reference
double Vector2d::radianAngle ( )
slot

Retrieve radian angle defined by Vector2d.

Returns
Radian value
Vector2d& Vector2d::rotate ( double  rad)
slot

Rotate Vector2d counter-clockwise of specified radian angle.

Parameters
radRadian angle
Returns
Vector2d reference
Vector2d& Vector2d::rotate270 ( )
slot

Rotate Vector2d counter-clockwise of 270 degrees.

Returns
Vector2d reference
Vector2d& Vector2d::rotate90 ( )
slot

Rotate Vector2d counter-clockwise of 90 degrees.

Returns
Vector2d reference

Property Documentation

double Vector2d::x
readwrite

x value

double Vector2d::y
readwrite

y value


The documentation for this class was generated from the following file: