コード例 #1
0
        void ILeafVisitorOf <ICircleShape> .Visit(ICircleShape circleShape)
        {
            IModel model;

            if (!_allocatedModels.TryGetValue(circleShape, out model))
            {
                model = _allocatedModels[circleShape] = Models.Cylinder.Scaled(circleShape.Descriptor.Radius,
                                                                               0.1f,
                                                                               circleShape.Descriptor.Radius).Rotated(GMath.Pi / 2, Vectors.XAxis);
            }

            DrawShape(circleShape, model);
        }
コード例 #2
0
 public void CopyStateTo(ICircleShape element)
 {
     element.Descriptor = Descriptor;
 }
コード例 #3
0
 static CircleShape()
 {
     SceneServer.Instance.UpdateManager.InitStaticImpl(typeof(CircleShape), typeof(CircleShapeDefaultImpl),
                                                       o => { mImpl = (ICircleShape)o; });
 }
コード例 #4
0
 public void CopyStateTo(ICircleShape element)
 {
     element.Descriptor = Descriptor;
 }