Vector Math - MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual

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

Advertisement

Vector math

A 3D vector describes both direction and location in 3D space. Vector objects include floating-
point values for position along each of the x-, y-, and z-axes. Vectors can be node-relative or
world-relative. If they are node-relative, their x, y, and z values are relative to the position of the
node. If they are world-relative, their x, y, and z directions are relative to the world.
Vector math operations perform calculations using each of the x, y, and z values. These
calculations are useful for performing intelligent movement and rotation of models.
Vector creation methods
Use these methods to create vectors:
Method
vector
(x,y,z)
random
Vector()
Vector properties
Use these properties to work with vectors:
Property
magnitude
length
[index]
x
y
z
Description
Creates a vector from arguments representing all axes.
Creates a vector describing a randomly chosen point on
the surface of a unit sphere. Differs from
vector(random(10)/10.0
because the
10.0)
randomVector()
results in a unit vector.
Access
Get
Get
Get and set
Get and set
Get and set
Get and set
,
,
random(10)/10.0
random(10)/
method always
Description
The magnitude of the vector. Equivalent to the length of
the vector.
The length of the vector. Equivalent to the magnitude of
the vector.
Returns the value of a vector at a specified point in an
index between 1 and 3.
The
component of a vector.
x
The
component of a vector.
y
The
component of a vector.
z
Returns
A vector object
A unit vector
Vector math
397

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?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents