PDA

View Full Version : CrossProd causes system exception.


mustan9
08-04-2007, 12:45 AM
Hi,

I have compiled the IntervalArray example from the SDK, which creates a new function that can be called from MaxScript at run-time.

If I add this single line of code, then it will cause MaxScript to throw a system exception.

Point3 t = CrossProd(Point3(0,0,0),Point3(0,0,0));

As you can see it's a very simple, and save line of code. Why could I be having this problem? Could I be missing a service pack or something for Visual Studio?

Thanks,

ypuech
08-04-2007, 01:43 PM
I've compiled the Interval Array example, added the CrossProd and everything is working fine... I use 3ds Max 9 SP2 and I build the plugin with Visual Studio 2005 Pro (no SP installed).

mustan9
08-04-2007, 03:06 PM
Thank you for checking this.

I figured out this morning that the normals of a TriObject were all null, and calling BuildingNormals() solved the problem.

So when a normal was passed to CrossProd, but was from a null pointer. It caused the error. I guess the float value was unacceptable or something.

I have no idea why I couldnt' see this last night. Guess I was just tired.

CGTalk Moderation
08-04-2007, 03:06 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.