<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: where and when to use if ( ! vpt || ! vpt-&amp;gt;IsAlive() ).... in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6325557#M14544</link>
    <description>&lt;P&gt;There doesn't seem to be any logic to it what so ever as far as I can see, ClustMod::GetWorldBoundBox doesn't do the check but is one of the modifiers in the samples where GetWorldBoundBox actually uses the ViewExp pointer though it is an unused call to getGW() it would still crash max if the pointer can be NULL. So what going on ?&lt;/P&gt;</description>
    <pubDate>Fri, 13 May 2016 17:49:13 GMT</pubDate>
    <dc:creator>klvnk</dc:creator>
    <dc:date>2016-05-13T17:49:13Z</dc:date>
    <item>
      <title>where and when to use if ( ! vpt || ! vpt-&gt;IsAlive() )....</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6322463#M14543</link>
      <description>&lt;P&gt;can someone shed some light on this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's seem to be used in an odd manner in the sdk samples.... At first glance I'd assumed that any function that has ViewExp *vpt argument needs to call it but then no, some hit test functions in PickModeCallback classes don't call it, Ah I think thats because it never uses the ViewExp pointer.... but again no because most GetWorldBoundingBox functions never use the ViewExp pointer but still call the check code. So whats going on ? Does it even really need to be used at all ?&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2016 10:54:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6322463#M14543</guid>
      <dc:creator>klvnk</dc:creator>
      <dc:date>2016-05-12T10:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: where and when to use if ( ! vpt || ! vpt-&gt;IsAlive() )....</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6325557#M14544</link>
      <description>&lt;P&gt;There doesn't seem to be any logic to it what so ever as far as I can see, ClustMod::GetWorldBoundBox doesn't do the check but is one of the modifiers in the samples where GetWorldBoundBox actually uses the ViewExp pointer though it is an unused call to getGW() it would still crash max if the pointer can be NULL. So what going on ?&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2016 17:49:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6325557#M14544</guid>
      <dc:creator>klvnk</dc:creator>
      <dc:date>2016-05-13T17:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: where and when to use if ( ! vpt || ! vpt-&gt;IsAlive() )....</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6333649#M14545</link>
      <description>&lt;P&gt;Yes, I agree that the samples in the SDK are not consistent in this case. I think it is mainly because of legacy issues. But you should use this methodology whenever you need to call the ViewExp pointer. This insures that the pointer is valid, and the IsAlive call will ensure the viewport is valid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps,&lt;/P&gt;
&lt;P&gt;kevin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 15:00:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6333649#M14545</guid>
      <dc:creator>kevinvandecar</dc:creator>
      <dc:date>2016-05-18T15:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: where and when to use if ( ! vpt || ! vpt-&gt;IsAlive() )....</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6333749#M14546</link>
      <description>&lt;P&gt;thanks for the reply, Id already decided to only do the check only if I use the viewexp pointer in the function. I've yet to break max here even without the checks in place.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 15:12:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6333749#M14546</guid>
      <dc:creator>klvnk</dc:creator>
      <dc:date>2016-05-18T15:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: where and when to use if ( ! vpt || ! vpt-&gt;IsAlive() )....</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6334044#M14547</link>
      <description>&lt;P&gt;Yes, I think that is safe... note that even in the GetBoundingBox functions, there is only a couple places where it is not used. In those cases I think it was just "habit" (ie. code copying probably). In some other cases, they are just passing the ViewExp pointer to the base class, so it still makes some sense to not forward a NULL pointer. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope it helps,&lt;/P&gt;
&lt;P&gt;kevin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 15:47:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/where-and-when-to-use-if-vpt-vpt-gt-isalive/m-p/6334044#M14547</guid>
      <dc:creator>kevinvandecar</dc:creator>
      <dc:date>2016-05-18T15:47:13Z</dc:date>
    </item>
  </channel>
</rss>

