mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
update assimp to 5.2.3 Bugfix-Release
This commit is contained in:
parent
3f796d2a06
commit
f297476092
1150 changed files with 165834 additions and 112019 deletions
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2019, assimp team
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
|
@ -48,9 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/anim.h>
|
||||
#include <vector>
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
/** Helper class to iterate through all keys in an animation channel.
|
||||
|
|
@ -58,55 +56,44 @@ namespace Assimp {
|
|||
* Missing tracks are interpolated. This is a helper class for
|
||||
* TargetAnimationHelper, but it can be freely used for other purposes.
|
||||
*/
|
||||
class KeyIterator
|
||||
{
|
||||
class KeyIterator {
|
||||
public:
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
/** Constructs a new key iterator
|
||||
*
|
||||
* @param _objPos Object position track. May be NULL.
|
||||
* @param _targetObjPos Target object position track. May be NULL.
|
||||
* @param _objPos Object position track. May be nullptr.
|
||||
* @param _targetObjPos Target object position track. May be nullptr.
|
||||
* @param defaultObjectPos Default object position to be used if
|
||||
* no animated track is available. May be NULL.
|
||||
* no animated track is available. May be nullptr.
|
||||
* @param defaultTargetPos Default target position to be used if
|
||||
* no animated track is available. May be NULL.
|
||||
* no animated track is available. May be nullptr.
|
||||
*/
|
||||
KeyIterator(const std::vector<aiVectorKey>* _objPos,
|
||||
const std::vector<aiVectorKey>* _targetObjPos,
|
||||
const aiVector3D* defaultObjectPos = NULL,
|
||||
const aiVector3D* defaultTargetPos = NULL);
|
||||
KeyIterator(const std::vector<aiVectorKey> *_objPos,
|
||||
const std::vector<aiVectorKey> *_targetObjPos,
|
||||
const aiVector3D *defaultObjectPos = nullptr,
|
||||
const aiVector3D *defaultTargetPos = nullptr);
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
/** Returns true if all keys have been processed
|
||||
*/
|
||||
bool Finished() const
|
||||
{return reachedEnd;}
|
||||
bool Finished() const { return reachedEnd; }
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
/** Increment the iterator
|
||||
*/
|
||||
void operator++();
|
||||
inline void operator++(int)
|
||||
{return ++(*this);}
|
||||
|
||||
|
||||
inline void operator++(int) { return ++(*this); }
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
/** Getters to retrieve the current state of the iterator
|
||||
*/
|
||||
inline const aiVector3D& GetCurPosition() const
|
||||
{return curPosition;}
|
||||
inline const aiVector3D &GetCurPosition() const { return curPosition; }
|
||||
|
||||
inline const aiVector3D& GetCurTargetPosition() const
|
||||
{return curTargetPosition;}
|
||||
inline const aiVector3D &GetCurTargetPosition() const { return curTargetPosition; }
|
||||
|
||||
inline double GetCurTime() const
|
||||
{return curTime;}
|
||||
inline double GetCurTime() const { return curTime; }
|
||||
|
||||
private:
|
||||
|
||||
//! Did we reach the end?
|
||||
bool reachedEnd;
|
||||
|
||||
|
|
@ -116,10 +103,10 @@ private:
|
|||
double curTime;
|
||||
|
||||
//! Input tracks and the next key to process
|
||||
const std::vector<aiVectorKey>* objPos,*targetObjPos;
|
||||
const std::vector<aiVectorKey> *objPos, *targetObjPos;
|
||||
|
||||
unsigned int nextObjPos, nextTargetObjPos;
|
||||
std::vector<aiVectorKey> defaultObjPos,defaultTargetObjPos;
|
||||
std::vector<aiVectorKey> defaultObjPos, defaultTargetObjPos;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
@ -130,15 +117,13 @@ private:
|
|||
* channel for the camera/spot light itself and a separate position
|
||||
* animation channels specifying the position of the camera/spot light
|
||||
* look-at target */
|
||||
class TargetAnimationHelper
|
||||
{
|
||||
class TargetAnimationHelper {
|
||||
public:
|
||||
|
||||
TargetAnimationHelper()
|
||||
: targetPositions (NULL)
|
||||
, objectPositions (NULL)
|
||||
{}
|
||||
|
||||
TargetAnimationHelper() :
|
||||
targetPositions(nullptr),
|
||||
objectPositions(nullptr) {
|
||||
// empty
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
/** Sets the target animation channel
|
||||
|
|
@ -147,37 +132,30 @@ public:
|
|||
* target at a specific position.
|
||||
*
|
||||
* @param targetPositions Translation channel*/
|
||||
void SetTargetAnimationChannel (const
|
||||
std::vector<aiVectorKey>* targetPositions);
|
||||
|
||||
void SetTargetAnimationChannel(const std::vector<aiVectorKey> *targetPositions);
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
/** Sets the main animation channel
|
||||
*
|
||||
* @param objectPositions Translation channel */
|
||||
void SetMainAnimationChannel ( const
|
||||
std::vector<aiVectorKey>* objectPositions);
|
||||
void SetMainAnimationChannel(const std::vector<aiVectorKey> *objectPositions);
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
/** Sets the main animation channel to a fixed value
|
||||
*
|
||||
* @param fixed Fixed value for the main animation channel*/
|
||||
void SetFixedMainAnimationChannel(const aiVector3D& fixed);
|
||||
|
||||
void SetFixedMainAnimationChannel(const aiVector3D &fixed);
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
/** Computes final animation channels
|
||||
* @param distanceTrack Receive camera translation keys ... != NULL. */
|
||||
void Process( std::vector<aiVectorKey>* distanceTrack );
|
||||
|
||||
* @param distanceTrack Receive camera translation keys ... != nullptr. */
|
||||
void Process(std::vector<aiVectorKey> *distanceTrack);
|
||||
|
||||
private:
|
||||
|
||||
const std::vector<aiVectorKey>* targetPositions,*objectPositions;
|
||||
const std::vector<aiVectorKey> *targetPositions, *objectPositions;
|
||||
aiVector3D fixedMain;
|
||||
};
|
||||
|
||||
|
||||
} // ! end namespace Assimp
|
||||
} // namespace Assimp
|
||||
|
||||
#endif // include guard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue