protected override void OnLoad() { // Add a collision object for each figure node. foreach (var figureNode in _scene.GetDescendants().OfType <FigureNode>()) { var geometricObject = new FigureGeometricObject { Shape = figureNode.Figure.HitShape, Scale = figureNode.ScaleWorld, Pose = figureNode.PoseWorld, FigureNode = figureNode, }; var collisionObject = new CollisionObject(geometricObject); _collisionDomain.CollisionObjects.Add(collisionObject); } _collisionDomain.CollisionObjects.Add(_pickingObject); }
protected override void OnLoad() { // Add a collision object for each figure node. foreach (var figureNode in _scene.GetDescendants().OfType<FigureNode>()) { var geometricObject = new FigureGeometricObject { Shape = figureNode.Figure.HitShape, Scale = figureNode.ScaleWorld, Pose = figureNode.PoseWorld, FigureNode = figureNode, }; var collisionObject = new CollisionObject(geometricObject); _collisionDomain.CollisionObjects.Add(collisionObject); } _collisionDomain.CollisionObjects.Add(_pickingObject); }