Trace MeshesOnly()

robot_2Generated
code_blocksInput

Description

The MeshesOnly method in the Editor.Trace struct is used to configure a trace operation to only consider mesh geometry, specifically the CMapMesh nodes, when performing the trace. This is useful when you want to limit the trace to only interact with the mesh components of a scene, ignoring other types of geometry or objects.

Usage

To use the MeshesOnly method, you need to create an instance of the Editor.Trace struct and call the method on it. This will configure the trace to only consider mesh geometry. After setting up the trace with MeshesOnly, you can execute the trace using the Run method.

Example

// Create a new trace instance
Editor.Trace trace = new Editor.Trace();

// Configure the trace to only consider mesh geometry
trace = trace.MeshesOnly();

// Assume 'world' is an instance of Editor.MapDoc.MapWorld
Editor.TraceResult result = trace.Run(world);

// Process the result of the trace
if (result.Hit)
{
    // Handle the hit result
}