-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Refactor cpp-libawd
The original cpp-libawd was created by other developers, that are no longer active on this project.
I have given my best to expand the cpp-libawd to include more awd features, but I never gotten comfortable with some of the coding-style used, so i am going to make a big refactor, to be able to comfortable be working on this.
Here is a overview over features and coding-style i like to introduce for next version cpp-libawd 3.0.
For the AwayExtensionsFlashPro, I already have a modified version of the cpp-libawd.
cpp-libawd in AwayExtensionsFlashPro
A big reason for the refactor of libawd is to get back to one version that can be used both for AwayExtensionsFlashPro3dsmax and AwayExtensionsFlashPro.
List of features that the new cpp-libawd should support:
- cross platform compatible
- support export and import all AWD3.0 features.
- support export and import of AWDProjects (AWD-files that share assets)
- helper functions:
- create texture-atlas
- convert color-materials to texture-materials (printing colors into texture-atlas)
- merge meshes (incl create texture-atlas and maintain animations)
- reduce joint-per-vert for skinning data
- remove unneeded bones from skeleton
- better helpers for file-handling and path-manipulation
- better geometry-utility, that allow to easily create AWDSubgeometries with custom streams
- well documented code (documentation created with doxygen).
Coding style / Design-Descisions:
- General: Keep in mind that the cpp-awdlib should be easily portable to python.
- Strings: At the moment the cpp-libawd handles all strings as char-pointers. I do not like char-pointers, when there is something available like std::string. Most occurrences of char-pointer will be replaced with std::string.
- Namespace: To provide name-clashes with other libraries, the complete code will be placed into the namespace “AWD”. [edit:]Besides the AWD namespace, functions, types and classes will be grouped by "sub-namespaces" that are all inside the AWD-namespace.
- Lists: The cpp-libawd makes no use of std::vector. Instead c-style lists are used. Many c-style lists will be replaced with std::vector.
- GeometryUtil: in the new version, the user will no longer need to access the geometyUtil directly. We will now feed the AWDGeometry with the data, and than call AWDGeometry.process().
- Sources: Code will be distribute over more files, because this will make working on the cpp-awdlib easier.
- Type-casting: The cpp-libawd often needs to cast a AWDBlock into a class derived from AWDBlock. At the moment it uses c-style casting for this. This will be replaced with cpp-style casting (dynamic_cast<>)
Comments on this decisions are highly appreciated.