Vector Math - Adobe 65036570 - Director - PC User Manual

User guide
Hide thumbs Also See for 65036570 - Director - PC:
Table of Contents

Advertisement

Method
Description
Returns a list of models under the ray starting at the vector
modelsUnder
Ray(location
locationVector
Vector,
directionVector
coordinates.
direction
Vector,
optionalMax
NumberOf
Models)

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- 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 the following methods to create vectors:
Method
Description
Creates a vector from arguments representing all axes.
vector
(x,y,z)
Creates a vector describing a randomly chosen point on the surface
random
of a unit sphere. Differs from
Vector()
random(10)/10.0
randomVector()
Vector properties
Use the following properties to work with vectors:
Property
Access
magnitude
get
length
get
and
[index]
get
and
x
get
and
y
get
and
z
get
and pointing down the vector
, with both vectors specified in world-relative
vector(random(10)/10.0
,
random(10)/10.0)
method always results in a unit vector.
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
set
1 and 3.
The
component of a vector.
set
x
The
component of a vector.
set
y
The
component of a vector.
set
z
Returns
The first model inter-
sected by the ray plus a list
of up to the specified
maximum number of
models.
If the maximum number
of models isn't specified,
all models that the ray
intersects are returned.
Returns
A vector object
A unit vector
,
because the
ADOBE DIRECTOR 11.0
382
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director 11

Table of Contents