稀疏八叉树:一种稀疏八叉树数据结构

时间:2021-02-01 21:20:33
【文件属性】:
文件名称:稀疏八叉树:一种稀疏八叉树数据结构
文件大小:1.05MB
文件格式:ZIP
更新时间:2021-02-01 21:20:33
octree sparse raycasting culling 3d 稀疏八度 一种基于指针的稀疏八叉树数据结构。 有关线性实现,请参见 。 ·· 安装 该库需要对等依赖关系 。 npm install math-ds sparse-octree 用法 点数 import { Vector3 } from "math-ds" ; import { PointOctree } from "sparse-octree" ; const min = new Vector3 ( - 1 , - 1 , - 1 ) ; const max = new Vector3 ( 1 , 1 , 1 ) ; const octree = new PointOctree ( min , max ) ; const myData = { } ; const p1 = new Vector3 ( 0 , 0 , 0 ) ; const p2 = new Vector3 ( 0 , 0 , 0.5 ) ; octree . insert ( p1 , myData ) ; octree . move ( p1 , p2 ) ; octree . get ( p2 ) ; //

网友评论