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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Snippets — NVIDIA PhysX SDK 3.4.2 Documentation</title>
<link rel="stylesheet" href="../_static/nvidia.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/breathe.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '3.4.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="NVIDIA PhysX SDK 3.4.2 Documentation" href="../index.html" />
<link rel="up" title="User's Guide" href="Index.html" />
<link rel="next" title="Building with PhysX" href="BuildingWithPhysX.html" />
<link rel="prev" title="Welcome to PhysX" href="Introduction.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="BuildingWithPhysX.html" title="Building with PhysX"
accesskey="N">next</a></li>
<li class="right" >
<a href="Introduction.html" title="Welcome to PhysX"
accesskey="P">previous</a> |</li>
<li><a href="../Index.html">NVIDIA PhysX SDK 3.4.2 Documentation</a> »</li>
<li><a href="Index.html" accesskey="U">User's Guide</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="snippets">
<span id="helloworld"></span><h1>Snippets<a class="headerlink" href="#snippets" title="Permalink to this headline">¶</a></h1>
<div class="section" id="what-are-physx-snippets">
<h2>What are PhysX Snippets?<a class="headerlink" href="#what-are-physx-snippets" title="Permalink to this headline">¶</a></h2>
<p>In the context of the PhysX SDK, a 'Snippet' is a simple, minimalistic code sample.
PhysX-SDK version 3.3.0 offers a collection of Snippets to illustrate usage of the PhysX API in a
concise format, free from the complexity of a sample framework or game engine. The Snippets folder is
in the top-level directory of the PhysX SDK, alongside directories for Documentation, Include, Samples, etc.</p>
<dl class="docutils">
<dt>The folder {SDK Root}/Snippets/compiler/{platform} contains the Snippets solution file, e.g.</dt>
<dd>Snippets/compiler/vc14win64/Snippets.sln</dd>
</dl>
<p>Although a few of the Snippets support rendering, ( Win32, Win64, OSX and Linux only ) most Snippets do not provide rendering, require no input,
and provide only limited output through messages. Although Snippets can be run from a command prompt or by double-clicking the executable
icon, the best way to explore Snippets is by viewing the code in the Visual Studio IDE, and running the program in the debugger.</p>
</div>
<div class="section" id="helloworld-physx-basics">
<span id="helloworldbasics"></span><h2>HelloWorld: PhysX Basics<a class="headerlink" href="#helloworld-physx-basics" title="Permalink to this headline">¶</a></h2>
<p>SnippetHelloWorld illustrates basic use of PhysX, from startup to shutdown of a simple scene, and
is a good place to start learning the PhysX API. The simplest Snippets comprise a single source file, but SnippetHelloWorld,
among others, supports optional rendering through a second source file. SnippetHelloWorld creates a number of box stacks on
a plane, and if rendering is enabled, allows the user to create new stacks and fire a ball from the camera position.</p>
<p>The primary code for SnippetHelloWorld is found in {SDK Root}/Snippets/SnippetHelloWorld/SnippetHelloWorld.cpp.</p>
</div>
<div class="section" id="using-physx-visual-debugger-with-snippethelloworld">
<span id="pvdandhelloworld"></span><h2>Using PhysX Visual Debugger with SnippetHelloWorld<a class="headerlink" href="#using-physx-visual-debugger-with-snippethelloworld" title="Permalink to this headline">¶</a></h2>
<p>As is the case with any Snippet built against PROFILE, CHECKED or DEBUG configurations of the PhysX runtime,
HelloWorld will automatically connect to the PhysX Visual Debugger if that application is already running
when the Snippet executable is launched. For Snippets without rendering, PVD provides an easy way to visualize
the contents of the PhysX scene presented in the Snippet. In the screenshot image below, PhysX Visual Debugger appears on
the right hand side, while Visual Studio and Snippet Hello World are on the left.</p>
<img alt="../_images/HelloWorld.png" src="../_images/HelloWorld.png" />
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../Index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Snippets</a><ul>
<li><a class="reference internal" href="#what-are-physx-snippets">What are PhysX Snippets?</a></li>
<li><a class="reference internal" href="#helloworld-physx-basics">HelloWorld: PhysX Basics</a></li>
<li><a class="reference internal" href="#using-physx-visual-debugger-with-snippethelloworld">Using PhysX Visual Debugger with SnippetHelloWorld</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Introduction.html"
title="previous chapter">Welcome to PhysX</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="BuildingWithPhysX.html"
title="next chapter">Building with PhysX</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="BuildingWithPhysX.html" title="Building with PhysX"
>next</a></li>
<li class="right" >
<a href="Introduction.html" title="Welcome to PhysX"
>previous</a> |</li>
<li><a href="../Index.html">NVIDIA PhysX SDK 3.4.2 Documentation</a> »</li>
<li><a href="Index.html" >User's Guide</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2008-2018 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.
</div>
</body>
</html>
|