Skip to content

Instantly share code, notes, and snippets.

View rotoglup's full-sized avatar

Nicolas Lelong rotoglup

View GitHub Profile
@rotoglup
rotoglup / 201909 - a look into threejs raycaster.md
Last active December 2, 2022 11:55
201909 - a look into threejs raycaster

A look into threejs raycaster

I've been looking at the current master source code, not a specific version : github commit b3ce68b4 on sept. 2019.

The source code is located in src/core/Raycaster.js, and the doc is online.

A Raycaster instance is constructed given a ray (origin point + direction vector) and a range on this ray (near, far distances), and offers the following API :

  • intersectObject( object, recursive, optionalTarget ) : Array
@rotoglup
rotoglup / CMake usage.md
Last active December 20, 2022 12:02
Some notes about CMake constructs I had to use here and there

IMPORTED library

add_library(NvGPUDirect::DVP SHARED IMPORTED)
target_include_directories(NvGPUDirect::DVP INTERFACE "${NV_GPU_DIRECT_INCLUDE_DIR}")
set_target_properties(NvGPUDirect::DVP 
  PROPERTIES
    IMPORTED_IMPLIB ${NV_GPU_DIRECT_IMPLIB}
)