AABB
AlignmentBehavior
ArriveBehavior
AStar
BFS
BoundingSphere
BVH
BVHNode
Cell
CellSpacePartitioning
CohesionBehavior
CompositeGoal
ConvexHull
Corridor
CostTable
DFS
Dijkstra
Edge
EntityManager
EvadeBehavior
EventDispatcher
Behavior
FollowPathBehavior
FuzzyAND
FuzzyCompositeTerm
FuzzyFAIRLY
FuzzyModule
FuzzyOR
FuzzyRule
FuzzySet
FuzzyTerm
FuzzyVariable
FuzzyVERY
GameEntity
Goal
GoalEvaluator
Graph
GraphUtils
HalfEdge
HeuristicPolicyDijkstra
HeuristicPolicyEuclid
HeuristicPolicyEuclidSquared
HeuristicPolicyManhattan
InterposeBehavior
LeftSCurveFuzzySet
LeftShoulderFuzzySet
LineSegment
Logger
MathUtils
Matrix3
Matrix4
MemoryRecord
MemorySystem
MeshGeometry
MessageDispatcher
MovingEntity
NavEdge
NavMesh
NavMeshLoader
NavNode
Node
NormalDistFuzzySet
OBB
ObstacleAvoidanceBehavior
OffsetPursuitBehavior
OnPathBehavior
Path
Plane
Polygon
Polyhedron
PriorityQueue
PursuitBehavior
Quaternion
Ray
RectangleTriggerRegion
Regular
RightSCurveFuzzySet
RightShoulderFuzzySet
SAT
SeekBehavior
SeparationBehavior
SingletonFuzzySet
Smoother
SphericalTriggerRegion
State
StateMachine
SteeringBehavior
SteeringManager
Task
TaskQueue
Telegram
Think
Time
TriangularFuzzySet
Trigger
TriggerRegion
Vector3
Vehicle
Version
WanderBehavior

multiply

**描述:**该方法用于将矩阵与另一个矩阵相乘,得到一个新的矩阵。

语法:

matrix3.multiply(matrix)

参数:

  • matrix: 一个Matrix3类型的矩阵。

返回值:

返回一个新的Matrix3类型的矩阵,表示两个矩阵相乘的结果。

示例:

var matrix1 = new Yuka.Matrix3();
matrix1.fromArray([1, 2, 3, 4, 5, 6, 7, 8, 9]);

var matrix2 = new Yuka.Matrix3();
matrix2.fromArray([2, 0, 1, 3, 2, 1, 1, 4, 1]);

var resultMatrix = matrix1.multiply(matrix2);

在以上示例中,我们首先创建了两个Matrix3类型的矩阵。然后使用 fromArray() 方法将数组转换为矩阵。最后调用 multiply() 方法将这两个矩阵相乘,得到一个新的矩阵。

备注:

本方法不会改变原矩阵,而是返回一个新的矩阵。

该方法用于实现比如变换、投影、旋转等矩阵运算,是3D图形学中常用的方法之一。