PDA

View Full Version : Raytrace Function From Mpxcommand?


daviddoria
02-14-2008, 12:11 PM
I would like to use this function

MStatus MRenderUtil:: raytraceFirstGeometryIntersections ( const MFloatVectorArray & rayOrigins, const MFloatVectorArray & rayDirections, const long objectId, const long raySampler, MFloatVectorArray & resultIntersections, MIntArray & resultIntersected )

from my MPxCommand that I have written.

Where do I get values for objectId and raySampler? The documentation says to make an input to my node with those names, but I am not in a node!!

Thanks,

Dave

Starrider
02-18-2008, 03:02 PM
hey!
you can use the intersection-functions in the fnMesh class. this works only on a specific mesh and not on all. but i'm not sure if you can use the renderutlis' tracing without being rendering.

sirpalee
02-29-2008, 11:58 AM
If you don't want to use that function, the basic MFnMesh (MFnNurbsSurface too) have their own functions, that are allowing you to calculate intersections, just access the node/nodes though either the selection list, or the parameters given to the command.

CGTalk Moderation
02-29-2008, 11:58 AM
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.