コード例 #1
0
        public void Add(ObjBase obj)
        {
            switch (obj.Type)
            {
            case ObjType.Body:
                AddBody(obj as Body);
                break;

            case ObjType.Constraint:
                AddConstraint(obj as Constraint);
                break;

            case ObjType.Composite:
                AddComposite(obj as Composite);
                break;
            }
        }
コード例 #2
0
        public void Remove(ObjBase obj)
        {
            switch (obj.Type)
            {
            case ObjType.Body:
                RemoveBody(obj as Body);
                break;

            case ObjType.Constraint:
                RemoveConstraint(obj as Constraint);
                break;

            case ObjType.Composite:
                RemoveConstraint(obj as Composite);
                break;
            }
        }