← Back

ofxPointInMesh

github.com/AmnonOwed/ofxPointInMesh · @AmnonOwed
OF 0.8 Geometry

An openFrameworks addon to check if a 3D point is inside an ofMesh

22 6 Last commit 11y ago Created 11y ago

Forks

Forks pushed to more recently than AmnonOwed/ofxPointInMesh itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

daitomanabe/ofxPointInMesh by @daitomanabe · ★ 0 · pushed 6y ago

README

ofxPointInMesh



Introduction

A straightforward C++ openFrameworks addon to check if a 3D point (ofVec3f) is inside a closed 3D ofMesh. To determine this, it uses the Möller–Trumbore ray-triangle intersection algorithm.

Usage

Use ofxPointInMesh's static method by passing a point and a mesh as arguments:

bool isInside = ofxPointInMesh::isInside(thePoint, theMesh);


Also see the examples. Project files for Windows Code::Blocks are included. You can use openFrameworks' ProjectGenerator to generate project files for other IDE's.

Author

Created by Amnon Owed / @AmnonOwed

License

Distributed under the MIT License.

Installation

Download/clone the addon into the openFrameworks/addons/ folder.

Dependencies

None.

Compatibility

Developed under OF 0.8.4.

Known issues

The ofMesh mode must be OF_PRIMITIVE_TRIANGLES to use this addon. Assumes, but doesn't check, it is a closed 3D mesh. For bugs, please use this repository's issue tracker.

Version history



Version 0.1.0 (17.04.2015):

Get this addon

HTTPS
SSH