Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }