|
 |
Patrick Elliott <sel### [at] rraz net> wrote:
> Sigh.. You are I think making an assumption that, when you do want to
> change something, you would only want to change "one" transform. But,
> maybe you have a dozen, each with does something specific to positioning
> the object, each of which is "also" effected by all of the prior
> transforms. Tell me, with a real example, not just some assertion that I
> am imagining a problem, how you do that.
I don't really understand why you are seeing so many problems where
there is none.
You have a created object. This object has been created at the beginning
of the animation and will stay as it is, in memory, during the entire
animation. It will not be reparsed nor recreated at each frame.
What you do at each frame, however, is to apply certain transformations
(which depend on the clock, etc) to this object. I just can't see what is
the problem you are seeing there.
For example, it could be like this, executed at each frame:
theObject.transformation.reset();
theObject.translate(1, 2, 3);
theObject.translate(4, 5, 6);
theObject.translate(.5*clock, .6*clock, .7*clock);
theObject.translate(10, 11, 12);
Or anything else, for that matter (ie. it doesn't *necessarily* have to
start with a reset of the transformation matrix, but it may in most cases
be the easiest way).
If you really want to have the transformations in an array, well,
you *can* create such an array if you want to. Just create the array,
and at each frame modify the elements of the array you want, and then
apply the transformations in the array to the object in a loop, and
that's it. That will be exactly what you want, without having to put
an odd transformation array kludge in the object itself.
> Yes, you can use some commands
> that can revert the object to a known state, like at the origin, then
> transform it, but that is useless if the transform you need is relative
> to some arbitrary point, which is the result of 3-4 other prior
> transforms.
1) There's no need to revert transformations.
2) Even if there was, it *is* actually possible to revert transformations
regardless of how they depend on prior transformations and whatnot. Just
acquaint yourself with the subject.
> How do you, if you are doing say 7 translates, for some odd
> reason, revert back to the 3rd, change the 4th, then reapply the last 3?
> You can't
I already showed that you can.
> Sure, it might be possible, but it still breaks, as near as
> I can tell, when you try to provide a post-creation transform on the
> object, to modify the prior result. Show me that I am wrong, don't just
> tell me I am.
You clearly don't understand how transformations work, and you are having
a big misconception about how transformations should be applied to objects
in this case.
--
- Warp
Post a reply to this message
|
 |