#550 closed defect (fixed)
psSphereRotInvert enhancement
| Reported by: | Owned by: | Paul Price | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | PSLib SDRS | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
the function, psSphereRotInvert needs a little tweaking. While it can work the
way that it is currently spec'd, I suggest the following:
Drop the return of psSphereRot* and either allow the function to return void or
bool. Next, add a second argument to the function that is consistent with the
other functions. Namely, make the first argument a psSphereRot *out. ie,
psSphereRotInvert(psSphereRot *out, const psSphereRot *rot) <-(I'd actually
change "rot" to "in").
Doing this would allow the user to call the function such as,
psSphereRotInvert(rot, rot)
and have the same functionality as the current spec. HOWEVER, it would also
allow the user to keep both transformations which is especially useful when
doing transformations.
Change History (3)
comment:1 by , 21 years ago
| Status: | new → assigned |
|---|
comment:2 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Due to the update on the specifications you sent me, I have done the following:
psSphereRot *psSphereRotInvert(alphaP, deltaP, phiP);
So that this returns psSphereRotAlloc(-phiP, -deltaP, -alphaP)
and
psSphereRot *psSphereRotConjugate(psSphereRot *out, const psSphereRot *in)
which was formerly the invert function and returns -q0, -q1, -q2, q3
any problems with this?

So you would like to be able to get a new psSphereRot out of psSphereRotInvert?
psSphereRot *psSphereRotInvert(psSphereRot *out, const psSphereRot *in);
This allows us to either get a new one (out=NULL), or alter one in-place (out=in).