Hi,
I got next problem (I will explain it by an example):
I got 2 models generated by next code:
In the sceneControl I add these models to the Children collection of the ViewPort
As I register events on my objects to perform hitdection:
I also keep these objects at the namedObjects collection of the EventManager:
I got a treeControl where I select my active model.
As I select the active model ONLY this model his eventSource is registered on the eventManager.
Now my problem is the next:
As model2 lays in model1.
If model2 is active and so only model2 his eventSource is registered, this event will never be triggered if model1 is still drawn in the scene.
Sample image:
http://s28.postimg.org/56z4lnsi5/example.png
How to fix this?
Thanks in advance!
I got next problem (I will explain it by an example):
I got 2 models generated by next code:
Code:
var model1 = Line3DFactory.CreateMultiLine3D(model1Edges, 0.5, Color, LineCap.Flat, LineCap.Flat, ViewPort);
Code:
var model2 = Line3DFactory.CreateMultiLine3D(model1Edges, 0.5, Color, LineCap.Flat, LineCap.Flat, ViewPort);
In the sceneControl I add these models to the Children collection of the ViewPort
Code:
SceneControl.MainViewport.Children.Add(model1);
SceneControl.MainViewport.Children.Add(model2);
As I register events on my objects to perform hitdection:
Code:
var eventSource = new MultiModelEventSource3D();
eventSource.MouseMove += EventSourceOnMouseMove;
eventSource.MouseEnter += EventSourceMouseEnter;
eventSource.MouseLeave += EventSourceMouseLeave;
eventSource.MouseClick += EventSourceMouseClick;
eventSource.IsDragSurface = false;
eventSource.CustomData = sceneObject;
eventSource.TargetModelNames = sceneObject.Key;
I also keep these objects at the namedObjects collection of the EventManager:
Code:
_eventManager = new EventManager3D(MainViewport);
_eventManager.NamedObjects.Add(sceneObject1.Key, sceneObject1.Model3D.Content);
_eventManager.NamedObjects.Add(sceneObject2.Key, sceneObject2.Model3D.Content);
I got a treeControl where I select my active model.
As I select the active model ONLY this model his eventSource is registered on the eventManager.
Now my problem is the next:
As model2 lays in model1.
If model2 is active and so only model2 his eventSource is registered, this event will never be triggered if model1 is still drawn in the scene.
Sample image:
http://s28.postimg.org/56z4lnsi5/example.png
How to fix this?
Thanks in advance!