Chapter 20
526
Vector binary operations
Use these syntaxes to perform additional vector math calculations:
Transforms
A transform is a data object describing a model’s position, orientation, and scale in the 3D world.
Transform functions can be used to move a given vector, light, camera, or model from its current
location to a new position and/or orientation.
Transform creation function
Use the
transform()
function to create a new
transform
data object:
distanceTo
(
vector2
)
Returns the distance between
vector
and
vector2
.
If these
vectors represent positions in the 3D world, this is the distance
between them.
Floating-point value of
distance.
duplicate()
A copy of the vector.
A new vector object.
Operator
Description
Returns
vector1
+vector2
Returns a new vector equaling
vector1
+vector2
for
x
equaling 1 through 3.
A new vector object
vector1 -
vector2
Returns a new vector equaling
vector1 -vector2
for
x
equaling 1 through 3.
A new vector object
vector1*
vector2
Returns the product of the two vectors.
A floating-point value
vector1/
vector2
Not supported.
0
vector2*scalar
Returns a new vector equaling
vector2 * scalar
for
x
equaling 1 through 3.
A new vector object
vector2/scalar
Returns a new vector equaling
vector2/scalar
.
A new vector object
transform*
vector
Returns a new vector resulting from applying the positional and
transformation changes defined by
transform
to
vector
.
Note that vector*transform is an invalid operation.
A new vector object
scalar-vector1
Returns a new vector equaling
scalar-vector1
.
A new vector object
vector1-scalar
Returns a new vector
equaling
vector1-scalar
.
A new vector object
vector1
Returns a new vector equaling
vector1
.
A new vector object
v
scalar
Returns a new vector equaling
v scalar
.
A new vector object
Function
Description
Returns
transform()
Creates a new transform initialized as the identity transform. The
identity transform has no rotation and a vector position of
(0,0,0)
A new transform object
Command
Description
Returns
Содержание DIRECTOR MX-USING DIRECTOR MX
Страница 1: ...Using Director MX Macromedia Director MX...
Страница 12: ...Contents 12...
Страница 156: ...Chapter 4 156...
Страница 202: ...Chapter 6 202...
Страница 244: ...Chapter 7 244...
Страница 292: ...Chapter 10 292...
Страница 330: ...Chapter 12 330...
Страница 356: ...Chapter 13 356...
Страница 372: ...Chapter 14 372...
Страница 442: ...Chapter 16 442...
Страница 472: ...Chapter 18 472...
Страница 520: ...Chapter 19 520...
Страница 536: ...Chapter 20 536...
Страница 562: ...Chapter 23 562...
Страница 566: ...Chapter 24 566...
Страница 602: ...Chapter 27 602...