Я нашел потрясающую ссылку из здесь , чтобы настроить и показать характерные точки AR.
Это прекрасно работает, но показывает пирамиды, и мне нужно показать плоские белые точки, как это:
![enter image description here](https://i.stack.imgur.com/cY6xP.png)
Что мне нужнонаписать, чтобы показать белые точки вместо пирамид?
Обновление: Это то, что я наконец-то сделал, и это прекрасно работает:
if (this.timestamp != cloud.timestamp && materialHolder.getNow(null) != null) {
timestamp = cloud.timestamp
val buf = cloud.points
// Point clouds are 4 values x,y,z and a confidence value.
numOfFeaturePoints = buf.limit() / 4
// no features in the cloud
if (numOfFeaturePoints < 1) {
renderable = null
return
}
if (isInProcess) {
return
}
isInProcess = true
// remove current feature points
for (child in children) {
child.renderable = null
}
// add the new feature points as dots
val feature = Vector3()
for (i in 0 until buf.limit() / 4) {
// feature point
feature.x = buf.get(i * 4)
feature.y = buf.get(i * 4 + 1)
feature.z = buf.get(i * 4 + 2)
val node = Node()
node.renderable = ShapeFactory.makeCylinder(0.01f, 0.001f, Vector3(feature.x, feature.y, feature.z), myMaterial)
node.renderable!!.isShadowCaster = false
node.setParent(this)
}
isInProcess = false
}