As I set the Active model I do the following:
Reset the events on the eventManager
Get the event from the Active model and register it.
Thanks in advance!
PS: I have to say this:
If I draw the "Wireframe" I also draw A solid TransparentMesh with it to do Polygon hit detection with some of my own code.
This is how to Model is realy build:
Reset the events on the eventManager
Code:
_eventManager.ResetEventSources3D();Get the event from the Active model and register it.
Code:
var eventSourceToRegister = _dictionarySceneObjectToEventSource[sceneObject.Key];
_eventManager.RegisterEventSource3D(eventSourceToRegister);Thanks in advance!
PS: I have to say this:
If I draw the "Wireframe" I also draw A solid TransparentMesh with it to do Polygon hit detection with some of my own code.
This is how to Model is realy build:
Code:
var myModel3DGroup = new Model3DGroup();
//Solid
_solidModel = new GeometryModel3D
{
Geometry = GetMeshGeometry(roughModel.MeshBoundary.TriangleMesh),
Material = new DiffuseMaterial(Brushes.Transparent)
};
myModel3DGroup.Children.Add(_solidModel);
//WireFrame
_edges = model.MeshBoundary.PolygonMesh.GetEdgeList();
_wireframeModelGroup = new Model3DGroup();
var model1 = Line3DFactory.CreateMultiLine3D(model1Edges, 0.5, Color, LineCap.Flat, LineCap.Flat, ViewPort);
_wireframeModelGroup.Children.Add(model1);
myModel3DGroup.Children.Add(_wireframeModelGroup);
