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
|
<html>
<head>
<title>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.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('vhacd_raycast_mesh_8h_source.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">vhacdRaycastMesh.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="vhacd_raycast_mesh_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef RAYCAST_MESH_H</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor">#define RAYCAST_MESH_H</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> </div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include <stdint.h></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> </div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="keyword">namespace </span><a class="code" href="namespace_v_h_a_c_d.html">VHACD</a></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> {</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  <span class="comment">// Very simple brute force raycast against a triangle mesh. Tests every triangle; no hierachy.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>  <span class="comment">// Does a deep copy, always does calculations with full double float precision</span></div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="class_v_h_a_c_d_1_1_raycast_mesh.html"> 12</a></span>  <span class="keyword">class </span><a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html">RaycastMesh</a></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  {</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  <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#a6a1024989eba5ce6650d87780a1b7a3a">createRaycastMesh</a>(uint32_t vcount, <span class="comment">// The number of vertices in the source triangle mesh</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  <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></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  uint32_t tcount, <span class="comment">// The number of triangles in the source triangle mesh</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  <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></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <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#a6a1024989eba5ce6650d87780a1b7a3a">createRaycastMesh</a>(uint32_t vcount, <span class="comment">// The number of vertices in the source triangle mesh</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <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></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  uint32_t tcount, <span class="comment">// The number of triangles in the source triangle mesh</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <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></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <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#a930ab641744d36f2828e1a81ab53cf78">raycast</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> *from, <span class="comment">// The starting point of the raycast</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="keyword">const</span> <span class="keywordtype">double</span> *to, <span class="comment">// The ending point of the raycast</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <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></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keywordtype">double</span> *hitLocation, <span class="comment">// The point where the ray hit nearest to the 'closestToPoint' location</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keywordtype">double</span> *hitDistance) = 0; <span class="comment">// The distance the ray traveled to the hit location</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <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#ace94007f6b1f996ffe11194641f7c8dc">release</a>(<span class="keywordtype">void</span>) = 0;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keyword">protected</span>:</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_v_h_a_c_d_1_1_raycast_mesh.html#aa2da844c427008bcfc49554f2d015db4"> 34</a></span>  <span class="keyword">virtual</span> <a class="code" href="class_v_h_a_c_d_1_1_raycast_mesh.html#aa2da844c427008bcfc49554f2d015db4">~RaycastMesh</a>(<span class="keywordtype">void</span>) { };</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  };</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> } <span class="comment">// end of VHACD namespace</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="class_v_h_a_c_d_1_1_raycast_mesh_html_ace94007f6b1f996ffe11194641f7c8dc"><div class="ttname"><a href="class_v_h_a_c_d_1_1_raycast_mesh.html#ace94007f6b1f996ffe11194641f7c8dc">VHACD::RaycastMesh::release</a></div><div class="ttdeci">virtual void release(void)=0</div></div>
<div class="ttc" id="class_v_h_a_c_d_1_1_raycast_mesh_html"><div class="ttname"><a href="class_v_h_a_c_d_1_1_raycast_mesh.html">VHACD::RaycastMesh</a></div><div class="ttdef"><b>Definition:</b> vhacdRaycastMesh.h:12</div></div>
<div class="ttc" id="class_v_h_a_c_d_1_1_raycast_mesh_html_aa2da844c427008bcfc49554f2d015db4"><div class="ttname"><a href="class_v_h_a_c_d_1_1_raycast_mesh.html#aa2da844c427008bcfc49554f2d015db4">VHACD::RaycastMesh::~RaycastMesh</a></div><div class="ttdeci">virtual ~RaycastMesh(void)</div><div class="ttdef"><b>Definition:</b> vhacdRaycastMesh.h:34</div></div>
<div class="ttc" id="namespace_v_h_a_c_d_html"><div class="ttname"><a href="namespace_v_h_a_c_d.html">VHACD</a></div><div class="ttdef"><b>Definition:</b> vhacdCircularList.h:19</div></div>
<div class="ttc" id="class_v_h_a_c_d_1_1_raycast_mesh_html_a930ab641744d36f2828e1a81ab53cf78"><div class="ttname"><a href="class_v_h_a_c_d_1_1_raycast_mesh.html#a930ab641744d36f2828e1a81ab53cf78">VHACD::RaycastMesh::raycast</a></div><div class="ttdeci">virtual bool raycast(const double *from, const double *to, const double *closestToPoint, double *hitLocation, double *hitDistance)=0</div></div>
<div class="ttc" id="class_v_h_a_c_d_1_1_raycast_mesh_html_a6a1024989eba5ce6650d87780a1b7a3a"><div class="ttname"><a href="class_v_h_a_c_d_1_1_raycast_mesh.html#a6a1024989eba5ce6650d87780a1b7a3a">VHACD::RaycastMesh::createRaycastMesh</a></div><div class="ttdeci">static RaycastMesh * createRaycastMesh(uint32_t vcount, const double *vertices, uint32_t tcount, const uint32_t *indices)</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- 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>
|