Alembic: allow copy_{z,y}up_from_{y,z}up() to be called with yup=zup
This allows in-place conversion between z-up and y-up, by passing the same variable to both arguments.
This commit is contained in:
parent
00e0a94b3c
commit
b0967e9d42
@ -118,32 +118,36 @@ AbcObjectReader *create_reader(const Alembic::AbcGeom::IObject &object, ImportSe
|
||||
|
||||
ABC_INLINE void copy_zup_from_yup(float zup[3], const float yup[3])
|
||||
{
|
||||
const float old_yup1 = yup[1]; /* in case zup == yup */
|
||||
zup[0] = yup[0];
|
||||
zup[1] = -yup[2];
|
||||
zup[2] = yup[1];
|
||||
zup[2] = old_yup1;
|
||||
}
|
||||
|
||||
ABC_INLINE void copy_zup_from_yup(short zup[3], const short yup[3])
|
||||
{
|
||||
const short old_yup1 = yup[1]; /* in case zup == yup */
|
||||
zup[0] = yup[0];
|
||||
zup[1] = -yup[2];
|
||||
zup[2] = yup[1];
|
||||
zup[2] = old_yup1;
|
||||
}
|
||||
|
||||
/* Copy from Z-up to Y-up. */
|
||||
|
||||
ABC_INLINE void copy_yup_from_zup(float yup[3], const float zup[3])
|
||||
{
|
||||
const float old_zup1 = zup[1]; /* in case yup == zup */
|
||||
yup[0] = zup[0];
|
||||
yup[1] = zup[2];
|
||||
yup[2] = -zup[1];
|
||||
yup[2] = -old_zup1;
|
||||
}
|
||||
|
||||
ABC_INLINE void copy_yup_from_zup(short yup[3], const short zup[3])
|
||||
{
|
||||
const short old_zup1 = zup[1]; /* in case yup == zup */
|
||||
yup[0] = zup[0];
|
||||
yup[1] = zup[2];
|
||||
yup[2] = -zup[1];
|
||||
yup[2] = -old_zup1;
|
||||
}
|
||||
|
||||
/* *************************** */
|
||||
|
Loading…
Reference in New Issue
Block a user