コード例 #1
0
            public TI.Definition GetShape(physics_model_group def)
            {
                var shape_type  = GetShapeType();
                int shape_index = Shape.Value;

                if (shape_index == -1)
                {
                    throw new Debug.ExceptionLog("Tried to access an invalid {0} shape index in {1}",
                                                 Util.EnumToString(shape_type), def.owner.TagIndex.ToString());
                }

                switch (shape_type)
                {
                case physics_shape_type.Sphere:         return(def.Spheres[shape_index]);

                case physics_shape_type.Pill:           return(def.Pills[shape_index]);

                case physics_shape_type.Box:            return(def.Boxes[shape_index]);

                case physics_shape_type.Triangle:       return(def.Triangles[shape_index]);

                case physics_shape_type.Polyhedron:     return(def.Polyhedra[shape_index]);

                case physics_shape_type.MultiSphere: return(def.MultiSpheres[shape_index]);

                case physics_shape_type.List:           return(def.ListShapes[shape_index]);

                case physics_shape_type.Mopp:           return(def.Mopps[shape_index]);
                }

                return(null);
            }
コード例 #2
0
 internal void ReconstructShapeData(physics_model_group owner)
 {
     var havok_shape = ShapeInfo.GetShape(owner);
 }
コード例 #3
0
ファイル: Models.cs プロジェクト: CodeAsm/open-sauce
			internal void ReconstructShapeData(physics_model_group owner)
			{
				var havok_shape = ShapeInfo.GetShape(owner);
			}
コード例 #4
0
ファイル: Models.cs プロジェクト: CodeAsm/open-sauce
			public TI.Definition GetShape(physics_model_group def)
			{
				var shape_type = GetShapeType();
				int shape_index = Shape.Value;

				if (shape_index == -1)
					throw new Debug.ExceptionLog("Tried to access an invalid {0} shape index in {1}",
						Util.EnumToString(shape_type), def.owner.TagIndex.ToString());

				switch (shape_type)
				{
					case physics_shape_type.Sphere:		return def.Spheres[shape_index];

					case physics_shape_type.Pill:		return def.Pills[shape_index];
					case physics_shape_type.Box:		return def.Boxes[shape_index];
					case physics_shape_type.Triangle:	return def.Triangles[shape_index];
					case physics_shape_type.Polyhedron:	return def.Polyhedra[shape_index];
					case physics_shape_type.MultiSphere:return def.MultiSpheres[shape_index];

					case physics_shape_type.List:		return def.ListShapes[shape_index];
					case physics_shape_type.Mopp:		return def.Mopps[shape_index];
				}

				return null;
			}