maptalks / maptalks/maptalks.three

Getting a intersect point for a fatline

Open
#636 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
650
Forks
138
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am wondering what need to be done to get able to return the intersect object for a fatline the same way other geometry does.
if const identifyobject = threeLayer.identify(e.coordinate) is called and an extrubde line or some other traditional geo is under the raycast you get intersect: {distance: 71.90185867002965, point: te, object: ni, uv: At, face: Object, …} but for a fatline this object does not exist.
Any help would be fantastic

Thanks
Karl

for ExtrudeLine:
{
distance: 66.34218774858776
face: {a: 9582, b: 9580, c: 9583, normal: te, materialIndex: 0}
faceIndex: 6512
object: ni {id: 3004, uuid: "469CCF2A-5A8A-43A7-8B38-61A27FCC4BAB", name: "line_High Alpine Epic", type: "Mesh", parent: sa, …}
point: te {x: 214505.55753861176, y: -57909.758113298514, z: 11.259509777421535, isVector3: true, setEulerFromRotationMatrix: function, …}
uv: At {x: -64.78330543256831, y: 4.032302238737918, isVector2: true, fromAttribute: function, distanceToManhattan: function, …}

FatLine:{
_eventMap: {add: Array, remove: Array}
_mouseover: false
_visible: true
_zoomVisible: true
id: 2962
isAdd: true
isBaseObject: true
layer: "t"
object3d: Line2 {id: 3002, uuid: "5FDD47F0-D1D2-4072-880D-07B31BEDDAB7", name: "", type: "Line2", parent: sa, …}
options: {interactive: true, altitude: 0, minZoom: 0, maxZoom: 30, asynchronous: false, …}
pickObject3d: Line2 {id: 3003, uuid: "90919E4C-50BD-420B-B264-96980706CF86", name: "", type: "Line2", parent: sa, …}
picked: false
type: "FatLine"
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with threeLayer.identify(e.coordinate) and compare the reported ExtrudeLine intersection with the FatLine's Line2 and pickObject3d objects. Determine how FatLine picking currently works and define what intersection data should be returned; done means identify provides an intersection object for FatLine consistently with other geometry.

Written by the indexing model from the issue text.

Assessment

Tech stack
three.js
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.