1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
<html>
<head>
<title>NVIDIA(R) Blast(R) SDK 1.1 Source Reference: sdk/extensions/authoring/source/VHACD/inc/vhacdRaycastMesh.h Source File</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK HREF="NVIDIA.css" REL="stylesheet" TYPE="text/css">
</head>
<body bgcolor="#FFFFFF">
<div id="header">
<hr class="first">
<img alt="" src="blast_logo.png">
<br>
<center>
<a class="qindex" href="main.html">Main Page</a>
<!-- <a class="qindex" href="hierarchy.html">Class Hierarchy</a> //-->
<a class="qindex" href="annotated.html">Class List</a>
<a class="qindex" href="functions.html">Class Members</a>
</center>
<hr class="second">
</div>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>User's Guide</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>File Members</span></a></li>
</ul>
</div>
<h1>sdk/extensions/authoring/source/VHACD/inc/vhacdRaycastMesh.h</h1><a href="vhacd_raycast_mesh_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef RAYCAST_MESH_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span>
<a name="l00003"></a>00003 <span class="preprocessor">#define RAYCAST_MESH_H</span>
<a name="l00004"></a>00004 <span class="preprocessor"></span>
<a name="l00005"></a>00005 <span class="preprocessor">#include <stdint.h></span>
<a name="l00006"></a>00006
<a name="l00007"></a>00007 <span class="keyword">namespace </span>VHACD
<a name="l00008"></a>00008 {
<a name="l00009"></a>00009
<a name="l00010"></a>00010 <span class="comment">// Very simple brute force raycast against a triangle mesh. Tests every triangle; no hierachy.</span>
<a name="l00011"></a>00011 <span class="comment">// Does a deep copy, always does calculations with full double float precision</span>
<a name="l00012"></a><a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html">00012</a> <span class="keyword">class </span><a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html">RaycastMesh</a>
<a name="l00013"></a>00013 {
<a name="l00014"></a>00014 <span class="keyword">public</span>:
<a name="l00015"></a>00015 <span class="keyword">static</span> <a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html">RaycastMesh</a> * <a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html#6a1024989eba5ce6650d87780a1b7a3a">createRaycastMesh</a>(uint32_t vcount, <span class="comment">// The number of vertices in the source triangle mesh</span>
<a name="l00016"></a>00016 <span class="keyword">const</span> <span class="keywordtype">double</span> *vertices, <span class="comment">// The array of vertex positions in the format x1,y1,z1..x2,y2,z2.. etc.</span>
<a name="l00017"></a>00017 uint32_t tcount, <span class="comment">// The number of triangles in the source triangle mesh</span>
<a name="l00018"></a>00018 <span class="keyword">const</span> uint32_t *indices); <span class="comment">// The triangle indices in the format of i1,i2,i3 ... i4,i5,i6, ...</span>
<a name="l00019"></a>00019
<a name="l00020"></a>00020 <span class="keyword">static</span> <a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html">RaycastMesh</a> * <a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html#6a1024989eba5ce6650d87780a1b7a3a">createRaycastMesh</a>(uint32_t vcount, <span class="comment">// The number of vertices in the source triangle mesh</span>
<a name="l00021"></a>00021 <span class="keyword">const</span> <span class="keywordtype">float</span> *vertices, <span class="comment">// The array of vertex positions in the format x1,y1,z1..x2,y2,z2.. etc.</span>
<a name="l00022"></a>00022 uint32_t tcount, <span class="comment">// The number of triangles in the source triangle mesh</span>
<a name="l00023"></a>00023 <span class="keyword">const</span> uint32_t *indices); <span class="comment">// The triangle indices in the format of i1,i2,i3 ... i4,i5,i6, ...</span>
<a name="l00024"></a>00024
<a name="l00025"></a>00025
<a name="l00026"></a>00026 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html#930ab641744d36f2828e1a81ab53cf78">raycast</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> *from, <span class="comment">// The starting point of the raycast</span>
<a name="l00027"></a>00027 <span class="keyword">const</span> <span class="keywordtype">double</span> *to, <span class="comment">// The ending point of the raycast</span>
<a name="l00028"></a>00028 <span class="keyword">const</span> <span class="keywordtype">double</span> *closestToPoint, <span class="comment">// The point to match the nearest hit location (can just be the 'from' location of no specific point)</span>
<a name="l00029"></a>00029 <span class="keywordtype">double</span> *hitLocation, <span class="comment">// The point where the ray hit nearest to the 'closestToPoint' location</span>
<a name="l00030"></a>00030 <span class="keywordtype">double</span> *hitDistance) = 0; <span class="comment">// The distance the ray traveled to the hit location</span>
<a name="l00031"></a>00031
<a name="l00032"></a>00032 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html#ce94007f6b1f996ffe11194641f7c8dc">release</a>(<span class="keywordtype">void</span>) = 0;
<a name="l00033"></a>00033 <span class="keyword">protected</span>:
<a name="l00034"></a><a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html#a2da844c427008bcfc49554f2d015db4">00034</a> <span class="keyword">virtual</span> <a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html#a2da844c427008bcfc49554f2d015db4">~RaycastMesh</a>(<span class="keywordtype">void</span>) { };
<a name="l00035"></a>00035 };
<a name="l00036"></a>00036
<a name="l00037"></a>00037 } <span class="comment">// end of VHACD namespace</span>
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="preprocessor">#endif</span>
</pre></div></div>
<!-- start footer part -->
<div class="footer">
Copyright © 2015-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a>
</div>
</body>
</html>
|