Example #1
0
 // optimize object
 internal static void OptimizeObject(UnifiedObject Prototype, bool PreserveVertices)
 {
     if (Prototype is StaticObject) {
         StaticObject s = (StaticObject)Prototype;
         OptimizeObject(s, PreserveVertices);
     } else if (Prototype is AnimatedObjectCollection) {
         AnimatedObjectCollection a = (AnimatedObjectCollection)Prototype;
         for (int i = 0; i < a.Objects.Length; i++) {
             for (int j = 0; j < a.Objects[i].States.Length; j++) {
                 OptimizeObject(a.Objects[i].States[j].Object, PreserveVertices);
             }
         }
     }
 }
Example #2
0
 // create object
 internal static void CreateObject(UnifiedObject Prototype, Vector3 Position, World.Transformation BaseTransformation, World.Transformation AuxTransformation, bool AccurateObjectDisposal, double StartingDistance, double EndingDistance, double BlockLength, double TrackPosition)
 {
     CreateObject(Prototype, Position, BaseTransformation, AuxTransformation, -1, AccurateObjectDisposal, StartingDistance, EndingDistance, BlockLength, TrackPosition, 1.0, false);
 }
Example #3
0
 internal static void CreateObject(UnifiedObject Prototype, Vector3 Position, World.Transformation BaseTransformation, World.Transformation AuxTransformation, int SectionIndex, bool AccurateObjectDisposal, double StartingDistance, double EndingDistance, double BlockLength, double TrackPosition, double Brightness, bool DuplicateMaterials)
 {
     if (Prototype is StaticObject) {
         StaticObject s = (StaticObject)Prototype;
         CreateStaticObject(s, Position, BaseTransformation, AuxTransformation, AccurateObjectDisposal, 0.0, StartingDistance, EndingDistance, BlockLength, TrackPosition, Brightness, DuplicateMaterials);
     } else if (Prototype is AnimatedObjectCollection) {
         AnimatedObjectCollection a = (AnimatedObjectCollection)Prototype;
         CreateAnimatedWorldObjects(a.Objects, Position, BaseTransformation, AuxTransformation, SectionIndex, AccurateObjectDisposal, StartingDistance, EndingDistance, BlockLength, TrackPosition, Brightness, DuplicateMaterials);
     }
 }
Example #4
0
        // create object
        internal static void CreateObject(UnifiedObject Prototype, World.Vector3D Position, World.Transformation BaseTransformation, World.Transformation AuxTransformation, bool AccurateObjectDisposal, double StartingDistance, double EndingDistance, double BlockLength, double TrackPosition)
        {
		if (Prototype != null)
		{
			CreateObject(Prototype, Position, BaseTransformation, AuxTransformation, -1, AccurateObjectDisposal, StartingDistance, EndingDistance, BlockLength, TrackPosition, 1.0, false);
		}
		else
		{
			int a = ObjectsUsed;
			if (a >= Objects.Length)
			{
				Array.Resize<StaticObject>(ref Objects, Objects.Length << 1);
			}
			ObjectsUsed++;
		}
        }