⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newton.htm

📁 Newton Game Dynamic 1.52 Delphi下基于GLScene的OpenGL游戏开发控件。功能非常强大和易于使用。 Advanced physics engine for re
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<p>   
   <h4>Return</h4> Nothing.
  
<p>

</div>
</div>
<div class=Section>
<h3>
<a NAME="Contact^behavior^control^interface"></a>
<a NAME="Contact behavior control interface"></a>
Contact behavior control interface
</h3>
<div class=SectionText>

                                                                                                                  
<p>

</div>
</div>
<div class=Section>
<h3>
<a NAME="NewtonMaterialDisableContact"></a>
<a NAME="NewtonMaterialDisableContact"></a>
NewtonMaterialDisableContact
</h3>
<div class=Api>
void <font class=ApiName>NewtonMaterialDisableContact</font>(const NewtonMaterial* materialHandle)
</div>
<div class=SectionText>
Disable processing for the contact. 
  
<p>   <h4>Parameters</h4>
   
<p><table class=DefTable>
<tr class=Def>
<td class=Def>
<b>const NewtonMaterial</b> materialHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to a material pair
</td>
</tr>
</table>

<p>   
   <h4>Return</h4> Nothing.
  
<p>   <h4>Remarks</h4> This function can only be called from a material callback event handler.
   
<p>   <h4>See also</h4> <a HREF="#NewtonMaterialSetCollisionCallback">NewtonMaterialSetCollisionCallback</a>


</div>
</div>
<div class=Section>
<h3>
<a NAME="NewtonMaterialGetMaterialPairUserData"></a>
<a NAME="NewtonMaterialGetMaterialPairUserData"></a>
NewtonMaterialGetMaterialPairUserData
</h3>
<div class=Api>
void* <font class=ApiName>NewtonMaterialGetMaterialPairUserData</font>(const NewtonMaterial* materialHandle)
</div>
<div class=SectionText>
Get the userData set by the application when it created this material pair.
  
<p>   <h4>Parameters</h4>
   
<p><table class=DefTable>
<tr class=Def>
<td class=Def>
<b>const NewtonMaterial</b> materialHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to a material pair
</td>
</tr>
</table>

<p>   
   <h4>Return</h4> Application user data.
  
<p>   <h4>Remarks</h4> This function can only be called from a material callback event handler.
   
<p>   <h4>See also</h4> <a HREF="#NewtonMaterialSetCollisionCallback">NewtonMaterialSetCollisionCallback</a>


</div>
</div>
<div class=Section>
<h3>
<a NAME="NewtonMaterialGetContactFaceAttribute"></a>
<a NAME="NewtonMaterialGetContactFaceAttribute"></a>
NewtonMaterialGetContactFaceAttribute
</h3>
<div class=Api>
unsigned <font class=ApiName>NewtonMaterialGetContactFaceAttribute</font>(const NewtonMaterial* materialHandle)
</div>
<div class=SectionText>
Return the face attribute assigned to this face when for a user defined collision or a Newton collision tree.
  
<p>   <h4>Parameters</h4>
   
<p><table class=DefTable>
<tr class=Def>
<td class=Def>
<b>const NewtonMaterial</b> materialHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to a material pair
</td>
</tr>
</table>

<p>   
   <h4>Return</h4> face attribute for collision trees. Zero if the contact was generated by two convex collisions. 
  
<p>   <h4>Remarks</h4> This function can only be called from a material callback event handler.
  
<p>   <h4>Remarks</h4> this function can be used by the application to retrieve the face id of a polygon for a collision tree.
   
<p>   <h4>See also</h4> <a HREF="#NewtonMaterialSetCollisionCallback">NewtonMaterialSetCollisionCallback</a>


</div>
</div>
<div class=Section>
<h3>
<a NAME="NewtonMaterialGetCurrentTimestep"></a>
<a NAME="NewtonMaterialGetCurrentTimestep"></a>
NewtonMaterialGetCurrentTimestep
</h3>
<div class=Api>
dFloat <font class=ApiName>NewtonMaterialGetCurrentTimestep</font>(const NewtonMaterial* materialHandle)
</div>
<div class=SectionText>
Get the current time step.
  
<p>   <h4>Parameters</h4>
   
<p><table class=DefTable>
<tr class=Def>
<td class=Def>
<b>const NewtonMaterial</b> materialHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to a material pair
</td>
</tr>
</table>

<p>   
   <h4>Return</h4> the current time step.
  
<p>   <h4>Remarks</h4> This function can only be called from a material callback event handler. The function can be useful for the implementation of powered contacts.
   
<p>   <h4>See also</h4> <a HREF="#NewtonMaterialSetCollisionCallback">NewtonMaterialSetCollisionCallback</a>


</div>
</div>
<div class=Section>
<h3>
<a NAME="NewtonMaterialGetContactNormalSpeed"></a>
<a NAME="NewtonMaterialGetContactNormalSpeed"></a>
NewtonMaterialGetContactNormalSpeed
</h3>
<div class=Api>
dFloat <font class=ApiName>NewtonMaterialGetContactNormalSpeed</font>(<br> const NewtonMaterial* materialHandle,<br> const NewtonContact* contactlHandle)
</div>
<div class=SectionText>
Calculate the speed of this contact along the normal vector of the contact. 
  
<p>   <h4>Parameters</h4>
   
<p><table class=DefTable>
<tr class=Def>
<td class=Def>
<b>const NewtonMaterial</b> materialHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to a material pair
</td>
</tr>

<p>   
<tr class=Def>
<td class=Def>
<b>const NewtonContact</b>  contactlHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to the contact data
</td>
</tr>
</table>

<p>   
   <h4>Return</h4> Contact speed. A positive value means the contact is repulsive.
  
<p>   <h4>Remarks</h4> This function can only be called from a material callback event handler.
   
<p>   <h4>See also</h4> <a HREF="#NewtonMaterialSetCollisionCallback">NewtonMaterialSetCollisionCallback</a>


</div>
</div>
<div class=Section>
<h3>
<a NAME="NewtonMaterialGetContactTangentSpeed"></a>
<a NAME="NewtonMaterialGetContactTangentSpeed"></a>
NewtonMaterialGetContactTangentSpeed
</h3>
<div class=Api>
dFloat <font class=ApiName>NewtonMaterialGetContactTangentSpeed</font>(<br> const NewtonMaterial* materialHandle,<br> const NewtonContact* contactlHandle,<br> int index)
</div>
<div class=SectionText>
Calculate the speed of this contact along the tangent vector of the contact. 
  
<p>   <h4>Parameters</h4>
   
<p><table class=DefTable>
<tr class=Def>
<td class=Def>
<b>const NewtonMaterial</b> materialHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to a material pair.
</td>
</tr>

<p>   
<tr class=Def>
<td class=Def>
<b>const NewtonContact</b>  contactlHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to the contact data.
</td>
</tr>

<p>   
<tr class=Def>
<td class=Def>
<b>int</b> index
</td>
<td class=DefSep>-</td>
<td class=DefText>
index to the tangent vector. This value can be 0 for primary tangent direction or 1 for the secondary tangent direction.
</td>
</tr>
</table>

<p>   
   <h4>Return</h4> Contact tangent speed. 
  
<p>   <h4>Remarks</h4> This function can only be called from a material callback event handler.
   
<p>   <h4>See also</h4> <a HREF="#NewtonMaterialSetCollisionCallback">NewtonMaterialSetCollisionCallback</a>


</div>
</div>
<div class=Section>
<h3>
<a NAME="NewtonMaterialGetContactPositionAndNormal"></a>
<a NAME="NewtonMaterialGetContactPositionAndNormal"></a>
NewtonMaterialGetContactPositionAndNormal
</h3>
<div class=Api>
void <font class=ApiName>NewtonMaterialGetContactPositionAndNormal</font>(<br> const NewtonMaterial* materialHandle,<br> dFloat* positPtr,<br> dFloat* normalPtr)
</div>
<div class=SectionText>
Get the contact position and normal in global space.
  
<p>   <h4>Parameters</h4>
   
<p><table class=DefTable>
<tr class=Def>
<td class=Def>
<b>const NewtonMaterial</b> materialHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to a material pair.
</td>
</tr>

<p>   
<tr class=Def>
<td class=Def>
<b>dFloat</b> *positPtr,
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to an array of at least three floats to hold the contact position.
</td>
</tr>

<p>   
<tr class=Def>
<td class=Def>
<b>dFloat</b> *normalPtr
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to an array of at least three floats to hold the contact normal.
</td>
</tr>
</table>

<p>   
   <h4>Return</h4> Nothing.
  
<p>   <h4>Remarks</h4> This function can only be called from a material callback event handle.
   
<p>   <h4>See also</h4> <a HREF="#NewtonMaterialSetCollisionCallback">NewtonMaterialSetCollisionCallback</a>


</div>
</div>
<div class=Section>
<h3>
<a NAME="NewtonMaterialGetContactForce"></a>
<a NAME="NewtonMaterialGetContactForce"></a>
NewtonMaterialGetContactForce
</h3>
<div class=Api>
void <font class=ApiName>NewtonMaterialGetContactForce</font>(<br> const NewtonMaterial* materialHandle,<br> dFloat* forcePtr)
</div>
<div class=SectionText>
Get the contact force vector in global space.
  
<p>   <h4>Parameters</h4>
   
<p><table class=DefTable>
<tr class=Def>
<td class=Def>
<b>const NewtonMaterial</b> materialHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to a material pair.
</td>
</tr>

<p>   
<tr class=Def>
<td class=Def>
<b>dFloat</b> *forcePtr,
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to an array of at least three floats to hold the force vector in global space.
</td>
</tr>
</table>

<p>   
   <h4>Return</h4> Nothing.
  
<p>   <h4>Remarks</h4> The contact force value is only valid when calculating resting contacts. This means if two bodies collide with 
   non zero relative velocity, the reaction force will be an impulse, which is not a reaction force, this will return zero vector. 
   this function will only return meaningful values when the colliding bodies are at rest.
  
<p>   <h4>Remarks</h4> This function can only be called from a material callback event handler.
   
<p>   <h4>See also</h4> <a HREF="#NewtonMaterialSetCollisionCallback">NewtonMaterialSetCollisionCallback</a>


</div>
</div>
<div class=Section>
<h3>
<a NAME="NewtonMaterialGetContactTangentDirections"></a>
<a NAME="NewtonMaterialGetContactTangentDirections"></a>
NewtonMaterialGetContactTangentDirections
</h3>
<div class=Api>
void <font class=ApiName>NewtonMaterialGetContactTangentDirections</font>(<br> const NewtonMaterial* materialHandle,<br> dFloat* dir0,<br> dFloat* dir1)
</div>
<div class=SectionText>
Get the contact tangent vector to the contact point. 
  
<p>   <h4>Parameters</h4>
   
<p><table class=DefTable>
<tr class=Def>
<td class=Def>
<b>const NewtonMaterial</b> materialHandle
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to a material pair.
</td>
</tr>

<p>   
<tr class=Def>
<td class=Def>
<b>dFloat</b> *dir0
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to an array of at least three floats to hold the contact primary tangent vector.
</td>
</tr>

<p>   
<tr class=Def>
<td class=Def>
<b>dFloat</b> *dir1
</td>
<td class=DefSep>-</td>
<td class=DefText>
pointer to an array of at least three floats to hold the contact secondary tangent vector.
</td>
</tr>
</table>

<p>   
   <h4>Return</h4> Nothing.
  
<p>   <h4>Remarks</h4> This function can only be called from a material callback event handler.
   
<p>   <h4>See also</h4> <a HREF="#NewtonMaterialSetCollisionCallback">NewtonMaterialSetCollisionCallback</a>


</div>
</div>
<div class=Section>
<h3>
<a NAME="NewtonMaterialGetBodyCollisionID"></a>
<a NAME="NewtonMaterialGetBodyCollisionID"></a>
NewtonMaterialGetBodyCollisionID
</h3>
<div class=Api>
unsigned <font class=ApiName>NewtonMaterialGetBodyCollisionID</font>(<br> const NewtonMaterial* material,<br> c

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -