示例#1
0
 public ControlPoint(Vector3 position, RotationAroundPoint rotation, float radius, float delay, float gamma = 1.0f)
 {
     this.position = position;
     this.rotation = rotation;
     this.radius = radius;
     this.delay = delay;
     this.gamma = gamma;
 }
示例#2
0
 public ControlPoint()
 {
     this.position = new Vector3();
     this.rotation = new RotationAroundPoint();
     this.radius = 15.0f;
     this.delay = 0.0f;
     this.gamma = 1.0f;
 }
示例#3
0
    public Entity(int i, Vector3 c, RotationAroundPoint r, float bsr)
    {
        index = i;
        center = c;
        rotation = r;
        boundingSphereRadius = bsr;

        path = new List<ControlPoint>();
        delays = new List<float>();
        entities = new List<Entity>();

        path.Add(new ControlPoint(center, rotation, 1.0f, 0.0f));
        delays.Add(0.0f);
        newStage = true;


        for (int k = 0; k < TIME_CURVE_RES; k++)
        {
            timeCurve[k] = Mathf.Pow((float)k / (float)(TIME_CURVE_RES - 1), 1.0f);
        }

        //create proxy representation based on entity type (instance or subset)
        if (index < 0)
        {
            //billboard = new SubsetBill(this);            
        }
        else
        {
            //billboard = new InstaBill(this);
        }    
        
    }
示例#4
0
 public void setRotationRecursive(RotationAroundPoint rotation)
 {
     foreach (Entity e in entities)
     {
         if (e.isInstance())
         {
             e.setRotation(rotation);
         }
         else
         {
             e.setRotationRecursive(rotation);
         }
     }
 }
示例#5
0
 public void setRotation(RotationAroundPoint rotation)
 {
     if (path.Count > 0)
     {
         path[path.Count - 1].rotation = rotation;
         markStarted = path.Count - 2;
     }
 }