MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual page 398

Hide thumbs Also See for DIRECTOR MX 2004-USING DIRECTOR:
Table of Contents

Advertisement

Vector methods
Use these methods to work with vectors:
Method
normalize()
get
Normalized()
dot(vector2)
angleBetween
(vector2)
cross(vector2)
or
crossProduct
(vector2)
or
perpendicular
To(vector2)
distanceTo
(vector2)
duplicate()
Vector binary operations
Use these syntaxes to perform additional vector math calculations:
Note: JavaScript does not support these operations for vector objects. In JavaScript, you must write
the code to perform the vector math calculations using the vectors' x, y, and z coordinates.
Operator
vector1 +vector2
vector1 -vector2
vector1*
vector2
vector1/vector2
vector2*scalar
398
Chapter 17: Controlling the 3D World
Description
Normalizes the vector by modifying it into a unit vector of
length 1. This is done by dividing each component of the
vector by the vector's original length. That original length
is the square root of the sum of the squares of each
component.
Returns a normalized version of the vector.
Returns the dot (inner) product of the first vector and the
second vector (
vector2
length, the result is the cosine of the angle between the
two vectors.
Returns the angle between
degrees.
Returns a vector perpendicular to the original vector and
to
.
vector2
Returns the distance between
these vectors represent positions in the 3D world, this is
the distance between them.
A copy of the vector.
Description
Returns a new vector equaling
equaling 1 through 3.
Returns a new vector equaling
for
vector1 -vector2
x
Returns the product of the two vectors.
Not supported.
Returns a new vector equaling
for
vector2 * scalar
x
). If both vectors are of unit
and
vector
vector2
and
vector
vector2
vector1 +vector2
equaling 1 through 3.
equaling 1 through 3.
Returns
Nothing. Vector is
modified.
A new vector object.
Dot product of the
two vectors.
, in
Value of the angle in
degrees.
A new vector object.
. If
Floating-point value
of distance.
A new vector object.
Returns
for
A new vector object
x
A new vector object
A floating-point value
0
A new vector object

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?

This manual is also suitable for:

Director mx 2004

Table of Contents