我无法与Three.Points相交,但我可以相交THREE.Mesh,下面是我的代码:有人可以帮助我理解我正在犯的错误。当我与Points相交时,我得到的是0。
Declare @Table table (Id varchar(25),Employee_name varchar(25), Address varchar(25))
Insert @Table values
(101,'A1','B1' ),
(102,'A2','B2' ),
(103,'A3','B3' ),
(104,'A3','B4' ),
(105,'A3','B5' )
select field_content as selected_column_content
from (
select
field_name, field_content
FROM
(Select cast(id as varchar(max)) as id,
cast(Employee_name as varchar(max)) as Employee_name,
cast(address as varchar(max)) as address from @Table) A
unpivot (
field_content
FOR field_name
IN (a.id,a.Employee_name,a.address)
) AS unpvt
where upper(field_name) = upper('id')
) unpvt1
unpivot
( Value FOR
Column_Name in (unpvt1.field_name)) piv
;
答案 0 :(得分:0)
function onDocumentMouseDown( event ) {
event.preventDefault();
if(event.which == 1) {
var raycaster = new THREE.Raycaster();
raycaster.setFromCamera( mouse, camera );
raycaster.params.Points.threshold = 100000; // bigger number = bigger sensitivity
var intersects = raycaster.intersectObjects( myobjectsarray,false); // myobject array is array of THREE.Points object
if ( intersects.length > 0 ) {console.log('tadaah',intersects);}
}
}