Beispiel #1
0
void Rotate_Object (ObjectPtr Object, const Vector3d& Vector, const TRANSFORM *Trans)
{
    if (Object == NULL)
        return;

    for(vector<ObjectPtr>::iterator Sib = Object->Bound.begin(); Sib != Object->Bound.end(); Sib++)
    {
        Rotate_Object(*Sib, Vector, Trans);
    }

    if (Object->Clip != Object->Bound)
    {
        for(vector<ObjectPtr>::iterator Sib = Object->Clip.begin(); Sib != Object->Clip.end(); Sib++)
        {
            Rotate_Object(*Sib, Vector, Trans);
        }
    }

    /* NK 1998 added if */
    if (!Test_Flag(Object, UV_FLAG))
    {
        Transform_Textures(Object->Texture, Trans);
        Transform_Textures(Object->Interior_Texture, Trans);
    }

    if(Object->interior != NULL)
        Object->interior->Transform(Trans);

    Object->Rotate(Vector, Trans);
}
Beispiel #2
0
void Rotate_Object (OBJECT *Object, VECTOR Vector, TRANSFORM *Trans)
{
  OBJECT *Sib;

  if (Object == NULL)
  {
    return;
  }

  for (Sib = Object->Bound; Sib != NULL; Sib = Sib->Sibling)
  {
    Rotate_Object(Sib, Vector, Trans);
  }

  if (Object->Clip != Object->Bound)
  {
    for (Sib = Object->Clip; Sib != NULL; Sib = Sib->Sibling)
    {
      Rotate_Object(Sib, Vector, Trans);
    }
  }

  /* NK 1998 added if */
  if (!Test_Flag(Object, UV_FLAG))
  {
    Transform_Textures(Object->Texture, Trans);
    Transform_Textures(Object->Interior_Texture, Trans);
  }

	if (Object->UV_Trans == NULL)
		Object->UV_Trans = Create_Transform();
	Compose_Transforms(Object->UV_Trans, Trans);

  Transform_Interior(Object->Interior, Trans);

  Rotate(Object, Vector, Trans);
}