Need to know, that you do not apply transformations to objects. DirectX even doesn't know what "object" is. You always apply transformations to vertex positions.
With fixed function pipeline of DirectX 9 by calling SetTransform()
, you applying transformations to all vertices being drawn on next draw call. So, to apply other transforms to other vertices you need a separate draw call (pseudocode):
device->SetStreamSource(vertexBuffer1,...); // "object1"
device->SetTransform(transform1);
device->Draw(...); // draw object1
device->SetStreamSource(vertexBuffer2,...); // "object2"
device->SetTransform(transform2); // rotation2
device->Draw(..); // draw object2
Note, that whis will increase number of draw calls proportionally to number of objects and to number their transforms. Draw calls is expensive. For optimized solutions look for shaders.
Hope it helps. Happy coding!