Ejemplo n.º 1
0
		public void SetCenteringForMeshGroup(MeshGroup meshGroup)
		{
			AxisAlignedBoundingBox bounds = meshGroup.GetAxisAlignedBoundingBox();
			Vector3 boundsCenter = (bounds.maxXYZ + bounds.minXYZ) / 2;
			centering = Matrix4X4.CreateTranslation(-boundsCenter);
			// and move the translation back so the part does not move
			translation *= Matrix4X4.CreateTranslation(boundsCenter);
		}
Ejemplo n.º 2
0
		static AxisAlignedBoundingBox GetAxisAlignedBoundingBox(MeshGroup meshGroup, Matrix4X4 transform)
		{
			return meshGroup.GetAxisAlignedBoundingBox(transform);
		}