Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from assimp:master #7

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/AssetLib/MDL/MDLFileData.h
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ struct IntSharedData_MDL7 {
: apcOutBones(),
iNum()
{
abNeedMaterials.reserve(10);
abNeedMaterials.reserve(12);
}

//! Destruction: properly delete all allocated resources
Expand Down
8 changes: 4 additions & 4 deletions code/Common/SceneCombiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------

Copyright (c) 2006-2024, assimp team

Copyright (c) 2006-2025, assimp team

All rights reserved.

Expand Down Expand Up @@ -53,17 +52,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// ----------------------------------------------------------------------------
#include "ScenePrivate.h"
#include "time.h"
#include <assimp/Hash.h>
#include <assimp/SceneCombiner.h>
#include <assimp/StringUtils.h>
#include <assimp/fast_atof.h>
#include <assimp/mesh.h>
#include <assimp/metadata.h>
#include <assimp/scene.h>
#include <stdio.h>
#include <assimp/DefaultLogger.hpp>

#include <unordered_set>
#include <ctime>
#include <cstdio>

namespace Assimp {

Expand Down
20 changes: 10 additions & 10 deletions include/assimp/SceneCombiner.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,11 @@ struct SceneHelper {
* and loaders (ie. LWS).
*/
class ASSIMP_API SceneCombiner {
public:
// class cannot be instanced
SceneCombiner() = delete;

~SceneCombiner() = delete;

public:
// -------------------------------------------------------------------
/** Merges two or more scenes.
*
Expand Down Expand Up @@ -275,8 +274,8 @@ class ASSIMP_API SceneCombiner {
/** Builds a list of uniquely named bones in a mesh list
*
* @param asBones Receives the output list
* @param it First mesh to be processed
* @param end Last mesh to be processed
* @param it First mesh to be processed
* @param end Last mesh to be processed
*/
static void BuildUniqueBoneList(std::list<BoneWithHash> &asBones,
std::vector<aiMesh *>::const_iterator it,
Expand All @@ -285,17 +284,17 @@ class ASSIMP_API SceneCombiner {
// -------------------------------------------------------------------
/** Add a name prefix to all nodes in a scene.
*
* @param Current node. This function is called recursively.
* @param node Current node. This function is called recursively.
* @param prefix Prefix to be added to all nodes
* @param len STring length
* @param len String length
*/
static void AddNodePrefixes(aiNode *node, const char *prefix,
unsigned int len);

// -------------------------------------------------------------------
/** Add an offset to all mesh indices in a node graph
*
* @param Current node. This function is called recursively.
* @param node Current node. This function is called recursively.
* @param offset Offset to be added to all mesh indices
*/
static void OffsetNodeMeshIndices(aiNode *node, unsigned int offset);
Expand All @@ -310,7 +309,7 @@ class ASSIMP_API SceneCombiner {
* the master graph), a scene is attached to the root of the master
* graph (as an additional child node)
* @duplicates List of duplicates. If elem[n] == n the scene is not
* a duplicate. Otherwise elem[n] links scene n to its first occurrence.
* a duplicate. Otherwise, elem[n] links scene n to its first occurrence.
*/
static void AttachToGraph(aiScene *master,
std::vector<NodeAttachmentInfo> &srcList);
Expand All @@ -321,8 +320,9 @@ class ASSIMP_API SceneCombiner {
// -------------------------------------------------------------------
/** Get a deep copy of a scene
*
* @param dest Receives a pointer to the destination scene
* @param src Source scene - remains unmodified.
* @param dest Receives a pointer to the destination scene
* @param source Source scene - remains unmodified.
* @param allocate true for allocation a new scene
*/
static void CopyScene(aiScene **dest, const aiScene *source, bool allocate = true);

Expand Down
3 changes: 1 addition & 2 deletions test/unit/Main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "../../include/assimp/DefaultLogger.hpp"
#include "UnitTestPCH.h"
#include <math.h>
#include <time.h>
#include <ctime>

int main(int argc, char *argv[]) {
::testing::InitGoogleTest(&argc, argv);
Expand Down
Loading