对象中的矩阵代表什么

对象中的矩阵代表什么

本文介绍了Three.js - 3D 对象中的矩阵代表什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看THREE.Object3D的源码,共有三个属性:matrixmatrixWorldmatrixRotationWorld.

Looking at the source of THREE.Object3D, there are three properties: matrix, matrixWorld and matrixRotationWorld.

我看到可以从 matrix 中提取对象的位置、缩放和旋转.我还看到可以从 matrixWorld 中提取对象上某个点的世界位置.

I see that the object's position, scale and rotation can be extracted from matrix. I also see that the world position of a point on the object can be extracted from matrixWorld.

我的问题:

  • matrixmatrixWorld 表示相同的信息,即矩阵可以转换为matrixWorld,反之亦然吗?

  • Do matrix and matrixWorld represent the same information, i.e. can matrix be converted to matrixWorld, and vice versa?

matrixRotationWorld 代表什么?它是干什么用的?并且可以转换为matrix和/或matrixWorld吗?

What does matrixRotationWorld represent? What is it used for? And can it be converted to matrix and/or matrixWorld?

谢谢

推荐答案

object.matrix 是对象的矩阵变换.

object.matrixWorld 是对象的矩阵变换,考虑对象的父对象的矩阵变换.(对象的父对象也可能有父对象,所以object.matrixWorld 的计算是递归的.)

object.matrixWorld is the matrix transform of the object, taking into consideration the matrix transform of the object's parent. (The object's parent may also have a parent, so the calculation of object.matrixWorld is recursive.)

object.matrixobject.matrixWorld 当对象除了场景之外没有父对象时是相同的.

object.matrix and object.matrixWorld are identical when the object has no parent, other than the scene.

object.matrixRotationWorld 不再存在.

three.js r.69

three.js r.69

这篇关于Three.js - 3D 对象中的矩阵代表什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 04:37