-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Use BL_ConvertObjectInfo to store object conversion data.
Previously the game objects were all storing a constraint list used for the creation of physics constraint from user settings, but once the object created, this list has no interest and over all it can be shared between duplicated objects. To solve this situation a BL_ConvertObjectInfo struct is introduced, this struct store a pointer to the blender object which was converted and a list of the blender constraints. These convert info are created in BL_BlenderSceneConverter and kept in BL_BlenderConverter after conversion, as promissed they are shared between game objects under a pointer member: m_convertInfo. Getter GetBlenderObject and GetConstraints are rewritten to return data from the convert info. A special case is dedicated in GetBlenderObject to default camera which doesn't have any convert info.
- Loading branch information
1 parent
f47a2dc
commit fe801b4
Showing
11 changed files
with
98 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef __BL_CONVERT_OBJECT_INFO__ | ||
#define __BL_CONVERT_OBJECT_INFO__ | ||
|
||
#include <vector> | ||
|
||
struct bRigidBodyJointConstraint; | ||
|
||
struct BL_ConvertObjectInfo | ||
{ | ||
/// Blender object used during conversion. | ||
Object *m_blenderObject; | ||
/// Object constraints defined by the user. | ||
std::vector<bRigidBodyJointConstraint *> m_constraints; | ||
}; | ||
|
||
#endif // __BL_CONVERT_OBJECT_INFO__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters