aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Documentation/PhysXAPI/files/classPxContactModifyCallback.html
blob: f92b12d2faf4bcf7d16fc57453d0bc6ac284692d (plain) (blame)
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
<html>
	<head>
		<title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxContactModifyCallback Class Reference</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="images/PhysXlogo.png" align="middle"> <br>
			<center>
				<a class="qindex" href="main.html">Main Page</a> &nbsp; 
				<a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; 
				<a class="qindex" href="annotated.html">Compound List</a> &nbsp; 
				<a class="qindex" href="functions.html">Compound Members</a> &nbsp;  
			</center>
			<hr class="second">
		</div>
<!-- Generated by Doxygen 1.5.8 -->
<div class="contents">
<h1>PxContactModifyCallback Class Reference<br>
<small>
[<a class="el" href="group__physics.html">Physics</a>]</small>
</h1><!-- doxytag: class="PxContactModifyCallback" -->An interface class that the user can implement in order to modify contact constraints.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="PxContactModifyCallback_8h-source.html">PxContactModifyCallback.h</a>&gt;</code>
<p>

<p>
<a href="classPxContactModifyCallback-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxContactModifyCallback.html#383f0448886bf352215c886b3066f790">onContactModify</a> (<a class="el" href="classPxContactModifyPair.html">PxContactModifyPair</a> *const pairs, <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> count)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Passes modifiable arrays of contacts to the application.  <a href="#383f0448886bf352215c886b3066f790"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxContactModifyCallback.html#d6c57abf114d4c594973c2d365a98b6f">~PxContactModifyCallback</a> ()</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
An interface class that the user can implement in order to modify contact constraints. 
<p>
<b>Threading:</b> It is <b>necessary</b> to make this class thread safe as it will be called in the context of the simulation thread. It might also be necessary to make it reentrant, since some calls can be made by multi-threaded parts of the physics engine.<p>
You can enable the use of this contact modification callback by raising the flag <a class="el" href="structPxPairFlag.html#60e71a2948b030140f840766a3f7ac2f2465a37a9b236f662bda8d6636eed59b" title="Call contact modification callback for this collision pair.">PxPairFlag::eMODIFY_CONTACTS</a> in the filter shader/callback (see <a class="el" href="group__physics.html#g9db06e901a760fb02c06f27bf3e474b3" title="Filter shader to specify handling of collision pairs.">PxSimulationFilterShader</a>) for a pair of rigid body objects.<p>
Please note: + Raising the contact modification flag will not wake the actors up automatically. + It is not possible to turn off the performance degradation by simply removing the callback from the scene, the filter shader/callback has to be used to clear the contact modification flag. + The contacts will only be reported as long as the actors are awake. There will be no callbacks while the actors are sleeping.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxScene.html#eec3367a4461c1ab2e552acdb8c0609e" title="Sets a user callback object, which receives callbacks on all contacts generated for...">PxScene.setContactModifyCallback()</a> <a class="el" href="classPxScene.html#1978693b355df49712d7e59c10c4115d" title="Retrieves the PxContactModifyCallback pointer set with setContactModifyCallback()...">PxScene.getContactModifyCallback()</a> </dd></dl>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="d6c57abf114d4c594973c2d365a98b6f"></a><!-- doxytag: member="PxContactModifyCallback::~PxContactModifyCallback" ref="d6c57abf114d4c594973c2d365a98b6f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual PxContactModifyCallback::~PxContactModifyCallback           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="383f0448886bf352215c886b3066f790"></a><!-- doxytag: member="PxContactModifyCallback::onContactModify" ref="383f0448886bf352215c886b3066f790" args="(PxContactModifyPair *const pairs, PxU32 count)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void PxContactModifyCallback::onContactModify           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classPxContactModifyPair.html">PxContactModifyPair</a> *const &nbsp;</td>
          <td class="paramname"> <em>pairs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a>&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Passes modifiable arrays of contacts to the application. 
<p>
The initial contacts are as determined fresh each frame by collision detection.<p>
The number of contacts can not be changed, so you cannot add your own contacts. You may however disable contacts using <a class="el" href="classPxContactSet.html#930b0b6a5450e9b2e83634d6803f4045" title="Ignore the contact point.">PxContactSet::ignore()</a>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxContactModifyPair.html" title="An array of instances of this class is passed to PxContactModifyCallback::onContactModify()...">PxContactModifyPair</a> </dd></dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PxContactModifyCallback_8h-source.html">PxContactModifyCallback.h</a></ul>
</div>

<hr style="width: 100%; height: 2px;"><br>
Copyright &copy; 2008-2018 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>
</body>
</html>