GeometryModel3D Constructor

 

Builds a new GeometryModel3D.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

NameDescription
System_CAPS_pubmethodGeometryModel3D()

Creates a new instance of GeometryModel3D.

System_CAPS_pubmethodGeometryModel3D(Geometry3D, Material)

Creates a new instance of GeometryModel3D with the specified Geometry3D and Material.

public HitTestResultBehavior HTResult(System.Windows.Media.HitTestResult rawresult)
{
    //MessageBox.Show(rawresult.ToString());
    RayHitTestResult rayResult = rawresult as RayHitTestResult;

    if (rayResult != null)
    {
        RayMeshGeometry3DHitTestResult rayMeshResult = rayResult as RayMeshGeometry3DHitTestResult;

        if (rayMeshResult != null)
        {
            GeometryModel3D hitgeo = rayMeshResult.ModelHit as GeometryModel3D;

            UpdateResultInfo(rayMeshResult);
            UpdateMaterial(hitgeo, (side1GeometryModel3D.Material as MaterialGroup));
        }
    }

    return HitTestResultBehavior.Continue;
}
Return to top
Show: