diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
commit | 0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch) | |
tree | 2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a03118.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a03118.html')
-rw-r--r-- | docs/doxygen/nel/a03118.html | 4524 |
1 files changed, 4524 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03118.html b/docs/doxygen/nel/a03118.html new file mode 100644 index 00000000..2d6b28c9 --- /dev/null +++ b/docs/doxygen/nel/a03118.html @@ -0,0 +1,4524 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>NeL: NLPACS::CPrimitiveWorldImage class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NLPACS::CPrimitiveWorldImage Class Reference</h1><code>#include <<a class="el" href="a06208.html">primitive_world_image.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +Data for the primitive duplicated for each world image it is linked <dl compact><dt><b>Author:</b></dt><dd>Cyril 'Hulud' Corvazier <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00043">43</a> of file <a class="el" href="a06208.html">primitive_world_image.h</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>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea0">addMoveElement</a> (<a class="el" href="a02942.html">CMoveCell</a> &cell, <a class="el" href="a04558.html#a9">uint16</a> <a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a9">uint16</a> <a class="el" href="a04223.html#a573">y</a>, double centerX, double centerY, <a class="el" href="a02946.html">CMovePrimitive</a> *primitive, <a class="el" href="a02943.html">CMoveContainer</a> &container, <a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Add the primitive in the cell and resort the list. <a href="#NLPACS_1_1CPrimitiveWorldImagea0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea1">checkSortedList</a> (<a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Check sorted lists. <a href="#NLPACS_1_1CPrimitiveWorldImagea1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea2">copy</a> (const <a class="el" href="a03118.html">CPrimitiveWorldImage</a> &source)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea3">CPrimitiveWorldImage</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea4">CPrimitiveWorldImage::addMoveElementendOfList</a> (<a class="el" href="a02942.html">CMoveCell</a> &cell, <a class="el" href="a04558.html#a9">uint16</a> <a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a9">uint16</a> <a class="el" href="a04223.html#a573">y</a>, <a class="el" href="a02946.html">CMovePrimitive</a> *primitive, <a class="el" href="a02943.html">CMoveContainer</a> &container)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Add the primitive in the cell at the end of the list and don't sort. <a href="#NLPACS_1_1CPrimitiveWorldImagea4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea5">deleteIt</a> (<a class="el" href="a02943.html">CMoveContainer</a> &container, <a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea6">dirtBB</a> (<a class="el" href="a02943.html">CMoveContainer</a> *container, <a class="el" href="a02946.html">CMovePrimitive</a> *primitive, <a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea7">dirtPos</a> (<a class="el" href="a02943.html">CMoveContainer</a> *container, <a class="el" href="a02946.html">CMovePrimitive</a> *primitive, <a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea8">doMove</a> (double timeMax)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea9">doMove</a> (<a class="el" href="a02588.html">CGlobalRetriever</a> &retriever, <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &surfaceTemp, double originalMax, double finalMax, bool keepZ=false)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a05380.html#a0">TCollisionSurfaceDescVector</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea10">evalCollision</a> (<a class="el" href="a02588.html">CGlobalRetriever</a> &retriever, <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &surfaceTemp, <a class="el" href="a04558.html#a11">uint32</a> testTime, <a class="el" href="a04558.html#a11">uint32</a> maxTestIteration, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea11">evalCollision</a> (<a class="el" href="a03118.html">CPrimitiveWorldImage</a> &other, class <a class="el" href="a02376.html">CCollisionDesc</a> &desc, double timeMin, double timeMax, <a class="el" href="a04558.html#a11">uint32</a> testTime, <a class="el" href="a04558.html#a11">uint32</a> maxTestIteration, double &firstContactTime, double &lastContactTime, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a02946.html">CMovePrimitive</a> &otherPrimitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea12">evalCollisionOBoverOB</a> (<a class="el" href="a03118.html">CPrimitiveWorldImage</a> &other, <a class="el" href="a02376.html">CCollisionDesc</a> &desc, double timeMin, double timeMax, double &firstContactTime, double &lastContactTime, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a02946.html">CMovePrimitive</a> &otherPrimitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea13">evalCollisionOBoverOC</a> (<a class="el" href="a03118.html">CPrimitiveWorldImage</a> &other, <a class="el" href="a02376.html">CCollisionDesc</a> &desc, double timeMin, double timeMax, double &firstContactTime, double &lastContactTime, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a02946.html">CMovePrimitive</a> &otherPrimitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea14">evalCollisionOCoverOC</a> (<a class="el" href="a03118.html">CPrimitiveWorldImage</a> &other, <a class="el" href="a02376.html">CCollisionDesc</a> &desc, double timeMin, double timeMax, double &firstContactTime, double &lastContactTime, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a02946.html">CMovePrimitive</a> &otherPrimitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea15">evalCollisionPoverOC</a> (<a class="el" href="a03118.html">CPrimitiveWorldImage</a> &other, <a class="el" href="a02376.html">CCollisionDesc</a> &desc, <a class="el" href="a04558.html#a15">uint</a> numPoint, double &firstContactTime, double &lastContactTime, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a02946.html">CMovePrimitive</a> &otherPrimitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea16">evalCollisionPoverS</a> (<a class="el" href="a03118.html">CPrimitiveWorldImage</a> &other, <a class="el" href="a02376.html">CCollisionDesc</a> &desc, <a class="el" href="a04558.html#a15">uint</a> numPoint, <a class="el" href="a04558.html#a15">uint</a> numSeg, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a02946.html">CMovePrimitive</a> &otherPrimitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea17">evalCollisionSoverOC</a> (<a class="el" href="a03118.html">CPrimitiveWorldImage</a> &other, <a class="el" href="a02376.html">CCollisionDesc</a> &desc, <a class="el" href="a04558.html#a15">uint</a> numPoint, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a02946.html">CMovePrimitive</a> &otherPrimitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea18">getBBXMax</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea19">getBBXMin</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea20">getBBYMax</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea21">getBBYMin</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03664.html">NLMISC::CVectorD</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea22">getDeltaPosition</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03664.html">NLMISC::CVectorD</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea23">getFinalPosition</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02591.html">UGlobalPosition</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea24">getGlobalPosition</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea25">getInitTime</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02945.html">CMoveElement</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea26">getMoveElement</a> (<a class="el" href="a04558.html#a15">uint</a> i)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the nieme MoveElement. The primitive can have 4 move elements. Can be NULL if the ineme elment is not in a list. <a href="#NLPACS_1_1CPrimitiveWorldImagea26"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02946.html">CMovePrimitive</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea27">getNextModified</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get next modified primitive. <a href="#NLPACS_1_1CPrimitiveWorldImagea27"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea28">getOrientation</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03664.html">NLMISC::CVectorD</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea29">getSpeed</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea30">isInModifiedListFlag</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Is in modified list ? <a href="#NLPACS_1_1CPrimitiveWorldImagea30"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea31">isInWorldImageFlag</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Is in modified list ? <a href="#NLPACS_1_1CPrimitiveWorldImagea31"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea32">linkInModifiedList</a> (<a class="el" href="a02946.html">CMovePrimitive</a> *next)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea33">move</a> (const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &speed, <a class="el" href="a02943.html">CMoveContainer</a> &container, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea34">precalcBB</a> (double beginTime, double endTime, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea35">precalcPos</a> (<a class="el" href="a02946.html">CMovePrimitive</a> &primitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea36">precalcSpeed</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea37">reaction</a> (const <a class="el" href="a02386.html">CCollisionSurfaceDesc</a> &surfaceDesc, const <a class="el" href="a02591.html">UGlobalPosition</a> &globalPosition, <a class="el" href="a02588.html">CGlobalRetriever</a> &retriever, double ratio, double dt, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a02943.html">CMoveContainer</a> &container, <a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea38">reaction</a> (<a class="el" href="a03118.html">CPrimitiveWorldImage</a> &second, const <a class="el" href="a02376.html">CCollisionDesc</a> &desc, <a class="el" href="a02588.html">CGlobalRetriever</a> *retriver, <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &surfaceTemp, bool collision, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a02946.html">CMovePrimitive</a> &otherPrimitive, <a class="el" href="a02943.html">CMoveContainer</a> *container, <a class="el" href="a04558.html#a7">uint8</a> worldImage, <a class="el" href="a04558.html#a7">uint8</a> secondWorldImage, bool secondConst)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea39">removeMoveElement</a> (<a class="el" href="a04558.html#a15">uint</a> i, <a class="el" href="a02943.html">CMoveContainer</a> &container, <a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove the nieme MoveElement. <a href="#NLPACS_1_1CPrimitiveWorldImagea39"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea40">setGlobalPosition</a> (const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &pos, <a class="el" href="a02943.html">CMoveContainer</a> &container, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a04558.html#a7">uint8</a> worldImage, bool keepZ=false, <a class="el" href="a02591.html#NLPACS_1_1UGlobalPositionw2">UGlobalPosition::TType</a> <a class="el" href="a04223.html#a581">type</a>=UGlobalPosition::Unspecified)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea41">setGlobalPosition</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &pos, <a class="el" href="a02943.html">CMoveContainer</a> &container, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive, <a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea42">setInModifiedListFlag</a> (bool itis)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the inModifiedList flag. <a href="#NLPACS_1_1CPrimitiveWorldImagea42"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea43">setInWorldImageFlag</a> (bool itis)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the inModifiedList flag. <a href="#NLPACS_1_1CPrimitiveWorldImagea43"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea44">setOrientation</a> (double rot, <a class="el" href="a02943.html">CMoveContainer</a> *container, <a class="el" href="a02946.html">CMovePrimitive</a> *primitive, <a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea45">setSpeed</a> (const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &speed, <a class="el" href="a02943.html">CMoveContainer</a> *container, <a class="el" href="a02946.html">CMovePrimitive</a> *primitive, <a class="el" href="a04558.html#a7">uint8</a> worldImage)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea46">update</a> (double beginTime, double endTime, <a class="el" href="a02946.html">CMovePrimitive</a> &primitive)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Update precalculated data. <a href="#NLPACS_1_1CPrimitiveWorldImagea46"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Private Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5">TDynamicFlags</a> { <br> + <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey1">DirtPosFlag</a> = 0x0001, +<a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey0">DirtBBFlag</a> = 0x0002, +<a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey3">InModifiedListFlag</a> = 0x0004, +<a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey4">InWorldImageFlag</a> = 0x0008, +<br> + <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey2">ForceSize</a> = 0xffff +<br> + }</td></tr> + +<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03664.html">NLMISC::CVectorD</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03664.html">NLMISC::CVectorD</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager5">_DeltaPosition</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a9">uint16</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>double </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02945.html">CMoveElement</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a> [4]</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02946.html">CMovePrimitive</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager9">_NextModified</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03121.html">CPosition</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03664.html">NLMISC::CVectorD</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a></td></tr> + +</table> +<hr><h2>Member Enumeration Documentation</h2> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagey5" doxytag="NLPACS::CPrimitiveWorldImage::TDynamicFlags" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> enum <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5">NLPACS::CPrimitiveWorldImage::TDynamicFlags</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey1" doxytag="DirtPosFlag" ></a>DirtPosFlag</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey0" doxytag="DirtBBFlag" ></a>DirtBBFlag</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey3" doxytag="InModifiedListFlag" ></a>InModifiedListFlag</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey4" doxytag="InWorldImageFlag" ></a>InWorldImageFlag</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey2" doxytag="ForceSize" ></a>ForceSize</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06208.html#l00385">385</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +<div class="fragment"><pre>00386 { +00387 <span class="comment">// The dirt flag. Precalculated data for the position must be recomputed.</span> +00388 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey1">DirtPosFlag</a> =0x0001, +00389 +00390 <span class="comment">// The dirt bounding box. Precalculated data for the bounding box must be recomputed.</span> +00391 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey0">DirtBBFlag</a> =0x0002, +00392 +00393 <span class="comment">// In modified list.</span> +00394 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey3">InModifiedListFlag</a> =0x0004, +00395 +00396 <span class="comment">// Inserted in the world image.</span> +00397 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey4">InWorldImageFlag</a> =0x0008, +00398 +00399 <span class="comment">// Force the size to uint16.</span> +00400 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey2">ForceSize</a> =0xffff +00401 }; +</pre></div> </td> + </tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea3" doxytag="NLPACS::CPrimitiveWorldImage::CPrimitiveWorldImage" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLPACS::CPrimitiveWorldImage::CPrimitiveWorldImage </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00042">42</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00474">_BBXMax</a>, <a class="el" href="a06208.html#l00472">_BBXMin</a>, <a class="el" href="a06208.html#l00475">_BBYMax</a>, <a class="el" href="a06208.html#l00473">_BBYMin</a>, <a class="el" href="a06208.html#l00404">_DynamicFlags</a>, <a class="el" href="a06208.html#l00500">_MoveElement</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00043 { +00044 <span class="comment">// Set to NULL</span> +00045 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<4; i++) +00046 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[i]=NULL; +00047 +00048 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>=0; +00049 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>=-FLT_MAX; +00050 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>=-FLT_MAX; +00051 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a>=-FLT_MAX; +00052 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a>=-FLT_MAX; +00053 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea0" doxytag="NLPACS::CPrimitiveWorldImage::addMoveElement" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::addMoveElement </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02942.html">CMoveCell</a> & </td> + <td class="mdname" nowrap> <em>cell</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a9">uint16</a> </td> + <td class="mdname" nowrap> <em>x</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a9">uint16</a> </td> + <td class="mdname" nowrap> <em>y</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>centerX</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>centerY</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> * </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02943.html">CMoveContainer</a> & </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Add the primitive in the cell and resort the list. +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l01058">1058</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00474">_BBXMax</a>, <a class="el" href="a06208.html#l00472">_BBXMin</a>, <a class="el" href="a06208.html#l00500">_MoveElement</a>, <a class="el" href="a02943.html#NLPACS_1_1CMoveContainera3">NLPACS::CMoveContainer::allocateMoveElement()</a>, <a class="el" href="a06046.html#l00052">NLPACS::CMoveCell::linkFirstX()</a>, <a class="el" href="a06046.html#l00058">NLPACS::CMoveCell::linkLastX()</a>, <a class="el" href="a06051.html#l00048">NLPACS::CMoveElement::Primitive</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06045.html#l00124">NLPACS::CMoveCell::updateSortedLists()</a>, <a class="el" href="a06051.html#l00063">NLPACS::CMoveElement::X</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06051.html#l00064">NLPACS::CMoveElement::Y</a>, and <a class="el" href="a05646.html#l00236">y</a>. +<p> +<div class="fragment"><pre>01060 { +01061 <span class="comment">// Find a free place</span> +01062 <a class="code" href="a04558.html#a15">uint</a> slot; +01063 <span class="keywordflow">for</span> (slot=0; slot<4; slot++) +01064 { +01065 <span class="comment">// Empty ?</span> +01066 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[slot]==NULL) +01067 { +01068 <span class="comment">// Primitive center</span> +01069 <span class="keywordtype">double</span> cx=(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>+<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>)/2.f; +01070 +01071 <span class="comment">// Allocate move element</span> +01072 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[slot]=container.allocateMoveElement (); +01073 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[slot]->Primitive=primitive; +01074 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[slot]->X=<a class="code" href="a04223.html#a572">x</a>; +01075 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[slot]->Y=<a class="code" href="a04223.html#a573">y</a>; +01076 +01077 <span class="comment">// Insert in left or right ?</span> +01078 <span class="keywordflow">if</span> (cx<centerX) +01079 <span class="comment">// In the left</span> +01080 cell.linkFirstX (_MoveElement[slot]); +01081 <span class="keywordflow">else</span> +01082 <span class="comment">// In the right</span> +01083 cell.linkLastX (_MoveElement[slot]); +01084 +01085 <span class="comment">/*// Insert in left or right ?</span> +01086 <span class="comment"> if (cy<centerY)</span> +01087 <span class="comment"> // In the left</span> +01088 <span class="comment"> cell.linkFirstY (_MoveElement[slot]);</span> +01089 <span class="comment"> else</span> +01090 <span class="comment"> // In the right</span> +01091 <span class="comment"> cell.linkLastY (_MoveElement[slot]);*/</span> +01092 +01093 <span class="comment">// Move it</span> +01094 cell.updateSortedLists (_MoveElement[slot], worldImage); +01095 +01096 <span class="comment">// End</span> +01097 <span class="keywordflow">break</span>; +01098 } +01099 } +01100 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea1" doxytag="NLPACS::CPrimitiveWorldImage::checkSortedList" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::checkSortedList </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname1" valign="top" nowrap> <em>worldImage</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Check sorted lists. +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l01149">1149</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00472">_BBXMin</a>, <a class="el" href="a06208.html#l00500">_MoveElement</a>, <a class="el" href="a06054.html#l00116">NLPACS::CMovePrimitive::getWorldImage()</a>, <a class="el" href="a06051.html#l00051">NLPACS::CMoveElement::NextX</a>, <a class="el" href="a05622.html#l00311">nlassertonce</a>, <a class="el" href="a06051.html#l00054">NLPACS::CMoveElement::PreviousX</a>, <a class="el" href="a06051.html#l00048">NLPACS::CMoveElement::Primitive</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>01150 { +01151 <span class="comment">// For the 4 elements</span> +01152 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<4; i++) +01153 { +01154 <span class="comment">// element here ?</span> +01155 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[i]) +01156 { +01157 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[i]->PreviousX) +01158 <a class="code" href="a04199.html#a7">nlassertonce</a> (_MoveElement[i]->PreviousX->Primitive->getWorldImage(worldImage)->_BBXMin <= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>); +01159 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[i]->NextX) +01160 <a class="code" href="a04199.html#a7">nlassertonce</a> (_BBXMin <= _MoveElement[i]->NextX->Primitive->getWorldImage(worldImage)->_BBXMin); +01161 } +01162 } +01163 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea2" doxytag="NLPACS::CPrimitiveWorldImage::copy" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::copy </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03118.html">CPrimitiveWorldImage</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>source</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00066">66</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00404">_DynamicFlags</a>, <a class="el" href="a06208.html#l00500">_MoveElement</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey3">InModifiedListFlag</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00067 { +00068 <span class="comment">// Copy</span> +00069 this->operator=(source); +00070 +00071 <span class="comment">// Reset some flags</span> +00072 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>&=~<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey3">InModifiedListFlag</a>; +00073 +00074 <span class="comment">// Pointer into the 4 possibles sorted lists of movable primitives. Must be NULL</span> +00075 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<4; i++) +00076 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[i]=NULL; +00077 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea4" doxytag="NLPACS::CPrimitiveWorldImage::CPrimitiveWorldImage::addMoveElementendOfList" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::CPrimitiveWorldImage::addMoveElementendOfList </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02942.html">CMoveCell</a> & </td> + <td class="mdname" nowrap> <em>cell</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a9">uint16</a> </td> + <td class="mdname" nowrap> <em>x</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a9">uint16</a> </td> + <td class="mdname" nowrap> <em>y</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> * </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02943.html">CMoveContainer</a> & </td> + <td class="mdname" nowrap> <em>container</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Add the primitive in the cell at the end of the list and don't sort. +<p> + </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea5" doxytag="NLPACS::CPrimitiveWorldImage::deleteIt" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::deleteIt </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02943.html">CMoveContainer</a> & </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00057">57</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00500">_MoveElement</a>, <a class="el" href="a06207.html#l01131">removeMoveElement()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>00058 { +00059 <span class="comment">// Free the move elements </span> +00060 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<4; i++) +00061 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[i]) +00062 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea39">removeMoveElement</a> (i, container, worldImage); +00063 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea6" doxytag="NLPACS::CPrimitiveWorldImage::dirtBB" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::dirtBB </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02943.html">CMoveContainer</a> * </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> * </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00277">277</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00404">_DynamicFlags</a>, <a class="el" href="a06049.html#l00036">NLPACS::CMoveContainer::changed()</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey0">DirtBBFlag</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +Referenced by <a class="el" href="a06208.html#l00270">dirtPos()</a>. +<p> +<div class="fragment"><pre>00278 { +00279 <span class="comment">// Warn container that BB has changed</span> +00280 container->changed (primitive, worldImage); +00281 +00282 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>|=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey0">DirtBBFlag</a>; +00283 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea7" doxytag="NLPACS::CPrimitiveWorldImage::dirtPos" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::dirtPos </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02943.html">CMoveContainer</a> * </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> * </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00270">270</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00404">_DynamicFlags</a>, <a class="el" href="a06208.html#l00277">dirtBB()</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey1">DirtPosFlag</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +Referenced by <a class="el" href="a06054.html#l00154">NLPACS::CMovePrimitive::dirtAllPos()</a>, <a class="el" href="a06207.html#l01480">move()</a>, <a class="el" href="a06207.html#l01167">reaction()</a>, <a class="el" href="a06207.html#l01404">setGlobalPosition()</a>, <a class="el" href="a06208.html#l00089">setOrientation()</a>, and <a class="el" href="a06208.html#l00111">setSpeed()</a>. +<p> +<div class="fragment"><pre>00271 { +00272 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>|=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey1">DirtPosFlag</a>; +00273 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea6">dirtBB</a> (container, primitive, worldImage); +00274 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea8" doxytag="NLPACS::CPrimitiveWorldImage::doMove" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::doMove </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">double </td> + <td class="mdname1" valign="top" nowrap> <em>timeMax</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00230">230</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00417">NLPACS::CPrimitiveWorldImage::CPosition::getPos()</a>, and <a class="el" href="a06208.html#l00423">NLPACS::CPrimitiveWorldImage::CPosition::setPos()</a>. +<p> +<div class="fragment"><pre>00231 { +00232 <span class="comment">// H_AUTO(PACS_PWI_doMove_short);</span> +00233 +00234 <span class="comment">// Make the move</span> +00235 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona4">setPos</a> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona1">getPos</a> ()+<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>*(timeMax-<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a>)); +00236 +00237 <span class="comment">// Final position</span> +00238 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a>=timeMax; +00239 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea9" doxytag="NLPACS::CPrimitiveWorldImage::doMove" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::doMove </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02588.html">CGlobalRetriever</a> & </td> + <td class="mdname" nowrap> <em>retriever</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> & </td> + <td class="mdname" nowrap> <em>surfaceTemp</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>originalMax</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>finalMax</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>keepZ</em> = false</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00201">201</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00466">_DeltaPosition</a>, <a class="el" href="a05761.html#l02028">NLPACS::CGlobalRetriever::doMove()</a>, <a class="el" href="a06208.html#l00429">NLPACS::CPrimitiveWorldImage::CPosition::getGlobalPos()</a>, <a class="el" href="a05788.html#l00056">H_AUTO</a>, <a class="el" href="a06208.html#l00435">NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPos()</a>, and <a class="el" href="a06208.html#l00445">NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPosKeepZ()</a>. +<p> +<div class="fragment"><pre>00202 { +00203 <a class="code" href="a04365.html#a4">H_AUTO</a>(NLPACS_PWI_Do_Move); +00204 +00205 +00206 <span class="comment">// Time to avance</span> +00207 <span class="keywordtype">double</span> ratio; +00208 <span class="keywordflow">if</span> (finalMax!=originalMax) +00209 ratio=(finalMax-<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a>)/(originalMax-<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a>); +00210 <span class="keywordflow">else</span> +00211 ratio=1; +00212 +00213 <span class="comment">// Make the move</span> +00214 <span class="keywordflow">if</span> (!keepZ) +00215 { +00216 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona2">setGlobalPos</a> (retriever.doMove(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona0">getGlobalPos</a>(), <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager5">_DeltaPosition</a>, (<span class="keywordtype">float</span>)ratio, surfaceTemp, <span class="keyword">false</span>), retriever); +00217 } +00218 <span class="keywordflow">else</span> +00219 { +00220 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona3">setGlobalPosKeepZ</a>(retriever.doMove(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona0">getGlobalPos</a>(), <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager5">_DeltaPosition</a>, (<span class="keywordtype">float</span>)ratio, surfaceTemp, <span class="keyword">false</span>), retriever); +00221 } +00222 +00223 +00224 <span class="comment">// Final position</span> +00225 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a>=finalMax; +00226 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea10" doxytag="NLPACS::CPrimitiveWorldImage::evalCollision" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a05380.html#a0">TCollisionSurfaceDescVector</a> * NLPACS::CPrimitiveWorldImage::evalCollision </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02588.html">CGlobalRetriever</a> & </td> + <td class="mdname" nowrap> <em>retriever</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> & </td> + <td class="mdname" nowrap> <em>surfaceTemp</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname" nowrap> <em>testTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname" nowrap> <em>maxTestIteration</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Eval collisions with the global retriever.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>retriever</em> </td><td>is the global retriever used to test collision </td></tr> + <tr><td valign=top><em>timeMin</em> </td><td>is the time you want to clip collision result in the past. </td></tr> + <tr><td valign=top><em>timeMax</em> </td><td>is the time you want to clip collision result in the futur.</td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>true if a collision has been detected in the time range, else false.</dd></dl> + +<p> +Definition at line <a class="el" href="a06207.html#l00166">166</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00466">_DeltaPosition</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>, <a class="el" href="a06054.html#l00393">NLPACS::CMovePrimitive::checkTestTime()</a>, <a class="el" href="a06208.html#l00429">NLPACS::CPrimitiveWorldImage::CPosition::getGlobalPos()</a>, <a class="el" href="a06054.html#l00319">NLPACS::CMovePrimitive::getLength()</a>, <a class="el" href="a06054.html#l00278">NLPACS::CMovePrimitive::getPrimitiveTypeInternal()</a>, <a class="el" href="a06054.html#l00331">NLPACS::CMovePrimitive::getRadiusInternal()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05578.html#l00110">NLPACS::TCollisionSurfaceDescVector</a>, <a class="el" href="a05761.html#l01937">NLPACS::CGlobalRetriever::testBBoxMove()</a>, <a class="el" href="a05761.html#l01864">NLPACS::CGlobalRetriever::testCylinderMove()</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +<div class="fragment"><pre>00168 { +00169 <span class="comment">// H_AUTO(PACS_PWI_evalCollision_short);</span> +00170 +00171 <span class="comment">// Test time</span> +00172 <span class="keywordflow">if</span> (!primitive.checkTestTime (testTime, maxTestIteration)) +00173 <span class="keywordflow">return</span> NULL; +00174 +00175 <span class="comment">// Switch the good test</span> +00176 <span class="keywordflow">if</span> (primitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedBox) +00177 { +00178 <span class="comment">// Local I</span> +00179 CVector locI ((<span class="keywordtype">float</span>)(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.EdgeDirectionX[0]*primitive.getLength(0)/2.0), (<span class="keywordtype">float</span>)(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.EdgeDirectionY[0]*primitive.getLength(1)/2.0), 0); +00180 +00181 <span class="comment">// Local J</span> +00182 CVector locJ ((<span class="keywordtype">float</span>)(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.EdgeDirectionX[1]*primitive.getLength(0)/2.0), (<span class="keywordtype">float</span>)(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.EdgeDirectionY[1]*primitive.getLength(1)/2.0), 0); +00183 +00184 <span class="comment">// Test</span> +00185 <span class="keywordflow">return</span> retriever.testBBoxMove (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona0">getGlobalPos</a> (), <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager5">_DeltaPosition</a>, locI, locJ, surfaceTemp); +00186 } +00187 <span class="keywordflow">else</span> +00188 { +00189 <span class="comment">// Check</span> +00190 <a class="code" href="a04199.html#a6">nlassert</a> (primitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedCylinder); +00191 +00192 <span class="comment">// Test</span> +00193 <span class="comment">//nlinfo ("1) %f %f %f\n", _DeltaPosition.x, _DeltaPosition.y, _DeltaPosition.z);</span> +00194 +00195 <span class="keywordflow">return</span> retriever.testCylinderMove (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona0">getGlobalPos</a> (), <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager5">_DeltaPosition</a>, primitive.getRadiusInternal(), surfaceTemp); +00196 } +00197 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea11" doxytag="NLPACS::CPrimitiveWorldImage::evalCollision" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLPACS::CPrimitiveWorldImage::evalCollision </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03118.html">CPrimitiveWorldImage</a> & </td> + <td class="mdname" nowrap> <em>other</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>class <a class="el" href="a02376.html">CCollisionDesc</a> & </td> + <td class="mdname" nowrap> <em>desc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>timeMin</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>timeMax</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname" nowrap> <em>testTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname" nowrap> <em>maxTestIteration</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double & </td> + <td class="mdname" nowrap> <em>firstContactTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double & </td> + <td class="mdname" nowrap> <em>lastContactTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>otherPrimitive</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Eval collisions with the other primitive.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>other</em> </td><td>is another move primitive to test collisions with. </td></tr> + <tr><td valign=top><em>desc</em> </td><td>is a collision descriptor filled with information about the collision context if the method return true. </td></tr> + <tr><td valign=top><em>timeMin</em> </td><td>is the time you want to clip collision result in the past. </td></tr> + <tr><td valign=top><em>timeMax</em> </td><td>is the time you want to clip collision result in the futur.</td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>true if a collision has been detected in the time range, else false.</dd></dl> + +<p> +Definition at line <a class="el" href="a06207.html#l00081">81</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06054.html#l00393">NLPACS::CMovePrimitive::checkTestTime()</a>, <a class="el" href="a06207.html#l00243">evalCollisionOBoverOB()</a>, <a class="el" href="a06207.html#l00349">evalCollisionOBoverOC()</a>, <a class="el" href="a06207.html#l00780">evalCollisionOCoverOC()</a>, <a class="el" href="a06054.html#l00299">NLPACS::CMovePrimitive::getCollisionMaskInternal()</a>, <a class="el" href="a06054.html#l00306">NLPACS::CMovePrimitive::getOcclusionMaskInternal()</a>, <a class="el" href="a06054.html#l00278">NLPACS::CMovePrimitive::getPrimitiveTypeInternal()</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05578.html#l00049">NLPACS::CCollisionDesc::XChgContactNormals()</a>. +<p> +<div class="fragment"><pre>00084 { +00085 <span class="comment">// H_AUTO(PACS_PWI_evalCollision_long);</span> +00086 +00087 <span class="comment">// Mask test</span> +00088 <span class="keywordflow">if</span> (( (primitive.getCollisionMaskInternal() & otherPrimitive.getOcclusionMaskInternal()) == 0) && +00089 ( (primitive.getOcclusionMaskInternal() & otherPrimitive.getCollisionMaskInternal()) == 0)) +00090 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00091 +00092 <span class="comment">// Test time</span> +00093 <span class="keywordflow">if</span> ( (!primitive.checkTestTime (testTime, maxTestIteration)) || (!otherPrimitive.checkTestTime (testTime, maxTestIteration)) ) +00094 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00095 +00096 <span class="comment">// Clear time min time max</span> +00097 firstContactTime=FLT_MAX; +00098 lastContactTime=-FLT_MAX; +00099 +00100 <span class="comment">// Switch the good test</span> +00101 <span class="keywordflow">switch</span> (primitive.getPrimitiveTypeInternal()) +00102 { +00103 +00104 <span class="comment">// Static box over...</span> +00105 <span class="keywordflow">case</span> UMovePrimitive::_2DOrientedBox: +00106 { +00107 <span class="comment">// Switch second type</span> +00108 <span class="keywordflow">switch</span> (otherPrimitive.getPrimitiveTypeInternal()) +00109 { +00110 +00111 <span class="comment">// Static box over movable box</span> +00112 <span class="keywordflow">case</span> UMovePrimitive::_2DOrientedBox: +00113 <span class="comment">// Make the test</span> +00114 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea12">evalCollisionOBoverOB</a> (other, desc, timeMin, timeMax, firstContactTime, lastContactTime, primitive, otherPrimitive); +00115 +00116 <span class="comment">// Static box over movable cylinder</span> +00117 <span class="keywordflow">case</span> UMovePrimitive::_2DOrientedCylinder: +00118 <span class="comment">// Make the test</span> +00119 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea13">evalCollisionOBoverOC</a> (other, desc, timeMin, timeMax, firstContactTime, lastContactTime, primitive, otherPrimitive); +00120 +00121 <span class="keywordflow">default</span>: +00122 <span class="comment">// Should not go here</span> +00123 <a class="code" href="a04199.html#a12">nlstop</a>; +00124 } +00125 } +00126 +00127 <span class="comment">// Static box over...</span> +00128 <span class="keywordflow">case</span> UMovePrimitive::_2DOrientedCylinder: +00129 { +00130 <span class="comment">// Switch second type</span> +00131 <span class="keywordflow">switch</span> (otherPrimitive.getPrimitiveTypeInternal()) +00132 { +00133 +00134 <span class="comment">// Static box over movable box</span> +00135 <span class="keywordflow">case</span> UMovePrimitive::_2DOrientedBox: +00136 { +00137 <span class="comment">// Make the test</span> +00138 <span class="keywordtype">bool</span> collid=other.evalCollisionOBoverOC (*<span class="keyword">this</span>, desc, timeMin, timeMax, firstContactTime, lastContactTime, otherPrimitive, +00139 primitive); +00140 <span class="keywordflow">if</span> (collid) +00141 desc.XChgContactNormals (); +00142 <span class="keywordflow">return</span> collid; +00143 } +00144 +00145 <span class="comment">// Static box over movable cylinder</span> +00146 <span class="keywordflow">case</span> UMovePrimitive::_2DOrientedCylinder: +00147 <span class="comment">// Make the test</span> +00148 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea14">evalCollisionOCoverOC</a> (other, desc, timeMin, timeMax, firstContactTime, lastContactTime, primitive, otherPrimitive); +00149 +00150 <span class="keywordflow">default</span>: +00151 <span class="comment">// Should not go here</span> +00152 <a class="code" href="a04199.html#a12">nlstop</a>; +00153 } +00154 } +00155 +00156 <span class="keywordflow">default</span>: +00157 <span class="comment">// Should not go here</span> +00158 <a class="code" href="a04199.html#a12">nlstop</a>; +00159 } +00160 +00161 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00162 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea12" doxytag="NLPACS::CPrimitiveWorldImage::evalCollisionOBoverOB" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLPACS::CPrimitiveWorldImage::evalCollisionOBoverOB </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03118.html">CPrimitiveWorldImage</a> & </td> + <td class="mdname" nowrap> <em>other</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02376.html">CCollisionDesc</a> & </td> + <td class="mdname" nowrap> <em>desc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>timeMin</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>timeMax</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double & </td> + <td class="mdname" nowrap> <em>firstContactTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double & </td> + <td class="mdname" nowrap> <em>lastContactTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>otherPrimitive</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00243">243</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06598.html#l00057">NLPACS::UCollisionDesc::ContactTime</a>, <a class="el" href="a06207.html#l00455">evalCollisionPoverS()</a>, <a class="el" href="a06054.html#l00278">NLPACS::CMovePrimitive::getPrimitiveTypeInternal()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00081">evalCollision()</a>. +<p> +<div class="fragment"><pre>00246 { +00247 <span class="comment">// Checks</span> +00248 <a class="code" href="a04199.html#a6">nlassert</a> (primitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedBox); +00249 <a class="code" href="a04199.html#a6">nlassert</a> (otherPrimitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedBox); +00250 +00251 <span class="comment">// Find a collision</span> +00252 <span class="keywordtype">bool</span> find=<span class="keyword">false</span>; +00253 +00254 <span class="comment">// Best time</span> +00255 desc.ContactTime=FLT_MAX; +00256 +00257 <span class="comment">// Timemin</span> +00258 <span class="keywordtype">double</span> _timeMax=-FLT_MAX; +00259 +00260 <span class="comment">// Check movable points over the edge</span> +00261 <a class="code" href="a04558.html#a15">uint</a> pt; +00262 <a class="code" href="a04558.html#a15">uint</a> seg; +00263 <span class="keywordflow">for</span> (pt=0; pt<4; pt++) +00264 <span class="keywordflow">for</span> (seg=0; seg<4; seg++) +00265 { +00266 <span class="comment">// Get collision time of the point over the segment</span> +00267 CCollisionDesc d; +00268 <span class="keywordflow">if</span> ( <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea16">evalCollisionPoverS</a> (other, d, pt, seg, primitive, otherPrimitive) ) +00269 { +00270 <span class="comment">// Find</span> +00271 find=<span class="keyword">true</span>; +00272 +00273 <span class="comment">// Best time ?</span> +00274 <span class="keywordflow">if</span> (d.ContactTime<desc.ContactTime) +00275 { +00276 <span class="comment">// This is the new descriptor</span> +00277 desc=d; +00278 } +00279 +00280 <span class="comment">// Best max time ?</span> +00281 <span class="keywordflow">if</span> (d.ContactTime>_timeMax) +00282 { +00283 <span class="comment">// This is the new max time</span> +00284 _timeMax=d.ContactTime; +00285 } +00286 } +00287 } +00288 +00289 <span class="comment">// Check static points over the movable box</span> +00290 <span class="keywordflow">for</span> (pt=0; pt<4; pt++) +00291 <span class="keywordflow">for</span> (seg=0; seg<4; seg++) +00292 { +00293 <span class="comment">// Get collision time of the point over the segment</span> +00294 CCollisionDesc d; +00295 <span class="keywordflow">if</span> (other.evalCollisionPoverS (*<span class="keyword">this</span>, d, pt, seg, primitive, otherPrimitive)) +00296 { +00297 <span class="comment">// Find</span> +00298 find=<span class="keyword">true</span>; +00299 +00300 <span class="comment">// Best time ?</span> +00301 <span class="keywordflow">if</span> (d.ContactTime<desc.ContactTime) +00302 { +00303 <span class="comment">// This is the new descriptor</span> +00304 desc=d; +00305 } +00306 +00307 <span class="comment">// Best max time ?</span> +00308 <span class="keywordflow">if</span> (d.ContactTime>_timeMax) +00309 { +00310 <span class="comment">// This is the new max time</span> +00311 _timeMax=d.ContactTime; +00312 } +00313 } +00314 } +00315 +00316 <span class="keywordflow">if</span> (find) +00317 { +00318 <span class="comment">// First last contact time</span> +00319 firstContactTime=desc.ContactTime; +00320 lastContactTime=_timeMax; +00321 +00322 <span class="comment">// Half time</span> +00323 <span class="comment">//double halfTime = (_timeMax+desc.ContactTime)/2.0;</span> +00324 +00325 <span class="comment">// Collision in the past ?</span> +00326 <span class="comment">//if (timeMin > halfTime)</span> +00327 <span class="keywordflow">if</span> (timeMin > _timeMax) +00328 <span class="comment">// yes, abort</span> +00329 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00330 +00331 <span class="comment">// Collision not in the future ?</span> +00332 <span class="keywordflow">if</span> (timeMax>desc.ContactTime) +00333 { +00334 <span class="comment">// Clamp time</span> +00335 <span class="keywordflow">if</span> (desc.ContactTime<timeMin) +00336 desc.ContactTime=timeMin; +00337 +00338 <span class="comment">// yes, found it</span> +00339 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00340 } +00341 } +00342 +00343 <span class="comment">// No collision found</span> +00344 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00345 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea13" doxytag="NLPACS::CPrimitiveWorldImage::evalCollisionOBoverOC" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLPACS::CPrimitiveWorldImage::evalCollisionOBoverOC </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03118.html">CPrimitiveWorldImage</a> & </td> + <td class="mdname" nowrap> <em>other</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02376.html">CCollisionDesc</a> & </td> + <td class="mdname" nowrap> <em>desc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>timeMin</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>timeMax</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double & </td> + <td class="mdname" nowrap> <em>firstContactTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double & </td> + <td class="mdname" nowrap> <em>lastContactTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>otherPrimitive</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00349">349</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06598.html#l00057">NLPACS::UCollisionDesc::ContactTime</a>, <a class="el" href="a06207.html#l00573">evalCollisionPoverOC()</a>, <a class="el" href="a06207.html#l00689">evalCollisionSoverOC()</a>, <a class="el" href="a06054.html#l00278">NLPACS::CMovePrimitive::getPrimitiveTypeInternal()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00081">evalCollision()</a>. +<p> +<div class="fragment"><pre>00352 { +00353 <span class="comment">// Checks</span> +00354 <a class="code" href="a04199.html#a6">nlassert</a> (primitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedBox); +00355 <a class="code" href="a04199.html#a6">nlassert</a> (otherPrimitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedCylinder); +00356 +00357 <span class="comment">// Find a collision</span> +00358 <span class="keywordtype">bool</span> find=<span class="keyword">false</span>; +00359 +00360 <span class="comment">// Best time</span> +00361 desc.ContactTime=FLT_MAX; +00362 +00363 <span class="comment">// time min clip</span> +00364 <span class="keywordtype">double</span> _timeMax = -FLT_MAX; +00365 +00366 <span class="comment">// Check movable points over the cylinder</span> +00367 <a class="code" href="a04558.html#a15">uint</a> pt; +00368 <span class="keywordflow">for</span> (pt=0; pt<4; pt++) +00369 { +00370 <span class="comment">// Get collision time of the point over the segment</span> +00371 CCollisionDesc d; +00372 <span class="keywordtype">double</span> firstContactTime; +00373 <span class="keywordtype">double</span> lastContactTime; +00374 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea15">evalCollisionPoverOC</a> (other, d, pt, firstContactTime, lastContactTime, primitive, otherPrimitive)) +00375 { +00376 <span class="comment">// Found</span> +00377 find=<span class="keyword">true</span>; +00378 +00379 <span class="comment">// Best time ?</span> +00380 <span class="keywordflow">if</span> (firstContactTime<desc.ContactTime) +00381 { +00382 <span class="comment">// This is the new descriptor</span> +00383 desc=d; +00384 } +00385 +00386 <span class="comment">// Best max time ?</span> +00387 <span class="keywordflow">if</span> (lastContactTime>_timeMax) +00388 { +00389 <span class="comment">// New max time</span> +00390 _timeMax=lastContactTime; +00391 } +00392 } +00393 } +00394 +00395 <span class="comment">// Check static points over the movable box</span> +00396 <a class="code" href="a04558.html#a15">uint</a> seg; +00397 <span class="keywordflow">for</span> (seg=0; seg<4; seg++) +00398 { +00399 <span class="comment">// Get collision time of the point over the segment</span> +00400 CCollisionDesc d; +00401 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea17">evalCollisionSoverOC</a> (other, d, seg, primitive, otherPrimitive)) +00402 { +00403 <span class="comment">// Found</span> +00404 find=<span class="keyword">true</span>; +00405 +00406 <span class="comment">// Best time ?</span> +00407 <span class="keywordflow">if</span> (d.ContactTime<desc.ContactTime) +00408 { +00409 <span class="comment">// This is the new descriptor</span> +00410 desc=d; +00411 } +00412 +00413 <span class="comment">// Best max time ?</span> +00414 <span class="keywordflow">if</span> (d.ContactTime>_timeMax) +00415 { +00416 <span class="comment">// New max time</span> +00417 _timeMax=d.ContactTime; +00418 } +00419 } +00420 } +00421 +00422 <span class="keywordflow">if</span> (find) +00423 { +00424 <span class="comment">// First last contact time</span> +00425 firstContactTime=desc.ContactTime; +00426 lastContactTime=_timeMax; +00427 +00428 <span class="comment">// Half time</span> +00429 <span class="comment">//double halfTime = (_timeMax+desc.ContactTime)/2.0;</span> +00430 +00431 <span class="comment">// Collision in the past ?</span> +00432 <span class="comment">//if (timeMin > halfTime)</span> +00433 <span class="keywordflow">if</span> (timeMin > _timeMax) +00434 <span class="comment">// yes, abort</span> +00435 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00436 +00437 <span class="comment">// Collision not in the future ?</span> +00438 <span class="keywordflow">if</span> (timeMax>desc.ContactTime) +00439 { +00440 <span class="comment">// Clamp time</span> +00441 <span class="keywordflow">if</span> (desc.ContactTime<timeMin) +00442 desc.ContactTime=timeMin; +00443 +00444 <span class="comment">// yes, found it</span> +00445 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00446 } +00447 } +00448 +00449 <span class="comment">// No collision found</span> +00450 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00451 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea14" doxytag="NLPACS::CPrimitiveWorldImage::evalCollisionOCoverOC" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLPACS::CPrimitiveWorldImage::evalCollisionOCoverOC </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03118.html">CPrimitiveWorldImage</a> & </td> + <td class="mdname" nowrap> <em>other</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02376.html">CCollisionDesc</a> & </td> + <td class="mdname" nowrap> <em>desc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>timeMin</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>timeMax</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double & </td> + <td class="mdname" nowrap> <em>firstContactTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double & </td> + <td class="mdname" nowrap> <em>lastContactTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>otherPrimitive</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00780">780</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a06208.html#l00469">_Speed</a>, <a class="el" href="a06598.html#l00055">NLPACS::UCollisionDesc::ContactNormal0</a>, <a class="el" href="a06598.html#l00056">NLPACS::UCollisionDesc::ContactNormal1</a>, <a class="el" href="a06598.html#l00054">NLPACS::UCollisionDesc::ContactPosition</a>, <a class="el" href="a06598.html#l00057">NLPACS::UCollisionDesc::ContactTime</a>, <a class="el" href="a06054.html#l00325">NLPACS::CMovePrimitive::getHeightInternal()</a>, <a class="el" href="a06054.html#l00278">NLPACS::CMovePrimitive::getPrimitiveTypeInternal()</a>, <a class="el" href="a06054.html#l00331">NLPACS::CMovePrimitive::getRadiusInternal()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06685.html#l00119">NLMISC::CVectorD::normalize()</a>, <a class="el" href="a06207.html#l00540">NLPACS::secondDegree()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::x</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::y</a>, and <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::z</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00081">evalCollision()</a>. +<p> +<div class="fragment"><pre>00783 { +00784 <span class="comment">// Checks</span> +00785 <a class="code" href="a04199.html#a6">nlassert</a> (primitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedCylinder); +00786 <a class="code" href="a04199.html#a6">nlassert</a> (otherPrimitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedCylinder); +00787 +00788 +00789 <span class="comment">/* Cylinder0 center equ:</span> +00790 <span class="comment"> * p(t) = p0 + v0*(t - t0)</span> +00791 <span class="comment"> *</span> +00792 <span class="comment"> * Cylinder1 center equ:</span> +00793 <span class="comment"> * p'(t) = p'0 + v'0*(t - t'0)</span> +00794 <span class="comment"> *</span> +00795 <span class="comment"> * Find t for this equation:</span> +00796 <span class="comment"> * (R + R')² = Norm² (p(t) - p'(t))</span> +00797 <span class="comment"> * (R + R')² = Norm² ( p0 + v0 ( t - t0 ) - p'0 - v'0 ( t - t'0 ) )</span> +00798 <span class="comment"> *</span> +00799 <span class="comment"> * A = p0 - v0*t0 - p'0 + v'0*t'0</span> +00800 <span class="comment"> * B = (v0 - v'0)</span> +00801 <span class="comment"> *</span> +00802 <span class="comment"> * Norm² (B)*t² + 2*(A.B)*t + Norm² (A) - (R + R')² = 0</span> +00803 <span class="comment"> *</span> +00804 <span class="comment"> * a = Norm² (B)</span> +00805 <span class="comment"> * b = 2*(A.B)</span> +00806 <span class="comment"> * c = Norm² (A) - (R + R')²</span> +00807 <span class="comment"> *</span> +00808 <span class="comment"> * a*t² + b*t + c = 0</span> +00809 <span class="comment"> */</span> +00810 +00811 <span class="comment">// Let's go</span> +00812 <span class="keyword">const</span> <span class="keywordtype">double</span> _Ax = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a> - other._3dInitPosition.x; +00813 <span class="keyword">const</span> <span class="keywordtype">double</span> _Ay = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a> - other._3dInitPosition.y; +00814 <span class="keyword">const</span> <span class="keywordtype">double</span> _Bx = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a> - other._Speed.x; +00815 <span class="keyword">const</span> <span class="keywordtype">double</span> _By = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a> - other._Speed.y; +00816 +00817 <span class="comment">// Eval system</span> +00818 <span class="keywordtype">double</span> s0, s1; +00819 <span class="keywordtype">double</span> radiusSquare=primitive.getRadiusInternal()+otherPrimitive.getRadiusInternal(); +00820 radiusSquare*=radiusSquare; +00821 <a class="code" href="a04558.html#a15">uint</a> numSolution=<a class="code" href="a05380.html#a30">secondDegree</a> (_Bx*_Bx+_By*_By, 2.f*(_Ax*_Bx+_Ay*_By), _Ax*_Ax+_Ay*_Ay-radiusSquare, s0, s1); +00822 <span class="keywordflow">if</span> (numSolution!=0) +00823 { +00824 <span class="comment">// time</span> +00825 <span class="keywordtype">double</span> _timeMin, _timeMax; +00826 +00827 <span class="comment">// Collision time</span> +00828 <span class="keywordflow">if</span> (numSolution==1) +00829 { +00830 _timeMin=s0; +00831 _timeMax=s0; +00832 } +00833 <span class="keywordflow">else</span> +00834 { +00835 <span class="comment">// Time min and max</span> +00836 <span class="keywordflow">if</span> (s0>s1) +00837 { +00838 _timeMin=s1; +00839 _timeMax=s0; +00840 } +00841 <span class="keywordflow">else</span> +00842 { +00843 _timeMin=s0; +00844 _timeMax=s1; +00845 } +00846 } +00847 +00848 <span class="comment">// half time</span> +00849 <span class="comment">//const double halfTime=(_timeMin+_timeMax)/2.0;</span> +00850 +00851 <span class="comment">// Conatct time</span> +00852 firstContactTime=_timeMin; +00853 lastContactTime=_timeMax; +00854 +00855 <span class="comment">// Clip time</span> +00856 <span class="keywordflow">if</span> ((timeMin<_timeMax)&&(_timeMin<timeMax)) +00857 { +00858 <span class="comment">// Some constants</span> +00859 <span class="keyword">const</span> <span class="keywordtype">double</span> cyl0Time= _timeMin; +00860 <span class="keyword">const</span> <span class="keywordtype">double</span> pointCyl0Z=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>; +00861 <span class="keyword">const</span> <span class="keywordtype">double</span> cyl0PosZ= pointCyl0Z + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>*cyl0Time; +00862 +00863 <span class="comment">// Pos Z</span> +00864 <span class="keyword">const</span> <span class="keywordtype">double</span> cyl1Time= _timeMin; +00865 <span class="keyword">const</span> <span class="keywordtype">double</span> pointCyl1Z=other._3dInitPosition.z; +00866 <span class="keyword">const</span> <span class="keywordtype">double</span> cyl1PosZ= pointCyl1Z + other._Speed.z * cyl1Time; +00867 +00868 <span class="comment">// Z Included ?</span> +00869 <span class="keywordflow">if</span> ( (cyl0PosZ <= cyl1PosZ + otherPrimitive.getHeightInternal() ) && (cyl0PosZ + primitive.getHeightInternal() >= cyl1PosZ) ) +00870 { +00871 <span class="comment">// Ok Collision, fill the result</span> +00872 +00873 <span class="comment">// Time</span> +00874 desc.ContactTime=std::max (_timeMin, timeMin); +00875 +00876 <span class="comment">// Cylinder 0 position</span> +00877 <span class="keyword">const</span> <span class="keywordtype">double</span> cyl0PosX= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a> + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>*cyl0Time; +00878 <span class="keyword">const</span> <span class="keywordtype">double</span> cyl0PosY= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a> + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>*cyl0Time; +00879 +00880 <span class="comment">// Cylinder 1 position</span> +00881 <span class="keyword">const</span> <span class="keywordtype">double</span> cyl1PosX= other._3dInitPosition.x + other._Speed.x*cyl1Time; +00882 <span class="keyword">const</span> <span class="keywordtype">double</span> cyl1PosY= other._3dInitPosition.y + other._Speed.y*cyl1Time; +00883 +00884 <span class="comment">// First cylinder normal</span> +00885 desc.ContactNormal0.x= cyl1PosX - cyl0PosX; +00886 desc.ContactNormal0.y= cyl1PosY - cyl0PosY; +00887 desc.ContactNormal0.z= 0; +00888 desc.ContactNormal0.normalize (); +00889 +00890 <span class="comment">// Contact position</span> +00891 desc.ContactPosition.x= desc.ContactNormal0.x*primitive.getRadiusInternal() + cyl0PosX; +00892 desc.ContactPosition.y= desc.ContactNormal0.y*primitive.getRadiusInternal() + cyl0PosY; +00893 desc.ContactPosition.z= std::max (cyl0PosZ, cyl1PosZ); +00894 +00895 <span class="comment">// Second cylinder normal</span> +00896 desc.ContactNormal1.x= -desc.ContactNormal0.x; +00897 desc.ContactNormal1.y= -desc.ContactNormal0.y; +00898 desc.ContactNormal1.z= 0; +00899 +00900 <span class="comment">// End</span> +00901 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00902 } +00903 } +00904 } +00905 +00906 <span class="comment">// No collision</span> +00907 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00908 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea15" doxytag="NLPACS::CPrimitiveWorldImage::evalCollisionPoverOC" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLPACS::CPrimitiveWorldImage::evalCollisionPoverOC </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03118.html">CPrimitiveWorldImage</a> & </td> + <td class="mdname" nowrap> <em>other</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02376.html">CCollisionDesc</a> & </td> + <td class="mdname" nowrap> <em>desc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>numPoint</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double & </td> + <td class="mdname" nowrap> <em>firstContactTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double & </td> + <td class="mdname" nowrap> <em>lastContactTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>otherPrimitive</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00573">573</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>, <a class="el" href="a06208.html#l00469">_Speed</a>, <a class="el" href="a06598.html#l00055">NLPACS::UCollisionDesc::ContactNormal0</a>, <a class="el" href="a06598.html#l00056">NLPACS::UCollisionDesc::ContactNormal1</a>, <a class="el" href="a06598.html#l00054">NLPACS::UCollisionDesc::ContactPosition</a>, <a class="el" href="a06598.html#l00057">NLPACS::UCollisionDesc::ContactTime</a>, <a class="el" href="a06054.html#l00325">NLPACS::CMovePrimitive::getHeightInternal()</a>, <a class="el" href="a06054.html#l00278">NLPACS::CMovePrimitive::getPrimitiveTypeInternal()</a>, <a class="el" href="a06054.html#l00331">NLPACS::CMovePrimitive::getRadiusInternal()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06685.html#l00119">NLMISC::CVectorD::normalize()</a>, <a class="el" href="a06207.html#l00540">NLPACS::secondDegree()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::x</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::y</a>, and <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::z</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00349">evalCollisionOBoverOC()</a>. +<p> +<div class="fragment"><pre>00576 { +00577 <span class="comment">// Checks</span> +00578 <a class="code" href="a04199.html#a6">nlassert</a> (primitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedBox); +00579 <a class="code" href="a04199.html#a6">nlassert</a> (otherPrimitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedCylinder); +00580 +00581 <span class="comment">/* Point Equ:</span> +00582 <span class="comment"> * p(t) = p0 + v0*(t - t0)</span> +00583 <span class="comment"> *</span> +00584 <span class="comment"> * Cylinder center Equ:</span> +00585 <span class="comment"> * p'(t) = p'0 + v'0*(t - t'0)</span> +00586 <span class="comment"> *</span> +00587 <span class="comment"> * Find t for this equation:</span> +00588 <span class="comment"> * R² = Norm² (p(t) - p'(t))</span> +00589 <span class="comment"> * R² = Norm² ( p0 + v0 ( t - t0 ) - p'0 - v'0 ( t - t'0 ) )</span> +00590 <span class="comment"> *</span> +00591 <span class="comment"> * A = p0 - v0*t0 - p'0 + v'0*t'0</span> +00592 <span class="comment"> * B = (v0 - v'0)</span> +00593 <span class="comment"> *</span> +00594 <span class="comment"> * Norm² (B)*t² + 2*(A.B)*t + Norm² (A) - R² = 0</span> +00595 <span class="comment"> *</span> +00596 <span class="comment"> * a = Norm² (B)</span> +00597 <span class="comment"> * b = 2*(A.B)</span> +00598 <span class="comment"> * c = Norm² (A) - R²</span> +00599 <span class="comment"> *</span> +00600 <span class="comment"> * a*t² + b*t + c = 0</span> +00601 <span class="comment"> */</span> +00602 +00603 <span class="comment">// Let's go</span> +00604 <span class="keyword">const</span> <span class="keywordtype">double</span> _Ax = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[numPoint] - other._3dInitPosition.x; +00605 <span class="keyword">const</span> <span class="keywordtype">double</span> _Ay = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[numPoint] - other._3dInitPosition.y; +00606 <span class="keyword">const</span> <span class="keywordtype">double</span> _Bx = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a> - other._Speed.x; +00607 <span class="keyword">const</span> <span class="keywordtype">double</span> _By = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a> - other._Speed.y; +00608 +00609 <span class="comment">// Eval system</span> +00610 <span class="keywordtype">double</span> s0, s1; +00611 <span class="keywordtype">double</span> squareRadius=otherPrimitive.getRadiusInternal()*otherPrimitive.getRadiusInternal(); +00612 <a class="code" href="a04558.html#a15">uint</a> numSolution=<a class="code" href="a05380.html#a30">secondDegree</a> (_Bx*_Bx+_By*_By, 2.f*(_Ax*_Bx+_Ay*_By), _Ax*_Ax+_Ay*_Ay-squareRadius, s0, s1); +00613 <span class="keywordflow">if</span> (numSolution!=0) +00614 { +00615 <span class="comment">// time</span> +00616 <span class="keywordtype">double</span> time; +00617 +00618 <span class="comment">// Collision time</span> +00619 <span class="keywordflow">if</span> (numSolution==1) +00620 { +00621 firstContactTime=s0; +00622 lastContactTime=s0; +00623 } +00624 <span class="keywordflow">else</span> +00625 { +00626 <span class="comment">// First and last time</span> +00627 <span class="keywordflow">if</span> (s0<s1) +00628 { +00629 firstContactTime=s0; +00630 lastContactTime=s1; +00631 } +00632 <span class="keywordflow">else</span> +00633 { +00634 firstContactTime=s1; +00635 lastContactTime=s0; +00636 } +00637 } +00638 time=firstContactTime; +00639 +00640 <span class="comment">// Pos Z</span> +00641 <span class="keyword">const</span> <span class="keywordtype">double</span> pointCylZ=other._3dInitPosition.z; +00642 <span class="keyword">const</span> <span class="keywordtype">double</span> cylPosZ= pointCylZ + other._Speed.z*time; +00643 +00644 <span class="comment">// Some constants</span> +00645 <span class="keyword">const</span> <span class="keywordtype">double</span> pointZ=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>; +00646 <span class="keyword">const</span> <span class="keywordtype">double</span> ptPosZ= pointZ + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>*time; +00647 +00648 <span class="comment">// Z Included ?</span> +00649 <span class="keywordflow">if</span> ( (ptPosZ <= cylPosZ + otherPrimitive.getHeightInternal()) && (ptPosZ + primitive.getHeightInternal() >= cylPosZ) ) +00650 { +00651 <span class="comment">// Ok Collision, fill the result</span> +00652 +00653 <span class="comment">// Time</span> +00654 desc.ContactTime=time; +00655 +00656 <span class="comment">// Point position</span> +00657 <span class="keyword">const</span> <span class="keywordtype">double</span> ptPosX= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[numPoint] + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>*time; +00658 <span class="keyword">const</span> <span class="keywordtype">double</span> ptPosY= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[numPoint] + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>*time; +00659 +00660 <span class="comment">// Cylinder position</span> +00661 <span class="keyword">const</span> <span class="keywordtype">double</span> cylPosX= other._3dInitPosition.x + other._Speed.x*time; +00662 <span class="keyword">const</span> <span class="keywordtype">double</span> cylPosY= other._3dInitPosition.y + other._Speed.y*time; +00663 +00664 <span class="comment">// Position</span> +00665 desc.ContactPosition.x=ptPosX; +00666 desc.ContactPosition.y=ptPosY; +00667 desc.ContactPosition.z=std::max (cylPosZ, ptPosZ); +00668 +00669 <span class="comment">// Cylinder normal</span> +00670 desc.ContactNormal1.x=ptPosX-cylPosX; +00671 desc.ContactNormal1.y=ptPosY-cylPosY; +00672 desc.ContactNormal1.z=0; +00673 desc.ContactNormal1.normalize (); +00674 desc.ContactNormal0.x=-desc.ContactNormal1.x; +00675 desc.ContactNormal0.y=-desc.ContactNormal1.y; +00676 desc.ContactNormal0.z=0; +00677 +00678 <span class="comment">// End</span> +00679 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00680 } +00681 } +00682 +00683 <span class="comment">// No collision</span> +00684 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00685 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea16" doxytag="NLPACS::CPrimitiveWorldImage::evalCollisionPoverS" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLPACS::CPrimitiveWorldImage::evalCollisionPoverS </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03118.html">CPrimitiveWorldImage</a> & </td> + <td class="mdname" nowrap> <em>other</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02376.html">CCollisionDesc</a> & </td> + <td class="mdname" nowrap> <em>desc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>numPoint</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>numSeg</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>otherPrimitive</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00455">455</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>, <a class="el" href="a06208.html#l00469">_Speed</a>, <a class="el" href="a06598.html#l00055">NLPACS::UCollisionDesc::ContactNormal0</a>, <a class="el" href="a06598.html#l00056">NLPACS::UCollisionDesc::ContactNormal1</a>, <a class="el" href="a06598.html#l00054">NLPACS::UCollisionDesc::ContactPosition</a>, <a class="el" href="a06598.html#l00057">NLPACS::UCollisionDesc::ContactTime</a>, <a class="el" href="a06054.html#l00325">NLPACS::CMovePrimitive::getHeightInternal()</a>, <a class="el" href="a06054.html#l00319">NLPACS::CMovePrimitive::getLength()</a>, <a class="el" href="a06054.html#l00278">NLPACS::CMovePrimitive::getPrimitiveTypeInternal()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::x</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::y</a>, and <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::z</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00243">evalCollisionOBoverOB()</a>. +<p> +<div class="fragment"><pre>00457 { +00458 <span class="comment">// Checks</span> +00459 <a class="code" href="a04199.html#a6">nlassert</a> (primitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedBox); +00460 <a class="code" href="a04199.html#a6">nlassert</a> (otherPrimitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedBox); +00461 +00462 <span class="comment">// Some constants</span> +00463 <span class="keyword">const</span> <span class="keywordtype">double</span> normalSegX=other._OBData.EdgeDirectionY[numSeg]; +00464 <span class="keyword">const</span> <span class="keywordtype">double</span> normalSegY=-other._OBData.EdgeDirectionX[numSeg]; +00465 +00466 <span class="comment">// Relative speed</span> +00467 <span class="keyword">const</span> <span class="keywordtype">double</span> speedX=other._Speed.x-<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>; +00468 <span class="keyword">const</span> <span class="keywordtype">double</span> speedY=other._Speed.y-<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>; +00469 +00470 <span class="comment">// Dot product with the plan tangeante</span> +00471 <span class="keywordtype">double</span> dotProd= speedX*normalSegX + speedY*normalSegY; +00472 <span class="comment">//if ( dotProd > 0 )</span> +00473 <span class="keywordflow">if</span> ( dotProd != 0 ) +00474 { +00475 <span class="comment">// Time of the collision</span> +00476 <span class="keywordtype">double</span> time= (normalSegX*(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[numPoint] - other._OBData.PointPosX[numSeg]) + +00477 normalSegY*(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[numPoint] - other._OBData.PointPosY[numSeg])) / dotProd; +00478 +00479 <span class="comment">// Position of segment point at collision time</span> +00480 <span class="keyword">const</span> <span class="keywordtype">double</span> segPosX= other._OBData.PointPosX[numSeg] + other._Speed.x*time; +00481 <span class="keyword">const</span> <span class="keywordtype">double</span> segPosY= other._OBData.PointPosY[numSeg] + other._Speed.y*time; +00482 +00483 <span class="comment">// Position of the point at collision time</span> +00484 <span class="keyword">const</span> <span class="keywordtype">double</span> ptPosX= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[numPoint] + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>*time; +00485 <span class="keyword">const</span> <span class="keywordtype">double</span> ptPosY= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[numPoint] + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>*time; +00486 +00487 <span class="comment">// Direction of the collision on the segment</span> +00488 <span class="keyword">const</span> <span class="keywordtype">double</span> dirX= ptPosX - segPosX; +00489 <span class="keyword">const</span> <span class="keywordtype">double</span> dirY= ptPosY - segPosY; +00490 +00491 <span class="comment">// Length of this vector</span> +00492 <span class="keyword">const</span> <span class="keywordtype">double</span> length= dirY*normalSegX - dirX*normalSegY; +00493 +00494 <span class="comment">// Included ?</span> +00495 <span class="keywordflow">if</span> ( ( length >= 0 ) && ( length <= otherPrimitive.getLength(numSeg&1) ) ) +00496 { +00497 <span class="comment">// 2d Collid checked... Now check height</span> +00498 +00499 <span class="comment">// Pos Z</span> +00500 <span class="keyword">const</span> <span class="keywordtype">double</span> pointSegZ=other._3dInitPosition.z; +00501 <span class="keyword">const</span> <span class="keywordtype">double</span> segPosZ= pointSegZ + other._Speed.z*time; +00502 +00503 <span class="comment">// Some constants</span> +00504 <span class="keyword">const</span> <span class="keywordtype">double</span> pointZ=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>; +00505 <span class="keyword">const</span> <span class="keywordtype">double</span> ptPosZ= pointZ + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>*time; +00506 +00507 <span class="comment">// Included ?</span> +00508 <span class="keywordflow">if</span> ( (ptPosZ <= segPosZ + otherPrimitive.getHeightInternal()) && (ptPosZ + primitive.getHeightInternal() >= segPosZ) ) +00509 { +00510 <span class="comment">// Ok Collision, fill the result</span> +00511 +00512 <span class="comment">// Time</span> +00513 desc.ContactTime=time; +00514 +00515 <span class="comment">// Position</span> +00516 desc.ContactPosition.x=ptPosX; +00517 desc.ContactPosition.y=ptPosY; +00518 desc.ContactPosition.z=std::max (segPosZ, ptPosZ); +00519 +00520 <span class="comment">// Seg box normal</span> +00521 desc.ContactNormal1.x=normalSegX; +00522 desc.ContactNormal1.y=normalSegY; +00523 desc.ContactNormal1.z=0; +00524 desc.ContactNormal0.x=-desc.ContactNormal1.x; +00525 desc.ContactNormal0.y=-desc.ContactNormal1.y; +00526 desc.ContactNormal0.z=0; +00527 +00528 <span class="comment">// End</span> +00529 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00530 } +00531 } +00532 } +00533 +00534 <span class="comment">// No collision</span> +00535 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00536 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea17" doxytag="NLPACS::CPrimitiveWorldImage::evalCollisionSoverOC" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLPACS::CPrimitiveWorldImage::evalCollisionSoverOC </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03118.html">CPrimitiveWorldImage</a> & </td> + <td class="mdname" nowrap> <em>other</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02376.html">CCollisionDesc</a> & </td> + <td class="mdname" nowrap> <em>desc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>numPoint</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>otherPrimitive</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00689">689</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>, <a class="el" href="a06208.html#l00469">_Speed</a>, <a class="el" href="a06598.html#l00055">NLPACS::UCollisionDesc::ContactNormal0</a>, <a class="el" href="a06598.html#l00056">NLPACS::UCollisionDesc::ContactNormal1</a>, <a class="el" href="a06598.html#l00054">NLPACS::UCollisionDesc::ContactPosition</a>, <a class="el" href="a06598.html#l00057">NLPACS::UCollisionDesc::ContactTime</a>, <a class="el" href="a06054.html#l00325">NLPACS::CMovePrimitive::getHeightInternal()</a>, <a class="el" href="a06054.html#l00319">NLPACS::CMovePrimitive::getLength()</a>, <a class="el" href="a06054.html#l00278">NLPACS::CMovePrimitive::getPrimitiveTypeInternal()</a>, <a class="el" href="a06054.html#l00331">NLPACS::CMovePrimitive::getRadiusInternal()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06685.html#l00119">NLMISC::CVectorD::normalize()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::x</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::y</a>, and <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::z</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00349">evalCollisionOBoverOC()</a>. +<p> +<div class="fragment"><pre>00691 { +00692 <span class="comment">// Checks</span> +00693 <a class="code" href="a04199.html#a6">nlassert</a> (primitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedBox); +00694 <a class="code" href="a04199.html#a6">nlassert</a> (otherPrimitive.getPrimitiveTypeInternal()==UMovePrimitive::_2DOrientedCylinder); +00695 +00696 <span class="comment">// Some constants</span> +00697 <span class="keyword">const</span> <span class="keywordtype">double</span> normalSegX=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.EdgeDirectionY[numSeg]; +00698 <span class="keyword">const</span> <span class="keywordtype">double</span> normalSegY=-<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.EdgeDirectionX[numSeg]; +00699 +00700 <span class="comment">// Relative speed</span> +00701 <span class="keyword">const</span> <span class="keywordtype">double</span> speedX=other._Speed.x-<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>; +00702 <span class="keyword">const</span> <span class="keywordtype">double</span> speedY=other._Speed.y-<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>; +00703 +00704 <span class="comment">// Dot product with the plan tangeante</span> +00705 <span class="keywordtype">double</span> dotProd= speedX*normalSegX + speedY*normalSegY; +00706 <span class="comment">//if ( dotProd < 0 )</span> +00707 <span class="keywordflow">if</span> ( dotProd !=0 ) +00708 { +00709 <span class="comment">// Time of the collision</span> +00710 <span class="keywordtype">double</span> time= (otherPrimitive.getRadiusInternal() + normalSegX*(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[numSeg] - other._3dInitPosition.x ) + +00711 normalSegY*(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[numSeg] - other._3dInitPosition.y ) ) / dotProd; +00712 +00713 <span class="comment">// Position of segment point at collision time</span> +00714 <span class="keyword">const</span> <span class="keywordtype">double</span> segPosX= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[numSeg] + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>*time; +00715 <span class="keyword">const</span> <span class="keywordtype">double</span> segPosY= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[numSeg] + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>*time; +00716 +00717 <span class="comment">// Position of the cylinder at collision time</span> +00718 <span class="keyword">const</span> <span class="keywordtype">double</span> cylPosX= other._3dInitPosition.x + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>*time; +00719 <span class="keyword">const</span> <span class="keywordtype">double</span> cylPosY= other._3dInitPosition.y + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>*time; +00720 +00721 <span class="comment">// Position de contact</span> +00722 <span class="keyword">const</span> <span class="keywordtype">double</span> contactX= cylPosX - normalSegX*otherPrimitive.getRadiusInternal(); +00723 <span class="keyword">const</span> <span class="keywordtype">double</span> contactY= cylPosY - normalSegY*otherPrimitive.getRadiusInternal(); +00724 +00725 <span class="comment">// Direction of the collision on the segment</span> +00726 <span class="keyword">const</span> <span class="keywordtype">double</span> dirX= contactX - segPosX; +00727 <span class="keyword">const</span> <span class="keywordtype">double</span> dirY= contactY - segPosY; +00728 +00729 <span class="comment">// Length of this vector</span> +00730 <span class="keyword">const</span> <span class="keywordtype">double</span> length= dirY*normalSegX - dirX*normalSegY; +00731 +00732 <span class="comment">// Included ?</span> +00733 <span class="keywordflow">if</span> ( ( length >= 0 ) && ( length <= primitive.getLength (numSeg&1) ) ) +00734 { +00735 <span class="comment">// 2d Collid checked... Now check height</span> +00736 +00737 <span class="comment">// Pos Z</span> +00738 <span class="keyword">const</span> <span class="keywordtype">double</span> segPosZ= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a> + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>*time; +00739 +00740 <span class="comment">// Some constants</span> +00741 <span class="keyword">const</span> <span class="keywordtype">double</span> cylPosZ= other._3dInitPosition.z + other._Speed.z*time; +00742 +00743 <span class="comment">// Included ?</span> +00744 <span class="keywordflow">if</span> ( (cylPosZ <= segPosZ + primitive.getHeightInternal() ) && (cylPosZ + otherPrimitive.getHeightInternal() >= segPosZ) ) +00745 { +00746 <span class="comment">// Ok Collision, fill the result</span> +00747 +00748 <span class="comment">// Time</span> +00749 desc.ContactTime=time; +00750 +00751 <span class="comment">// Position</span> +00752 desc.ContactPosition.x=contactX; +00753 desc.ContactPosition.y=contactY; +00754 desc.ContactPosition.z=std::max (segPosZ, cylPosZ); +00755 +00756 <span class="comment">// Segment normal</span> +00757 desc.ContactNormal0.x=normalSegX; +00758 desc.ContactNormal0.y=normalSegY; +00759 desc.ContactNormal0.z=0; +00760 +00761 <span class="comment">// Seg box normal</span> +00762 desc.ContactNormal1.x=contactX-cylPosX; +00763 desc.ContactNormal1.y=contactY-cylPosY; +00764 desc.ContactNormal1.z=0; +00765 desc.ContactNormal1.normalize (); +00766 +00767 <span class="comment">// End</span> +00768 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00769 } +00770 } +00771 } +00772 +00773 <span class="comment">// No collision</span> +00774 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00775 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea18" doxytag="NLPACS::CPrimitiveWorldImage::getBBXMax" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double NLPACS::CPrimitiveWorldImage::getBBXMax </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return max of the bounding box in X. +<p> +Definition at line <a class="el" href="a06208.html#l00192">192</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00474">_BBXMax</a>. +<p> +<div class="fragment"><pre>00193 { +00194 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>; +00195 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea19" doxytag="NLPACS::CPrimitiveWorldImage::getBBXMin" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double NLPACS::CPrimitiveWorldImage::getBBXMin </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return min of the bounding box in X. +<p> +Definition at line <a class="el" href="a06208.html#l00176">176</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00472">_BBXMin</a>. +<p> +Referenced by <a class="el" href="a06045.html#l00124">NLPACS::CMoveCell::updateSortedLists()</a>. +<p> +<div class="fragment"><pre>00177 { +00178 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>; +00179 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea20" doxytag="NLPACS::CPrimitiveWorldImage::getBBYMax" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double NLPACS::CPrimitiveWorldImage::getBBYMax </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return max of the bounding box in Y. +<p> +Definition at line <a class="el" href="a06208.html#l00200">200</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00475">_BBYMax</a>. +<p> +<div class="fragment"><pre>00201 { +00202 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a>; +00203 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea21" doxytag="NLPACS::CPrimitiveWorldImage::getBBYMin" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double NLPACS::CPrimitiveWorldImage::getBBYMin </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return min of the bounding box in Y. +<p> +Definition at line <a class="el" href="a06208.html#l00184">184</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00473">_BBYMin</a>. +<p> +<div class="fragment"><pre>00185 { +00186 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a>; +00187 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea22" doxytag="NLPACS::CPrimitiveWorldImage::getDeltaPosition" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a03664.html">NLMISC::CVectorD</a>& NLPACS::CPrimitiveWorldImage::getDeltaPosition </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the delta position +<p> +Definition at line <a class="el" href="a06208.html#l00208">208</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00466">_DeltaPosition</a>. +<p> +<div class="fragment"><pre>00209 { +00210 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager5">_DeltaPosition</a>; +00211 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea23" doxytag="NLPACS::CPrimitiveWorldImage::getFinalPosition" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03664.html">NLMISC::CVectorD</a> NLPACS::CPrimitiveWorldImage::getFinalPosition </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the position of the move primitive at the end of the movement.<p> +<dl compact><dt><b>Returns:</b></dt><dd>the new position of the primitive.</dd></dl> + +<p> +Definition at line <a class="el" href="a06208.html#l00078">78</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00417">NLPACS::CPrimitiveWorldImage::CPosition::getPos()</a>. +<p> +<div class="fragment"><pre>00079 { +00080 <span class="comment">// Get the position</span> +00081 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona1">getPos</a>(); +00082 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea24" doxytag="NLPACS::CPrimitiveWorldImage::getGlobalPosition" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a02591.html">UGlobalPosition</a>& NLPACS::CPrimitiveWorldImage::getGlobalPosition </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00258">258</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00429">NLPACS::CPrimitiveWorldImage::CPosition::getGlobalPos()</a>. +<p> +<div class="fragment"><pre>00259 { +00260 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona0">getGlobalPos</a>(); +00261 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea25" doxytag="NLPACS::CPrimitiveWorldImage::getInitTime" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double NLPACS::CPrimitiveWorldImage::getInitTime </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00286">286</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +<div class="fragment"><pre>00287 { +00288 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a>; +00289 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea26" doxytag="NLPACS::CPrimitiveWorldImage::getMoveElement" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02945.html">CMoveElement</a>* NLPACS::CPrimitiveWorldImage::getMoveElement </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>i</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the nieme MoveElement. The primitive can have 4 move elements. Can be NULL if the ineme elment is not in a list. +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00214">214</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00500">_MoveElement</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00215 { +00216 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[i]; +00217 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea27" doxytag="NLPACS::CPrimitiveWorldImage::getNextModified" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02946.html">CMovePrimitive</a>* NLPACS::CPrimitiveWorldImage::getNextModified </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get next modified primitive. +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00168">168</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00497">_NextModified</a>. +<p> +<div class="fragment"><pre>00169 { +00170 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager9">_NextModified</a>; +00171 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea28" doxytag="NLPACS::CPrimitiveWorldImage::getOrientation" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double NLPACS::CPrimitiveWorldImage::getOrientation </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00264">264</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>. +<p> +<div class="fragment"><pre>00265 { +00266 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.Orientation; +00267 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea29" doxytag="NLPACS::CPrimitiveWorldImage::getSpeed" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a03664.html">NLMISC::CVectorD</a>& NLPACS::CPrimitiveWorldImage::getSpeed </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">void </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the speed vector for this primitive.<p> +the new speed vector. +<p> +Definition at line <a class="el" href="a06208.html#l00125">125</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +<div class="fragment"><pre>00126 { +00127 <span class="comment">// New time</span> +00128 <span class="keywordflow">return</span> <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>; +00129 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea30" doxytag="NLPACS::CPrimitiveWorldImage::isInModifiedListFlag" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLPACS::CPrimitiveWorldImage::isInModifiedListFlag </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Is in modified list ? +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00132">132</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00404">_DynamicFlags</a>, and <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey3">InModifiedListFlag</a>. +<p> +Referenced by <a class="el" href="a06049.html#l00036">NLPACS::CMoveContainer::changed()</a>. +<p> +<div class="fragment"><pre>00133 { +00134 <span class="keywordflow">return</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>&<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey3">InModifiedListFlag</a>) != 0; +00135 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea31" doxytag="NLPACS::CPrimitiveWorldImage::isInWorldImageFlag" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLPACS::CPrimitiveWorldImage::isInWorldImageFlag </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Is in modified list ? +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00153">153</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00404">_DynamicFlags</a>, and <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey4">InWorldImageFlag</a>. +<p> +Referenced by <a class="el" href="a06054.html#l00126">NLPACS::CMovePrimitive::isInserted()</a>. +<p> +<div class="fragment"><pre>00154 { +00155 <span class="keywordflow">return</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>&<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey4">InWorldImageFlag</a>) != 0; +00156 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea32" doxytag="NLPACS::CPrimitiveWorldImage::linkInModifiedList" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::linkInModifiedList </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02946.html">CMovePrimitive</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>next</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00147">147</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00497">_NextModified</a>. +<p> +Referenced by <a class="el" href="a06049.html#l00036">NLPACS::CMoveContainer::changed()</a>. +<p> +<div class="fragment"><pre>00148 { +00149 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager9">_NextModified</a>=next; +00150 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea33" doxytag="NLPACS::CPrimitiveWorldImage::move" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::move </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03664.html">NLMISC::CVectorD</a> & </td> + <td class="mdname" nowrap> <em>speed</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02943.html">CMoveContainer</a> & </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the speed vector for this primitive. Only for movable primitives.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>speed</em> </td><td>is the speed of the primitive.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06207.html#l01480">1480</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a06208.html#l00270">dirtPos()</a>, <a class="el" href="a06208.html#l00417">NLPACS::CPrimitiveWorldImage::CPosition::getPos()</a>, <a class="el" href="a06208.html#l00111">setSpeed()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>01481 { +01482 <span class="comment">// New speed</span> +01483 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea45">setSpeed</a> (speed, &container, &primitive, worldImage); +01484 +01485 <span class="comment">// Set initial position</span> +01486 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a> = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona1">getPos</a> (); +01487 +01488 <span class="comment">// Set initial time</span> +01489 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a> = 0; +01490 +01491 <span class="comment">// Dirt BB</span> +01492 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea7">dirtPos</a> (&container, &primitive, worldImage); +01493 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea34" doxytag="NLPACS::CPrimitiveWorldImage::precalcBB" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::precalcBB </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">double </td> + <td class="mdname" nowrap> <em>beginTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>endTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00971">971</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a06208.html#l00474">_BBXMax</a>, <a class="el" href="a06208.html#l00472">_BBXMin</a>, <a class="el" href="a06208.html#l00475">_BBYMax</a>, <a class="el" href="a06208.html#l00473">_BBYMin</a>, <a class="el" href="a06208.html#l00466">_DeltaPosition</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>, <a class="el" href="a06054.html#l00278">NLPACS::CMovePrimitive::getPrimitiveTypeInternal()</a>, <a class="el" href="a06054.html#l00331">NLPACS::CMovePrimitive::getRadiusInternal()</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00244">type</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::x</a>, and <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::y</a>. +<p> +Referenced by <a class="el" href="a06208.html#l00231">update()</a>. +<p> +<div class="fragment"><pre>00972 { +00973 <span class="comment">// Type of the primitive</span> +00974 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a581">type</a>=primitive.getPrimitiveTypeInternal(); +00975 +00976 <span class="comment">// Box ?</span> +00977 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a>==UMovePrimitive::_2DOrientedBox) +00978 { +00979 <span class="comment">// Orientation index</span> +00980 <a class="code" href="a04558.html#a14">sint</a> orient= (<a class="code" href="a04558.html#a14">sint</a>)(256.f*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.Orientation/(2.f*NLMISC::Pi)); +00981 orient&=0xff; +00982 orient>>=6; +00983 <a class="code" href="a04199.html#a6">nlassert</a> (orient>=0); +00984 <a class="code" href="a04199.html#a6">nlassert</a> (orient<4); +00985 +00986 <span class="comment">// Compute coordinates</span> +00987 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>=FLT_MAX; +00988 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a>=FLT_MAX; +00989 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>=-FLT_MAX; +00990 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a>=-FLT_MAX; +00991 +00992 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<4; i++) +00993 { +00994 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[i]<<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>) +00995 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[i]; +00996 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[i]><a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>) +00997 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[i]; +00998 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[i]<<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a>) +00999 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a>=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[i]; +01000 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[i]><a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a>) +01001 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a>=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[i]; +01002 } +01003 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>=<a class="code" href="a04061.html#a0">std::min</a> (std::min (_BBXMin, _BBXMin+endTime*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>), _BBXMin+beginTime*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>); +01004 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>=std::max (std::max (_BBXMax, _BBXMax+endTime*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>), _BBXMax+beginTime*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>); +01005 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a>=<a class="code" href="a04061.html#a0">std::min</a> (std::min (_BBYMin, _BBYMin+endTime*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>), _BBYMin+beginTime*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>); +01006 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a>=std::max (std::max (_BBYMax, _BBYMax+endTime*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>), _BBYMax+beginTime*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>); +01007 +01008 <span class="comment">/* </span> +01009 <span class="comment"> // This code is faster but buggy.. </span> +01010 <span class="comment"> _BBXMin= _OBData.PointPosX[minX[orient]] + _Speed.x*beginTime;</span> +01011 <span class="comment"> _BBXMin= std::min (_BBXMin, _OBData.PointPosX[minX[orient]] + _Speed.x*endTime);</span> +01012 <span class="comment"></span> +01013 <span class="comment"> _BBYMin= _OBData.PointPosY[minY[orient]] + _Speed.y*beginTime;</span> +01014 <span class="comment"> _BBYMin= std::min (_BBYMin, _OBData.PointPosY[minY[orient]] + _Speed.y*endTime);</span> +01015 <span class="comment"></span> +01016 <span class="comment"> _BBXMax= _OBData.PointPosX[maxX[orient]] + _Speed.x*beginTime;</span> +01017 <span class="comment"> _BBXMax= std::max (_BBXMax, _OBData.PointPosX[maxX[orient]] + _Speed.x*endTime);</span> +01018 <span class="comment"></span> +01019 <span class="comment"> _BBYMax= _OBData.PointPosY[maxY[orient]] + _Speed.y*beginTime;</span> +01020 <span class="comment"> _BBYMax= std::max (_BBYMax, _OBData.PointPosY[maxY[orient]] + _Speed.y*endTime);*/</span> +01021 } +01022 <span class="keywordflow">else</span> +01023 { +01024 <span class="comment">// Should be a cylinder</span> +01025 <a class="code" href="a04199.html#a6">nlassert</a> (type==UMovePrimitive::_2DOrientedCylinder); +01026 +01027 <span class="comment">// Compute X coordinates</span> +01028 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a> + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>*beginTime; +01029 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a> + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>*endTime; +01030 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>><a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>) +01031 { +01032 <span class="keywordtype">double</span> tmp=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>; +01033 _BBXMin=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>; +01034 _BBXMax=tmp; +01035 } +01036 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">_BBXMin</a>-=primitive.getRadiusInternal(); +01037 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">_BBXMax</a>+=primitive.getRadiusInternal(); +01038 +01039 <span class="comment">// Compute Y coordinates</span> +01040 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a>= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a> + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>*beginTime; +01041 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a>= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a> + <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>*endTime; +01042 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a>><a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a>) +01043 { +01044 <span class="keywordtype">double</span> tmp=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a>; +01045 _BBYMin=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a>; +01046 _BBYMax=tmp; +01047 } +01048 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">_BBYMin</a>-=primitive.getRadiusInternal(); +01049 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">_BBYMax</a>+=primitive.getRadiusInternal(); +01050 } +01051 +01052 <span class="comment">// Delta position</span> +01053 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager5">_DeltaPosition</a>=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>*(endTime-beginTime); +01054 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea35" doxytag="NLPACS::CPrimitiveWorldImage::precalcPos" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::precalcPos </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>primitive</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l00912">912</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>, <a class="el" href="a06054.html#l00319">NLPACS::CMovePrimitive::getLength()</a>, <a class="el" href="a06054.html#l00278">NLPACS::CMovePrimitive::getPrimitiveTypeInternal()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05646.html#l00244">type</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::x</a>, and <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::y</a>. +<p> +Referenced by <a class="el" href="a06208.html#l00231">update()</a>. +<p> +<div class="fragment"><pre>00913 { +00914 <span class="comment">// Type of the primitive</span> +00915 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a581">type</a>=primitive.getPrimitiveTypeInternal(); +00916 +00917 <span class="comment">// Box ?</span> +00918 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a>==UMovePrimitive::_2DOrientedBox) +00919 { +00920 <span class="comment">// Calc cosinus and sinus</span> +00921 <span class="keywordtype">double</span> cosinus=(<span class="keywordtype">double</span>)cos(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.Orientation); +00922 <span class="keywordtype">double</span> sinus=(<span class="keywordtype">double</span>)sin(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.Orientation); +00923 +00924 <span class="comment">// Size</span> +00925 <span class="keywordtype">double</span> halfWidth=primitive.getLength (0)/2; +00926 <span class="keywordtype">double</span> halfDepth=primitive.getLength (1)/2; +00927 +00928 <span class="comment">// First point</span> +00929 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[0]=cosinus*(-halfWidth)-sinus*(-halfDepth)+<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>; +00930 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[0]=sinus*(-halfWidth)+cosinus*(-halfDepth)+<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>; +00931 +00932 <span class="comment">// Second point</span> +00933 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[1]=cosinus*halfWidth-sinus*(-halfDepth)+<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>; +00934 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[1]=sinus*halfWidth+cosinus*(-halfDepth)+<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>; +00935 +00936 <span class="comment">// Third point</span> +00937 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[2]=cosinus*halfWidth-sinus*halfDepth+<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>; +00938 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[2]=sinus*halfWidth+cosinus*halfDepth+<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>; +00939 +00940 <span class="comment">// Fourth point</span> +00941 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[3]=cosinus*(-halfWidth)-sinus*halfDepth+<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>; +00942 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[3]=sinus*(-halfWidth)+cosinus*halfDepth+<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>; +00943 +00944 <span class="comment">// Direction</span> +00945 <span class="keywordtype">double</span> length0 = (primitive.getLength(0)==0)? 0.001 : primitive.getLength(0); +00946 <span class="keywordtype">double</span> length1 = (primitive.getLength(1)==0)? 0.001 : primitive.getLength(1); +00947 <span class="keywordtype">double</span> oneOverLength[2]= { 1 / length0, 1 / length1 }; +00948 +00949 <span class="comment">// Direction</span> +00950 <a class="code" href="a04558.html#a15">uint</a> i; +00951 <span class="keywordflow">for</span> (i=0; i<4; i++) +00952 { +00953 <span class="comment">// Next index</span> +00954 <a class="code" href="a04558.html#a15">uint</a> next=(i+1)&3; +00955 <span class="keywordtype">double</span> oneOver=oneOverLength[i&1]; +00956 +00957 <span class="comment">// New direction</span> +00958 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.EdgeDirectionX[i]=(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[next] - <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosX[i])*oneOver; +00959 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.EdgeDirectionY[i]=(<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[next] - <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.PointPosY[i])*oneOver; +00960 } +00961 } +00962 <span class="keywordflow">else</span> +00963 { +00964 <span class="comment">// Should be a cylinder</span> +00965 <a class="code" href="a04199.html#a6">nlassert</a> (type==UMovePrimitive::_2DOrientedCylinder); +00966 } +00967 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea36" doxytag="NLPACS::CPrimitiveWorldImage::precalcSpeed" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::precalcSpeed </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea37" doxytag="NLPACS::CPrimitiveWorldImage::reaction" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::reaction </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02386.html">CCollisionSurfaceDesc</a> & </td> + <td class="mdname" nowrap> <em>surfaceDesc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a02591.html">UGlobalPosition</a> & </td> + <td class="mdname" nowrap> <em>globalPosition</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02588.html">CGlobalRetriever</a> & </td> + <td class="mdname" nowrap> <em>retriever</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>ratio</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>dt</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02943.html">CMoveContainer</a> & </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l01350">1350</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a05578.html#l00102">NLPACS::CCollisionSurfaceDesc::ContactNormal</a>, <a class="el" href="a05578.html#l00103">NLPACS::CCollisionSurfaceDesc::ContactTime</a>, <a class="el" href="a06208.html#l00270">dirtPos()</a>, <a class="el" href="a06054.html#l00313">NLPACS::CMovePrimitive::getAttenuation()</a>, <a class="el" href="a06208.html#l00417">NLPACS::CPrimitiveWorldImage::CPosition::getPos()</a>, <a class="el" href="a06054.html#l00285">NLPACS::CMovePrimitive::getReactionTypeInternal()</a>, <a class="el" href="a06054.html#l00038">NELPACS_DIST_BACK</a>, <a class="el" href="a06685.html#l00136">NLMISC::CVectorD::set()</a>, <a class="el" href="a06208.html#l00435">NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPos()</a>, <a class="el" href="a05646.html#l00244">type</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>01353 { +01354 <span class="comment">// H_AUTO(PACS_PWI_reaction_short);</span> +01355 +01356 <span class="comment">// Reaction type</span> +01357 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a581">type</a>=primitive.getReactionTypeInternal(); +01358 +01359 <span class="comment">// Reaction to the collision: copy the CGlobalRetriever::CGlobalPosition</span> +01360 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona2">setGlobalPos</a> (globalPosition, retriever); +01361 +01362 <span class="comment">// Relfexion or slide ?</span> +01363 <span class="keywordflow">if</span> ((<a class="code" href="a04223.html#a581">type</a>==UMovePrimitive::Reflexion)||(<a class="code" href="a04223.html#a581">type</a>==UMovePrimitive::Slide)) +01364 { +01365 <span class="comment">// Slide ?</span> +01366 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a>==UMovePrimitive::Slide) +01367 { +01368 <span class="comment">// Project last delta on plane of collision.</span> +01369 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>-= surfaceDesc.ContactNormal*(surfaceDesc.ContactNormal*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>-<a class="code" href="a04631.html#a0">NELPACS_DIST_BACK</a>/(dt-surfaceDesc.ContactTime)); +01370 } +01371 +01372 <span class="comment">// Reflexion ?</span> +01373 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a>==UMovePrimitive::Reflexion) +01374 { +01375 <span class="comment">// Project last delta on plane of collision.</span> +01376 <span class="keywordtype">double</span> speedProj=surfaceDesc.ContactNormal*<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>; +01377 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>-=surfaceDesc.ContactNormal*(speedProj+speedProj*primitive.getAttenuation()-<a class="code" href="a04631.html#a0">NELPACS_DIST_BACK</a>/(dt-surfaceDesc.ContactTime)); +01378 } +01379 } +01380 <span class="keywordflow">else</span> +01381 { +01382 <span class="comment">// Stop ?</span> +01383 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a>==UMovePrimitive::Stop) +01384 { +01385 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDz2079_9">set</a> (0,0,0); +01386 } +01387 } +01388 +01389 <span class="comment">// Contact time</span> +01390 <span class="keywordtype">double</span> contactTime=surfaceDesc.ContactTime; +01391 +01392 <span class="comment">// Init position</span> +01393 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a> = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona1">getPos</a>() - <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a> * contactTime; +01394 +01395 <span class="comment">// Set contactTime</span> +01396 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a>=contactTime; +01397 +01398 <span class="comment">// Dirt pos</span> +01399 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea7">dirtPos</a> (&container, &primitive, worldImage); +01400 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea38" doxytag="NLPACS::CPrimitiveWorldImage::reaction" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::reaction </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03118.html">CPrimitiveWorldImage</a> & </td> + <td class="mdname" nowrap> <em>second</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a02376.html">CCollisionDesc</a> & </td> + <td class="mdname" nowrap> <em>desc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02588.html">CGlobalRetriever</a> * </td> + <td class="mdname" nowrap> <em>retriver</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> & </td> + <td class="mdname" nowrap> <em>surfaceTemp</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>collision</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>otherPrimitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02943.html">CMoveContainer</a> * </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>secondWorldImage</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>secondConst</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l01167">1167</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a06208.html#l00466">_DeltaPosition</a>, <a class="el" href="a06208.html#l00460">_InitTime</a>, <a class="el" href="a06208.html#l00457">_Position</a>, <a class="el" href="a06208.html#l00469">_Speed</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06598.html#l00055">NLPACS::UCollisionDesc::ContactNormal0</a>, <a class="el" href="a06598.html#l00056">NLPACS::UCollisionDesc::ContactNormal1</a>, <a class="el" href="a06598.html#l00057">NLPACS::UCollisionDesc::ContactTime</a>, <a class="el" href="a06208.html#l00270">dirtPos()</a>, <a class="el" href="a05761.html#l02028">NLPACS::CGlobalRetriever::doMove()</a>, <a class="el" href="a06054.html#l00313">NLPACS::CMovePrimitive::getAttenuation()</a>, <a class="el" href="a06208.html#l00429">NLPACS::CPrimitiveWorldImage::CPosition::getGlobalPos()</a>, <a class="el" href="a06054.html#l00421">NLPACS::CMovePrimitive::getMass()</a>, <a class="el" href="a06208.html#l00417">NLPACS::CPrimitiveWorldImage::CPosition::getPos()</a>, <a class="el" href="a06054.html#l00285">NLPACS::CMovePrimitive::getReactionTypeInternal()</a>, <a class="el" href="a06054.html#l00337">NLPACS::CMovePrimitive::isObstacle()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06685.html#l00115">NLMISC::CVectorD::norm()</a>, <a class="el" href="a06685.html#l00136">NLMISC::CVectorD::set()</a>, <a class="el" href="a06208.html#l00435">NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPos()</a>, <a class="el" href="a06208.html#l00423">NLPACS::CPrimitiveWorldImage::CPosition::setPos()</a>, <a class="el" href="a06208.html#l00111">setSpeed()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>01171 { +01172 <span class="comment">// H_AUTO(PACS_PWI_reaction_long);</span> +01173 +01174 <span class="comment">// Get the two reaction codes</span> +01175 UMovePrimitive::TReaction firstReaction=primitive.getReactionTypeInternal(); +01176 UMovePrimitive::TReaction secondReaction=otherPrimitive.getReactionTypeInternal(); +01177 +01178 <span class="comment">// Overide collsion </span> +01179 collision = collision && (primitive.isObstacle ()) && (otherPrimitive.isObstacle ()); +01180 +01181 <span class="comment">// Get the two mass</span> +01182 <span class="keywordtype">float</span> mass0 = primitive.getMass (); +01183 <span class="keywordtype">float</span> mass1 = otherPrimitive.getMass (); +01184 +01185 <span class="comment">// Energy sum</span> +01186 <span class="keywordtype">double</span> projSpeed0 = desc.ContactNormal1 * <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>; +01187 <span class="keywordtype">double</span> projSpeed1 = desc.ContactNormal0 * second._Speed; +01188 <span class="keywordtype">double</span> energySum = (- mass0 * projSpeed0 - mass1 * projSpeed1 ) / 2.0; +01189 +01190 <span class="comment">// Old position</span> +01191 <a class="code" href="a03664.html">CVectorD</a> collisionPosition=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a>; +01192 collisionPosition+=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>*desc.ContactTime; +01193 +01194 <span class="comment">// Calc new speed</span> +01195 <a class="code" href="a03664.html">CVectorD</a> newSpeed; +01196 +01197 <span class="comment">// Obstacle ?</span> +01198 <span class="keywordflow">if</span> (collision) +01199 { +01200 <span class="keywordflow">switch</span> (firstReaction) +01201 { +01202 <span class="keywordflow">case</span> UMovePrimitive::Slide: +01203 <span class="comment">// Remove projected speed</span> +01204 newSpeed=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a> - projSpeed0 * desc.ContactNormal1; +01205 +01206 <span class="comment">// Reflexion speed</span> +01207 newSpeed+=( primitive.getAttenuation()*energySum / mass0 ) * desc.ContactNormal1; +01208 <span class="keywordflow">break</span>; +01209 <span class="keywordflow">case</span> UMovePrimitive::Reflexion: +01210 <span class="comment">// Remove projected speed</span> +01211 newSpeed=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a> - projSpeed0 * desc.ContactNormal1; +01212 +01213 <span class="comment">// Reflexion speed</span> +01214 newSpeed+=( primitive.getAttenuation()*energySum / mass0 ) * desc.ContactNormal1; +01215 <span class="keywordflow">break</span>; +01216 <span class="keywordflow">case</span> UMovePrimitive::Stop: +01217 newSpeed.<a class="code" href="a03664.html#NLMISC_1_1CVectorDz2079_9">set</a> (0,0,0); +01218 <span class="keywordflow">break</span>; +01219 <span class="keywordflow">case</span> UMovePrimitive::DoNothing: +01220 newSpeed=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>; +01221 <span class="keywordflow">break</span>; +01222 <span class="keywordflow">default</span>: <span class="keywordflow">break</span>; +01223 } +01224 +01225 <span class="comment">// Set new speed</span> +01226 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea45">setSpeed</a> (newSpeed, container, &primitive, worldImage); +01227 +01228 <span class="comment">// New position at t=0</span> +01229 <span class="keywordflow">if</span> (retriever) +01230 { +01231 <span class="comment">// Make a domove in the Ben data</span> +01232 <span class="keywordtype">double</span> deltaDist= <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager5">_DeltaPosition</a>.<a class="code" href="a03664.html#NLMISC_1_1CVectorDz2077_0">norm</a>(); +01233 <span class="keywordtype">double</span> deltaTime; +01234 <span class="keywordflow">if</span>(deltaDist<0.000001) +01235 deltaTime= 0; +01236 <span class="keywordflow">else</span> +01237 deltaTime=(collisionPosition-<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona1">getPos</a> ()).norm()/deltaDist; +01238 <a class="code" href="a04199.html#a6">nlassert</a> (deltaTime>=0); +01239 <a class="code" href="a04199.html#a6">nlassert</a> (deltaTime<=1); +01240 +01241 UGlobalPosition newPosition = retriever->doMove (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona0">getGlobalPos</a> (), <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager5">_DeltaPosition</a>, +01242 (<span class="keywordtype">float</span>)deltaTime, surfaceTemp, <span class="keyword">true</span>); +01243 +01244 <span class="comment">// Set the new position</span> +01245 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona2">setGlobalPos</a> (newPosition, *retriever); +01246 +01247 <span class="comment">// Position at t=0</span> +01248 _3dInitPosition = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona1">getPos</a>() - newSpeed * desc.ContactTime; +01249 +01250 <span class="comment">// New init time</span> +01251 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a> = desc.ContactTime; +01252 } +01253 <span class="keywordflow">else</span> +01254 { +01255 <span class="comment">// No retriever used</span> +01256 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona4">setPos</a> (collisionPosition); +01257 +01258 <span class="comment">// Position at t=0</span> +01259 _3dInitPosition = collisionPosition - newSpeed * desc.ContactTime; +01260 +01261 <span class="comment">// New init time</span> +01262 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a> = desc.ContactTime; +01263 } +01264 +01265 <span class="comment">// Dirt pos</span> +01266 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea7">dirtPos</a> (container, &primitive, worldImage); +01267 +01268 <span class="comment">// ****** Second object</span> +01269 +01270 <span class="comment">// Is second object in a static world ?</span> +01271 <span class="keywordflow">if</span> (!secondConst) +01272 { +01273 <span class="comment">// Old position</span> +01274 collisionPosition=second._3dInitPosition; +01275 collisionPosition+=second._Speed * desc.ContactTime; +01276 +01277 <span class="comment">// Obstacle ?</span> +01278 <span class="keywordflow">switch</span> (secondReaction) +01279 { +01280 <span class="keywordflow">case</span> UMovePrimitive::Slide: +01281 <span class="comment">// Remove projected speed</span> +01282 newSpeed=second._Speed - projSpeed1 * desc.ContactNormal0; +01283 +01284 <span class="comment">// Reflexion speed</span> +01285 newSpeed+=( otherPrimitive.getAttenuation()*energySum / mass1 ) * desc.ContactNormal1; +01286 <span class="keywordflow">break</span>; +01287 <span class="keywordflow">case</span> UMovePrimitive::Reflexion: +01288 <span class="comment">// Remove projected speed</span> +01289 newSpeed=second._Speed - projSpeed1 * desc.ContactNormal0; +01290 +01291 <span class="comment">// Reflexion speed</span> +01292 newSpeed+=( otherPrimitive.getAttenuation()*energySum / mass1 ) * desc.ContactNormal0; +01293 <span class="keywordflow">break</span>; +01294 <span class="keywordflow">case</span> UMovePrimitive::Stop: +01295 newSpeed.<a class="code" href="a03664.html#NLMISC_1_1CVectorDz2079_9">set</a> (0,0,0); +01296 <span class="keywordflow">break</span>; +01297 <span class="keywordflow">case</span> UMovePrimitive::DoNothing: +01298 newSpeed=second._Speed; +01299 <span class="keywordflow">break</span>; +01300 <span class="keywordflow">default</span>: <span class="keywordflow">break</span>; +01301 } +01302 +01303 <span class="comment">// Set new speed</span> +01304 second.setSpeed (newSpeed, container, &otherPrimitive, secondWorldImage); +01305 +01306 <span class="comment">// New position at t=0</span> +01307 <span class="keywordflow">if</span> (retriever) +01308 { +01309 <span class="comment">// Make a domove in the Ben data</span> +01310 <span class="keywordtype">double</span> deltaDist= second._DeltaPosition.norm(); +01311 <span class="keywordtype">double</span> deltaTime; +01312 <span class="keywordflow">if</span>(deltaDist==0) +01313 deltaTime= 0; +01314 <span class="keywordflow">else</span> +01315 deltaTime=(collisionPosition-second._Position.getPos ()).norm()/deltaDist; +01316 <a class="code" href="a05378.html#a374">clamp</a> (deltaTime, 0.0, 1.0); +01317 +01318 UGlobalPosition newPosition = retriever->doMove (second._Position.getGlobalPos (), second._DeltaPosition, +01319 (<span class="keywordtype">float</span>)deltaTime, surfaceTemp, <span class="keyword">true</span>); +01320 +01321 <span class="comment">// Set the new position</span> +01322 second._Position.setGlobalPos (newPosition, *retriever); +01323 +01324 <span class="comment">// Position at t=0</span> +01325 second._3dInitPosition = second._Position.getPos() - newSpeed * desc.ContactTime; +01326 +01327 <span class="comment">// New init time</span> +01328 second._InitTime = desc.ContactTime; +01329 } +01330 <span class="keywordflow">else</span> +01331 { +01332 <span class="comment">// No retriever used</span> +01333 second._Position.setPos (collisionPosition); +01334 +01335 <span class="comment">// Position at t=0</span> +01336 second._3dInitPosition = collisionPosition - newSpeed * desc.ContactTime; +01337 +01338 <span class="comment">// New init time</span> +01339 second._InitTime = desc.ContactTime; +01340 } +01341 +01342 <span class="comment">// Dirt pos</span> +01343 second.dirtPos (container, &otherPrimitive, secondWorldImage); +01344 } +01345 } +01346 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea39" doxytag="NLPACS::CPrimitiveWorldImage::removeMoveElement" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::removeMoveElement </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>i</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02943.html">CMoveContainer</a> & </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Remove the nieme MoveElement. +<p> + +<p> +Definition at line <a class="el" href="a06207.html#l01131">1131</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00500">_MoveElement</a>, <a class="el" href="a02943.html#NLPACS_1_1CMoveContainera9">NLPACS::CMoveContainer::freeMoveElement()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a02943.html#NLPACS_1_1CMoveContainerd27">NLPACS::CMoveContainer::unlinkMoveElement()</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00057">deleteIt()</a>. +<p> +<div class="fragment"><pre>01132 { +01133 <span class="comment">// Check</span> +01134 <a class="code" href="a04199.html#a6">nlassert</a> ((i>=0)||(i<4)); +01135 <a class="code" href="a04199.html#a6">nlassert</a> (_MoveElement[i]!=NULL); +01136 +01137 <span class="comment">// Unlink the element</span> +01138 container.unlinkMoveElement (_MoveElement[i], worldImage); +01139 +01140 <span class="comment">// Free the move element</span> +01141 container.freeMoveElement (_MoveElement[i]); +01142 +01143 <span class="comment">// Set to NULL</span> +01144 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">_MoveElement</a>[i]=NULL; +01145 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea40" doxytag="NLPACS::CPrimitiveWorldImage::setGlobalPosition" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::setGlobalPosition </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03664.html">NLMISC::CVectorD</a> & </td> + <td class="mdname" nowrap> <em>pos</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02943.html">CMoveContainer</a> & </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>keepZ</em> = false, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02591.html#NLPACS_1_1UGlobalPositionw2">UGlobalPosition::TType</a> </td> + <td class="mdname" nowrap> <em>type</em> = UGlobalPosition::Unspecified</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the global position of the move primitive. Setting the global position can take a long time if you use a <a class="el" href="a02589.html">UGlobalRetriever</a>. Set the position with this method only the first time or for teleporting.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>pos</em> </td><td>is the new global position of the primitive.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06207.html#l01429">1429</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a06208.html#l00270">dirtPos()</a>, <a class="el" href="a06048.html#l00124">NLPACS::CMoveContainer::getGlobalRetriever()</a>, <a class="el" href="a06208.html#l00417">NLPACS::CPrimitiveWorldImage::CPosition::getPos()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05761.html#l00482">NLPACS::CGlobalRetriever::retrievePosition()</a>, <a class="el" href="a06208.html#l00435">NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPos()</a>, <a class="el" href="a06208.html#l00445">NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPosKeepZ()</a>, <a class="el" href="a06208.html#l00423">NLPACS::CPrimitiveWorldImage::CPosition::setPos()</a>, <a class="el" href="a05646.html#l00244">type</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>01430 { +01431 <span class="comment">// Cast type</span> +01432 <a class="code" href="a04199.html#a6">nlassert</a> (dynamic_cast<const CMoveContainer*>(&container)); +01433 <span class="keyword">const</span> CMoveContainer *cont=(<span class="keyword">const</span> CMoveContainer*)&container; +01434 +01435 <span class="comment">// Get the retriever</span> +01436 CGlobalRetriever *retriever=cont->getGlobalRetriever(); +01437 +01438 <span class="comment">// Use a global retriever</span> +01439 <span class="keywordflow">if</span> (retriever) +01440 { +01441 <span class="comment">// Get a cvector</span> +01442 <span class="comment">// CVector vect=pos; // better with CVectorD</span> +01443 +01444 <span class="comment">// Get global position</span> +01445 UGlobalPosition globalPosition=retriever->retrievePosition (pos, 1.0e10, type); +01446 +01447 <span class="keywordflow">if</span> (keepZ) +01448 { +01449 <span class="comment">// Set the position</span> +01450 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona4">setPos</a> (pos); +01451 +01452 <span class="comment">// Set global position</span> +01453 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona3">setGlobalPosKeepZ</a> (globalPosition, *retriever); +01454 } +01455 <span class="keywordflow">else</span> +01456 { +01457 <span class="comment">// Set global position</span> +01458 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona2">setGlobalPos</a> (globalPosition, *retriever); +01459 } +01460 } +01461 <span class="keywordflow">else</span> +01462 { +01463 <span class="comment">// Set the position</span> +01464 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona4">setPos</a> (pos); +01465 } +01466 +01467 <span class="comment">// Precalc some values</span> +01468 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a> = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona1">getPos</a> (); +01469 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a> = 0; +01470 +01471 <span class="comment">// Speed NULL</span> +01472 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>=CVector::Null; +01473 +01474 <span class="comment">// Dirt BB</span> +01475 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea7">dirtPos</a> (&container, &primitive, worldImage); +01476 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea41" doxytag="NLPACS::CPrimitiveWorldImage::setGlobalPosition" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::setGlobalPosition </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> & </td> + <td class="mdname" nowrap> <em>pos</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02943.html">CMoveContainer</a> & </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the global position of the move primitive.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>pos</em> </td><td>is the new global position of the primitive.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06207.html#l01404">1404</a> of file <a class="el" href="a06207.html">primitive_world_image.cpp</a>. +<p> +References <a class="el" href="a06208.html#l00463">_3dInitPosition</a>, <a class="el" href="a06208.html#l00270">dirtPos()</a>, <a class="el" href="a06048.html#l00124">NLPACS::CMoveContainer::getGlobalRetriever()</a>, <a class="el" href="a06208.html#l00417">NLPACS::CPrimitiveWorldImage::CPosition::getPos()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06208.html#l00435">NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPos()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>01405 { +01406 <span class="comment">// Cast type</span> +01407 <a class="code" href="a04199.html#a6">nlassert</a> (dynamic_cast<const CMoveContainer*>(&container)); +01408 <span class="keyword">const</span> CMoveContainer *cont=(<span class="keyword">const</span> CMoveContainer*)&container; +01409 +01410 <span class="comment">// Use the global retriever ?</span> +01411 <a class="code" href="a04199.html#a6">nlassert</a> (cont->getGlobalRetriever()); +01412 +01413 <span class="comment">// Get the pos</span> +01414 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona2">setGlobalPos</a> (pos, *cont->getGlobalRetriever()); +01415 +01416 <span class="comment">// Precalc some values</span> +01417 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">_3dInitPosition</a> = <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">_Position</a>.<a class="code" href="a03121.html#NLPACS_1_1CPrimitiveWorldImage_1_1CPositiona1">getPos</a> (); +01418 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">_InitTime</a> = 0; +01419 +01420 <span class="comment">// Speed NULL</span> +01421 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>=CVector::Null; +01422 +01423 <span class="comment">// Dirt BB</span> +01424 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea7">dirtPos</a> (&container, &primitive, worldImage); +01425 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea42" doxytag="NLPACS::CPrimitiveWorldImage::setInModifiedListFlag" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::setInModifiedListFlag </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>itis</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Clear the inModifiedList flag. +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00138">138</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00404">_DynamicFlags</a>, and <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey3">InModifiedListFlag</a>. +<p> +Referenced by <a class="el" href="a06049.html#l00036">NLPACS::CMoveContainer::changed()</a>. +<p> +<div class="fragment"><pre>00139 { +00140 <span class="keywordflow">if</span> (itis) +00141 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>|=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey3">InModifiedListFlag</a>; +00142 <span class="keywordflow">else</span> +00143 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>&=~<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey3">InModifiedListFlag</a>; +00144 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea43" doxytag="NLPACS::CPrimitiveWorldImage::setInWorldImageFlag" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::setInWorldImageFlag </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>itis</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Clear the inModifiedList flag. +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00159">159</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00404">_DynamicFlags</a>, and <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey4">InWorldImageFlag</a>. +<p> +<div class="fragment"><pre>00160 { +00161 <span class="keywordflow">if</span> (itis) +00162 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>|=<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey4">InWorldImageFlag</a>; +00163 <span class="keywordflow">else</span> +00164 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>&=~<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey4">InWorldImageFlag</a>; +00165 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea44" doxytag="NLPACS::CPrimitiveWorldImage::setOrientation" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::setOrientation </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">double </td> + <td class="mdname" nowrap> <em>rot</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02943.html">CMoveContainer</a> * </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> * </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the new orientation of the move primitive. Only for the box primitives.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>rot</em> </td><td>is the new OZ rotation in radian.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06208.html#l00089">89</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>, <a class="el" href="a06208.html#l00270">dirtPos()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>00090 { +00091 <span class="comment">// New position</span> +00092 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">_OBData</a>.Orientation=rot; +00093 +00094 <span class="comment">// Position has changed</span> +00095 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea7">dirtPos</a> (container, primitive, worldImage); +00096 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea45" doxytag="NLPACS::CPrimitiveWorldImage::setSpeed" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::setSpeed </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03664.html">NLMISC::CVectorD</a> & </td> + <td class="mdname" nowrap> <em>speed</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02943.html">CMoveContainer</a> * </td> + <td class="mdname" nowrap> <em>container</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> * </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>worldImage</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the speed vector for this primitive.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>speed</em> </td><td>is the new speed vector.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06208.html#l00111">111</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00270">dirtPos()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +Referenced by <a class="el" href="a06207.html#l01480">move()</a>, and <a class="el" href="a06207.html#l01167">reaction()</a>. +<p> +<div class="fragment"><pre>00112 { +00113 <span class="comment">// New time</span> +00114 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">_Speed</a>=speed; +00115 +00116 <span class="comment">// Speed has changed</span> +00117 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea7">dirtPos</a> (container, primitive, worldImage); +00118 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImagea46" doxytag="NLPACS::CPrimitiveWorldImage::update" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLPACS::CPrimitiveWorldImage::update </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">double </td> + <td class="mdname" nowrap> <em>beginTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>double </td> + <td class="mdname" nowrap> <em>endTime</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02946.html">CMovePrimitive</a> & </td> + <td class="mdname" nowrap> <em>primitive</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Update precalculated data. +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00231">231</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +References <a class="el" href="a06208.html#l00404">_DynamicFlags</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey0">DirtBBFlag</a>, <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey1">DirtPosFlag</a>, <a class="el" href="a06207.html#l00971">precalcBB()</a>, and <a class="el" href="a06207.html#l00912">precalcPos()</a>. +<p> +<div class="fragment"><pre>00232 { +00233 <span class="comment">// Pos dirt ?</span> +00234 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>&<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey1">DirtPosFlag</a>) +00235 { +00236 <span class="comment">// Compute precalculated data</span> +00237 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea35">precalcPos</a> (primitive); +00238 +00239 <span class="comment">// Clean</span> +00240 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>&=~<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey1">DirtPosFlag</a>; +00241 } +00242 +00243 <span class="comment">// Bounding box dirt ?</span> +00244 <span class="keywordflow">if</span> (<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>&<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey0">DirtBBFlag</a>) +00245 { +00246 <span class="comment">// Compute precalculated data</span> +00247 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagea34">precalcBB</a> (beginTime, endTime, primitive); +00248 +00249 <span class="comment">// Clean</span> +00250 <a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">_DynamicFlags</a>&=~<a class="code" href="a03118.html#NLPACS_1_1CPrimitiveWorldImagey5NLPACS_1_1CPrimitiveWorldImagey0">DirtBBFlag</a>; +00251 } +00252 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager0" doxytag="NLPACS::CPrimitiveWorldImage::_3dInitPosition" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03664.html">NLMISC::CVectorD</a> <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager0">NLPACS::CPrimitiveWorldImage::_3dInitPosition</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00463">463</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00780">evalCollisionOCoverOC()</a>, <a class="el" href="a06207.html#l00573">evalCollisionPoverOC()</a>, <a class="el" href="a06207.html#l00455">evalCollisionPoverS()</a>, <a class="el" href="a06207.html#l00689">evalCollisionSoverOC()</a>, <a class="el" href="a06207.html#l01480">move()</a>, <a class="el" href="a06207.html#l00971">precalcBB()</a>, <a class="el" href="a06207.html#l00912">precalcPos()</a>, <a class="el" href="a06207.html#l01167">reaction()</a>, and <a class="el" href="a06207.html#l01404">setGlobalPosition()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager1" doxytag="NLPACS::CPrimitiveWorldImage::_BBXMax" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager1">NLPACS::CPrimitiveWorldImage::_BBXMax</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00474">474</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l01058">addMoveElement()</a>, <a class="el" href="a06207.html#l00042">CPrimitiveWorldImage()</a>, <a class="el" href="a06208.html#l00192">getBBXMax()</a>, and <a class="el" href="a06207.html#l00971">precalcBB()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager2" doxytag="NLPACS::CPrimitiveWorldImage::_BBXMin" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager2">NLPACS::CPrimitiveWorldImage::_BBXMin</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00472">472</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l01058">addMoveElement()</a>, <a class="el" href="a06207.html#l01149">checkSortedList()</a>, <a class="el" href="a06207.html#l00042">CPrimitiveWorldImage()</a>, <a class="el" href="a06208.html#l00176">getBBXMin()</a>, and <a class="el" href="a06207.html#l00971">precalcBB()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager3" doxytag="NLPACS::CPrimitiveWorldImage::_BBYMax" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager3">NLPACS::CPrimitiveWorldImage::_BBYMax</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00475">475</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00042">CPrimitiveWorldImage()</a>, <a class="el" href="a06208.html#l00200">getBBYMax()</a>, and <a class="el" href="a06207.html#l00971">precalcBB()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager4" doxytag="NLPACS::CPrimitiveWorldImage::_BBYMin" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager4">NLPACS::CPrimitiveWorldImage::_BBYMin</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00473">473</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00042">CPrimitiveWorldImage()</a>, <a class="el" href="a06208.html#l00184">getBBYMin()</a>, and <a class="el" href="a06207.html#l00971">precalcBB()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager5" doxytag="NLPACS::CPrimitiveWorldImage::_DeltaPosition" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03664.html">NLMISC::CVectorD</a> <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager5">NLPACS::CPrimitiveWorldImage::_DeltaPosition</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00466">466</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00201">doMove()</a>, <a class="el" href="a06207.html#l00166">evalCollision()</a>, <a class="el" href="a06208.html#l00208">getDeltaPosition()</a>, <a class="el" href="a06207.html#l00971">precalcBB()</a>, and <a class="el" href="a06207.html#l01167">reaction()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager6" doxytag="NLPACS::CPrimitiveWorldImage::_DynamicFlags" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a9">uint16</a> <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager6">NLPACS::CPrimitiveWorldImage::_DynamicFlags</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00404">404</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00066">copy()</a>, <a class="el" href="a06207.html#l00042">CPrimitiveWorldImage()</a>, <a class="el" href="a06208.html#l00277">dirtBB()</a>, <a class="el" href="a06208.html#l00270">dirtPos()</a>, <a class="el" href="a06208.html#l00132">isInModifiedListFlag()</a>, <a class="el" href="a06208.html#l00153">isInWorldImageFlag()</a>, <a class="el" href="a06208.html#l00138">setInModifiedListFlag()</a>, <a class="el" href="a06208.html#l00159">setInWorldImageFlag()</a>, and <a class="el" href="a06208.html#l00231">update()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager7" doxytag="NLPACS::CPrimitiveWorldImage::_InitTime" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager7">NLPACS::CPrimitiveWorldImage::_InitTime</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00460">460</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l01167">reaction()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager8" doxytag="NLPACS::CPrimitiveWorldImage::_MoveElement" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02945.html">CMoveElement</a>* <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager8">NLPACS::CPrimitiveWorldImage::_MoveElement</a>[4]<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00500">500</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l01058">addMoveElement()</a>, <a class="el" href="a06207.html#l01149">checkSortedList()</a>, <a class="el" href="a06207.html#l00066">copy()</a>, <a class="el" href="a06207.html#l00042">CPrimitiveWorldImage()</a>, <a class="el" href="a06207.html#l00057">deleteIt()</a>, <a class="el" href="a06208.html#l00214">getMoveElement()</a>, and <a class="el" href="a06207.html#l01131">removeMoveElement()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager9" doxytag="NLPACS::CPrimitiveWorldImage::_NextModified" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02946.html">CMovePrimitive</a>* <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager9">NLPACS::CPrimitiveWorldImage::_NextModified</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00497">497</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06208.html#l00168">getNextModified()</a>, and <a class="el" href="a06208.html#l00147">linkInModifiedList()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager10" doxytag="NLPACS::CPrimitiveWorldImage::_OBData" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> struct { ... } <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager10">NLPACS::CPrimitiveWorldImage::_OBData</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Referenced by <a class="el" href="a06207.html#l00166">evalCollision()</a>, <a class="el" href="a06207.html#l00573">evalCollisionPoverOC()</a>, <a class="el" href="a06207.html#l00455">evalCollisionPoverS()</a>, <a class="el" href="a06207.html#l00689">evalCollisionSoverOC()</a>, <a class="el" href="a06208.html#l00264">getOrientation()</a>, <a class="el" href="a06207.html#l00971">precalcBB()</a>, <a class="el" href="a06207.html#l00912">precalcPos()</a>, and <a class="el" href="a06208.html#l00089">setOrientation()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager11" doxytag="NLPACS::CPrimitiveWorldImage::_Position" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03121.html">CPosition</a> <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager11">NLPACS::CPrimitiveWorldImage::_Position</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00457">457</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l01167">reaction()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager12" doxytag="NLPACS::CPrimitiveWorldImage::_Speed" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03664.html">NLMISC::CVectorD</a> <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager12">NLPACS::CPrimitiveWorldImage::_Speed</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00469">469</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. +<p> +Referenced by <a class="el" href="a06207.html#l00780">evalCollisionOCoverOC()</a>, <a class="el" href="a06207.html#l00573">evalCollisionPoverOC()</a>, <a class="el" href="a06207.html#l00455">evalCollisionPoverS()</a>, <a class="el" href="a06207.html#l00689">evalCollisionSoverOC()</a>, and <a class="el" href="a06207.html#l01167">reaction()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager13" doxytag="NLPACS::CPrimitiveWorldImage::EdgeDirectionX" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager13">NLPACS::CPrimitiveWorldImage::EdgeDirectionX</a>[4]<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00488">488</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager14" doxytag="NLPACS::CPrimitiveWorldImage::EdgeDirectionY" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager14">NLPACS::CPrimitiveWorldImage::EdgeDirectionY</a>[4]<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00489">489</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager15" doxytag="NLPACS::CPrimitiveWorldImage::Orientation" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager15">NLPACS::CPrimitiveWorldImage::Orientation</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00492">492</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager16" doxytag="NLPACS::CPrimitiveWorldImage::PointPosX" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager16">NLPACS::CPrimitiveWorldImage::PointPosX</a>[4]<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00484">484</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLPACS_1_1CPrimitiveWorldImager17" doxytag="NLPACS::CPrimitiveWorldImage::PointPosY" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> double <a class="el" href="a03118.html#NLPACS_1_1CPrimitiveWorldImager17">NLPACS::CPrimitiveWorldImage::PointPosY</a>[4]<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06208.html#l00485">485</a> of file <a class="el" href="a06208.html">primitive_world_image.h</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a06208.html">primitive_world_image.h</a><li><a class="el" href="a06207.html">primitive_world_image.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:20:50 2004 for NeL by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.6 </small></address> +</body> +</html> |