feat: filter sdk

This commit is contained in:
luzhuang 2023-06-01 02:10:14 +00:00
parent 24e60580ec
commit 040c3a5800
790 changed files with 0 additions and 108794 deletions

View File

@ -1,3 +0,0 @@
<html>
<meta http-equiv="refresh" content="0; URL=http://www.autodesk.com/fbx-sdkdoc-2019-enu">
</html>

View File

@ -1,204 +0,0 @@
Autodesk
LICENSE AND SERVICES AGREEMENT
Autodesk® FBX® SDK 2019
READ CAREFULLY: AUTODESK LICENSES THE SOFTWARE AND OTHER LICENSED MATERIALS ONLY ON THE CONDITION THAT LICENSEE ACCEPTS ALL OF THE TERMS CONTAINED OR REFERENCED IN THIS AGREEMENT.
By selecting the “I accept” button or other button or mechanism designed to acknowledge agreement to the terms of an electronic copy of this Agreement, or by installing, downloading, accessing, or otherwise copying or using all or any portion of the Autodesk Materials, (i) you accept this Agreement on behalf of the entity for which you are authorized to act (e.g., an employer) and acknowledge that such entity is legally bound by this Agreement (and you agree to act in a manner consistent with this Agreement) or, if there is no such entity for which you are authorized to act, you accept this Agreement on behalf of yourself as an individual and acknowledge that you are legally bound by this Agreement, and (ii) you represent and warrant that you have the right, power and authority to act on behalf of and bind such entity (if any) or yourself. You may not accept this Agreement on behalf of another entity unless you are an employee or other agent of such other entity with the right, power and authority to act on behalf of such other entity.
If Licensee is unwilling to accept this Agreement, or you do not have the right, power and authority to act on behalf of and bind such entity or yourself as an individual (if there is no such entity), (a) DO NOT SELECT THE “I ACCEPT” BUTTON OR OTHERWISE CLICK ON ANY BUTTON OR OTHER MECHANISM DESIGNED TO ACKNOWLEDGE AGREEMENT, AND DO NOT INSTALL, DOWNLOAD, ACCESS, OR OTHERWISE COPY OR USE ALL OR ANY PORTION OF THE AUTODESK MATERIALS; AND (b) WITHIN THIRTY (30) DAYS FROM THE DATE OF ACQUIRING THE AUTODESK MATERIALS, LICENSEE MAY RETURN THE AUTODESK MATERIALS (INCLUDING ANY COPIES) TO THE ENTITY FROM WHICH THEY WERE ACQUIRED FOR A REFUND OF THE APPLICABLE LICENSE FEES PAID BY THE LICENSEE.
The words “Autodesk", “Agreement” and “Licensee” and other capitalized terms used in this Agreement are defined terms. The definitions can be found in Exhibit A (if the terms are not defined in the main body of the Agreement).
1. License
1.1 License Grant. Subject to and conditioned on Licensees continuous compliance with this Agreement, Autodesk grants Licensee a nonexclusive, nonsublicensable, nontransferable, limited license to Install and Access the Licensed SDK and User Documentation, in each case solely (a) in the Territory, (b) within the scope of the License Type and Permitted Number specified in the applicable License Identification, and (c) in accordance with the other terms of this Agreement, to:
1.1.1       (a)    use the SDK for development, research, internal, educational, or commercial purposes:
(i) to create a software product with the capability to read and/or write and/or translate Licensee files, which software product links to the Library (“Developed Software”); and/or
(ii) to modify the Sample Code(s) solely to create an object code version(s) (“Modified Code(s)”); and/or
(b)     reproduce the Library to link to the Developed Software.
1.1.2      (a)     incorporate the executable version of the Developed Software into; and/or
(b)     incorporate the Modified Code(s) into; and/or
(c)     link the Library, in binary code form to;
software products developed by Licensee (“Licensee Product(s)”) for Licensees Internal Business Needs.
1.1.3   reproduce, distribute and sublicense free of charge or for a fee Licensee Product(s) provided that Licensee must sublicense the Software, the Developed Software, the Library, the Sample Code(s) and the Modified Code(s) “as is”, without warranty of any kind.
Various License Types are described in Exhibit B. In any case where the License Identification does not specify a License Type or Permitted Number or Territory, or there is no License Identification, the License Type will, by default, be the Stand-alone (Individual) License and the Territory will be worldwide, subject to the Export Control requirements herein.
1.1.4       Licensee shall reproduce and apply any copyright or other proprietary rights notices included on or embedded in the Software, or any part thereof, to any copies of the Software or any part thereof, or to the Developed Software, in any form.
1.1.5       Licensee shall place the following statement in the copyright area of either: (i) the end-user License and/or terms of use for the Developed Software; or (ii) the About Box or similar notice page of the Developed Software; and Licensee shall also include the following statement in the copyright area of either: (a) the on-line documentation regarding the Developed Software; or (b) any other document related to Developed Software that contains copyright information:
“This software contains Autodesk® FBX® code developed by Autodesk, Inc. Copyright 2018 Autodesk, Inc. All rights, reserved. Such code is provided “as is” and Autodesk, Inc. disclaims any and all warranties, whether express or implied, including without limitation the implied warranties of merchantability, fitness for a particular purpose or non-infringement of third party rights. In no event shall Autodesk, Inc. be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of such code.”
1.2 Upgrades and Previous Versions.
1.2.1 Effect of Upgrades. If Autodesk or a Reseller provides Licensee with an Upgrade to other Licensed Materials previously licensed to Licensee, the Licensed Materials previously licensed to Licensee and any other Autodesk Materials relating thereto will thereafter be deemed to be a “Previous Version.” Except as set forth in Section 1.2.2 (Exception for Relationship Program Licensees), the license grant and other rights with respect to any Previous Version will terminate one hundred twenty (120) days after Installation of the Upgrade. Within such one hundred twenty (120) day period, except as set forth in Section 1.2.2 (Exception for Relationship Program Licensees), (a) Licensee must cease all use of any Previous Version and Uninstall all copies of the Previous Version, and (b) upon expiration of such period, such Previous Version will no longer constitute Licensed Materials but rather will be deemed to be Excluded Materials and Licensee will no longer have a license for any such Previous Version. At Autodesks request, Licensee agrees to destroy or return to Autodesk or the Reseller from which they were acquired all copies of the Previous Version. Autodesk reserves the right to require Licensee to show satisfactory proof that all copies of any Previous Version have been Uninstalled and, if so requested by Autodesk, destroyed or returned to Autodesk or the Reseller from which they were acquired.
1.2.2 Exception for Relationship Program Licensees. The termination of rights as to Previous Versions described in Section 1.2.1 (Effect of Upgrades) may not apply to Licensee if and to the extent (a) Licensee participates in a Relationship Program and the Relationship Program Terms authorize Licensee to retain such Previous Versions or (b) otherwise authorized in writing by Autodesk.
1.3 Additional Terms. The Licensed Materials (or portions thereof) may be subject to terms (e.g., terms accompanying such Licensed Materials or made available in connection with ordering, installing, downloading, accessing, using or copying such Licensed Materials) that are in addition to or different from the terms set forth in this Agreement, and Licensee agrees to comply with such terms.
1.4 Other Materials. If Autodesk provides or makes available to Licensee any additional materials associated with the Licensed Materials, including any corrections, patches, service packs, updates or upgrades to, or new versions of, the Licensed Materials (including Upgrades) or any Supplemental Materials or User Documentation for the Licensed Materials, (a) such additional materials may include or be subject to other terms in addition to or different from the terms set forth in this Agreement (including, without limitation, additional or different fees, license terms, or restrictions on use), and Licensee agrees to comply with such terms, or (b) if there are no other terms for such additional materials, they will (except as otherwise provided by Section 1.2 (Upgrades and Previous Versions)) be subject to the same terms (including, without limitation, the licenses, applicable License Type and Permitted Number, and other terms of this Agreement) as the Licensed Materials to which such additional materials apply. In no event will the foregoing result in any rights with respect to Excluded Materials.
1.5 Authorized Users. Licensee may permit the Licensed Materials to be Installed and/or Accessed only by Licensees Personnel (except as otherwise designated in the applicable License Type), and any such Installation or Access will be subject to any other requirements imposed by this Agreement and the applicable License Type and Permitted Number. Licensee will be responsible for compliance with this Agreement by Licensees Personnel and any other persons who may have Access to the Autodesk Materials through Licensee (whether or not such Access is authorized by Autodesk or within the scope of the applicable License Type and Permitted Number).
1.6 Third-Party Licensed Materials. The Autodesk Materials may contain or be accompanied by third-party software, data or other materials that are subject to and provided in accordance with terms that are in addition to or different from the terms set forth in this Agreement. Such terms may be included or referenced in or with such third-party software, data or other materials (e.g., in the “About box”) or a web page specified by Autodesk (the URL for which may be obtained on Autodesks website or on request to Autodesk). Licensee agrees to comply with such terms. In addition, Licensee will take sole responsibility for obtaining and complying with any licenses that may be necessary to use third-party software, data or other materials that Licensee uses or obtains for use in conjunction with the Licensed Materials. Licensee acknowledges and agrees that Autodesk has no responsibility for, and makes no representations or warranties regarding, such third-party software, data or other materials or Licensees use of such third-party software, data or other materials.
1.7 Relationship Programs. Autodesk may offer to Licensee, and (if so) Licensee may participate in one (1) or more Relationship Programs applicable to the Licensed Materials licensed to Licensee under this Agreement (and such Relationship Programs may include rights in addition to or different from those set forth in this Agreement). Any Relationship Programs are subject to Autodesks terms therefor, which terms are set forth in the applicable Relationship Program Terms. Licensee agrees that if it requests, accepts, or makes use of any Relationship Program, Licensee will be bound by such terms, as they may be modified from time to time in accordance with the applicable Relationship Program Terms (and such terms, as so modified from time to time, are a part of and incorporated by reference into this Agreement), and Licensee agrees to comply with such terms. Licensee acknowledges that Autodesk may require a further acceptance of such terms as a condition to participation in a Relationship Program.
1.8 Services. Autodesk may provide, and Licensee may elect to receive or benefit from, certain Services from time to time. Any Services are subject to Autodesks terms therefor, which terms are set forth in the applicable Services Terms. Licensee agrees that if it requests, accepts, or makes use of any Services, Licensee will be bound by such terms, as they may be modified from time to time in accordance with the applicable Services Terms (and such terms, as so modified from time to time, are a part of and incorporated by reference into this Agreement), and Licensee agrees to comply with such terms. Licensee acknowledges that Autodesk may require a further acceptance of such terms as a condition to providing Services.
1.9 Archival Copy. Licensees license under Section 1.1 (License Grant) includes the right to make a single archival copy of the Licensed Materials in the Territory, provided that (a) the single-copy limitation will not apply to copies made as an incidental part of a routine backup of Licensees entire computer system on which the Licensed Materials are Installed in accordance with this Agreement, where such backup includes the making of copies of substantially all other software on such computer system and (b) any archival copy may be Accessed or Installed (other than on a backup storage medium from which the Licensed Materials cannot be Accessed) only when and for so long as the primary copy of the Licensed Materials is inaccessible and inoperable. Copies of the Licensed Materials that are Installed and are in excess of the Permitted Number at any time while the primary copy of the Licensed Materials is also Accessible are not "archival copies" as permitted under this Section 1.9 (Archival Copy).
1.10 Nature of Licenses. Licensee acknowledges and agrees that when Licensee acquires a license of Licensed Materials, (including through a Relationship Program or Services), Licensees acquisition is neither contingent on the delivery of any future features or functionality nor subject to any public or other comments (oral, written or otherwise) made by Autodesk regarding future features or functionality.
1.11 Feedback.
Licensee hereby grants Autodesk, under all of Licensees intellectual property and proprietary rights, the following worldwide, exclusive, transferable, perpetual, irrevocable, royalty-free, fully paid-up rights: (1) to make, have made, use, copy, modify, and create derivative works of the Feedback as part of or in connection with any Autodesk product, technology, service, content, material, specification or documentation (including without limitation in connection with the marketing or sale thereof); (2) to publicly perform or display, import, broadcast, transmit, distribute, license, offer to sell and sell, rent, lease or lend copies of the Feedback (and derivative works thereof and improvements thereon); and (3) to sublicense to third parties the foregoing rights, including the right to sublicense to further third parties. “Feedback” shall mean all suggestions, comments, input, ideas, reports, information or know-how (whether in oral or written form) provided by Licensee to Autodesk or an Autodesk affiliate in connection with Licensees evaluation of or use of the Licensed Materials. Feedback does not include any artwork or sample content created by Licensee using the Licensed Materials.
2. License Limitations; Prohibitions
2.1 Limitations and Exclusions.
2.1.1 No License Granted; Unauthorized Activities. The parties acknowledge and agree that, notwithstanding anything to the contrary in this Agreement, no license is granted (whether expressly, by implication or otherwise) under this Agreement (and this Agreement expressly excludes any right) (a) to Excluded Materials, (b) to any Autodesk Materials that Licensee did not acquire lawfully or that Licensee acquired in violation of or in a manner inconsistent with this Agreement, (c) for Installation of or Access to the Licensed Materials beyond the applicable license term (whether a fixed term or Relationship Program period or term) or outside the scope of the applicable License Type or Permitted Number, (d) for Installation of the Licensed Materials on any Computer other than a Computer owned or leased, and controlled, by Licensee, unless otherwise authorized in writing by Autodesk, (e) to distribute, rent, loan, lease, sell, sublicense, transfer or otherwise provide all or any portion of the Autodesk Materials to any person or entity except as expressly set forth in this Agreement or as expressly authorized in writing by Autodesk, (f) to provide or make available any features or functionality of the Autodesk Materials to any person or entity (other than to and for Licensee itself for the purpose specified in the applicable License Type), whether or not over a network and whether or not on a hosted basis, (g) except as otherwise expressly provided with respect to a specific License Type, to Install or Access or allow the Installation of or Access to the Autodesk Materials over the Internet or other non-local network, including, without limitation, use in connection with a wide area network (WAN), virtual private network (VPN), virtualization, Web hosting, time-sharing, service bureau, software as a service, cloud or other service or technology, (h) to remove, alter or obscure any proprietary notices, labels or marks in the Autodesk Materials, (i) to decompile, disassemble or otherwise reverse engineer the Autodesk Materials, or (j) to translate, adapt, arrange, or create derivative works based on, or otherwise modify the Autodesk Materials for any purpose.
2.1.2 Licensed Materials as a Single Product. The Licensed Materials are licensed to Licensee as a single product and the applicable components may not be separated for Installation or Access (and all such components must be Installed and Accessed on the same Computer except as authorized in writing by Autodesk).
2.1.3 Territory. Except as otherwise authorized in writing by Autodesk, the licenses granted in this Agreement are granted only for the Territory. Nothing in this Agreement permits Licensee (including, without limitation, Licensees Personnel, if any) to Install or Access the Licensed Materials outside of the Territory.
2.1.4 Effect of Unauthorized Use. Licensee will not engage in, and will not permit or assist any third party to engage in any of the uses or activities prohibited (or any uses or activities inconsistent with the limitations described) in this Section 2.1 (Limitations and Exclusions) (collectively, “Unauthorized Uses”). Any such Unauthorized Use, and any Installation of or Access to the Licensed Materials provided under this Agreement, outside of the scope of the applicable license grants (including, without limitation, outside the applicable License Type and/or Permitted Number) or otherwise not in accordance with this Agreement, constitute or result in infringement of Autodesks intellectual property rights as well as a breach of this Agreement. Licensee will notify Autodesk promptly of any such Unauthorized Uses or other unauthorized Installation or Access.
2.1.5 Use of Open Source Software by Licensee.  If Licensee uses any third party software (including free or Open Source Software), whether or not in conjunction with the Software, Licensee shall ensure that its use does not: (i) create, or purport to create, obligations of Autodesk or any of its affiliates with respect to the Software; (ii) grant, or purport to grant, to any third party any rights to or immunities under Autodesks or any of its affiliates intellectual property rights; or (iii) cause the Software to be subject to any licensing terms other than those set forth in this Agreement.
2.2 Circumvention.
2.2.1 Licensee may not (i) utilize any equipment, device, software, or other means to (or designed to) circumvent or remove any form of technical protection used by Autodesk in connection with the Autodesk Materials, or (ii) Install or Access the Autodesk Materials with any product code, authorization code, serial number, or other copy-protection device not supplied by Autodesk directly or through a Reseller. Without limitation of the generality of the foregoing, Licensee may not utilize any equipment, device, software, or other means to (or designed to) circumvent or remove the Autodesk License Manager or any tool or technical protection measure provided or made available by Autodesk for managing, monitoring or controlling Installation of or Access to Autodesk Materials.
2.2.2 Licensee may not utilize any equipment, device, software, or other means to (or designed to) circumvent or remove any usage restrictions, or to enable functionality disabled by Autodesk, in connection with the Excluded Materials. Licensee may not bypass or delete any functionality or technical limitations of the Autodesk Materials that (or that are designed to) prevent or inhibit the unauthorized copying of, Installation or Access to the Excluded Materials.
3. All Rights Reserved
Autodesk and its licensors retain title to and ownership of, and all other rights with respect to, the Autodesk Materials and all copies thereof, including, without limitation, any related copyrights, trademarks, trade secrets, patents, and other intellectual property rights. Licensee has only the limited licenses granted with respect to the Licensed Materials expressly set forth in this Agreement, and Licensee has no other rights, implied or otherwise. Licensee acknowledges and agrees that the Autodesk Materials are licensed, not sold, and that rights to Install and Access the Licensed Materials are acquired only under the license from Autodesk. The structure and organization of Software included in the Autodesk Materials, any source code or similar materials relating to such Software, any API Information and Development Materials (both as described in Section 1.11 (APIs)), and any other Licensed Materials identified as confidential or proprietary are valuable trade secrets of, and confidential and proprietary information of, Autodesk and its suppliers, and (a) may not be distributed, disclosed or otherwise provided to third parties, and (b) may be used only internally and only in conjunction with and for Licensees own authorized internal use of the Licensed Materials.
4. Privacy; Use of Information; Connectivity
4.1 Privacy and Use of Information. Licensee acknowledges and agrees that Licensee (and third parties acting on Licensees behalf) may provide, and Autodesk and its Resellers (and third parties acting on behalf of Autodesk and its Resellers) may obtain, certain information and data with respect to Licensee (including, without limitation, personal information) and Licensees business in connection with this Agreement, including, without limitation, information and data provided to or obtained by Autodesk and its Resellers (or third parties acting on behalf of Autodesk and its Resellers) through the Customer Information Form and otherwise, in connection with ordering, registration, activation, updating, validating entitlement to, auditing, monitoring Installation of and Access to Autodesk Materials, Relationship Programs and Services and managing the relationship with Licensee. Licensee hereby consents to Autodesk maintaining, using, storing and disclosing such information and data (including, without limitation, personal information, if any) in conformity with Autodesks policies on privacy and data protection, as such policies may be updated from time to time, including without limitation Autodesks Privacy Statement, as currently located at http://usa.autodesk.com/privacy/. Without limitation of the generality of the foregoing, Licensee acknowledges and agrees that: (a) Autodesk may from time to time prompt Licensee (and third parties acting on Licensees behalf) to provide express agreement to the terms of Autodesks Privacy Statement and/or express agreement to specific uses of information and data (including, without limitation, personal information); (b) Autodesk may provide information and data, including, without limitation, information and data about Licensees use of Autodesk Materials, Relationship Programs, and Licensees support requests, to Autodesk subsidiaries and affiliates, Resellers and other third parties in connection with the provision, maintenance, administration or usage of Licensed Materials, Relationship Programs or Services or in connection with enforcement of any agreements relating to Licensed Materials, Relationship Programs or Services; and (c) Autodesk may make cross-border transfers of such information and data, including to jurisdictions with privacy or data protection laws that are less protective of Licensee than the jurisdiction in which Licensee is domiciled. Licensee acknowledges and agrees that such policies may be changed from time to time by Autodesk and that, effective upon posting on Autodesks website or other written notice from Autodesk, Licensee will be subject to such changes.
4.2 Connectivity. Certain Licensed Materials may facilitate or require Licensees access to and use of content and services that are hosted on websites maintained by Autodesk or by third parties. In some cases, such content and services may appear to be a feature or function within, or extension of, the Licensed Materials on Licensees Computer even though hosted on such websites. Accessing such content or services and use of Licensed Materials may cause Licensees Computer, without additional notice, to connect automatically to the Internet (transitorily, intermittently or on a regular basis) and to communicate with an Autodesk or third-party website—for example, for purposes of providing Licensee with additional information, features and functionality or to validate that the Licensed Materials and/or content or services are being used as permitted under this Agreement or other applicable terms. Such connectivity to Autodesk websites is governed by Autodesks policies on privacy and data protection described in this Section 4 (Privacy; Use of Information; Connectivity). Such connectivity to websites of third parties is governed by the terms (including the disclaimers and notices) found on such sites or otherwise associated with the third-party content or services. Autodesk does not control, endorse, or accept responsibility for any such third-party content or services, and any dealings between Licensee and any third party in connection with such content or services, including, without limitation, such third partys privacy policies, use of personal information, delivery of and payment for goods and services, and any other terms associated with such dealings, are solely between Licensee and such third party. Autodesk may at any time, for any reason, modify or discontinue the availability of any third-party content or services. Access to and use of certain content and services (whether of Autodesk or third parties) may require assent to separate terms and/or payment of additional fees.
5. Limited Warranty and Disclaimers
5.1 Limited Warranty. Autodesk warrants that, as of the date on which the Licensed Materials are delivered to Licensee and for ninety (90) days thereafter or if the license term is shorter, such shorter period (“Warranty Period”), the Licensed Materials will provide the general features and functions described in the User Documentation portion of the Licensed Materials. Autodesk's entire liability and Licensees exclusive remedy during the Warranty Period (“Limited Warranty”) will be, with the exception of any statutory warranty or remedy that cannot be excluded or limited under law, at Autodesk's option, (i) to attempt to correct or work around errors, if any, or (ii) to refund the license fees, if any, paid by Licensee and terminate this Agreement or the license specific to such Licensed Materials. Such refund is subject to the return, during the Warranty Period, of the Autodesk Materials, with a copy of Licensees License Identification, to Licensees local Autodesk office or the Reseller from which Licensee acquired the Autodesk Materials. THE LIMITED WARRANTY SET FORTH IN THIS SECTION GIVES LICENSEE SPECIFIC LEGAL RIGHTS. LICENSEE MAY HAVE ADDITIONAL LEGAL RIGHTS UNDER LAW WHICH VARY FROM JURISDICTION TO JURISDICTION. AUTODESK DOES NOT SEEK TO LIMIT LICENSEES WARRANTY RIGHTS TO ANY EXTENT NOT PERMITTED BY LAW.
5.2 Disclaimer. EXCEPT FOR THE EXPRESS LIMITED WARRANTY PROVIDED IN SECTION 5.1 (LIMITED WARRANTY), AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, AUTODESK AND ITS SUPPLIERS MAKE, AND LICENSEE RECEIVES, NO WARRANTIES, REPRESENTATIONS, OR CONDITIONS OF ANY KIND, EXPRESS OR IMPLIED (INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT, OR WARRANTIES OTHERWISE IMPLIED BY STATUTE OR FROM A COURSE OF DEALING OR USAGE OF TRADE) WITH RESPECT TO ANY AUTODESK MATERIALS, RELATIONSHIP PROGRAMS, OR SERVICES (PURSUANT TO A RELATIONSHIP PROGRAM OR OTHERWISE). ANY STATEMENTS OR REPRESENTATIONS ABOUT THE AUTODESK MATERIALS, RELATIONSHIP PROGRAMS OR SERVICES AND THEIR FEATURES OR FUNCTIONALITY IN THE LICENSED MATERIALS OR ANY COMMUNICATION WITH LICENSEE ARE FOR INFORMATION PURPOSES ONLY, AND DO NOT CONSTITUTE A WARRANTY, REPRESENTATION, OR CONDITION. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT: (a) THAT THE OPERATION OR OUTPUT OF THE LICENSED MATERIALS OR SERVICES WILL BE UNINTERRUPTED, ERROR-FREE, SECURE, ACCURATE, RELIABLE, OR COMPLETE, WHETHER OR NOT UNDER A RELATIONSHIP PROGRAM OR SUPPORT BY AUTODESK OR ANY THIRD PARTY; (b) THAT ERRORS WILL BE CORRECTED BY AUTODESK OR ANY THIRD PARTY; OR (c) THAT AUTODESK OR ANY THIRD PARTY WILL RESOLVE ANY PARTICULAR SUPPORT REQUEST OR THAT SUCH RESOLUTION WILL MEET LICENSEES REQUIREMENTS OR EXPECTATIONS. NOTHING IN THE FOREGOING RESTRICTS THE EFFECT OF WARRANTIES OR CONDITIONS WHICH MAY BE IMPLIED BY LAW WHICH CANNOT BE EXCLUDED, RESTRICTED OR MODIFIED NOTWITHSTANDING A CONTRACTUAL RESTRICTION TO THE CONTRARY. WITHOUT LIMITING THE FOREGOING, AUTODESK AND ITS SUPPLIERS MAKE, AND LICENSEE RECEIVES, NO WARRANTIES THAT: (I) FUTURE VERSIONS OF THE SDK, LIBRARY AND/OR SAMPLE CODE(S), IF ANY, WILL CONTAIN FEATURES SIMILAR TO OR THE SAME AS THE SDK, LIBRARY AND/OR SAMPLE CODE(S), RESPECTIVELY OR WILL BE COMPATIBLE WITH THE SDK, LIBRARY AND/OR SAMPLE CODE(S), RESPECTIVELY; (II) THE SOFTWARE OR THE SDK, LIBRARY AND/OR SAMPLE CODE(S) WILL MEET LICENSEE REQUIREMENTS; OR (III) OPERATION OF THE SDK, LIBRARY OR SAMPLE CODE(S) WILL BE UNINTERRUPTED OR ERROR-FREE.
6. Warnings
6.1 Functionality Limitations. The Licensed Materials and Services (except for Licensed Materials designed for non-commercial use, such as Autodesk Materials designed to be used for household or other consumer purposes or licensed only for purposes of educational or individual learning) are commercial professional tools intended to be used by trained professionals only. Particularly in the case of commercial professional use, the Licensed Materials and Services are not a substitute for Licensees professional judgment or independent testing. The Licensed Materials and Services are intended only to assist Licensee with its design, analysis, simulation, estimation, testing and/or other activities and are not a substitute for Licensees own independent design, analysis, simulation, estimation, testing, and/or other activities, including those with respect to product stress, safety and utility. Due to the large variety of potential applications for the Licensed Materials and Services, the Licensed Materials and Services have not been tested in all situations under which they may be used. Autodesk will not be liable in any manner whatsoever for the results obtained through use of the Licensed Materials or Services. Persons using the Licensed Materials or Services are responsible for the supervision, management, and control of the Licensed Materials and Services and the results of using the Licensed Materials and Services. This responsibility includes, without limitation, the determination of appropriate uses for the Licensed Materials and Services and the selection of the Licensed Materials, Services and other computer programs and materials to help achieve intended results. Persons using the Licensed Materials or Services are also responsible for establishing the adequacy of independent procedures for testing the reliability, accuracy, completeness, and other characteristics of any output of the Licensed Materials or Services, including, without limitation, all items designed with the assistance of the Licensed Materials or Services. Licensee further acknowledges and agrees that the Licensed Materials form part of Licensees total unique hardware and software environment to deliver specific functionality, and that the Licensed Materials and Services provided by Autodesk may not achieve the results Licensee desires within Licensees design, analysis, simulation, estimation, and/or testing constraints.
6.2 Activation Codes and Security.
6.2.1 Activation Code Required for Installation/Access and Continued Use. Installation of and Access to the Licensed Materials require, and the continued use thereof may from time to time require, activation codes issued by Autodesk. Registration may be required before an activation code is issued by Autodesk. Licensee will provide Autodesk and its Reseller with any information required for such registration and agrees that any information provided to Autodesk or its Reseller will be accurate and current. Licensee will also maintain and update Licensees registration information, on an ongoing basis, through customer data registration processes, including without limitation the Customer Information Form, which may be provided by Autodesk. Licensee acknowledges and agrees that Autodesk may use such information in accordance with its Privacy Statement (as described or referenced in Section 4 (Privacy; Use of Information; Connectivity)).
6.2.2 Disabling Access. LICENSEE ACKNOWLEDGES AND AGREES THAT INSTALLATION OF AND ACCESS TO LICENSED MATERIALS MAY BE DISABLED BY THE ACTIVATION, SECURITY, AND TECHNICAL PROTECTION MECHANISMS IF LICENSEE TRIES TO TRANSFER ALL OR A PART OF THE LICENSED MATERIALS TO ANOTHER COMPUTER, IF LICENSEE TAMPERS WITH THE TECHNICAL PROTECTION MECHANISMS OR DATE-SETTING MECHANISMS ON A COMPUTER OR IN THE LICENSED MATERIALS, IF LICENSEE USES THE LICENSED MATERIALS PAST AN APPLICABLE RELATIONSHIP PROGRAM PERIOD OR FIXED TERM, OR IF LICENSEE UNDERTAKES CERTAIN OTHER ACTIONS THAT AFFECT THE SECURITY MODE OR UNDER OTHER CIRCUMSTANCES AND THAT, IN ANY SUCH EVENT, LICENSEES ACCESS TO LICENSEES WORK PRODUCT AND OTHER DATA MAY BE AFFECTED. MORE INFORMATION IS CONTAINED IN THE APPLICABLE LICENSED MATERIALS OR AVAILABLE FROM AUTODESK ON REQUEST.
6.2.3 Effect of Activation Codes. Licensee acknowledges and agrees that receipt of an activation code (whether or not provided to Licensee in error) will not constitute evidence of or affect the scope of Licensees license rights. Those rights will be only as set forth in this Agreement and the applicable License Identification.
6.3 Affected Data. Work product and other data created with Licensed Materials made available under certain License Types, including licenses that limit the permitted purpose to educational purposes or personal learning purposes, may contain certain notices and limitations that make the work product and other data usable only in certain circumstances (e.g., only in the education field). In addition, if Licensee combines or links work product or other data created with such Licensed Materials with work product or other data otherwise created, then such other work product or data may also be affected by these notices and limitations. Autodesk will have no responsibility or liability whatsoever if Licensee combines or links work product or other data created with such Licensed Materials with work product or other data otherwise created. In addition, Licensee will not remove, alter or obscure any such notices or limitations.
7. Limitations of Liability
7.1 Limitation on Type and Amount of Liability. IN NO EVENT WILL AUTODESK OR ITS SUPPLIERS HAVE ANY LIABILITY (DIRECTLY OR INDIRECTLY) FOR ANY INCIDENTAL, SPECIAL, INDIRECT, CONSEQUENTIAL OR PUNITIVE DAMAGES; FOR LOSS OF PROFITS, USE, REVENUE, OR DATA; OR FOR BUSINESS INTERRUPTION (REGARDLESS OF THE LEGAL THEORY FOR SEEKING SUCH DAMAGES OR OTHER LIABILITY). IN ADDITION, THE LIABILITY OF AUTODESK AND ITS SUPPLIERS ARISING OUT OF OR RELATING TO ANY AUTODESK MATERIALS, RELATIONSHIP PROGRAMS OR SERVICES WILL NOT EXCEED THE AMOUNT PAID OR PAYABLE BY LICENSEE FOR SUCH AUTODESK MATERIALS, RELATIONSHIP PROGRAMS, OR SERVICES, RESPECTIVELY.
7.2 Application of and Basis for Limitations. THE LIMITATIONS OF LIABILITY IN THIS SECTION 7 (LIMITATIONS OF LIABILITY) WILL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW TO ANY DAMAGES OR OTHER LIABILITY, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE, EVEN IF AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LIABILITY AND REGARDLESS OF WHETHER THE LIMITED REMEDIES AVAILABLE HEREUNDER FAIL OF THEIR ESSENTIAL PURPOSE. ALSO, LICENSEE AGREES THAT THE LICENSE, RELATIONSHIP PROGRAMS AND SERVICES FEES AND OTHER FEES CHARGED BY AUTODESK AND PAID BY LICENSEE ARE BASED ON AND REFLECTIVE OF THE ALLOCATION OF RISK CONTEMPLATED BY THIS SECTION 7 (LIMITATIONS OF LIABILITY) AND THAT THE LIABILITY LIMITATIONS IN THIS SECTION 7 (LIMITATIONS OF LIABILITY) ARE AN ESSENTIAL ELEMENT OF THE AGREEMENT BETWEEN THE PARTIES.
8. Term and Termination
8.1 Term; Termination or Suspension. Each license under this Agreement, with respect to each specific set of Licensed Materials covered by this Agreement, will become effective as of the latest to occur of: (a) this Agreement becoming effective, (b) payment by Licensee of the applicable fees, excluding licenses (such as evaluation licenses) where no fees are required, (c) delivery of the specific Licensed Materials, and (d) in the case of Autodesk Materials provided in connection with a Relationship Program, upon commencement of the applicable Relationship Program period or fixed term. Each of Autodesk or Licensee may terminate this Agreement, Licensees license as to Licensed Materials, Licensees Relationship Program, and/or the provision of Services relating to the Licensed Materials if the other party is in breach of this Agreement and fails to cure such breach within ten (10) days after written notice of the breach; however, if Licensee is in breach of Section 1 (License) or Section 2 (License Limitations; Prohibitions), Autodesk may terminate this Agreement, Licensees license as to Licensed Materials, Licensees Relationship Program, and/or the provision of Services relating to the Licensed Materials immediately upon written notice of the breach. In addition, Autodesk may, as an alternative to termination, suspend Licensees license as to the Licensed Materials, Licensees Relationship Program, the provision of Services relating to the Licensed Materials, and/or other Autodesk obligations or Licensee rights under this Agreement (or under other terms, if any, relating to materials associated with the Licensed Materials), if Licensee fails to make a payment to Autodesk or a Reseller or otherwise fails to comply with the provisions of this Agreement or other terms relating to any such license, Relationship Program, Services, or other associated materials. Autodesk may also terminate this Agreement if Licensee becomes subject to bankruptcy proceedings, becomes insolvent, or makes an arrangement with Licensees creditors. This Agreement will terminate automatically without further notice or action by Autodesk if Licensee goes into liquidation.
Licensee acknowledges and agrees that Autodesk may assign or sub-contract any of its rights or obligations under this Agreement.
8.2 Effect of Termination of Agreement or License. Upon termination or expiration of this Agreement, the licenses granted hereunder will terminate. Upon termination or expiration of any license granted to Licensee, Licensee must cease all use of Autodesk Materials to which such license applies, any Relationship Program (including, without limitation, associated services), and any Services and Uninstall all copies of the Autodesk Materials. At Autodesks request, Licensee agrees to destroy or return to Autodesk or the Reseller from which they were acquired all Autodesk Materials. Autodesk reserves the right to require Licensee to show satisfactory proof that all copies of the Autodesk Materials have been Uninstalled and, if so requested by Autodesk, destroyed or returned to Autodesk or the Reseller from which they were acquired. If Licensees Relationship Program is terminated or expires, but this Agreement and Licensees license to the Licensed Materials remains in effect, any rights of Licensee based on the Relationship Program (including, without limitation, rights with respect to Previous Versions) will terminate, and (unless otherwise authorized by the Relationship Program Terms) Licensee must comply with the obligations of Section 1.2.1 (Effect of Upgrades) with respect to (including the obligations to cease use of, Uninstall and destroy or return) all copies of such Previous Versions.
8.3 Survival. Sections 1.3 (Additional Terms), 1.4 (Other Materials), 1.5 (Authorized Users), 1.6 (Third-Party Licensed Materials), 1.11 (APIs), 2.1.1 (No License Granted;Unauthorized Activities), 2.1.4 (Effect of Unauthorized Use), 2.2 (Circumvention), 3 (All Rights Reserved), 4 (Privacy; Use of Information; Connectivity), 5.2 (Disclaimer), 6 (Warnings), 7 (Limitations of Liability), 8 (Term and Termination), and 9 (General Provisions) and Exhibit A will survive any termination or expiration of this Agreement.
9. General Provisions
9.1 Notices. Notices in connection with this Agreement by either party will be in writing and will be sent by electronic mail, postal service, or a delivery service (such as UPS, FedEx or DHL), except that Licensee may not provide notice to Autodesk of an Autodesk breach or provide notice of termination of this Agreement by electronic mail. Notices from Autodesk to Licensee will be effective (a) in the case of notices by email, one (1) day after sending to the email address provided to Autodesk, or (b) in the case of notices by mail or delivery service, five (5) days after sending by regular post or delivery service to the address provided to Autodesk. Licensee hereby consents to service of process being effected on Licensee by registered mail sent to the address set forth on Licensees Customer Information Form (or, if no Customer Information Form has been provided, Licensees last address known by Autodesk) if so permitted by applicable law. Notices from Licensee to Autodesk will be effective (a) in the case of notices by email, one (1) day after sending to (and receipt by Autodesk at) CopyrightAgent@autodesk.com, or (b) in the case of notices by mail or delivery service, when received by Autodesk at Autodesk, Inc., 111 McInnis Parkway, San Rafael, California 94903, USA, Attention: Copyright Agent. If Licensee participates in a Relationship Program, either party may also provide notice as set forth in the Relationship Program Terms.
9.2 Governing Law and Jurisdiction. This Agreement will be governed by and construed in accordance with the laws of (a) Switzerland if Licensee acquired the Autodesk Materials in a country in Europe, Africa or the Middle East, (b) Singapore if Licensee acquired the Autodesk Materials in a country in Asia, Oceania or the Asia-Pacific region, or (c) the State of California (and, to the extent controlling, the federal laws of the United States) if Licensee acquired the Autodesk Materials in a country in the Americas (including the Caribbean) or any other country not specified in this Section 9.2 (Governing Law and Jurisdiction). The laws of such jurisdictions shall govern without reference to the conflicts-of-laws rules thereof. The UN Convention on Contracts for the International Sale of Goods and the Uniform Computer Information Transaction Act shall not apply to (and are excluded from the laws governing) this Agreement. In addition, each party agrees that any claim, action or dispute arising under or relating to this Agreement will be brought exclusively in (and the parties will be subject to the exclusive jurisdiction of) the Superior Court of the State of California, County of Marin, or the United States District Court for the Northern District of California in San Francisco, except that if Licensee has acquired the Autodesk Materials in (a) a country in Europe, Africa or the Middle East, any such claim or dispute will be brought exclusively in (and the parties will be subject to the exclusive jurisdiction of) the courts of Switzerland, or (b) a country in Asia, Oceania or the Asia-Pacific region, any such claim or dispute will be brought exclusively in (and the parties will be subject to the exclusive jurisdiction of) the courts of Singapore. Nothing in the foregoing will prevent Autodesk from bringing an action for infringement of intellectual property rights in any country where such infringement is alleged to occur.
9.3 No Assignment; Insolvency. Licensee may not assign this Agreement or any rights hereunder (whether by purchase of stock or assets, merger, change of control, operation of law, or otherwise) without Autodesk's prior written consent, which may be withheld in Autodesk's sole and absolute discretion, and any unauthorized purported assignment by Licensee will be void. In the context of any bankruptcy or similar proceeding, Licensee acknowledges and agrees this Agreement is and shall be treated as an executory contract that may not be assumed and/or assigned without Autodesk's prior written consent, which consent may be withheld in Autodesk's sole and absolute discretion whether pursuant to Section 365(c)(1) of Title 11 of the United States Code or any other applicable law respecting the treatment of executory contracts within bankruptcy. Any assignment (regardless of how or on what basis the assignment may occur) will be conditioned on compliance with the following: at least thirty (30) days before assigning or agreeing to any assignment of rights under this Agreement (including transferring any copies of or right to use the Software), (a) Licensee must provide written notice to Autodesk, Uninstall all copies of the Software, and (without limitation of the generality of Section 9.7 (Audits)) allow Autodesk or its designee to inspect the records, systems and facilities of (or operated for) Licensee and its subsidiaries and affiliates to verify (by any means available to Autodesk, whether remotely or on premises) that all copies of the Software have been Uninstalled, (b) the proposed assignee must agree to comply (and Licensee must ensure that the assignee will comply) with all of the obligations of this Agreement with respect to such Software, which agreement must provide that Autodesk is a third-party beneficiary of the assignees agreement, and the assignee must provide a copy of the agreement to Autodesk, and (c) Licensee and proposed assignee must comply with all other transfer procedures identified by Autodesk.
9.4 Autodesk Subsidiaries and Affiliates. Licensee acknowledges and agrees that Autodesk may arrange to have its subsidiaries and affiliates engage in activities in connection with this Agreement, including, without limitation, delivering Autodesk Materials and providing Relationship Programs and Services, provided that Autodesk (and not such subsidiaries and affiliates) will remain subject to the obligations of Autodesk under this Agreement. Licensee also agrees that Autodesks subsidiaries and affiliates may enforce (including taking actions for breach of) this Agreement.
9.5 Exceptions to Prohibitions; Severability.
9.5.1 Exceptions to Prohibitions. The prohibitions contained in this Agreement will not apply where and to the extent applicable law does not allow such prohibitions to be enforced. Licensee may have other rights under the laws of the state or country within the Territory where the Licensed Materials are acquired, and this Agreement does not change Licensees rights under the laws of such state or country if and to the extent the laws of such state or country do not permit this Agreement to do so. Licensee will bear the burden of proof to demonstrate that applicable law does not allow (i) the enforcement of such prohibitions; or (ii) this Agreement to change particular rights in a state or country (and that Licensee has not exceeded the bounds of the unenforceable prohibitions and unchangeable rights).
9.5.2 Severability. If and to the extent any provision of this Agreement is held illegal, invalid, or unenforceable in whole or in part under applicable law, such provision or such portion thereof will be ineffective as to the jurisdiction in which it is illegal, invalid, or unenforceable to the extent of its illegality, invalidity, or unenforceability and will be deemed modified to the extent necessary to conform to applicable law so as to give the maximum effect to the intent of the parties. The illegality, invalidity, or unenforceability of such provision in that jurisdiction will not in any way affect the legality, validity, or enforceability of such provision or any other provision of this Agreement in any other jurisdiction.
9.6 No Waiver. No term or provision of this Agreement will be considered waived, and no breach excused, unless such waiver is in writing signed on behalf of the party against which the waiver is asserted. No waiver (whether express or implied) will constitute consent to, waiver of, or excuse of any other, different, or subsequent breach.
9.7 Audits. Licensee agrees that Autodesk has the right to require an audit (electronic or otherwise) of the Autodesk Materials and the Installation thereof and Access thereto. As part of any such audit, Autodesk or its authorized representative will have the right, on fifteen (15) days prior notice to Licensee, to inspect Licensees records, systems and facilities, including machine IDs, serial numbers and related information, to verify that the use of any and all Autodesk Materials is in conformance with this Agreement. Licensee will provide full cooperation to enable any such audit. If Autodesk determines that Licensees use is not in conformity with the Agreement, Licensee will obtain immediately and pay for valid license(s) to bring Licensees use into compliance with this Agreement and other applicable terms and pay the reasonable costs of the audit. In addition to such payment rights, Autodesk reserves the right to seek any other remedies available at law or in equity, whether under this Agreement or otherwise.
9.8 Language. The English language version of this Agreement is legally binding in case of any inconsistencies between the English version and any translations. If Licensee purchased the license for the Licensed Materials in Canada, Licensee agrees to the following: The parties hereto confirm that it is their wish that this Agreement, as well as other documents relating hereto, including notices, have been and shall be written in the English language only. Les parties ci-dessus confirment leur désir que cet accord ainsi que tous les documents, y compris tous avis qui s'y rattachent, soient rédigés en langue anglaise.
9.9 Construction. Ambiguities in this Agreement will not be construed against the drafter.
9.10 Force Majeure. Autodesk will not be liable for any loss, damage or penalty resulting from delays or failures in performance resulting from acts of God, supplier delay or other causes beyond Autodesk's reasonable control.
9.11 U.S. Government Rights. For U.S. Government procurements, all Autodesk Materials are deemed to be commercial computer software as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19 "Commercial Computer Software - Restricted Rights" and DFARS 227.7202, “Rights in Commercial Computer Software or Commercial Computer Software Documentation”, as applicable, and any successor regulations. Any use, modification, reproduction release, performance, display or disclosure of the Autodesk Materials by the U.S. Government shall be solely in accordance with license rights and restrictions described herein.
9.12 Export Control. Licensee acknowledges and agrees that the Autodesk Materials and Services (including any data submitted by Licensee in connection with a Service and any Licensee-specific output generated by a Service) are subject to compliance with United States and other applicable country export control and trade sanctions laws, rules and regulations, including, without limitation the regulations promulgated by the U.S. Department of Commerce and the U.S. Department of the Treasury (collectively, "Export Control Laws"). Licensee represents, warrants and covenants that neither Licensee nor Licensees Personnel (i) are a citizen or resident of, or located within, a nation that is subject to U.S. trade sanctions or other significant trade restrictions (including, without limitation, Cuba, Iran, Sudan, Syria and North Korea), (ii) are identified on any of the U.S. government restricted party lists (including, without limitation, the U.S. Treasury Department's List of Specially Designated Nationals and Blocked Persons, the U.S. Department of Commerces Denied Party List, Entity List and Unverified List and the U.S. Department of States proliferation-related lists), (iii) will, unless otherwise authorized under the Export Control Laws, use Autodesk Materials or Services in any restricted end use, including, without limitation, design, analysis, simulation, estimation, testing, or other activities related to nuclear, chemical/biological weapons, rocket systems or unmanned air vehicles applications, or (iv) will use the Autodesk Materials or Services to disclose, transfer, download, export, or re-export, directly or indirectly, any Licensee-specific output generated by the Autodesk Materials or Services, Licensee content, third party content, or any other content or material to any country, entity, or party that is ineligible to receive such items under the Export Control Laws or other laws or regulations to which Licensee may be subject. Licensee understands that the requirements and restrictions of the Export Control Laws as applicable to Licensee may vary depending on the Autodesk Materials or Services provided under this Agreement and may change over time. Licensee shall be solely responsible for (i) determining the precise controls applicable to the Autodesk Materials or Services, and (ii) complying with the Export Control Laws and monitoring any modifications to them.
9.13 Entire Agreement. This Agreement and any other terms referenced in this Agreement (such as the Relationship Program Terms and the Services Terms) constitute the entire agreement between the parties (and merge and supersede any prior or contemporaneous agreements, discussions, communications, agreements, representations, warranties, advertising or understandings) with respect to the subject matter hereof, except that particular Autodesk Materials may be subject to additional or different terms associated with such Autodesk Materials. The parties acknowledge that, in entering into this Agreement, they are not relying on any agreements, discussions, communications, agreements, representations, warranties, advertising or understandings other than as expressly set forth in this Agreement. Licensee acknowledges and agrees that Autodesk may add to or change the Relationship Program Terms and the Services Terms from time to time, provided that Autodesk will provide written notice of the additions or changes (and may allow Licensee not to renew, may permit Licensee to terminate, and may offer other options with respect to Relationship Programs or Services) before the additions or changes are effective as to Licensee. In the event of a conflict between this Agreement and any other terms of Autodesk (including, without limitation, the Relationship Program Terms, the Services Terms, or such additional or different terms), the other terms will apply. Terms stipulated by Licensee in any communication by Licensee which purport to vary this Agreement or such other terms will be void and of no effect unless agreed in a writing signed by an authorized representative of Autodesk. Any other modifications to this Agreement will also be invalid unless agreed to in a writing signed by an authorized representative of Autodesk.
10. Additional Terms.
This Section 10 (Additional Terms) applies to the following Software that may be included within the Licensed Materials: (i) Autodesk Maya; (ii) Autodesk Softimage; (iii) Autodesk 3ds Max; and (iv) Autodesk 3ds Max Design.
10.1 Rendering.
10.1.1 With regard to the Rendering Software (defined below), in addition to any other license granted in this Agreement, Licensee may allow the Rendering Software to be Installed or Accessed on a Networked Basis, solely for Licensees Internal Business Needs, specifically to render files created with the Software. However, if the Rendering Software is mental ray, and the Software is provided with a finite number of mental ray rendering nodes, then with regard to mental ray the foregoing is restricted to that number of mental ray rendering nodes.
10.1.2 With regard to the mental ray Batch Software (defined below), in addition to any other license granted in this Agreement, Licensee may allow the mental ray Batch Software to be Installed or Accessed on a Networked Basis, solely for Licensees Internal Business Needs, and used (i) specifically to render files created with the Software; or (ii) by the Rendering Software specifically to render files created with the Software. The total number of CPUs used by the mental ray Batch Software cannot exceed the number specified in the License Identification.
10.1.3 With regard to the mental ray Standalone (defined below), Licensee may allow the mental ray Standalone to be Installed or Accessed, on a Networked Basis, solely on Computing Device(s) (defined below) solely for Licensees Internal Business Needs specifically to render files created with the Software. With regard to mental ray Standalone, any reference in the Agreement to Computer is hereby deleted and “Computing Device(s)” substituted therefor.
10.1.4 With regard to the mental ray Satellite (defined below) for each of Autodesk 3ds Max, Autodesk Maya and Autodesk Softimage Software each mental ray Satellite executable(s) may run on one (1) or more host no more than four (4) client Computing Devices. With regard to mental ray Satellite, any reference in the Agreement to Computer is hereby deleted and “Computing Device(s)” substituted therefor.
10.1.5 Definitions.
(1) “mental ray Standalone” means the mental ray Standalone client/server executable, including the mental ray standard shader libraries and utility programs, used specifically for rendering files created with the Software.
(2) “Rendering Software” means a subset of the Software used specifically for rendering files created with the Software.
(3) “mental ray Batch Software” means a subset of the Software used: (i) specifically for rendering files created with the Software or (ii) by the Rendering Software specifically for rendering files created with the Software.
(4) “mental ray Satellite” means the mental ray Satellite server executable, including the mental ray standard shader libraries. mental ray Satellite is functionally equivalent to the mental ray Standalone server executable, used specifically for rendering files created with the Software except it is not able to read and write files in the complete mi2 format.
(5) “Computing Device” means (i) a single electronic assembly with a maximum of: (a) four (4) CPUs (regardless of the number of cores in each CPU) each CPU having one or more microprocessors, (b) four (4) discrete GPU-based computing boards; or (ii) a software implementation of the single electronic assembly, (a so-called 'virtual machine') described in (i) above, which single electronic assembly accepts information in digital or similar form and manipulates the information for a specific result based on a sequence of instructions.
10.2 Exceptions.
10.2.1 This Section 10.2 (Exceptions) applies to the Autodesk Media & Entertainment 3D entertainment Software that may be included within the Licensed Materials. Notwithstanding the provisions set forth in Section 2.1.1 (No License Granted; Unauthorized Activities) if: (i) the Redistributable Component (defined below) operates with the Software and with Licensee Application; and (ii) the Redistributable Component is linked to Licensee Application; then Licensee may reproduce and distribute the Redistributable Component and Licensee Application together, subject to Licensees strict adherence to all of the following terms and conditions:
(a) the class identifications for any classes of objects Licensee created shall be different from and clearly distinguishable from the class identifications used by Autodesk;
(b) modified Sample (defined below) code and any resulting binary files in Licensee Application are identified as developed by Licensee, and not by Autodesk;
(c) Licensee Application has Licensees copyright notice;
(d) any Modification (defined below), and resulting binary files, shall include the copyright notices of Autodesk, Inc. as well as the following statement: "This software contains copyrighted code owned by Autodesk, Inc. but has been modified and is not endorsed by Autodesk, Inc." The language of the copyright notice and the statement shall be in the same language as the Software language;
(e) distribution is strictly for not-for-profit purposes;
(f) distribution is either in binary form or text form;
(g) distribution is subject to a standard form of click-through end-user license agreement which license agreement, among other things: (1) protects Autodesk's interests consistent with the terms of this Agreement; and (2) prohibits the redistribution of the Redistributable Component;
(h) if the Redistributable Component operates with the Autodesk 3ds Max Software and/or Autodesk 3ds Max Design Software and with Licensee Application then prior to reproduction and distribution of the Redistributable Component and Licensee Application all MIDI files have been excluded from the Redistributable Component and Licensee Application; and
(i) Licensee agrees to defend, indemnify and hold harmless Autodesk and its subsidiaries and affiliates from and against any and all damages, costs, losses, liabilities, expenses and settlement amounts incurred in connection with any suit, claim or action by any third party alleging that the Redistributable Component and/or Licensee Application infringes or misappropriates any patent, copyrights, moral rights, trademark, trade secret and design rights, whether registered or unregistered, and including any application for registration of any of the foregoing and all rights or forms of protections of a similar nature having equivalent or similar effect to any of these, which may subsist anywhere in the world, of such third party.
10.2.2 Definitions.
(1) "Licensee Application" means, with regard to the Software, a Modification made by Licensee for designing, developing, and testing an application program made by Licensee.
(2) "Modification" means any: (i) addition to the substance of a Sample or any addition to the substance of the contents of a file containing a Sample; (ii) any deletion from the structure of a Sample, or any deletion from the structure of the contents of a file containing a Sample; and/or (iii) any new file that contains any part of a Sample; all of which, in Autodesks sole discretion, ensures that the Sample is not the primary source of value.
(3) "Redistributable Component" means the Sample(s) and/or a Modification.
(4) "Sample(s)" means sample source code, or individual animations, still images, and/or audio files contained in the Software, and located in the samples directory, the examples subdirectory, samples files or any similar type directory or file.
10.3 Additional Terms; Certain Softimage Materials. This Section 10.3 (Additional Terms; Certain Softimage Materials) applies to the following Software that may be included within the Licensed Materials: (i) Autodesk Softimage Mod Tool software; and (ii) Autodesk Softimage Mod Tool Pro software.
10.3.1 Autodesk Softimage Mod Tool Software. In the event the Software is Autodesk Softimage Mod Tool Software then the applicable Exhibit B License Type is B. 4. (Educational Stand-alone (Individual) License).
10.3.2 Autodesk Softimage Mod Tool Pro Software. In the event the Software is Autodesk Softimage Mod Tool Pro Software, then the applicable Exhibit B License Type is B. 1. (Stand-alone (Individual) License), however, Licensees Internal Business Needs are limited to the design, development and testing of an application program designed to function with the Software for Licensees internal use in producing multimedia content in conjunction with Licensees valid XNA® Creators Club Online Premium Membership.
11. Additional Terms: Quantity Take Off.
This Section 11 (Additional Terms; Quantity Take Off) applies to the Quantity Take Off Software that may be included within the Licensed Materials (“QTO Software”):
11.1 The QTO Software is based in part on the work of the Independent JPEG Group.
11.2 Portions of the QTO Software include Crystal Reports Runtime Software (“Runtime Software”) licensed from Business Objects Software Ltd (“Business Objects”). Licensees use of the Runtime Software is subject to the following terms:
(a) Licensee agrees not to alter disassemble, decompile, translate, adapt or reverse-engineer the Runtime Software or the report file (.RPT) format;
(b) Licensee agrees not to distribute the Runtime Software with any general-purpose report writing, data analysis or report delivery product or any other product that performs the same or similar functions as Business Objects product offerings;
(c) Licensee agrees not to use the Runtime Software to create for distribution a product that is generally competitive with Business Objects' product offerings;
(d) Licensee agrees not to use the Runtime Software to create for distribution a product that converts the report file (.RPT) format to an alternative report file format used by any general-purpose report writing, data analysis or report delivery product that is not the property of Business Objects; and
(e) Licensee agrees not to use the Crystal Reports Software on a rental or timesharing basis or to operate a service bureau facility for the benefit of third-parties.
11.3 BUSINESS OBJECTS AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. BUSINESS OBJECTS AND ITS SUPPLIERS SHALL HAVE NO LIABILITY WHATSOEVER UNDER THIS AGREEMENT OR IN CONNECTION WITH THE CRYSTAL REPORTS SOFTWARE.
12. Autodesk download technology may use the Akamai NetSession Interface, which may utilize a limited amount of your upload bandwidth and PC resources to connect you to a peered network and improve speed and reliability of Web content. The Akamai NetSession Interface is secure client-side networking technology that harnesses the power of your computer to deliver software and media available on the Akamai network. Your Akamai NetSession Interface works collectively with other Akamai NetSession Interfaces, along with thousands of Akamai edge servers, and runs as a networking service utilizing a limited amount of your computer's available resources. More information about the Akamai NetSession Interface is available here: http://www.akamai.com/client. By clicking "Accept" and using the Autodesk download technology, you accept the Akamai License Agreement (http://www.akamai.com/eula) in addition to the Autodesk License and Service Agreement.
Exhibit A
Definitions
1. “Access” or “Accessible” means, with respect to a computer program or other materials, (a) to use or execute the computer program or other materials or (b) to use or otherwise benefit from the features or functionality of the computer program or other materials.
2. “Agreement” means this License and Services Agreement, including all exhibits and schedules thereto, as the License and Services Agreement may be amended from time to time in accordance with the terms thereof.
3. “Authorized User” means any individual person who Installs or Accesses, or is authorized to Install or Access, any of the Licensed Materials.
4. “Autodesk” means Autodesk, Inc., a Delaware corporation, except that if, Licensee acquires a license to the Autodesk Materials in (a) a country in Europe, Africa or the Middle East, “Autodesk” means Autodesk Development Sàrl or (b) a country in Asia, Oceania or the Asia-Pacific region, “Autodesk” means Autodesk Asia Pte Ltd.
5. “Autodesk License Manager” means the tool known as Autodesk License Manager or any future Autodesk tool for managing, monitoring or controlling Installation of or Access to Autodesk Materials.
6. “Autodesk Materials” means any materials distributed or made available by Autodesk, directly or indirectly, including Software, Supplemental Materials, User Documentation and Excluded Materials (whether or not licensed to Licensee).
7. “Computer” means (i) a single electronic device, with one or more central processing units (CPUs), that accepts information in digital or similar form and manipulates the information for a specific result based on a sequence of instructions, or (ii) a software implementation of such a device (or so-called virtual machine).
8. “Customer Information Form” means a form completed by or on behalf of Licensee and submitted to Autodesk or a Reseller, directly or indirectly, in connection with Licensees order for a license of Autodesk Materials, Relationship Program or Services.
9. “Educational Licensee” means a Licensee who is also (a) a Qualified Educational Institution, (b) Faculty, (c) Student or (d) Other Authorized Educational Licensee. An Educational Licensee may be required to show proof of eligibility if requested by Autodesk. Autodesk, in its sole discretion, retains the right to determine the eligibility of an Educational Licensee.
10. “Educational Purposes” means (i) in the case of a Qualified Educational Institution, Faculty or Other Authorized Educational Licensees, purposes directly related to learning, teaching, training, research and development that are part of the instructional functions performed by a Qualified Educational Institution or Other Authorized Educational Licensee and (ii) in the case of Students, purposes related to learning, training, research or development. “Educational Purposes” does not include commercial, professional or any other for-profit purposes.
11. “Evaluation Purposes” means purposes of evaluation and demonstration of the capabilities of the Software or Supplemental Materials but excludes competitive analysis and any commercial, professional, or other for-profit purposes.
12. “Excluded Materials” means any materials, including Software, Supplemental Materials or User Documentation (and including, without limitation, any computer programs, modules or components of a computer program, functionality or features of a computer program, explanatory printed or electronic materials, content or other materials, if any), that may be provided or become available to Licensee, by any means, or that are on any media delivered to Licensee, for which (a) Licensee does not have a License Identification, or (b) Licensee has not paid (and continued to pay) the applicable fees. Licensee acknowledges that Excluded Materials are included on media or via download for convenience of the licensing mechanism used by Autodesk, and inclusion does not in any way authorize, expressly or impliedly, a right to use such Excluded Materials.
13. “Faculty” means an individual person who is an employee or independent contractor working for a Qualified Educational Institution.
14. “Install” and “Installation” means, with respect to a computer program or other materials, to copy the program or other materials onto a hard disk or other storage medium.
15. “License Identification” means one or more designations by Autodesk that set forth the License Type (among other things) for Licensees license of the Licensed Materials. The License Identification may be (a) located (i) in the Licensed Materials (e.g., in an “About” box, license information dialog box, or text file of Software), (ii) on or with Autodesk packaging, or (iii) in a written confirmation or other notice issued to Licensee by Autodesk and transmitted via email, facsimile, physical delivery, or otherwise, or (b) obtained from Autodesk on request. For clarification, License Identification does not include a designation, confirmation, packaging or other document provided by a Reseller or other third party.
16. “License Type” means a type of license specified by Autodesk for Autodesk Materials, including the types set forth in Exhibit B. License Type includes the terms specified by Autodesk for each type of license, including the applicable terms set forth in Exhibit B. License Type is determined by Autodesk and may be specified in the applicable License Identification.
17. “Licensed Materials” means Software, Supplemental Materials and User Documentation (a) downloaded by clicking on the “I accept” button or other button or mechanism associated with this Agreement or by otherwise indicating assent to this Agreement, (b) delivered prepackaged with this Agreement, or (c) otherwise accompanied by this Agreement, provided that (i) in the case of Software, the Software is identified in an applicable License Identification, and (ii) Licensee has paid (and continues to pay) the applicable fees. Licensed Materials also includes Supplemental Materials and User Documentation that Autodesk provides or makes available to Licensee for use with Software licensed under this Agreement if there are no separate terms for such materials specified by Autodesk. Licensed Materials includes, without limitation, any error corrections, patches, service packs, updates and upgrades to, and new versions of, the Licensed Materials that Autodesk provides or makes available to Licensee under Licensees then-current license. Licensee acknowledges that availability of Upgrades and new versions may be subject to additional fees and the Relationship Program Terms. In addition, Licensed Materials includes, without limitation, any Previous Versions and other Autodesk Materials that Licensee receives or retains pursuant to the Relationship Program Terms, but only for so long as and to the extent expressly authorized by the Relationship Program Terms. Notwithstanding the foregoing (or any other provision of this Agreement), Licensed Materials in all cases excludes Excluded Materials.
18. “Licensee” means (a) the company or other legal entity on behalf of which Autodesk Materials are acquired, if the Autodesk Materials are acquired on behalf of such an entity (e.g., by an employee, independent contractor, or other authorized representative), or (b) if there is no such entity, the individual who accepts this Agreement (e.g., by selecting the “I accept” button or other button or mechanism associated with this Agreement or otherwise indicating assent to this Agreement, or by installing, downloading, accessing, or otherwise copying or using all or any portion of the Autodesk Materials). For clarification, “Licensee” refers only to a single, specifically identified legal entity or individual, and does not include any subsidiary or affiliate of any such legal entity or individual or any other related person.
19. “Licensees Internal Business Needs” means, in reference to Licensed Materials, the use of such Licensed Materials (and the features and functionality thereof) by Licensees own Personnel to meet the internal requirements of Licensees business in the ordinary course of such business, provided that Internal Business Needs will in no event include providing or making available such Licensed Materials (or the features or functionality thereof) to any third party.
20. “Networked Basis” means a computing environment that includes a Computer acting as a file server which allows the Licensed Materials Installed on such Computer to be uploaded and Installed to, and operated, viewed or otherwise Accessed from, other Computers through a local area network connection or through a VPN connection subject to compliance with the VPN Requirements.
21. “Open Source” means any software code that: (a) contains, or is derived in any manner, (in whole or in part), from any software that is distributed as free software, open source software, shareware (e.g., Linux), or similar licensing or distribution models; and (b) is subject to any agreement with terms requiring that using, copying, modifying or redistributing the software requires that such software and/or the derivative works of such software be: (i) disclosed and/or distributed in source code form; (ii) be licensed for the purpose of making derivative works; and/or (iii) be redistributed free of charge; including, without limitation, software licensed or distributed under any of the following licenses or distribution models, or licenses or distribution models similar to, GNUs General Public License (GPL) or Lesser/Library GPL (LGPL).
22. “Other Authorized Educational Licensee” means a Licensee described at http://www.autodesk.com/educationterms or as otherwise authorized in writing by Autodesk.
23. “Permitted Number” means a maximum number (e.g., number of authorized users, number of concurrent users, number of computers, sessions, etc.) applicable to a license of the Licensed Materials and to the License Type associated with such license. Such number is determined by Autodesk and may be specified in the applicable License Identification.
24. “Personal Learning Purposes” means (i) personal learning as a Student or (ii) in the case of a non-Student, personal learning, excluding (a) in-person or online classroom learning in any degree-granting or certificate granting program, and (b) learning related to any commercial, professional or other for-profit purposes.
25. “Personnel” means (a) Licensees individual employees and (b) individual persons who are independent contractors working on Licensees premises and who Install and Access the Licensed Materials only on and through Computers owned or leased and controlled by Licensee.
26. “Previous Versions” means, as to any then-current release of Licensed Materials, a prior release of the Licensed Materials as to which such then-current release is a successor or substitute (as determined by Autodesk).
27. “Qualified Educational Institution” means an educational institution which has been accredited by an authorized governmental agency within its applicable local, state, provincial, federal, or national government and has the primary purpose of teaching its enrolled students. Examples, without limitation, of entities that are included and excluded from this definition are described at http://www.autodesk.com/educationterms.
28. “Relationship Program” means (i) Subscription or (ii) a rental program offered generally by Autodesk pursuant to which Autodesk makes available Licensed Materials.
29. “Relationship Program Terms” means the terms for a Relationship Program set forth at http://usa.autodesk.com/company/legal-notices-trademarks/support-terms-and-conditions or any successor or supplemental web page of Autodesk (the URL for which may be obtained on Autodesks website or on request).
30. “Reseller” means a distributor or reseller authorized directly or indirectly by Autodesk to distribute authentic Autodesk Materials to Licensee.
31. ”Services” means services (including the results of services) provided or made available by Autodesk, including, without limitation, support services, storage, simulation and testing services, training and other benefits, but excluding services provided or made available as part of a Relationship Program.
32. “Services Terms” means the terms for Services set forth at a location where a user may order or register for, or that is displayed in connection with ordering or registering for, such Services (e.g., a web page) or, if there are no such terms, at http://usa.autodesk.com/company/legal-notices-trademarks/terms-of-service (if the Services are web services) or http://usa.autodesk.com/company/legal-notices-trademarks/terms-of-use for all other Services) or any successor or supplemental web pages of Autodesk.
33. “Software” means the Autodesk FBX SDK computer program, or a module or component of a computer program, including the software development kit (“SDK”) distributed or made available by Autodesk. The term “Software” may also refer to functions and features of a computer program.
34. “Stand-alone Basis” means (i) the Licensed Materials are Installed on a single Computer and (ii) the Licensed Materials cannot be Installed on, or operated, viewed or otherwise Accessed from or through any other Computer (e.g., through a network connection of any kind).
35. “Student” means an individual person enrolled as a student at a Qualified Educational Institution.
36. “Subscription” is the program offered generally by Autodesk under which Autodesk provides (among other things) updates and upgrades to, new versions of, and certain other support, services and training relating to Autodesk Materials.
37. “Supplemental Materials” means materials, other than Software and related User Documentation, that are distributed or made available by Autodesk for use with Software. Supplemental Materials include, without limitation, (a) content, such as sample drawings and designs, modules for drawings and designs, and representations of elements used in drawings and designs (e.g., buildings, parts of buildings, fixtures, furniture, bridges, roads, characters, backgrounds, settings and animations), (b) background materials, such as building codes and descriptions of building practices, (c) tools for rendering the output of the Software, such as fonts, and (d) Development Materials, application programming interfaces (APIs), and other similar developer materials (including API Information).
37 “Territory” (a) means the country, countries or jurisdiction(s) specified in the License Identification, or (b) if there is no such License Identification, or no country or jurisdiction is specified in the License Identification, means the country in which Licensee acquires a license to the Autodesk Materials. If the License Identification specifies, or Licensee acquires the Autodesk Materials in, a member country of the European Union or the European Free Trade Association, Territory means all the countries of the European Union and the European Free Trade Association.
38. “Uninstall” means to remove or disable a copy of Autodesk Materials from a hard drive or other storage medium through any means or otherwise to destroy or make unusable a copy of the Autodesk Materials.
39. “Upgrade” means a full commercial version of Licensed Materials (a) which is a successor to or substitute for a qualifying prior release (and may incorporate error corrections, patches, service packs and updates and upgrades to, and may enhance or add to the features or functionality of, the prior release) or different release of Licensed Materials, (b) is provided to a Licensee who has previously licensed the applicable qualifying prior or different release from Autodesk and (c) for which Autodesk generally charges a separate fee or makes available solely to customers under a Relationship Program. Whether Autodesk Materials are an Upgrade may be specified in the applicable License Identification. Whether Autodesk Materials are an Upgrade and whether Licensee has met the qualifications to license particular Autodesk Materials as an Upgrade are determined by Autodesk.
40. “User Documentation” means the explanatory or instructional materials for Software or Supplemental Materials (including materials regarding use of the Software or Supplemental Materials), whether in printed or electronic form, that Autodesk or a Reseller incorporates in the Software or Supplemental Materials (or the packaging for the Software or Supplemental Materials) or otherwise provides to its customers when or after such customers license, acquire or Install the Software or Supplemental Materials.
41. “VPN Requirements” means (i) the Licensed Materials are Accessed through a secure virtual private network (“VPN”); (ii) the maximum number of concurrent users Accessing the Licensed Materials (on a Networked Basis or through the VPN) does not exceed the Permitted Number at any time; (iii) all copies of the Licensed Materials are Installed and Accessed exclusively in conjunction with the technical protection device (if any) supplied with the Licensed Materials; and (iv) the VPN connection is secure and complies with current industry standard encryption and protection mechanisms.
Exhibit B
License Types
1. Stand-alone (Individual) License. If the License Identification identifies the License Type as a “Stand-alone License” or as an “Individual License," Licensee may Install a single primary copy of the specific release of the Licensed Materials designated in the applicable License Identification on one (1) Computer, on a Stand-alone Basis, and permit Access to such primary copy of the Licensed Materials solely by Licensees Personnel, and solely for Licensees Internal Business Needs. Licensee may also Install a single additional copy of such Licensed Materials on one (1) additional Computer, on a Stand-alone Basis; provided that (i) such additional copy of the Licensed Materials is Accessed solely by the same person as the primary copy; (ii) such person is Licensee (if Licensee is an individual) or an employee of Licensee; (iii) such person Accesses the additional copy solely to perform work while away from that persons usual work location and solely for Licensees Internal Business Needs; and (iv) the primary and additional copies are not Accessed at the same time. Stand-alone (Individual) License is for a perpetual term, except as otherwise provided in this Agreement.
2. Multi-seat Stand-alone License. If the License Identification identifies the License Type as a “Multi-seat Stand-alone License," Licensee may Install primary copies of the specific release of the Licensed Materials designated in the applicable License Identification on up to the Permitted Number of Computers, on a Stand-alone Basis, and permit Access to such copies of the Licensed Materials solely by Licensees Personnel, and solely for Licensees Internal Business Needs. Licensee may also Install additional copies of such Licensed Materials on additional Computers in an amount up to the Permitted Number of Computers, on a Stand-alone Basis; provided that (i) each additional copy of such Licensed Materials is Accessed solely by the same person as the primary copy; (ii) such person is Licensee (if Licensee is an individual) or an employee of Licensee; (iii) such person Accesses the additional copy solely to perform work while away from that persons usual work location and solely for Licensees Internal Business Needs; and (iv) the primary and additional copies are not Accessed at the same time. Multi-seat Stand-alone License is for a perpetual term, except as otherwise provided in this Agreement.
3. Network License. If the License Identification identifies the License Type for the Licensed Materials as a “Network License," Licensee may Install copies of the specific release of the Licensed Materials designated in the applicable License Identification on a Computer and permit Access to such Licensed Materials on multiple Computers, on a Networked Basis, solely by Licensees Personnel, solely for Licensees Internal Business Needs, only so long as the maximum number of concurrent Authorized Users does not exceed the Permitted Number of Authorized Users or other limits imposed by the Autodesk License Manager (if any). Licensee may, at Licensees option, also Install the Licensed Materials on a Hot Backup Server; provided that Licensee may Access the Licensed Materials on the Hot Backup Server only during the time period when, and solely for as long as, the primary Installed copy of the Licensed Materials is inoperable and only subject to the same terms and conditions as are applicable to the primary Installed copy. A “Hot Backup Server” means a file server Computer that has a second copy of the Software and Supplemental Materials Installed but that is not permitted to be Accessible except when the primary Installed copy of the Software and Supplemental Materials are inoperable and only for so long as such primary Installed copy is inoperable. A Network License is for a perpetual term, except as otherwise provided in this Agreement.
4. Educational Stand-alone (Individual) License.  If the License Identification identifies the License Type as an “Educational Stand-alone (Individual) License,” an Educational Licensee may Install a copy of the specific release of the Licensed Materials designated in the applicable License Identification on one (1) Computer, subject to certain functional limitations described in Section 6.3 (Affected Data), on a Stand-alone Basis, and permit Access to such copy of the Licensed Materials solely by an Educational Licensee solely for Educational Purposes.  An Educational Stand-alone (Individual) License is for a fixed term specified in the applicable License Identification or, if no such term is specified, the term is thirty-six (36) months from Installation or as otherwise authorized in writing by Autodesk.
5. Educational Multi-seat Stand-alone License. If the License Identification identifies the License Type as an “Educational Multi-seat Stand-alone License,” an Educational Licensee may Install copies of the specific release of the Licensed Materials designated in the applicable License Identification on up to the Permitted Number of Computers, subject to certain functional limitations described in Section 6.3 (Affected Data), on a Stand-alone Basis, and permit Access to such copies of the Licensed Materials solely by Educational Licensees solely for Educational Purposes. An Educational Multi-seat Stand-alone License is for a fixed term specified in the applicable License Identification or, if no such term is specified, the term is thirty-six (36) months from Installation or as otherwise authorized in writing by Autodesk.
6. Educational Network License. If the License Identification identifies the License Type as an “Educational Network License,” an Educational Licensee may Install copies of the specific release of the Licensed Materials designated in the applicable License Identification on a single file server Computer, subject to certain functional limitations described in Section 6.3 (Affected Data), and Access such Licensed Materials on multiple Computers on a Networked Basis, and permit Access to such copies of the Licensed Materials solely by Educational Licensees solely for Educational Purposes, only so long as the maximum number of concurrent Authorized Users does not exceed the Permitted Number of Authorized Users. An Educational Network License is for a fixed term specified in the applicable License Identification or, if no such term is specified, the term is thirty-six (36) months from Installation or as otherwise authorized in writing by Autodesk.
7. Personal Learning License. If the License Identification identifies the License Type as a “Personal Learning License”, Licensee may Install a copy of the specific release of the Licensed Materials designated in the applicable License Identification on one (1) Computer, subject to certain functional limitations described in Section 6.3 (Affected Data), on a Stand-alone Basis, and permit Access to such copy of the Licensed Materials solely by Licensee, as an individual, solely for Personal Learning Purposes and only at and from locations that are not labs or classrooms and are not operated for commercial, professional or for-profit purposes. A Personal Learning License Stand-alone is for a fixed term specified in the applicable License Identification. If no such term is specified, the term is thirteen (13) months from Installation.
8. Evaluation/Demonstration/Trial. If Autodesk identifies the License Type as a “demonstration”, “evaluation”, “trial,” “not for resale” or “NFR” version (each, an “Evaluation License”) in the applicable License Identification, Licensee may Install a copy of the specific release of the Licensed Materials designated in the applicable License Identification on one (1) Computer, subject to certain functional limitations described in Section 6.3 (Affected Data), on a Stand-alone Basis, and permit Access to such copy of the Licensed Materials, solely by Licensees Personnel, solely for Evaluation Purposes, only so long as the maximum number of concurrent Authorized Users does not exceed one (1), and only from Licensees work location. An Evaluation License is for a fixed term specified in the applicable License Identification, or if no such term is specified, the term is thirty (30) days from Installation or as otherwise authorized in writing by Autodesk.
9. Fixed Term/Limited Duration/Rental License. If Autodesk identifies a license in the applicable License Identification as being for a specified period or limited duration or as having a fixed term or as a rental license, Licensees right to Install and Access the Licensed Materials will continue only for the period, duration or term specified in the License Identification. Such Installation and Access will be in accordance with and subject to the applicable License Type and Permitted Number. If Autodesk identifies a license in the applicable License Identification as being for a specified period or limited duration, or as having a fixed term, or a rental license but no period, duration or term is specified in the License Identification, the period, duration or term will be ninety (90) days from Installation (or the period specified in Sections B.6 (Educational Network License), B.7 (Personal Learning License) or B.8 (Evaluation/Demonstration/Trial) of this Exhibit B with respect to the licenses described in those sections).
10. Session Specific Network License. If the License Identification identifies the License Type as a "Session Specific Network License", Licensee may install one (1) copy of the specific release of the Licensed Materials designated in the applicable License Identification on a Computer and permit Access to such Licensed Materials from multiple Computers through a Supported Virtualization Application, on a Networked Basis, solely by Licensee's Personnel, solely for Licensee's Internal Business needs, only so long as the maximum number of concurrent Sessions does not exceed the Permitted Number or other limits imposed by the Autodesk License Manager tool (if any). For purposes of this Session Specific Network License, (a) a “Session” is defined as a single interactive information exchange between two Computers that are connected through a Supported Virtualization Application, and (b) “Supported Virtualization Application(s)” are those third party virtualization applications or methods that are specifically identified as supported by Autodesk in the User Documentation for the Licensed Materials. With respect to the applicable Supported Virtualization Application, Licensee agrees to activate any available session tracking mechanism, not disable any such session tracking mechanism and to retain all records generated by such session tracking mechanism. A Session Specific Network License is for a perpetual term, except as otherwise provided in this Agreement.

Binary file not shown.

View File

@ -1,277 +0,0 @@
/****************************************************************************************
Copyright (C) 2016 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxsdk.h
#ifndef _FBXSDK_H_
#define _FBXSDK_H_
/**
* \mainpage FBX SDK Reference
* <p>
* \section welcome Welcome to the FBX SDK Reference
* The FBX SDK Reference contains reference information on every header file,
* namespace, class, method, enum, typedef, variable, and other C++ elements
* that comprise the FBX software development kit (SDK).
* <p>
* The FBX SDK Reference is organized into the following sections:
* <ul><li>Class List: an alphabetical list of FBX SDK classes
* <li>Class Hierarchy: a textual representation of the FBX SDK class structure
* <li>Graphical Class Hierarchy: a graphical representation of the FBX SDK class structure
* <li>File List: an alphabetical list of all documented header files</ul>
* <p>
* \section otherdocumentation Other Documentation
* Apart from this reference guide, an FBX SDK Programming Guide and many FBX
* SDK examples are also provided.
* <p>
* \section aboutFBXSDK About the FBX SDK
* The FBX SDK is a C++ software development kit (SDK) that lets you import
* and export 3D scenes using the Autodesk FBX file format. The FBX SDK
* reads FBX files created with FiLMBOX version 2.5 and later and writes FBX
* files compatible with MotionBuilder version 6.0 and up.
*/
#pragma pack(push, 8) //FBXSDK is compiled with default value (8)
#include <fbxsdk/fbxsdk_def.h>
#ifndef FBXSDK_NAMESPACE_USING
#define FBXSDK_NAMESPACE_USING 1
#endif
//---------------------------------------------------------------------------------------
//Core Base Includes
#include <fbxsdk/core/base/fbxarray.h>
#include <fbxsdk/core/base/fbxbitset.h>
#include <fbxsdk/core/base/fbxcharptrset.h>
#include <fbxsdk/core/base/fbxcontainerallocators.h>
#include <fbxsdk/core/base/fbxdynamicarray.h>
#include <fbxsdk/core/base/fbxstatus.h>
#include <fbxsdk/core/base/fbxfile.h>
#ifndef FBXSDK_ENV_WINSTORE
#include <fbxsdk/core/base/fbxfolder.h>
#endif
#include <fbxsdk/core/base/fbxhashmap.h>
#include <fbxsdk/core/base/fbxintrusivelist.h>
#include <fbxsdk/core/base/fbxmap.h>
#include <fbxsdk/core/base/fbxmemorypool.h>
#include <fbxsdk/core/base/fbxpair.h>
#include <fbxsdk/core/base/fbxset.h>
#include <fbxsdk/core/base/fbxstring.h>
#include <fbxsdk/core/base/fbxstringlist.h>
#include <fbxsdk/core/base/fbxtime.h>
#include <fbxsdk/core/base/fbxtimecode.h>
#include <fbxsdk/core/base/fbxutils.h>
//---------------------------------------------------------------------------------------
//Core Math Includes
#include <fbxsdk/core/math/fbxmath.h>
#include <fbxsdk/core/math/fbxdualquaternion.h>
#include <fbxsdk/core/math/fbxmatrix.h>
#include <fbxsdk/core/math/fbxquaternion.h>
#include <fbxsdk/core/math/fbxvector2.h>
#include <fbxsdk/core/math/fbxvector4.h>
//---------------------------------------------------------------------------------------
//Core Sync Includes
#ifndef FBXSDK_ENV_WINSTORE
#include <fbxsdk/core/sync/fbxatomic.h>
#include <fbxsdk/core/sync/fbxclock.h>
#include <fbxsdk/core/sync/fbxsync.h>
#include <fbxsdk/core/sync/fbxthread.h>
#endif /* !FBXSDK_ENV_WINSTORE */
//---------------------------------------------------------------------------------------
//Core Includes
#include <fbxsdk/core/fbxclassid.h>
#include <fbxsdk/core/fbxconnectionpoint.h>
#include <fbxsdk/core/fbxdatatypes.h>
#ifndef FBXSDK_ENV_WINSTORE
#include <fbxsdk/core/fbxmodule.h>
#include <fbxsdk/core/fbxloadingstrategy.h>
#endif /* !FBXSDK_ENV_WINSTORE */
#include <fbxsdk/core/fbxmanager.h>
#include <fbxsdk/core/fbxobject.h>
#include <fbxsdk/core/fbxperipheral.h>
#ifndef FBXSDK_ENV_WINSTORE
#include <fbxsdk/core/fbxplugin.h>
#include <fbxsdk/core/fbxplugincontainer.h>
#endif /* !FBXSDK_ENV_WINSTORE */
#include <fbxsdk/core/fbxproperty.h>
#include <fbxsdk/core/fbxpropertydef.h>
#include <fbxsdk/core/fbxpropertyhandle.h>
#include <fbxsdk/core/fbxpropertypage.h>
#include <fbxsdk/core/fbxpropertytypes.h>
#include <fbxsdk/core/fbxquery.h>
#include <fbxsdk/core/fbxqueryevent.h>
#ifndef FBXSDK_ENV_WINSTORE
#include <fbxsdk/core/fbxscopedloadingdirectory.h>
#include <fbxsdk/core/fbxscopedloadingfilename.h>
#endif /* !FBXSDK_ENV_WINSTORE */
#include <fbxsdk/core/fbxxref.h>
//---------------------------------------------------------------------------------------
//File I/O Includes
#include <fbxsdk/fileio/fbxexporter.h>
#include <fbxsdk/fileio/fbxexternaldocreflistener.h>
#include <fbxsdk/fileio/fbxfiletokens.h>
#include <fbxsdk/fileio/fbxglobalcamerasettings.h>
#include <fbxsdk/fileio/fbxgloballightsettings.h>
#include <fbxsdk/fileio/fbxgobo.h>
#include <fbxsdk/fileio/fbximporter.h>
#include <fbxsdk/fileio/fbxiobase.h>
#include <fbxsdk/fileio/fbxiopluginregistry.h>
#include <fbxsdk/fileio/fbxiosettings.h>
#include <fbxsdk/fileio/fbxstatisticsfbx.h>
#include <fbxsdk/fileio/fbxstatistics.h>
//---------------------------------------------------------------------------------------
//Scene Includes
#include <fbxsdk/scene/fbxaudio.h>
#include <fbxsdk/scene/fbxaudiolayer.h>
#include <fbxsdk/scene/fbxcollection.h>
#include <fbxsdk/scene/fbxcollectionexclusive.h>
#include <fbxsdk/scene/fbxcontainer.h>
#include <fbxsdk/scene/fbxcontainertemplate.h>
#include <fbxsdk/scene/fbxdisplaylayer.h>
#include <fbxsdk/scene/fbxdocument.h>
#include <fbxsdk/scene/fbxdocumentinfo.h>
#include <fbxsdk/scene/fbxenvironment.h>
#include <fbxsdk/scene/fbxgroupname.h>
#include <fbxsdk/scene/fbxlibrary.h>
#include <fbxsdk/scene/fbxmediaclip.h>
#include <fbxsdk/scene/fbxobjectmetadata.h>
#include <fbxsdk/scene/fbxpose.h>
#include <fbxsdk/scene/fbxreference.h>
#include <fbxsdk/scene/fbxscene.h>
#include <fbxsdk/scene/fbxselectionset.h>
#include <fbxsdk/scene/fbxselectionnode.h>
#include <fbxsdk/scene/fbxtakeinfo.h>
#include <fbxsdk/scene/fbxthumbnail.h>
#include <fbxsdk/scene/fbxvideo.h>
//---------------------------------------------------------------------------------------
//Scene Animation Includes
#include <fbxsdk/scene/animation/fbxanimcurve.h>
#include <fbxsdk/scene/animation/fbxanimcurvebase.h>
#include <fbxsdk/scene/animation/fbxanimcurvefilters.h>
#include <fbxsdk/scene/animation/fbxanimcurvenode.h>
#include <fbxsdk/scene/animation/fbxanimevalclassic.h>
#include <fbxsdk/scene/animation/fbxanimevalstate.h>
#include <fbxsdk/scene/animation/fbxanimevaluator.h>
#include <fbxsdk/scene/animation/fbxanimlayer.h>
#include <fbxsdk/scene/animation/fbxanimstack.h>
#include <fbxsdk/scene/animation/fbxanimutilities.h>
//---------------------------------------------------------------------------------------
//Scene Constraint Includes
#include <fbxsdk/scene/constraint/fbxcharacternodename.h>
#include <fbxsdk/scene/constraint/fbxcharacter.h>
#include <fbxsdk/scene/constraint/fbxcharacterpose.h>
#include <fbxsdk/scene/constraint/fbxconstraint.h>
#include <fbxsdk/scene/constraint/fbxconstraintaim.h>
#include <fbxsdk/scene/constraint/fbxconstraintcustom.h>
#include <fbxsdk/scene/constraint/fbxconstraintparent.h>
#include <fbxsdk/scene/constraint/fbxconstraintposition.h>
#include <fbxsdk/scene/constraint/fbxconstraintrotation.h>
#include <fbxsdk/scene/constraint/fbxconstraintscale.h>
#include <fbxsdk/scene/constraint/fbxconstraintsinglechainik.h>
#include <fbxsdk/scene/constraint/fbxconstraintutils.h>
#include <fbxsdk/scene/constraint/fbxcontrolset.h>
#include <fbxsdk/scene/constraint/fbxhik2fbxcharacter.h>
//---------------------------------------------------------------------------------------
//Scene Geometry Includes
#include <fbxsdk/scene/geometry/fbxblendshape.h>
#include <fbxsdk/scene/geometry/fbxblendshapechannel.h>
#include <fbxsdk/scene/geometry/fbxcache.h>
#include <fbxsdk/scene/geometry/fbxcachedeffect.h>
#include <fbxsdk/scene/geometry/fbxcamera.h>
#include <fbxsdk/scene/geometry/fbxcamerastereo.h>
#include <fbxsdk/scene/geometry/fbxcameraswitcher.h>
#include <fbxsdk/scene/geometry/fbxcluster.h>
#include <fbxsdk/scene/geometry/fbxdeformer.h>
#include <fbxsdk/scene/geometry/fbxgenericnode.h>
#include <fbxsdk/scene/geometry/fbxgeometry.h>
#include <fbxsdk/scene/geometry/fbxgeometrybase.h>
#include <fbxsdk/scene/geometry/fbxgeometryweightedmap.h>
#include <fbxsdk/scene/geometry/fbxlight.h>
#include <fbxsdk/scene/geometry/fbxlimitsutilities.h>
#include <fbxsdk/scene/geometry/fbxline.h>
#include <fbxsdk/scene/geometry/fbxlodgroup.h>
#include <fbxsdk/scene/geometry/fbxmarker.h>
#include <fbxsdk/scene/geometry/fbxmesh.h>
#include <fbxsdk/scene/geometry/fbxnode.h>
#include <fbxsdk/scene/geometry/fbxnodeattribute.h>
#include <fbxsdk/scene/geometry/fbxnull.h>
#include <fbxsdk/scene/geometry/fbxnurbs.h>
#include <fbxsdk/scene/geometry/fbxnurbscurve.h>
#include <fbxsdk/scene/geometry/fbxnurbssurface.h>
#include <fbxsdk/scene/geometry/fbxopticalreference.h>
#include <fbxsdk/scene/geometry/fbxpatch.h>
#include <fbxsdk/scene/geometry/fbxproceduralgeometry.h>
#include <fbxsdk/scene/geometry/fbxshape.h>
#include <fbxsdk/scene/geometry/fbxskeleton.h>
#include <fbxsdk/scene/geometry/fbxskin.h>
#include <fbxsdk/scene/geometry/fbxsubdeformer.h>
#include <fbxsdk/scene/geometry/fbxsubdiv.h>
#include <fbxsdk/scene/geometry/fbxtrimnurbssurface.h>
#include <fbxsdk/scene/geometry/fbxvertexcachedeformer.h>
#include <fbxsdk/scene/geometry/fbxweightedmapping.h>
//---------------------------------------------------------------------------------------
//Scene Shading Includes
#include <fbxsdk/scene/shading/fbxshadingconventions.h>
#include <fbxsdk/scene/shading/fbxbindingsentryview.h>
#include <fbxsdk/scene/shading/fbxbindingtable.h>
#include <fbxsdk/scene/shading/fbxbindingtableentry.h>
#include <fbxsdk/scene/shading/fbxbindingoperator.h>
#include <fbxsdk/scene/shading/fbxconstantentryview.h>
#include <fbxsdk/scene/shading/fbxentryview.h>
#include <fbxsdk/scene/shading/fbxfiletexture.h>
#include <fbxsdk/scene/shading/fbximplementation.h>
#include <fbxsdk/scene/shading/fbximplementationfilter.h>
#include <fbxsdk/scene/shading/fbximplementationutils.h>
#include <fbxsdk/scene/shading/fbxlayeredtexture.h>
#include <fbxsdk/scene/shading/fbxoperatorentryview.h>
#include <fbxsdk/scene/shading/fbxproceduraltexture.h>
#include <fbxsdk/scene/shading/fbxpropertyentryview.h>
#include <fbxsdk/scene/shading/fbxsemanticentryview.h>
#include <fbxsdk/scene/shading/fbxsurfacelambert.h>
#include <fbxsdk/scene/shading/fbxsurfacematerial.h>
#include <fbxsdk/scene/shading/fbxsurfacephong.h>
#include <fbxsdk/scene/shading/fbxtexture.h>
//---------------------------------------------------------------------------------------
//Utilities Includes
#include <fbxsdk/utils/fbxdeformationsevaluator.h>
#include <fbxsdk/utils/fbxprocessor.h>
#include <fbxsdk/utils/fbxprocessorxref.h>
#include <fbxsdk/utils/fbxprocessorxrefuserlib.h>
#include <fbxsdk/utils/fbxprocessorshaderdependency.h>
#include <fbxsdk/utils/fbxclonemanager.h>
#include <fbxsdk/utils/fbxgeometryconverter.h>
#include <fbxsdk/utils/fbxmanipulators.h>
#include <fbxsdk/utils/fbxmaterialconverter.h>
#include <fbxsdk/utils/fbxrenamingstrategyfbx5.h>
#include <fbxsdk/utils/fbxrenamingstrategyfbx6.h>
#include <fbxsdk/utils/fbxrenamingstrategyutilities.h>
#include <fbxsdk/utils/fbxrootnodeutility.h>
#include <fbxsdk/utils/fbxusernotification.h>
#include <fbxsdk/utils/fbxscenecheckutility.h>
//---------------------------------------------------------------------------------------
#if defined(FBXSDK_NAMESPACE) && (FBXSDK_NAMESPACE_USING == 1)
using namespace FBXSDK_NAMESPACE;
#endif
#pragma pack(pop)
#endif /* _FBXSDK_H_ */

View File

@ -1,420 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
/** \file fbxalloc.h
* Allocation functions definition.
*
* It is possible to override memory allocation functions throughout the FBX SDK by
* providing system memory allocation functions using the handler set functions below.
* The Microsoft Windows implementation in debug mode allows to specify where the
* allocations happen by providing the standard block type, file name and line number.
*/
#ifndef _FBXSDK_CORE_ARCH_ALLOC_H_
#define _FBXSDK_CORE_ARCH_ALLOC_H_
#include <fbxsdk/fbxsdk_def.h>
#if defined(_DEBUG) && defined(FBXSDK_ENV_WIN)
#include <crtdbg.h>
#endif
#if defined(FBXSDK_ENV_MAC)
#include <malloc/malloc.h>
#else
#include <malloc.h>
#endif
#include <fbxsdk/fbxsdk_nsbegin.h>
#if defined(FBXSDK_CPU_32) && !defined(FBXSDK_ENV_IOS)
#define FBXSDK_MEMORY_ALIGNMENT ((size_t)8U)
#else
#define FBXSDK_MEMORY_ALIGNMENT ((size_t)16U)
#endif
#define FBXSDK_MEMORY_COPY(dst, src, size) {memcpy(dst,src,size);}
typedef void* (*FbxMallocProc)(size_t); //! Function pointer signature used to replace "malloc"
typedef void* (*FbxCallocProc)(size_t, size_t); //! Function pointer signature used to replace "calloc"
typedef void* (*FbxReallocProc)(void*, size_t); //! Function pointer signature used to replace "realloc"
typedef void (*FbxFreeProc)(void*); //! Function pointer signature used to replace "free"
/** Set the global memory allocation function used internally by the FBX SDK.
* \param pHandler Function pointer that implements the necessary procedure to allocate memory in the system. */
FBXSDK_DLL void FbxSetMallocHandler(FbxMallocProc pHandler);
/** Set the global zero'd memory allocation function used internally by the FBX SDK.
* \param pHandler Function pointer that implements the necessary procedure to allocate zero'd memory in the system. */
FBXSDK_DLL void FbxSetCallocHandler(FbxCallocProc pHandler);
/** Set the global memory re-allocation function used internally by the FBX SDK.
* \param pHandler Function pointer that implements the necessary procedure to re-allocate memory in the system. */
FBXSDK_DLL void FbxSetReallocHandler(FbxReallocProc pHandler);
/** Set the global memory freeing function used internally by the FBX SDK.
* \param pHandler Function pointer that implements the necessary procedure to free memory in the system. */
FBXSDK_DLL void FbxSetFreeHandler(FbxFreeProc pHandler);
/** Get the global memory allocation function used internally by the FBX SDK.
* \return pHandler Function pointer on FBX's internal malloc */
FBXSDK_DLL FbxMallocProc FbxGetMallocHandler();
/** Get the global zero'd memory allocation function used internally by the FBX SDK.
* \return pHandler Function pointer on FBX's internal calloc */
FBXSDK_DLL FbxCallocProc FbxGetCallocHandler();
/** Get the global memory re-allocation function used internally by the FBX SDK.
* \return pHandler Function pointer on FBX's internal realloc */
FBXSDK_DLL FbxReallocProc FbxGetReallocHandler();
/** Get the global memory freeing function used internally by the FBX SDK.
* \return pHandler Function pointer on FBX's internal free */
FBXSDK_DLL FbxFreeProc FbxGetFreeHandler();
/** Get the default global memory allocation function used internally by the FBX SDK.
* \return pHandler Function pointer on FBX's internal malloc */
FBXSDK_DLL FbxMallocProc FbxGetDefaultMallocHandler();
/** Get the default global zero'd memory allocation function used internally by the FBX SDK.
* \return pHandler Function pointer on FBX's internal calloc */
FBXSDK_DLL FbxCallocProc FbxGetDefaultCallocHandler();
/** Get the default global memory re-allocation function used internally by the FBX SDK.
* \return pHandler Function pointer on FBX's internal realloc */
FBXSDK_DLL FbxReallocProc FbxGetDefaultReallocHandler();
/** Get the default global memory freeing function used internally by the FBX SDK.
* \return pHandler Function pointer on FBX's internal free */
FBXSDK_DLL FbxFreeProc FbxGetDefaultFreeHandler();
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
FBXSDK_DLL size_t FbxAllocSize(size_t pNbItems, size_t pItemSize);
FBXSDK_DLL void* FbxMalloc(size_t pSize);
FBXSDK_DLL void* FbxCalloc(size_t pCount, size_t pSize);
FBXSDK_DLL void* FbxRealloc(void* pData, size_t pSize);
FBXSDK_DLL void FbxFree(void* pData);
FBXSDK_DLL char* FbxStrDup(const char* pString);
FBXSDK_DLL wchar_t* FbxStrDupWC(const wchar_t* pString);
//These versions of allocators use the default system mallocs, and on Windows we also pass the debugging parameters.
//If you define FBXSDK_ALLOC_DEBUG in your project, the FBX SDK will use these debug versions everywhere.
FBXSDK_DLL void* FbxMallocDebug(size_t pSize, int pBlock, const char* pFile, int pLine);
FBXSDK_DLL void* FbxCallocDebug(size_t pCount, size_t pSize, int pBlock, const char* pFile, int pLine);
FBXSDK_DLL void* FbxReallocDebug(void* pData, size_t pSize, int pBlock, const char* pFile, int pLine);
FBXSDK_DLL void FbxFreeDebug(void* pData, int pBlock);
//When FBXSDK_ALLOC_DEBUG is defined, redirect allocation calls to the debug version.
#if defined(FBXSDK_ALLOC_DEBUG)
#define FbxMalloc(s) FbxMallocDebug(s, _NORMAL_BLOCK, __FILE__, __LINE__)
#define FbxCalloc(c, s) FbxCallocDebug(c, s, _NORMAL_BLOCK, __FILE__, __LINE__)
#define FbxRealloc(p, s) FbxReallocDebug(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
#define FbxFree(p) FbxFreeDebug(p, _NORMAL_BLOCK)
#endif
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
//! Deletion policy for pointer template classes that uses the delete operator.
template <class Type> class FbxDeletionPolicyDefault
{
public:
//! Destruction policy implementation.
static inline void DeleteIt(Type** pPtr)
{
if( *pPtr )
{
delete *pPtr;
*pPtr = NULL;
}
}
};
//! Deletion policy for pointer template classes that uses the FbxDelete() function.
template<typename T> void FbxDelete(T* p);
template<typename T> void FbxDelete(const T* p);
template <class Type> class FbxDeletionPolicyDelete
{
public:
//! Destruction policy implementation.
static inline void DeleteIt(Type** mPtr)
{
if( *mPtr )
{
FbxDelete(*mPtr);
*mPtr = NULL;
}
}
};
//! Deletion policy for pointer template classes that uses the FbxFree() function.
template <class Type> class FbxDeletionPolicyFree
{
public:
//! Destruction policy implementation.
static inline void DeleteIt(Type** pPtr)
{
if( *pPtr )
{
FbxFree(*pPtr);
*pPtr = NULL;
}
}
};
//! Deletion policy for pointer template classes that uses the Destroy() function.
template <class Type> class FbxDeletionPolicyObject
{
public:
//! Destruction policy implementation.
static inline void DeleteIt(Type** pPtr)
{
if( *pPtr )
{
(*pPtr)->Destroy();
*pPtr = NULL;
}
}
};
/** FbxAutoPtr mimics the \c auto_ptr class template implementation available in the C++ Standard Library. The \c auto_ptr template
* class describes an object that stores a pointer to a single allocated object of type Type* that ensures that the object to which
* it points gets destroyed automatically when control leaves a scope. */
template<class Type, class Policy=FbxDeletionPolicyDefault<Type> > class FbxAutoPtr
{
public:
//! Construct from a pointer.
explicit FbxAutoPtr(Type* pPtr=0) : mPtr(pPtr){}
//! Destructor.
~FbxAutoPtr() { Policy::DeleteIt(&mPtr); }
//! Retrieve the pointer it holds.
inline Type* Get() const { return mPtr; }
//! Member access operator.
inline Type* operator->() const { return mPtr; }
//! Convert to a Type pointer.
inline operator Type* () const { return mPtr; }
//! Dereference operator.
inline Type& operator*() const { return *mPtr; }
//! Logical not operator.
inline bool operator!() const { return mPtr == 0; }
//! Convert to boolean value.
inline operator bool () const { return mPtr != 0; }
//! Reset the scoped pointer by swapping with another pointer.
inline void Reset(Type* pPtr=0)
{
FBX_ASSERT(pPtr == 0 || pPtr != mPtr); //Catch self-reset errors
FbxAutoPtr<Type, Policy>(pPtr).Swap(*this);
}
//! Swap with another pointer.
inline void Swap(FbxAutoPtr& pOther)
{
Type* TmpPtr = pOther.mPtr;
pOther.mPtr = mPtr;
mPtr = TmpPtr;
}
//! Release the pointer, so that it won't perform deletion in its destruction.
inline Type* Release()
{
Type* TmpPtr = mPtr;
mPtr = NULL;
return TmpPtr;
}
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
FbxAutoPtr(const FbxAutoPtr&);
FbxAutoPtr& operator=(const FbxAutoPtr&);
Type* mPtr;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
//! Scoped pointer for FbxMalloc allocations, which call FbxFree() to deallocate.
template <class Type> class FbxAutoFreePtr : public FbxAutoPtr<Type, FbxDeletionPolicyFree<Type> >
{
public:
//! Construct from a pointer.
explicit FbxAutoFreePtr(Type* pPtr=0) : FbxAutoPtr<Type, FbxDeletionPolicyFree<Type> >(pPtr){}
};
//! Scoped pointer for FbxNew allocations, which call FbxDelete() to deallocate.
template <class Type> class FbxAutoDeletePtr : public FbxAutoPtr<Type, FbxDeletionPolicyDelete<Type> >
{
public:
//! Construct from a pointer.
explicit FbxAutoDeletePtr(Type* pPtr=0) : FbxAutoPtr<Type, FbxDeletionPolicyDelete<Type> >(pPtr){}
};
//! Scoped pointer for FbxObject derived classes, which call Destroy() to deallocate.
template <class Type> class FbxAutoDestroyPtr : public FbxAutoPtr<Type, FbxDeletionPolicyObject<Type> >
{
public:
//! Construct from a pointer.
explicit FbxAutoDestroyPtr(Type* pPtr=0) : FbxAutoPtr<Type, FbxDeletionPolicyObject<Type> >(pPtr){}
};
/** FbxSharedPtr class describes an object that stores a pointer to a single allocated object of type
* Type* that ensures that the object to which it points gets destroyed automatically when the control
* leaves a scope and the reference count is 0. */
class RefCount
{
public:
RefCount() { Init(); };
~RefCount() { Init(); };
void Init() { count = 0; }
void IncRef() { count++; }
int DecRef() { count--; if (count < 0) count = 0; return count; }
private:
int count;
};
template<class Type, class Policy=FbxDeletionPolicyDefault<Type> > class FbxSharedPtr
{
public:
// Default constructor.
FbxSharedPtr() :
mPtr(0),
mRef(0)
{}
//! Construct from a pointer.
explicit FbxSharedPtr(Type* pPtr) :
mPtr(pPtr),
mRef(0)
{
if (pPtr != 0)
{
mRef = (RefCount*)FbxMalloc(sizeof(RefCount));
mRef->Init();
mRef->IncRef();
}
}
//! Copy constructor
FbxSharedPtr(const FbxSharedPtr& pSPtr) :
mPtr(pSPtr.mPtr),
mRef(pSPtr.mRef)
{
if (pSPtr.mPtr != 0 && mRef != 0)
mRef->IncRef();
}
// Assignment operator
FbxSharedPtr& operator=(const FbxSharedPtr& pSPtr)
{
if (this != &pSPtr) // avoid self assignment
{
Reset();
if (pSPtr.mPtr)
{
mPtr = pSPtr.mPtr;
mRef = pSPtr.mRef;
FBX_ASSERT(mRef != NULL);
mRef->IncRef();
}
}
return *this;
}
//! Destructor.
~FbxSharedPtr() { Destroy(); }
void Destroy() { Reset(); }
//! Retrieve the pointer it holds.
inline Type* Get() const { return mPtr; }
//! Member access operator.
inline Type* operator->() const { return mPtr; }
//! Convert to a Type pointer.
inline operator Type* () const { return mPtr; }
//! Dereference operator.
inline Type& operator*() const { return *mPtr; }
//! Logical not operator.
inline bool operator!() const { return mPtr == 0; }
//! Convert to boolean value.
inline operator bool () const { return mPtr != 0; }
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
void Reset()
{
if (mRef)
{
FBX_ASSERT(mPtr != 0);
if (mRef->DecRef() == 0)
{
Policy::DeleteIt(&mPtr);
FbxFree(mRef);
mRef = NULL;
}
}
}
Type* mPtr;
RefCount* mRef;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
//! Scoped pointer for FbxMalloc allocations, which call FbxFree() to deallocate.
template <class Type> class FbxSharedFreePtr : public FbxSharedPtr<Type, FbxDeletionPolicyFree<Type> >
{
public:
//! Construct from a pointer.
explicit FbxSharedFreePtr(Type* pPtr=0) : FbxSharedPtr<Type, FbxDeletionPolicyFree<Type> >(pPtr){}
};
//! Scoped pointer for FbxNew allocations, which call FbxDelete() to deallocate.
template <class Type> class FbxSharedDeletePtr : public FbxSharedPtr<Type, FbxDeletionPolicyDelete<Type> >
{
public:
//! Construct from a pointer.
explicit FbxSharedDeletePtr(Type* pPtr=0) : FbxSharedPtr<Type, FbxDeletionPolicyDelete<Type> >(pPtr){}
};
//! Scoped pointer for FbxObject derived classes, which call Destroy() to deallocate.
template <class Type> class FbxSharedDestroyPtr : public FbxSharedPtr<Type, FbxDeletionPolicyObject<Type> >
{
public:
//! Construct from a pointer.
explicit FbxSharedDestroyPtr(Type* pPtr=0) : FbxSharedPtr<Type, FbxDeletionPolicyObject<Type> >(pPtr){}
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_ARCH_ALLOC_H_ */

View File

@ -1,240 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
/** \file fbxarch.h
* Architecture definition.
*
* List of available preprocessor defines that can appear on various systems:
*
* Operating System Environment:
* FBXSDK_ENV_WIN (Windows)
* FBXSDK_ENV_WINSTORE (Windows Store App)
* FBXSDK_ENV_MAC (MacOSX)
* FBXSDK_ENV_IOS (iOS)
* FBXSDK_ENV_LINUX (Linux)
*
* Architecture:
* FBXSDK_ARCH_IX86 (Intel x86)
* FBXSDK_ARCH_AMD64 (AMD64)
* FBXSDK_ARCH_ARM (Advanced RISC Machine)
*
* Processor:
* FBXSDK_CPU_32 (32bit processor)
* FBXSDK_CPU_64 (64bit processor)
*
* Compiler:
* FBXSDK_COMPILER_MSC (Microsoft Compiler)
* FBXSDK_COMPILER_GNU (GNU Compiler)
* FBXSDK_COMPILER_INTEL (Intel Compiler)
* FBXSDK_COMPILER_CLANG (Clang Compiler)
*
* These definitions are based on the information found here:
* http://predef.sourceforge.net/index.php
*
*/
#ifndef _FBXSDK_CORE_ARCH_ARCH_H_
#define _FBXSDK_CORE_ARCH_ARCH_H_
#if defined(_WIN32) || defined(_WIN64) //Microsoft Windows ------------------------------
#define FBXSDK_ENV_WIN 1
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
#define FBXSDK_ENV_WINSTORE 1
#endif
#if defined(_M_X64)
#define FBXSDK_ARCH_AMD64 1
#define FBXSDK_CPU_64 1
#elif defined(_M_IX86)
#define FBXSDK_ARCH_IX86 1
#define FBXSDK_CPU_32 1
#elif defined(_M_ARM)
#define FBXSDK_ARCH_ARM 1
#define FBXSDK_CPU_32 1
#else
#define FBXSDK_ARCH_ARM 1
#define FBXSDK_CPU_64 1
#endif
#if defined(_MSC_VER)
#define FBXSDK_COMPILER_MSC 1
#elif defined(__GNUC__)
#define FBXSDK_COMPILER_GNU 1
#elif defined(__ICL)
#define FBXSDK_COMPILER_INTEL 1
#else
#error Unsupported compiler!
#endif
#elif defined(__APPLE__) || defined(__MACH__) //Apple MacOS/X ---------------------------
#include "TargetConditionals.h"
#define FBXSDK_ENV_MAC 1
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
#define FBXSDK_ENV_IOS 1
#endif
#if defined(__i386__)
#define FBXSDK_ARCH_IX86 1
#define FBXSDK_CPU_32 1
#elif defined(__x86_64__) || defined(__x86_64)
#define FBXSDK_ARCH_AMD64 1
#define FBXSDK_CPU_64 1
#elif defined(__arm__)
#define FBXSDK_ARCH_ARM 1
#define FBXSDK_CPU_32 1
#elif defined(__arm64__)
#define FBXSDK_ARCH_ARM 1
#define FBXSDK_CPU_64 1
#else
#error Unsupported architecture!
#endif
#if defined(__GNUC__)
#define FBXSDK_COMPILER_GNU 1
#endif
#if defined(__clang__)
#define FBXSDK_COMPILER_CLANG 1
#endif
#if !defined(FBXSDK_COMPILER_GNU) && !defined(FBXSDK_COMPILER_CLANG)
#error Unsupported compiler!
#endif
#elif defined(__linux__) || defined(__CYGWIN__) || defined(EMSCRIPTEN) || defined(ANDROID) //Linux ---------------------------------
#define FBXSDK_ENV_LINUX 1
#if defined(EMSCRIPTEN)
#define FBXSDK_ENV_EMSCRIPTEN 1
#endif
#if defined(ANDROID)
#define FBXSDK_ENV_ANDROID 1
#endif
#if defined(__i386__)
#define FBXSDK_ARCH_IX86 1
#define FBXSDK_CPU_32 1
#elif defined(__x86_64__) || defined(__x86_64)
#define FBXSDK_ARCH_AMD64 1
#define FBXSDK_CPU_64 1
#elif defined(__arm__)
#define FBXSDK_ARCH_ARM 1
#define FBXSDK_CPU_32 1
#elif defined(EMSCRIPTEN)
#define FBXSDK_ARCH_AMD64 1
#define FBXSDK_CPU_64 1
#else
#define FBXSDK_ARCH_ARM 1
#define FBXSDK_CPU_64 1
#endif
#if defined(__GNUC__)
#define FBXSDK_COMPILER_GNU 1
#elif defined(EMSCRIPTEN)
#define FBXSDK_COMPILER_EMSCRIPTEN 1
#else
#error Unsupported compiler!
#endif
#else
#error Unsupported platform!
#endif
//---------------------------------------------------------------------------------------
//Compiler Specifics
#if defined(FBXSDK_SHARED)
#if defined(FBXSDK_COMPILER_MSC) || defined(FBXSDK_COMPILER_INTEL)
#define FBXSDK_DLLIMPORT __declspec(dllimport)
#define FBXSDK_DLLEXPORT __declspec(dllexport)
#elif defined(FBXSDK_COMPILER_GNU) && (__GNUC__ >= 4)
#define FBXSDK_DLLIMPORT __attribute__((visibility("default")))
#define FBXSDK_DLLEXPORT __attribute__((visibility("default")))
#else
#define FBXSDK_DLLIMPORT
#define FBXSDK_DLLEXPORT
#endif
#else
#define FBXSDK_DLLIMPORT
#define FBXSDK_DLLEXPORT
#endif
#ifndef FBXSDK_DLL
#define FBXSDK_DLL FBXSDK_DLLIMPORT
#endif
#if defined(FBXSDK_COMPILER_MSC)
#pragma warning(disable : 4251) //'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
#if _MSC_VER >= 1300 // 7.1
#define FBX_DEPRECATED __declspec(deprecated)
#else
#define FBX_DEPRECATED
#endif
#elif defined(FBXSDK_COMPILER_GNU) || defined(FBXSDK_COMPILER_EMSCRIPTEN)
#define FBX_DEPRECATED __attribute__((deprecated))
#elif defined(FBXSDK_COMPILER_INTEL)
#if __INTEL_COMPILER >= 810
#define FBX_DEPRECATED __declspec(deprecated)
#else
#define FBX_DEPRECATED
#endif
#else
#error Unsupported compiler!
#endif
#ifdef FBXSDK_COMPILER_CLANG
#define FBX_UNUSED(p) _Pragma(FBX_STRINGIFY(unused(p)))
#else
#define FBX_UNUSED(p) (void)(p)
#endif
//---------------------------------------------------------------------------------------
//Platform Standardization
#ifndef NULL
#if defined(__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
#define NULL (__null)
#else
#if defined(__cplusplus)
#define NULL 0
#else
#define NULL ((void*)0)
#endif
#endif
#endif
#if !defined(_MAX_PATH)
#define _MAX_PATH 260
#endif
#if defined(FBXSDK_ENV_WIN)
#define snprintf _snprintf //for stdio.h platform compatibility
#endif
#if !defined(FBXSDK_COMPILER_MSC)
#ifndef strcmpi
#define strcmpi strcasecmp
#endif
#ifndef stricmp
#define stricmp strcasecmp
#endif
#ifndef strncmpi
#define strncmpi strncasecmp
#endif
#ifndef strnicmp
#define strnicmp strncasecmp
#endif
#endif
#endif /* _FBXSDK_CORE_ARCH_ARCH_H_ */

View File

@ -1,93 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
/** \file fbxdebug.h
* Debugging macros and functions.
*
* All macros and functions are removed in release builds. To enable asserts, a debug build is required as well
* as the environment variable "FBXSDK_ASSERT" set to 1 is also required. By default, assertions will pop-up
* a window. It is possible to disable the pop-up on the Windows platform by calling the following code:
* \code
* _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
* \endcode
*/
#ifndef _FBXSDK_CORE_ARCH_DEBUG_H_
#define _FBXSDK_CORE_ARCH_DEBUG_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** If this environment variable is set to 1, the FBX SDK will assert in debug builds */
#define FBXSDK_ASSERT_ENVSTR "FBXSDK_ASSERT"
/** The assertion procedure signature. If a different assertion procedure must be provided, it should have this signature.
* \param pFileName The file name where the assertion occurred.
* \param pFunctionName The function name where the assertion occurred.
* \param pLineNumber The line number in the file where the assertion occurred.
* \param pMessage The message to display when the assertion occurs. */
typedef void (*FbxAssertProc)(const char* pFileName, const char* pFunctionName, const unsigned int pLineNumber, const char* pMessage);
/** Change the procedure used when assertion occurs.
* \param pAssertProc The procedure to be called when assertions occurs. */
FBXSDK_DLL void FbxAssertSetProc(FbxAssertProc pAssertProc);
//! Change the procedure back to the default one.
FBXSDK_DLL void FbxAssertSetDefaultProc();
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
FBXSDK_DLL void _FbxAssert(const char* pFileName, const char* pFunctionName, const unsigned int pLineNumber, bool pFormat, const char* pMessage, ...);
FBXSDK_DLL void _FbxTrace(const char* pMessage, ...);
#ifdef _DEBUG
template <bool x> struct FbxStaticAssertType;
template<> struct FbxStaticAssertType<true> {enum{value=1};};
template<> struct FbxStaticAssertType<false> {enum{value=-1};};
#define FBX_ASSERT(Condition) {if(!(Condition)){_FbxAssert(__FILE__,__FUNCTION__,__LINE__,false,#Condition);}}
#define FBX_ASSERT_MSG(Condition, Message, ...) {if(!(Condition)){_FbxAssert(__FILE__,__FUNCTION__,__LINE__,true,Message,##__VA_ARGS__);}}
#define FBX_ASSERT_NOW(Message, ...) _FbxAssert(__FILE__,__FUNCTION__,__LINE__,true,Message,##__VA_ARGS__);
#define FBX_ASSERT_RETURN(Condition) {if(!(Condition)){FBX_ASSERT_NOW(#Condition); return;}}
#define FBX_ASSERT_RETURN_VALUE(Condition, Value) {if(!(Condition)){FBX_ASSERT_NOW(#Condition); return Value;}}
#define FBX_ASSERT_STATIC(Condition) typedef char FbxBuildBreakIfFalse[FbxStaticAssertType<(bool)(Condition)>::value];
#define FBX_TRACE(Message, ...) {_FbxTrace(Message,##__VA_ARGS__);}
#else
#define FBX_ASSERT(Condition) ((void)0)
#define FBX_ASSERT_MSG(Condition, Message, ...) ((void)0)
#define FBX_ASSERT_NOW(Message, ...) ((void)0)
#define FBX_ASSERT_RETURN(Condition) if(!(Condition)){return;}
#define FBX_ASSERT_RETURN_VALUE(Condition, Value) if(!(Condition)){return Value;}
#define FBX_ASSERT_STATIC(Condition)
#define FBX_TRACE(Message, ...) ((void)0)
#endif
template<typename T> struct FbxIncompatibleWithArray{ enum {value = 0}; };
#define FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE(T)\
struct FbxIncompatibleWithArray< T >{\
union {\
T t();\
} catcherr;\
enum {value = 1};}
#define FBXSDK_INCOMPATIBLE_WITH_ARRAY(T)\
template<> FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE(T)
#define FBXSDK_IS_INCOMPATIBLE_WITH_ARRAY(T) ((bool) FbxIncompatibleWithArray<T>::value)
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_ARCH_DEBUG_H_ */

View File

@ -1,511 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
/** \file fbxnew.h
* New operator override templates.
*
* Instead of overloading the operator new in the FBX SDK, we provide a set of templates
* that are used internally to create objects. This mechanic allows the FBX SDK to call
* a different memory allocator.
* \see FbxSetMallocHandler FbxSetCallocHandler FbxSetReallocHandler FbxSetFreeHandler FbxSetMSizeHandler
*/
#ifndef _FBXSDK_CORE_ARCH_NEW_H_
#define _FBXSDK_CORE_ARCH_NEW_H_
#include <fbxsdk/fbxsdk_def.h>
#include <new>
#if defined(FBXSDK_COMPILER_MSC)
#pragma warning(push)
#pragma warning(disable : 4345) //warning C4345: behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
#endif
#include <fbxsdk/fbxsdk_nsbegin.h>
//Type traits for primitive types
template<typename T> struct FbxSimpleType { enum {value = 0}; };
template<typename T> struct FbxSimpleType<T*> { enum {value = 1}; };
template<typename T> struct FbxSimpleType<const T> { enum {value = FbxSimpleType<T>::value}; };
template<typename T, size_t n> struct FbxSimpleType<T[n]> { enum {value = FbxSimpleType<T>::value}; };
#define FBXSDK_DEFINE_SIMPLE_TYPE(T) template<> struct FbxSimpleType<T>{ union {T t;} catcherr; enum {value = 1};}
FBXSDK_DEFINE_SIMPLE_TYPE(bool);
FBXSDK_DEFINE_SIMPLE_TYPE(char);
FBXSDK_DEFINE_SIMPLE_TYPE(unsigned char);
FBXSDK_DEFINE_SIMPLE_TYPE(short);
FBXSDK_DEFINE_SIMPLE_TYPE(unsigned short);
FBXSDK_DEFINE_SIMPLE_TYPE(int);
FBXSDK_DEFINE_SIMPLE_TYPE(unsigned int);
FBXSDK_DEFINE_SIMPLE_TYPE(long);
FBXSDK_DEFINE_SIMPLE_TYPE(unsigned long);
FBXSDK_DEFINE_SIMPLE_TYPE(float);
FBXSDK_DEFINE_SIMPLE_TYPE(double);
FBXSDK_DEFINE_SIMPLE_TYPE(long double);
FBXSDK_DEFINE_SIMPLE_TYPE(long long);
FBXSDK_DEFINE_SIMPLE_TYPE(unsigned long long);
#define FBXSDK_IS_SIMPLE_TYPE(T) ((bool)FbxSimpleType<T>::value)
template<typename T> T* FbxNew()
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T();
}
template<typename T, typename T1> T* FbxNew(T1& p1)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1);
}
template<typename T, typename T1> T* FbxNew(const T1& p1)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1);
}
template<typename T, typename T1, typename T2> T* FbxNew(T1& p1, T2& p2)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2);
}
template<typename T, typename T1, typename T2> T* FbxNew(T1& p1, const T2& p2)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2);
}
template<typename T, typename T1, typename T2> T* FbxNew(const T1& p1, T2& p2)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2);
}
template<typename T, typename T1, typename T2> T* FbxNew(const T1& p1, const T2& p2)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2);
}
template<typename T, typename T1, typename T2, typename T3> T* FbxNew(T1& p1, T2& p2, T3& p3)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3);
}
template<typename T, typename T1, typename T2, typename T3> T* FbxNew(T1& p1, T2& p2, const T3& p3)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3);
}
template<typename T, typename T1, typename T2, typename T3> T* FbxNew(T1& p1, const T2& p2, T3& p3)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3);
}
template<typename T, typename T1, typename T2, typename T3> T* FbxNew(T1& p1, const T2& p2, const T3& p3)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3);
}
template<typename T, typename T1, typename T2, typename T3> T* FbxNew(const T1& p1, T2& p2, T3& p3)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3);
}
template<typename T, typename T1, typename T2, typename T3> T* FbxNew(const T1& p1, T2& p2, const T3& p3)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3);
}
template<typename T, typename T1, typename T2, typename T3> T* FbxNew(const T1& p1, const T2& p2, T3& p3)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3);
}
template<typename T, typename T1, typename T2, typename T3> T* FbxNew(const T1& p1, const T2& p2, const T3& p3)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(T1& p1, T2& p2, T3& p3, T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(T1& p1, T2& p2, T3& p3, const T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(T1& p1, T2& p2, const T3& p3, T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(T1& p1, T2& p2, const T3& p3, const T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(T1& p1, const T2& p2, T3& p3, T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(T1& p1, const T2& p2, T3& p3, const T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(T1& p1, const T2& p2, const T3& p3, T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(T1& p1, const T2& p2, const T3& p3, const T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(const T1& p1, T2& p2, T3& p3, T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(const T1& p1, T2& p2, T3& p3, const T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(const T1& p1, T2& p2, const T3& p3, T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(const T1& p1, T2& p2, const T3& p3, const T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(const T1& p1, const T2& p2, T3& p3, T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(const T1& p1, const T2& p2, T3& p3, const T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(const T1& p1, const T2& p2, const T3& p3, T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4> T* FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1, p2, p3, p4);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(T1& p1, T2& p2, T3& p3, T4& p4, T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, T2& p2, T3& p3, T4& p4, T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, const T2& p2, T3& p3, T4& p4, T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, T2& p2, const T3& p3, T4& p4, T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, T2& p2, T3& p3, const T4& p4, T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, T2& p2, T3& p3, T4& p4, const T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, const T2& p2, const T3& p3, T4& p4, T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, const T2& p2, T3& p3, const T4& p4, T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, const T2& p2, T3& p3, T4& p4, const T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, const T2& p2, const T3& p3, T4& p4, const T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5> T* FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, const T5& p5)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> T* FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, const T5& p5, const T6& p6)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5,p6);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> T* FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, const T5& p5, const T6& p6, const T7& p7)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5,p6,p7);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> T* FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, const T5& p5, const T6& p6, const T7& p7, const T8& p8)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5,p6,p7,p8);
}
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> T* FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, const T5& p5, const T6& p6, const T7& p7, const T8& p8, const T9& p9)
{
T* p = (T*)FbxMalloc(sizeof(T));
return new(p)T(p1,p2,p3,p4,p5,p6,p7,p8,p9);
}
template<typename T> void FbxDelete(T* p)
{
if( p )
{
((T*)p)->~T();
FbxFree(p);
}
}
template<typename T> void FbxDelete(const T* p)
{
if( p )
{
((T*)p)->~T();
FbxFree(const_cast<T*>(p));
}
}
template<typename T> T* FbxNewArray(const int n)
{
size_t lSize = FbxAllocSize((size_t)n, sizeof(T));
if( FBXSDK_IS_SIMPLE_TYPE(T) )
{
return (T*)FbxMalloc(lSize);
}
else
{
void* pTmp = FbxMalloc(lSize + sizeof(int));
T* p = (T*)((int*)pTmp+1);
*((int*)pTmp) = n;
for( int i = 0; i < n; ++i )
{
new((T*)p+i)T; //in-place new, not allocating memory so it is safe.
}
return p;
}
}
template<typename T> void FbxDeleteArray(T* p)
{
if( p )
{
if( !FBXSDK_IS_SIMPLE_TYPE(T) )
{
for( int i = 0; i < ((int*)p)[-1]; ++i )
{
((T*)p)[i].~T();
}
FbxFree((int*)p-1);
}
else
{
FbxFree((void*)p);
}
}
}
#define FBXSDK_FRIEND_NEW()\
template<typename T>\
friend T* FBXSDK_NAMESPACE::FbxNew();\
template<typename T, typename T1>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1);\
template<typename T, typename T1>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1);\
template<typename T, typename T1, typename T2>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, T2& p2);\
template<typename T, typename T1, typename T2>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, const T2& p2);\
template<typename T, typename T1, typename T2>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2);\
template<typename T, typename T1, typename T2>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2);\
template<typename T, typename T1, typename T2, typename T3>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, T2& p2, T3& p3);\
template<typename T, typename T1, typename T2, typename T3>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, T2& p2, const T3& p3);\
template<typename T, typename T1, typename T2, typename T3>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, const T2& p2, T3& p3);\
template<typename T, typename T1, typename T2, typename T3>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, const T2& p2, const T3& p3);\
template<typename T, typename T1, typename T2, typename T3>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2, T3& p3);\
template<typename T, typename T1, typename T2, typename T3>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2, const T3& p3);\
template<typename T, typename T1, typename T2, typename T3>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, T3& p3);\
template<typename T, typename T1, typename T2, typename T3>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3);\
\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, T2& p2, T3& p3, T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, T2& p2, T3& p3, const T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, T2& p2, const T3& p3, T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, T2& p2, const T3& p3, const T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, const T2& p2, T3& p3, T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, const T2& p2, T3& p3, const T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, const T2& p2, const T3& p3, T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, const T2& p2, const T3& p3, const T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2, T3& p3, T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2, T3& p3, const T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2, const T3& p3, T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2, const T3& p3, const T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, T3& p3, T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, T3& p3, const T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3, T4& p4);\
template<typename T, typename T1, typename T2, typename T3, typename T4>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4);\
\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(T1& p1, T2& p2, T3& p3, T4& p4, T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2, T3& p3, T4& p4, T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, T3& p3, T4& p4, T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2, const T3& p3, T4& p4, T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2, T3& p3, const T4& p4, T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, T2& p2, T3& p3, T4& p4, const T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3, T4& p4, T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, T3& p3, const T4& p4, T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, T3& p3, T4& p4, const T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3, T4& p4, const T5& p5);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, const T5& p5);\
\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, const T5& p5, const T6& p6);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, const T5& p5, const T6& p6, const T7& p7);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, const T5& p5, const T6& p6, const T7& p7, const T8& p8);\
template<typename T, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>\
friend T* FBXSDK_NAMESPACE::FbxNew(const T1& p1, const T2& p2, const T3& p3, const T4& p4, const T5& p5, const T6& p6, const T7& p7, const T8& p8, const T9& p9);\
template<typename T>\
friend void FBXSDK_NAMESPACE::FbxDelete(T* p);\
template<typename T>\
friend void FBXSDK_NAMESPACE::FbxDelete(const T* p);\
template<typename T>\
friend T* FBXSDK_NAMESPACE::FbxNewArray(const int n);\
template<typename T>\
friend void FBXSDK_NAMESPACE::FbxDeleteArray(T* p);
#ifdef FBXSDK_COMPILER_MSC
#pragma warning(pop)
#endif
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_ARCH_NEW_H_ */

View File

@ -1,97 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
/** \file fbxstdcompliant.h
* Macros to properly support the CRT secure functions. */
#ifndef _FBXSDK_CORE_ARCH_STDCOMPLIANT_H_
#define _FBXSDK_CORE_ARCH_STDCOMPLIANT_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
#if defined(FBXSDK_ENV_WIN)
#define FBXSDK_printf printf_s
#define FBXSDK_fprintf fprintf_s
inline int FBXSDK_sprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsprintf_s(dst, dstsize, format, vl); va_end(vl); return ret; }
inline int FBXSDK_snprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsnprintf_s(dst, dstsize, _TRUNCATE, format, vl); va_end(vl); return ret; }
inline int FBXSDK_vsprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsprintf_s(dst, dstsize, format, vl); }
inline int FBXSDK_vsnprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsnprintf_s(dst, dstsize, _TRUNCATE, format, vl); }
#define FBXSDK_stricmp(dst, src) _stricmp(dst, src)
#define FBXSDK_strnicmp(dst, src, count) _strnicmp(dst, src, count)
#define FBXSDK_strcpy(dst, size, src) strcpy_s(dst, size, src)
#define FBXSDK_strncpy(dst, size, src, count) strncpy_s(dst, size, src, count)
#define FBXSDK_strcat(dst, size, src) strcat_s(dst, size, src)
#define FBXSDK_strtok(str, delim, ctx) strtok_s(str, delim, ctx)
#define FBXSDK_wcscpy(dst, size, src) wcscpy_s(dst, size, src)
#define FBXSDK_wcscat(dst, size, src) wcscat_s(dst, size, src)
#if !defined(FBXSDK_ENV_WINSTORE)
#define FBXSDK_getpid _getpid
#define FBXSDK_getcwd _getcwd
#else
inline int FBXSDK_getpid(){ return 0; }
inline char* FBXSDK_getcwd(char*,int){ return NULL; }
#endif
#define FBXSDK_localtime(ptm, time) { struct tm tms; ptm = &tms; localtime_s(ptm, time); }
#define FBXSDK_gmtime(ptm, time) { struct tm tms; ptm = &tms; gmtime_s(ptm, time); }
#define FBXSDK_fopen(fp, name, mode) fopen_s(&fp, name, mode)
#elif defined(FBXSDK_ENV_MAC) || defined(FBXSDK_ENV_LINUX)
#define FBXSDK_printf printf
#define FBXSDK_fprintf fprintf
inline int FBXSDK_sprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsprintf(dst, format, vl); va_end(vl); return ret; }
inline int FBXSDK_snprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsnprintf(dst, dstsize, format, vl); va_end(vl); return ret; }
inline int FBXSDK_vsprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsprintf(dst, format, vl); }
inline int FBXSDK_vsnprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsnprintf(dst, dstsize, format, vl); }
#define FBXSDK_stricmp(dst, src) stricmp(dst, src)
#define FBXSDK_strnicmp(dst, src, count) strnicmp(dst, src, count)
#define FBXSDK_strcpy(dst, size, src) strcpy(dst, src)
#define FBXSDK_strncpy(dst, size, src, count) strncpy(dst, src, count)
#define FBXSDK_strcat(dst, size, src) strcat(dst, src)
#define FBXSDK_strtok(str, delim, ctx) strtok(str, delim)
#define FBXSDK_wcscpy(dst, size, src) wcscpy(dst, src)
#define FBXSDK_wcscat(dst, size, src) wcscat_s(dst, src)
#define FBXSDK_getpid getpid
#define FBXSDK_getcwd getcwd
#define FBXSDK_localtime(tm, time) tm=localtime(time)
#define FBXSDK_gmtime(tm, time) tm=gmtime(time)
#define FBXSDK_fopen(fp, name, mode) fp=fopen(name, mode)
#else
#error Unsupported platform!
#endif
#define FBXSDK_strdup FbxStrDup
//The scanf family functions cannot easily be used in both secure and non-secure versions because
//Microsoft's secure version expects the size of the string/char* arguments following their address.
//On Unix machines the scanf family functions do not have this behavior and trying to use the same
//calls would result in compiler errors because the arguments would not match the format string.
//Using the following macros in the code will simply desable the warning at compile time.
#if defined(FBXSDK_COMPILER_MSC) && (_MSC_VER >= 1300)
#define FBXSDK_CRT_SECURE_NO_WARNING_BEGIN\
{\
__pragma(warning(push))\
__pragma(warning(disable : 4996))\
}
#define FBXSDK_CRT_SECURE_NO_WARNING_END\
{\
__pragma(warning(pop))\
}
#else
#define FBXSDK_CRT_SECURE_NO_WARNING_BEGIN
#define FBXSDK_CRT_SECURE_NO_WARNING_END
#endif
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_ARCH_STDCOMPLIANT_H_ */

View File

@ -1,264 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
/** \file fbxtypes.h
* Basic types definition.
*
* Standard basic types used across the FBX SDK. There is also platform independent
* definitions that guarantee size across operating systems. The FBXSDK_SYSTEM_IS_LP64
* define is set to 1 when the operating system defines the "long" C++ type as 64-bit.
*/
#ifndef _FBXSDK_CORE_ARCH_TYPES_H_
#define _FBXSDK_CORE_ARCH_TYPES_H_
#include <fbxsdk/core/arch/fbxarch.h>
//Note: On MacOSX and Linux 64-bit, long is defined as 64-bits while on Windows
//it is still a 32-bits for backward compatibility. We stick with Windows standard.
#if defined(FBXSDK_CPU_64) && !defined(FBXSDK_ENV_WIN)
#define FBXSDK_SYSTEM_IS_LP64 1
#endif
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxObject;
typedef bool FbxBool;
typedef signed char FbxChar;
typedef unsigned char FbxUChar;
typedef signed short FbxShort;
typedef unsigned short FbxUShort;
typedef signed int FbxInt;
typedef unsigned int FbxUInt;
typedef float FbxFloat;
typedef double FbxDouble;
typedef FbxBool* FbxBoolPtr;
typedef FbxChar* FbxCharPtr;
typedef FbxUChar* FbxUCharPtr;
typedef FbxShort* FbxShortPtr;
typedef FbxUShort* FbxUShortPtr;
typedef FbxInt* FbxIntPtr;
typedef FbxUInt* FbxUIntPtr;
typedef FbxFloat* FbxFloatPtr;
typedef FbxDouble* FbxDoublePtr;
typedef FbxInt FbxEnum;
typedef FbxObject* FbxReference;
//-------------------------------------------------------------------------------------
//Architecture independent defines (guarantee size)
#if defined(FBXSDK_COMPILER_MSC)
#define FBXSDK_LONGLONG(x) (x##i64)
#define FBXSDK_ULONGLONG(x) (x##Ui64)
typedef signed __int8 FbxInt8;
typedef unsigned __int8 FbxUInt8;
typedef signed __int16 FbxInt16;
typedef unsigned __int16 FbxUInt16;
typedef signed __int32 FbxInt32;
typedef unsigned __int32 FbxUInt32;
typedef signed __int64 FbxInt64;
typedef unsigned __int64 FbxUInt64;
#else
#define FBXSDK_LONGLONG(x) (x##LL)
#define FBXSDK_ULONGLONG(x) (x##ULL)
typedef signed char FbxInt8;
typedef unsigned char FbxUInt8;
typedef signed short FbxInt16;
typedef unsigned short FbxUInt16;
typedef signed int FbxInt32;
typedef unsigned int FbxUInt32;
typedef signed long long FbxInt64;
typedef unsigned long long FbxUInt64;
#endif
#ifdef FBXSDK_SYSTEM_IS_LP64
typedef signed int FbxLong;
typedef unsigned int FbxULong;
#else
typedef signed long FbxLong;
typedef unsigned long FbxULong;
#endif
typedef FbxInt64 FbxLongLong;
typedef FbxUInt64 FbxULongLong;
typedef FbxLong* FbxLongPtr;
typedef FbxULong* FbxULongPtr;
typedef FbxLongLong* FbxLongLongPtr;
typedef FbxULongLong* FbxULongLongPtr;
#if defined(FBXSDK_ENV_EMSCRIPTEN)
typedef FbxInt32 __int32_t;
typedef FbxUInt32 __uint32_t;
typedef FbxInt64 __int64_t;
typedef FbxUInt64 __uint64_t;
#endif
//-------------------------------------------------------------------------------------
//Minimum and Maximum values for types
#define FBXSDK_CHAR_MIN -128
#define FBXSDK_CHAR_MAX 127
#define FBXSDK_UCHAR_MIN 0
#define FBXSDK_UCHAR_MAX 255
#define FBXSDK_SHORT_MIN -32768
#define FBXSDK_SHORT_MAX 32767
#define FBXSDK_USHORT_MIN 0
#define FBXSDK_USHORT_MAX 65535
#define FBXSDK_INT_MIN 0x80000000
#define FBXSDK_INT_MAX 0x7fffffff
#define FBXSDK_UINT_MIN 0
#define FBXSDK_UINT_MAX 0xffffffff
#define FBXSDK_LONG_MIN FBXSDK_INT_MIN
#define FBXSDK_LONG_MAX FBXSDK_INT_MAX
#define FBXSDK_ULONG_MIN FBXSDK_UINT_MIN
#define FBXSDK_ULONG_MAX FBXSDK_UINT_MAX
#define FBXSDK_LONGLONG_MIN FBXSDK_LONGLONG(0x8000000000000000)
#define FBXSDK_LONGLONG_MAX FBXSDK_LONGLONG(0x7fffffffffffffff)
#define FBXSDK_ULONGLONG_MIN FBXSDK_ULONGLONG(0)
#define FBXSDK_ULONGLONG_MAX FBXSDK_ULONGLONG(0xffffffffffffffff)
#define FBXSDK_FLOAT_MIN FLT_MIN
#define FBXSDK_FLOAT_MAX FLT_MAX
#define FBXSDK_FLOAT_EPSILON FLT_EPSILON
#define FBXSDK_DOUBLE_MIN DBL_MIN
#define FBXSDK_DOUBLE_MAX DBL_MAX
#define FBXSDK_DOUBLE_EPSILON DBL_EPSILON
#define FBXSDK_TOLERANCE (1.0e-6)
//-------------------------------------------------------------------------------------
//Handle and atomic definition (size change depending of architecture)
#if defined(FBXSDK_CPU_32)
typedef FbxUInt32 FbxHandle;
#define FBXSDK_REF_MIN FBXSDK_UINT_MIN
#define FBXSDK_REF_MAX FBXSDK_UINT_MAX
typedef FbxLong FbxAtomic;
#define FBXSDK_ATOMIC_MIN FBXSDK_LONG_MIN
#define FBXSDK_ATOMIC_MAX FBXSDK_LONG_MAX
#elif defined(FBXSDK_CPU_64)
typedef FbxUInt64 FbxHandle;
#define FBXSDK_REF_MIN FBXSDK_ULONGLONG_MIN
#define FBXSDK_REF_MAX FBXSDK_ULONGLONG_MAX
typedef FbxInt64 FbxAtomic;
#define FBXSDK_ATOMIC_MIN FBXSDK_LONGLONG_MIN
#define FBXSDK_ATOMIC_MAX FBXSDK_LONGLONG_MAX
#else
#error Unsupported architecture!
#endif
//-------------------------------------------------------------------------------------
//Various utility functions for fbxsdk basic types
inline FbxChar FbxMin(const FbxChar){ return FBXSDK_CHAR_MIN; }
inline FbxUChar FbxMin(const FbxUChar){ return FBXSDK_UCHAR_MIN; }
inline FbxShort FbxMin(const FbxShort){ return FBXSDK_SHORT_MIN; }
inline FbxUShort FbxMin(const FbxUShort){ return FBXSDK_USHORT_MIN; }
inline FbxInt FbxMin(const FbxInt){ return FBXSDK_INT_MIN; }
inline FbxUInt FbxMin(const FbxUInt){ return FBXSDK_UINT_MIN; }
inline FbxLongLong FbxMin(const FbxLongLong){ return FBXSDK_LONGLONG_MIN; }
inline FbxULongLong FbxMin(const FbxULongLong){ return FBXSDK_ULONGLONG_MIN; }
inline FbxFloat FbxMin(const FbxFloat){ return FBXSDK_FLOAT_MIN; }
inline FbxDouble FbxMin(const FbxDouble){ return FBXSDK_DOUBLE_MIN; }
inline FbxChar FbxMax(const FbxChar){ return FBXSDK_CHAR_MAX; }
inline FbxUChar FbxMax(const FbxUChar){ return FBXSDK_UCHAR_MAX; }
inline FbxShort FbxMax(const FbxShort){ return FBXSDK_SHORT_MAX; }
inline FbxUShort FbxMax(const FbxUShort){ return FBXSDK_USHORT_MAX; }
inline FbxInt FbxMax(const FbxInt){ return FBXSDK_INT_MAX; }
inline FbxUInt FbxMax(const FbxUInt){ return FBXSDK_UINT_MAX; }
inline FbxLongLong FbxMax(const FbxLongLong){ return FBXSDK_LONGLONG_MAX; }
inline FbxULongLong FbxMax(const FbxULongLong){ return FBXSDK_ULONGLONG_MAX; }
inline FbxFloat FbxMax(const FbxFloat){ return FBXSDK_FLOAT_MAX; }
inline FbxDouble FbxMax(const FbxDouble){ return FBXSDK_DOUBLE_MAX; }
#ifndef FBXSDK_SYSTEM_IS_LP64
inline FbxLong FbxMin(const FbxLong){ return FBXSDK_LONG_MIN; }
inline FbxULong FbxMin(const FbxULong){ return FBXSDK_ULONG_MIN; }
inline FbxLong FbxMax(const FbxLong){ return FBXSDK_LONG_MAX; }
inline FbxULong FbxMax(const FbxULong){ return FBXSDK_ULONG_MAX; }
#endif
template<class T> inline T FbxMin(const T){};
template<class T> inline T FbxMax(const T){};
template<class T> inline T FbxMin(const T x, const T y){ return (x < y) ? x : y; }
template<class T> inline T FbxMax(const T x, const T y){ return (x > y) ? x : y; }
//-------------------------------------------------------------------------------------
//Vector Template Types
template<class T> class FBXSDK_DLL FbxVectorTemplate2
{
public:
inline FbxVectorTemplate2(){ *this = T(0); }
inline explicit FbxVectorTemplate2(T pValue){ *this = pValue; }
inline FbxVectorTemplate2(T pData0, T pData1){ mData[0] = pData0; mData[1] = pData1; }
inline ~FbxVectorTemplate2(){}
inline T& operator[](int pIndex){ return mData[pIndex]; }
inline const T& operator[](int pIndex) const { return mData[pIndex]; }
inline FbxVectorTemplate2<T>& operator=(const T& pValue){ mData[0] = pValue; mData[1] = pValue; return *this; }
inline FbxVectorTemplate2<T>& operator=(const FbxVectorTemplate2<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; return *this; }
inline bool operator==(const FbxVectorTemplate2<T>& pVector) const { return ((mData[0] == pVector.mData[0]) && (mData[1] == pVector.mData[1])); }
inline bool operator!=(const FbxVectorTemplate2<T>& pVector) const { return !operator==( pVector ); }
inline T* Buffer(){ return mData; }
inline const T* Buffer() const { return mData; }
T mData[2];
};
template<class T> class FBXSDK_DLL FbxVectorTemplate3
{
public:
inline FbxVectorTemplate3(){ *this = T(0); }
inline explicit FbxVectorTemplate3(T pValue){ *this = pValue; }
inline FbxVectorTemplate3(T pData0, T pData1, T pData2){ mData[0] = pData0; mData[1] = pData1; mData[2] = pData2; }
inline ~FbxVectorTemplate3(){}
inline T& operator[](int pIndex) { return mData[pIndex]; }
inline const T& operator[](int pIndex) const { return mData[pIndex]; }
inline operator FbxVectorTemplate2<T>& () const { return *((FbxVectorTemplate2<T>*)this); }
inline FbxVectorTemplate3<T>& operator=(T const &pValue){ mData[0] = pValue; mData[1] = pValue; mData[2] = pValue; return *this; }
inline FbxVectorTemplate3<T>& operator=(const FbxVectorTemplate2<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; return *this; }
inline FbxVectorTemplate3<T>& operator=(const FbxVectorTemplate3<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; mData[2] = pVector.mData[2]; return *this; }
inline bool operator==(const FbxVectorTemplate3<T>& pVector) const { return ((mData[0] == pVector.mData[0]) && (mData[1] == pVector.mData[1]) && (mData[2] == pVector.mData[2])); }
inline bool operator!=(const FbxVectorTemplate3<T>& pVector) const { return !operator==(pVector); }
inline T* Buffer(){ return mData; }
inline const T* Buffer() const { return mData; }
T mData[3];
};
template<class T> class FBXSDK_DLL FbxVectorTemplate4
{
public:
inline FbxVectorTemplate4(){ *this = T(0); }
inline explicit FbxVectorTemplate4(T pValue){ *this = pValue; }
inline FbxVectorTemplate4(T pData0, T pData1, T pData2, T pData3){ mData[0] = pData0; mData[1] = pData1; mData[2] = pData2; mData[3] = pData3; }
inline ~FbxVectorTemplate4(){}
inline T& operator[](int pIndex){ return mData[pIndex]; }
inline const T& operator[](int pIndex) const { return mData[pIndex]; }
inline operator FbxVectorTemplate3<T>& () const { return *((FbxVectorTemplate3<T>*)this); }
inline FbxVectorTemplate4<T>& operator=(const T& pValue){ mData[0] = pValue; mData[1] = pValue; mData[2] = pValue; mData[3] = pValue; return *this; }
inline FbxVectorTemplate4<T>& operator=(const FbxVectorTemplate3<T>& pValue){ mData[0] = pValue[0]; mData[1] = pValue[1]; mData[2] = pValue[2]; return *this; }
inline FbxVectorTemplate4<T>& operator=(const FbxVectorTemplate4<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; mData[2] = pVector.mData[2]; mData[3] = pVector.mData[3]; return *this; }
inline bool operator==(const FbxVectorTemplate4<T>& pVector) const { return ((mData[0] == pVector.mData[0]) && (mData[1] == pVector.mData[1]) && (mData[2] == pVector.mData[2]) && (mData[3] == pVector.mData[3])); }
inline bool operator!=(const FbxVectorTemplate4<T>& pVector) const { return !operator==( pVector ); }
inline T* Buffer(){ return mData; }
inline const T* Buffer() const { return mData; }
T mData[4];
};
typedef FbxVectorTemplate2<FbxDouble> FbxDouble2;
typedef FbxVectorTemplate3<FbxDouble> FbxDouble3;
typedef FbxVectorTemplate4<FbxDouble> FbxDouble4;
typedef FbxVectorTemplate4<FbxDouble4> FbxDouble4x4;
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_ARCH_TYPES_H_ */

View File

@ -1,489 +0,0 @@
/****************************************************************************************
Copyright (C) 2017 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxarray.h
#ifndef _FBXSDK_CORE_BASE_ARRAY_H_
#define _FBXSDK_CORE_BASE_ARRAY_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** Class for array of basic elements such as pointers and basic types. This class will not
* call constructor and destructor for elements, thus it is not suitable for object references.
* Memory allocations are always done in a single contiguous memory region. */
template <class T> class FbxArray
{
public:
//! Element compare function pointer definition
typedef int (*CompareFunc)(const void*, const void*);
//! Constructor.
FbxArray() : mSize(0), mCapacity(0), mArray(NULL){}
//! Reserve constructor.
FbxArray(const int pCapacity) : mSize(0), mCapacity(0), mArray(NULL){ if( pCapacity > 0 ) Reserve(pCapacity); }
//! Copy constructor.
FbxArray(const FbxArray& pArray) : mSize(0), mCapacity(0), mArray(NULL){ *this = pArray; }
/** Destructor.
* \remark The destructor for each element will not be called. */
~FbxArray(){ Clear(); }
/** Insert an element at the given position, growing the array if capacity is not sufficient.
* \param pIndex Position where to insert the element. Must be a positive value.
* \param pElement Element to insert in the array.
* \param pCompact If \c true and capacity is exceeded, grow capacity by one, otherwise double capacity (default).
* \return -1 if insert failed, otherwise the position of the inserted element in the array.
* \remark If the given index is greater than Size(), the element is appended at the end. Use compact mode only if you need to save memory. */
inline int InsertAt(const int pIndex, const T& pElement, bool pCompact=false)
{
FBX_ASSERT_RETURN_VALUE(pIndex >= 0, -1);
int lIndex = FbxMin(pIndex, mSize);
if( mSize >= mCapacity )
{
T lElement = pElement; //Copy element because we might move memory
int lNewCapacity = FbxMax(pCompact ? mCapacity + 1 : mCapacity * 2, 1); //We always double capacity when not compacting
T* lArray = Allocate(lNewCapacity);
FBX_ASSERT_RETURN_VALUE(lArray, -1);
mArray = lArray;
mCapacity = lNewCapacity;
return InsertAt(pIndex, lElement); //Insert copied element because reference might be moved
}
if( lIndex < mSize ) //Move elements to leave a space open to insert the new element
{
//If pElement is inside memmove range, copy element and insert copy instead
if( (&pElement >= &mArray[lIndex]) && (&pElement < &mArray[mSize]) )
{
T lElement = pElement;
return InsertAt(pIndex, lElement);
}
memmove(&mArray[lIndex + 1], &mArray[lIndex], (mSize - lIndex) * sizeof(T));
}
memcpy(&mArray[lIndex], &pElement, sizeof(T));
mSize++;
return lIndex;
}
/** Append an element at the end of the array, doubling the array if capacity is not sufficient.
* \param pElement Element to append to the array.
* \return -1 if add failed, otherwise the position of the added element in the array. */
inline int Add(const T& pElement)
{
return InsertAt(mSize, pElement);
}
/** Append an element at the end of array, if not already present, doubling the array if capacity is not sufficient.
* \param pElement Element to append to the array.
* \return -1 if add failed, otherwise the position of the added element in the array. */
inline int AddUnique(const T& pElement)
{
int lIndex = Find(pElement);
return ( lIndex == -1 ) ? Add(pElement) : lIndex;
}
/** Append an element at the end of the array, growing the array by one element if capacity is not sufficient.
* \param pElement Element to append to the array.
* \return -1 if add failed, otherwise the position of the added element in the array. */
inline int AddCompact(const T& pElement)
{
return InsertAt(mSize, pElement, true);
}
/** Retrieve the number of element contained in the array. To increase the capacity without increasing the size, please use Reserve().
* \return The number of element in the array.
* \remark The size of the array cannot exceed its capacity. */
inline int Size() const { return mSize; }
/** Retrieve the current allocated memory capacity of the array.
* \return The capacity of the array in number of element.
* \remark The capacity will always be greater or equal to its size. */
inline int Capacity() const { return mCapacity; }
/** Retrieve a reference of the element at given index position in the array.
* \param pIndex Position of element in the array.
* \return A reference to the element at the specified position in the array.
* \remark No error will be thrown if the index is out of bounds. */
inline T& operator[](const int pIndex) const
{
#ifdef _DEBUG
FBX_ASSERT_MSG(pIndex >= 0, "Index is out of range!");
if( pIndex >= mSize )
{
if( pIndex < mCapacity )
{
FBX_ASSERT_NOW("Index is out of range, but not outside of capacity! Call SetAt() to use reserved memory.");
}
else FBX_ASSERT_NOW("Index is out of range!");
}
#endif
return (T&)mArray[pIndex];
}
/** Retrieve a copy of the element at given index position in the array.
* \param pIndex Position of element in the array.
* \return The value of the element at the specified position in the array.
* \remark No error will be thrown if the index is out of bounds. */
inline T GetAt(const int pIndex) const
{
return operator[](pIndex);
}
/** Retrieve a copy of the first element.
* \return Copy of the first element.
* \remark The array should have at least one element and no error will be thrown if the array is empty. */
inline T GetFirst() const
{
return GetAt(0);
}
/** Retrieve a copy of the last element.
* \return Copy of the last element.
* \remark The array should have at least one element and no error will be thrown if the array is empty. */
inline T GetLast() const
{
return GetAt(mSize-1);
}
/** Find first matching element, from first to last.
* \param pElement The element to be compared to each of the elements.
* \param pStartIndex The position to start searching from.
* \return Position of first matching element or -1 if there is no matching element. */
inline int Find(const T& pElement, const int pStartIndex=0) const
{
FBX_ASSERT_RETURN_VALUE(pStartIndex >= 0, -1);
for( int i = pStartIndex; i < mSize; ++i )
{
if( operator[](i) == pElement ) return i;
}
return -1;
}
/** Find first matching element, from last to first.
* \param pElement The element to be compared to each of the elements.
* \param pStartIndex The position to start searching from.
* \return Position of first matching element or -1 if there is no matching element. */
inline int FindReverse(const T& pElement, const int pStartIndex=FBXSDK_INT_MAX) const
{
for( int i = FbxMin(pStartIndex, mSize-1); i >= 0; --i )
{
if( operator[](i) == pElement ) return i;
}
return -1;
}
/** Request for allocation of additional memory without inserting new elements. After the memory has been reserved, please use SetAt() to initialize elements.
* \param pCapacity The number of additional element memory allocation requested.
* \return \c true if the memory allocation succeeded or if the capacity is unchanged, \c false otherwise.
* \remark If the requested capacity is less than or equal to the current capacity, this call has no effect. In either case, Size() is unchanged. */
inline bool Reserve(const int pCapacity)
{
FBX_ASSERT_RETURN_VALUE(pCapacity > 0, false);
if( pCapacity > mCapacity )
{
T* lArray = Allocate(pCapacity);
FBX_ASSERT_RETURN_VALUE(lArray, false);
mArray = lArray;
mCapacity = pCapacity;
//Initialize new memory to zero
memset(&mArray[mSize], 0, (mCapacity - mSize) * sizeof(T));
}
return true;
}
/** Set the element at given position in the array.
* \param pIndex Position of element in the array.
* \param pElement The new element.
* \remark If the index is outside range, and outside capacity, this call has no effect. However, if index is
* within capacity range, element count is increased such that Size() will become pIndex + 1. */
inline void SetAt(const int pIndex, const T& pElement)
{
FBX_ASSERT_RETURN(pIndex >= 0 && pIndex < mCapacity);
if( pIndex >= mSize ) mSize = pIndex + 1;
if( mArray ) memcpy(&mArray[pIndex], &pElement, sizeof(T));
}
/** Set the value of the first element.
* \param pElement The new value of the last element.
* \remark The array should have at least one element and no error will be thrown if the array is empty. */
inline void SetFirst(const T& pElement)
{
SetAt(0, pElement);
}
/** Set the value of the last element.
* \param pElement The new value of the last element.
* \remark The array should have at least one element and no error will be thrown if the array is empty. */
inline void SetLast(const T& pElement)
{
SetAt(mSize-1, pElement);
}
/** Remove an element at the given position in the array.
* \param pIndex Position of the element to remove.
* \return Removed element.
* \remark No error will be thrown if the index is out of bounds. */
inline T RemoveAt(const int pIndex)
{
T lElement = GetAt(pIndex);
if( pIndex + 1 < mSize )
{
memmove(&mArray[pIndex], &mArray[pIndex + 1], (mSize - pIndex - 1) * sizeof(T));
}
mSize--;
return lElement;
}
/** Remove the first element in the array.
* \return Removed element.
* \remark The array should have at least one element and no error will be thrown if the array is empty. */
inline T RemoveFirst()
{
return RemoveAt(0);
}
/** Remove the last element in the array.
* \return Removed element.
* \remark The array should have at least one element and no error will be thrown if the array is empty. */
inline T RemoveLast()
{
return RemoveAt(mSize-1);
}
/** Remove first matching element in the array.
* \param pElement Element to be removed.
* \return \c true if a matching element is found and removed, \c false otherwise. */
inline bool RemoveIt(const T& pElement)
{
int Index = Find(pElement);
if( Index >= 0 )
{
RemoveAt(Index);
return true;
}
return false;
}
/** Remove a range of elements at the given position in the array.
* \param pIndex Begin position of the elements to remove.
* \param pCount The count of elements to remove.
* \return \c true if successful, otherwise \c false. */
inline void RemoveRange(const int pIndex, const int pCount)
{
FBX_ASSERT_RETURN(pIndex >= 0);
FBX_ASSERT_RETURN(pCount >= 0);
if( pIndex + pCount < mSize )
{
memmove(&mArray[pIndex], &mArray[pIndex + pCount], (mSize - pIndex - pCount) * sizeof(T));
}
mSize -= pCount;
}
/** Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed. Please use SetAt() to initialize any new elements.
* \param pSize The new count of elements to set the array to. Must be greater or equal to zero.
* \return \c true if the memory (re)allocation succeeded, \c false otherwise.
* \remark If the requested element count is less than or equal to the current count, elements are freed from memory. Otherwise, the array grows and elements are unchanged. */
inline bool Resize(const int pSize)
{
if( pSize == mSize && mSize == mCapacity ) return true;
if( pSize == 0 )
{
Clear();
return true;
}
FBX_ASSERT_RETURN_VALUE(pSize > 0, false);
if( pSize != mCapacity )
{
T* lArray = Allocate(pSize);
FBX_ASSERT_RETURN_VALUE(lArray, false);
mArray = lArray;
}
if( pSize > mCapacity ) //Initialize new memory to zero
{
memset(&mArray[mSize], 0, (pSize - mSize) * sizeof(T));
}
mSize = pSize;
mCapacity = pSize;
return true;
}
/** Increase size of array by the specified size.
* \param pSize The size to add to the array size.
* \return \c true if operation succeeded, \c false otherwise. */
inline bool Grow(const int pSize)
{
return Resize(mSize + pSize);
}
/** Reduce size of array by the specified size.
* \param pSize The size to remove from the array size.
* \return \c true if operation succeeded, \c false otherwise. */
inline bool Shrink(const int pSize)
{
return Resize(mSize - pSize);
}
/** Compact the array so that its capacity is the same as its size.
* \return \c true if operation succeeded, \c false otherwise. */
inline bool Compact()
{
return Resize(mSize);
}
/** Reset the number of element to zero and free the memory allocated.
* \remark This only free the memory allocated by the array, and doesn't call the destructor of each element. */
inline void Clear()
{
if( mArray != NULL )
{
mSize = 0;
mCapacity = 0;
FbxFree(mArray);
mArray = NULL;
}
}
/** Sort the array using the specified compare function pointer
* \param pCompareFunc The compare function to use to sort elements. */
inline void Sort(CompareFunc pCompareFunc)
{
qsort(mArray, mSize, sizeof(T), pCompareFunc);
}
//! Get pointer to internal array of elements.
inline T* GetArray() const { return mArray ? (T*)mArray : NULL; }
//! Cast operator.
inline operator T* (){ return mArray ? (T*)mArray : NULL; }
/** Append another array at the end of this array.
* \param pOther The other array to append to this array. */
inline void AddArray(const FbxArray<T>& pOther)
{
if( Grow(pOther.mSize) )
{
memcpy(&mArray[mSize - pOther.mSize], pOther.mArray, pOther.mSize * sizeof(T));
}
}
/** Append the elements of another array at the end of this array if they are not present.
* \param pOther Another array. */
inline void AddArrayNoDuplicate(const FbxArray<T>& pOther)
{
for( int i = 0, c = pOther.mSize; i < c; ++i )
{
AddUnique(pOther[i]);
}
}
/** Remove the elements of another array from this array is they are present.
* \param pOther Another array. */
inline void RemoveArray(const FbxArray<T>& pOther)
{
for( int i = 0, c = pOther.mSize; i < c; ++i )
{
RemoveIt(pOther[i]);
}
}
/** Operator to copy elements of an array.
* \return this array containing a copy of pOther elements. */
inline FbxArray<T>& operator=(const FbxArray<T>& pOther)
{
if( this != &pOther )
{
if( Resize(pOther.mSize) )
{
memcpy(mArray, pOther.mArray, pOther.mSize * sizeof(T));
}
}
return *this;
}
/** Operator to compare elements of an array.
* \return \c true if the two arrays are equal, otherwise \c false. */
inline bool operator==(const FbxArray<T>& pOther) const
{
if( this == &pOther ) return true;
if( mSize != pOther.mSize ) return false;
return memcmp(mArray, pOther.mArray, sizeof(T) * mSize) == 0;
}
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
inline int GetCount() const { return mSize; }
private:
inline T* Allocate(const int pCapacity)
{
return (T*)FbxRealloc(mArray, FbxAllocSize(pCapacity, sizeof(T)));
}
int mSize;
int mCapacity;
T* mArray;
#if defined(FBXSDK_COMPILER_MSC)
//Previously class FbxArray is for pointers. Somehow, it's used to store other types. Here's a compile-time checking for known incompatible classes.
//If it happens you find new incompatible ones, declare them with macro FBXSDK_INCOMPATIBLE_WITH_ARRAY. Also see file fbxstring.h.
FBX_ASSERT_STATIC(FBXSDK_IS_SIMPLE_TYPE(T) || __is_enum(T) || (__has_trivial_constructor(T)&&__has_trivial_destructor(T)) || !FBXSDK_IS_INCOMPATIBLE_WITH_ARRAY(T));
#endif
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
//! Call FbxFree on each element of the array, and then clear it.
template <class T> inline void FbxArrayFree(FbxArray<T>& pArray)
{
for( int i = 0, c = pArray.Size(); i < c; ++i )
{
FbxFree(pArray[i]);
}
pArray.Clear();
}
//! Call FbxDelete on each element of the array, and then clear it.
template <class T> inline void FbxArrayDelete(FbxArray<T>& pArray)
{
for( int i = 0, c = pArray.Size(); i < c; ++i )
{
FbxDelete(pArray[i]);
}
pArray.Clear();
}
//! Call Destroy on each element of the array, and then clear it.
template <class T> inline void FbxArrayDestroy(FbxArray<T>& pArray)
{
for( int i = 0, c = pArray.Size(); i < c; ++i )
{
(pArray[i])->Destroy();
}
pArray.Clear();
}
//! Make sure to break build if someone try to make FbxArray<FbxArray<T>>, which is not supported.
template <class T> FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE(FbxArray<T>);
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_ARRAY_H_ */

View File

@ -1,90 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxbitset.h
#ifndef _FBXSDK_CORE_BASE_BITSET_H_
#define _FBXSDK_CORE_BASE_BITSET_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** An automatic growing array of bit.
*
* The bit array will automatically grow when specifying bit indexes that are greater
* than the array size when calling SetBit or UnsetBit. Indexes can vary from 0 to
* FBXSDK_UINT_MAX-1. When an invalid index is returned from any functions, FBXSDK_UINT_MAX
* is returned. The bit array is not thread safe.
*/
class FBXSDK_DLL FbxBitSet
{
public:
/** Constructor.
* \param pInitialSize Initial bit array size in bit count (not in byte count!).
*/
FbxBitSet(const FbxUInt pInitialSize=0);
//! Destructor.
virtual ~FbxBitSet();
/** Set the bit at the specified bit index to true regardless of its current value.
* \param pBitIndex The bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
*/
void SetBit(const FbxUInt pBitIndex);
/** Set all the bits to the specified value regardless of their current value.
* \param pValue The boolean value to set to all bits.
*/
void SetAllBits(const bool pValue);
/** Set the bit at the specified bit index to false regardless of its current value.
* \param pBitIndex The bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
*/
void UnsetBit(const FbxUInt pBitIndex);
/** Get the bit boolean value at the specified bit index.
* \param pBitIndex The bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
* \return True if the bit is set, false otherwise.
*/
bool GetBit(const FbxUInt pBitIndex) const;
/** Get the bit index of the first bit that is currently set.
* \return The bit index of the first set bit, FBXSDK_UINT_MAX if none found.
*/
FbxUInt GetFirstSetBitIndex() const;
/** Get the bit index of the last bit that is currently set.
* \return The bit index of the last set bit, FBXSDK_UINT_MAX if none found.
*/
FbxUInt GetLastSetBitIndex() const;
/** Get the bit index of the next set bit after the specified bit index.
* \param pBitIndex The start bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
* \return The bit index of the next set bit, FBXSDK_UINT_MAX if none found.
*/
FbxUInt GetNextSetBitIndex(const FbxUInt pBitIndex) const;
/** Get the bit index of the previous set bit before the specified bit index.
* \param pBitIndex The start bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
* \return The bit index of the previous set bit, FBXSDK_UINT_MAX if none found.
*/
FbxUInt GetPreviousSetBitIndex(const FbxUInt pBitIndex) const;
private:
void Grow(const FbxUInt pNewSize);
void* mData;
FbxUInt mSize;
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_BITSET_H_ */

View File

@ -1,95 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxcharptrset.h
#ifndef _FBXSDK_CORE_BASE_CHARPTRSET_H_
#define _FBXSDK_CORE_BASE_CHARPTRSET_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** This class contains the data structure support for char pointer set.
*/
class FBXSDK_DLL FbxCharPtrSet
{
public:
/** Class constructor
* \param pItemPerBlock Number of item per block. Default is 20. */
FbxCharPtrSet(int pItemPerBlock=20);
//! Class destructor
~FbxCharPtrSet();
/** Add a new item.
* \param pReference char pointer reference to the item.
* \param pItem FbxHandle to the item. */
void Add(const char* pReference, FbxHandle pItem);
/** Removes an item.
* \param pReference char reference to the item.
* \return true if successful. */
bool Remove(const char* pReference);
/** Get an item's reference.
* \param pReference char reference to the item.
* \param PIndex index to the item.
* \return FbxHandle to the item, NULL if fails. */
FbxHandle Get(const char* pReference, int* PIndex=NULL);
/** Get an item's reference from index.
* \param pIndex index to the item.
* \return FbxHandle to the item, NULL if fails. */
FbxHandle& operator[](int pIndex);
/** Get an item's reference from index.
* \param pIndex index to the item.
* \param pReference char reference to the item.
* \return FbxHandle to the item, NULL if fails. */
FbxHandle GetFromIndex(int pIndex, const char** pReference=NULL);
/** Removes an item by index.
* \param pIndex index to the item. */
void RemoveFromIndex(int pIndex);
/** Get the number of item in the array.
* \return the number of element in the set. */
inline int GetCount() const { return mCharPtrSetCount; }
//! Sorts the array.
void Sort();
//! Clears the array.
void Clear();
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
struct CharPtrSet;
inline void SetCaseSensitive(bool pIsCaseSensitive){ mIsCaseSensitive = pIsCaseSensitive; }
private:
CharPtrSet* FindEqual(const char* pReference) const;
CharPtrSet* mCharPtrSetArray;
int mCharPtrSetCount;
int mBlockCount;
int mItemPerBlock;
bool mIsChanged;
bool mIsCaseSensitive;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_CHARPTRSET_H_ */

View File

@ -1,213 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxcontainerallocators.h
#ifndef _FBXSDK_CORE_BASE_CONTAINER_ALLOCATORS_H_
#define _FBXSDK_CORE_BASE_CONTAINER_ALLOCATORS_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** An allocator class for use as a template parameter to one of the
* container class (FbxMap, FbxSet, FbxDynamicArray...) must implement these.
*/
class FBXSDK_DLL FbxBaseAllocator
{
public:
/** The class constructor.
* \param pRecordSize the size of one record held by the container.
* \remarks The parameter pRecordSize is not necessarily the same
* size as of the value type, since the
* container may wrap the value into a private class.
*/
FbxBaseAllocator(const size_t pRecordSize) :
mRecordSize(pRecordSize)
{
}
/** This tells the allocator that we are about to call AllocateRecords
* one or many times to allocate pRecordCount records.
* \param pRecordCount
* \remarks This gives the allocator a chance to do whatever it deems necessary
* to optimize subsequent allocations, for example, by preallocating a
* sufficiently large pool of memory.
*/
void Reserve(const size_t /*pRecordCount*/)
{
// By default, ignore all preallocating requests.
}
/** Returns a pointer to a uninitialized continuous block of memory
* able to hold pRecordCount * pRecordSize bytes.
* \param pRecordCount
* \remarks pRecordSize was defined in the Constructor description, above.
*/
void* AllocateRecords(const size_t pRecordCount=1)
{
return FbxMalloc(FbxAllocSize(pRecordCount, mRecordSize));
}
/** Frees a block of memory returned by AllocateRecords.
* \param pRecord
*/
void FreeMemory(void* pRecord)
{
FbxFree(pRecord);
}
/** \return the size of each record allocated.
*/
size_t GetRecordSize() const
{
return mRecordSize;
}
private:
size_t mRecordSize;
};
/** This allocator only frees the allocated memory when it is deleted.
* This is a good allocator for building dictionaries, where we only
* add things to a container, but never remove them.
*/
class FbxHungryAllocator
{
public:
FbxHungryAllocator(size_t pRecordSize) :
mRecordSize(pRecordSize),
mRecordPoolSize(0),
mData(NULL)
{
}
FbxHungryAllocator(const FbxHungryAllocator& pOther) :
mRecordSize(pOther.mRecordSize),
mRecordPoolSize(pOther.mRecordPoolSize),
mData(NULL)
{
}
~FbxHungryAllocator()
{
MemoryBlock* lCurrent = mData;
MemoryBlock* lNext = lCurrent ? lCurrent->mNextBlock : 0;
while (lCurrent)
{
FbxDelete(lCurrent);
lCurrent = lNext;
lNext = lCurrent ? lCurrent->mNextBlock : 0;
}
}
void Reserve(const size_t pRecordCount)
{
MemoryBlock* lMem = FbxNew< MemoryBlock >(pRecordCount* mRecordSize);
lMem->mNextBlock = mData;
mData = lMem;
mRecordPoolSize += pRecordCount;
}
void* AllocateRecords(const size_t pRecordCount = 1)
{
MemoryBlock* lBlock = mData;
void* lRecord = NULL;
while( (lBlock != NULL) && ((lRecord = lBlock->GetChunk(pRecordCount * mRecordSize)) == NULL) )
{
lBlock = lBlock->mNextBlock;
}
if( lRecord == NULL )
{
size_t lNumRecordToAllocate = mRecordPoolSize / 8 == 0 ? 2 : mRecordPoolSize / 8;
if( lNumRecordToAllocate < pRecordCount )
{
lNumRecordToAllocate = pRecordCount;
}
Reserve(lNumRecordToAllocate);
lRecord = AllocateRecords(pRecordCount);
}
return lRecord;
}
void FreeMemory(void* /*pRecord*/)
{
// "Hungry": release memory only when the allocator is destroyed.
}
size_t GetRecordSize() const
{
return mRecordSize;
}
FbxHungryAllocator& operator=(const FbxHungryAllocator& pOther)
{
if( this != &pOther )
{
// The next call to AllocateRecords() may skip over currently reserved
// records if the size changes drastically, but otherwise GetChunk()
// is size-oblivious.
if( mRecordSize < pOther.mRecordSize )
{
mRecordPoolSize = 0;
}
mRecordSize = pOther.mRecordSize;
}
return(*this);
}
private:
class MemoryBlock
{
public:
MemoryBlock(size_t pSize) :
mNextBlock(NULL),
mData(NULL),
mFreeData(NULL),
mEnd(NULL)
{
mData = FbxMalloc(pSize);
mFreeData = mData;
mEnd = reinterpret_cast<char*>(mData) + pSize;
}
~MemoryBlock()
{
FbxFree(mData);
}
void* GetChunk(const size_t pSize)
{
if( reinterpret_cast<char*>(mFreeData) + pSize < mEnd )
{
void* lChunk = mFreeData;
mFreeData = reinterpret_cast<char*>(mFreeData) + pSize;
return lChunk;
}
return NULL;
}
MemoryBlock* mNextBlock;
void* mData;
void* mFreeData;
void* mEnd;
};
size_t mRecordSize;
size_t mRecordPoolSize;
MemoryBlock* mData;
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_CONTAINER_ALLOCATORS_H_ */

View File

@ -1,324 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxdynamicarray.h
#ifndef _FBXSDK_CORE_BASE_DYNAMICARRAY_H_
#define _FBXSDK_CORE_BASE_DYNAMICARRAY_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxcontainerallocators.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** Template class for dynamic array holding objects.
* \nosubgrouping
* \see FbxStaticArray
*/
template <typename Type, typename Allocator=FbxBaseAllocator> class FbxDynamicArray
{
public:
//! Default constructor.
FbxDynamicArray() :
mArray(NULL),
mCapacity(0),
mSize(0),
mAllocator(sizeof(Type))
{
}
/** Constructor.
* \param pInitialSize initial capacity of this array */
FbxDynamicArray(const size_t pInitialSize) :
mArray(NULL),
mCapacity(0),
mSize(0),
mAllocator(sizeof(Type))
{
Reserve(pInitialSize);
}
/** Copy constructor.
* \remarks The copy constructor of \c Type will be
* invoked in order to copy the value of elements to the
* new array.
*/
FbxDynamicArray(const FbxDynamicArray& pArray) :
mArray(NULL),
mCapacity(0),
mSize(0),
mAllocator(sizeof(Type))
{
Reserve(pArray.mCapacity);
CopyArray(mArray, pArray.mArray, pArray.mSize);
mSize = pArray.mSize;
}
//! Destructor.
~FbxDynamicArray()
{
for( size_t i = 0; i < mSize; ++i )
{
mArray[i].~Type();
}
mAllocator.FreeMemory(mArray);
}
//! Gets the current capacity of the array.
size_t Capacity() const
{
return mCapacity;
}
//! Gets the size of the array.
size_t Size() const
{
return mSize;
}
/** Assures that sufficient memory is allocated to hold n objects in the array, and increases the capacity if necessary.
* \param pCount Number of objects to reserve */
void Reserve(const size_t pCount)
{
if( pCount > mCapacity )
{
//We don't use mAllocator.PreAllocate, because we want our array to be continuous in memory.
Type* lNewArray = (Type*)mAllocator.AllocateRecords(pCount);
MoveArray(lNewArray, mArray, mSize);
mAllocator.FreeMemory(mArray);
mArray = lNewArray;
mCapacity = pCount;
}
}
/** Appends n objects at the end of the array.
* \param pItem object to append
* \param pNCopies number of copies to append */
void PushBack(const Type& pItem, const size_t pNCopies = 1)
{
if( mSize + pNCopies > mCapacity )
{
size_t lNewSize = mCapacity + mCapacity / 2; //grow by 50%
if( mSize + pNCopies > lNewSize )
{
lNewSize = mSize + pNCopies;
}
Reserve(lNewSize);
}
FBX_ASSERT(mSize + pNCopies <= mCapacity);
Fill(mArray + mSize, pItem, pNCopies);
mSize += pNCopies;
}
/** Inserts n objects at the specified position.
* \param pIndex position index
* \param pItem object to insert
* \param pNCopies number of copies to append */
void Insert(const size_t pIndex, const Type& pItem, const size_t pNCopies=1)
{
FBX_ASSERT(pIndex >= 0);
FBX_ASSERT(pIndex <= mSize);
Type lValue = pItem; // in case pItem is in array
if( pNCopies == 0 )
{
}
else if( pIndex >= mSize )
{
PushBack(pItem, pNCopies);
}
else if( mSize + pNCopies > mCapacity )
{
size_t lNewSize = mCapacity + mCapacity / 2; //not enough room, grow by 50%
if( mSize + pNCopies > lNewSize )
{
lNewSize = mSize + pNCopies;
}
Type* lNewArray = (Type*)mAllocator.AllocateRecords(lNewSize);
MoveArray(lNewArray, mArray, pIndex); // copy prefix
Fill(lNewArray + pIndex, pItem, pNCopies); // copy values
MoveArray(lNewArray + pIndex + pNCopies, mArray + pIndex, mSize - pIndex); // copy suffix
mAllocator.FreeMemory(mArray);
mArray = lNewArray;
mSize += pNCopies;
mCapacity = lNewSize;
}
else
{
// copy suffix backwards
MoveArrayBackwards(mArray + pIndex + pNCopies, mArray + pIndex, mSize - pIndex);
Fill(mArray + pIndex, pItem, pNCopies); // copy values
mSize += pNCopies;
}
}
/** Removes n objects at the end.
* \param pNElements number of objects to remove */
void PopBack(size_t pNElements=1)
{
FBX_ASSERT(pNElements <= mSize);
for( size_t i = mSize - pNElements; i < mSize; ++i )
{
mArray[i].~Type();
}
mSize -= pNElements;
}
/** Removes n objects at the specified position.
* \param pIndex position index
* \param pNElements number of objects to remove */
void Remove(const size_t pIndex, size_t pNElements=1)
{
FBX_ASSERT(pIndex >= 0);
FBX_ASSERT(pIndex <= mSize);
FBX_ASSERT(pIndex + pNElements <= mSize);
if( pIndex + pNElements >= mSize )
{
PopBack(pNElements);
}
else
{
for( size_t i = pIndex; i < pIndex + pNElements; ++i )
{
mArray[i].~Type();
}
MoveOverlappingArray(&mArray[pIndex], &mArray[pIndex + pNElements], mSize - pIndex - pNElements);
mSize -= pNElements;
}
}
/** Gets nth object in the array.
* \param pIndex position index */
Type& operator[](const size_t pIndex)
{
return mArray[pIndex];
}
/** Gets nth object in the array.
* \param pIndex position index */
const Type& operator[](const size_t pIndex) const
{
return mArray[pIndex];
}
/** Retrieve the first item in the array.
* \return The first item in the array. */
Type& First()
{
return operator[](0);
}
/** Retrieve the first item in the array.
* \return The first item in the array. */
const Type& First() const
{
return operator[](0);
}
/** Retrieve the last item in the array.
* \return The last item in the array. */
Type& Last()
{
return operator[](mSize-1);
}
/** Retrieve the last item in the array.
* \return The last item in the array. */
const Type& Last() const
{
return operator[](mSize-1);
}
/** Find first matching element, from first to last.
* \param pItem The item to try to find in the array.
* \param pStartIndex The index to start searching from.
* \return Index of the first matching item, otherwise returns -1 (equivalent of SIZE_MAX for size_t). */
size_t Find(const Type& pItem, const size_t pStartIndex=0) const
{
for( size_t i = pStartIndex; i < mSize; ++i )
{
if( operator[](i) == pItem ) return i;
}
return -1;
}
/** Assignment operator.
* \remarks The copy constructor of \c Type will be invoked in order to copy the value of elements to the new array. */
FbxDynamicArray& operator=(const FbxDynamicArray& pArray)
{
Reserve(pArray.mCapacity);
CopyArray(mArray, pArray.mArray, pArray.mSize);
mSize = pArray.mSize;
return *this;
}
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
static void CopyArray(Type* pDest, const Type* pSrc, size_t pCount)
{
for( int i = 0; i < int(pCount); i++ )
{
new(&(pDest[i])) Type(pSrc[i]); //in-place new won't allocate memory, so it is safe
}
}
static void MoveArray(Type* pDest, const Type* pSrc, size_t pCount)
{
for( int i = 0; i < int(pCount); i++ )
{
new(&(pDest[i])) Type(pSrc[i]); //in-place new won't allocate memory, so it is safe
}
for( int i = 0; i < int(pCount); i++ )
{
pSrc[i].~Type();
}
}
static void MoveOverlappingArray(Type* pDest, const Type* pSrc, size_t pCount)
{
for( int i = 0; i < int(pCount); i++ )
{
new(&(pDest[i])) Type(pSrc[i]); //in-place new won't allocate memory, so it is safe
pSrc[i].~Type();
}
}
static void MoveArrayBackwards(Type* pDest, const Type* pSrc, size_t pCount)
{
for( int i = 0; i < int(pCount); ++i )
{
new(&(pDest[pCount-1-i])) Type(pSrc[pCount-1-i]); //in-place new won't allocate memory, so it is safe
pSrc[pCount-1-i].~Type();
}
}
static void Fill(Type* pDest, const Type& pItem, size_t pCount)
{
for( int i = 0; i < int(pCount); i++ )
{
new(&(pDest[i])) Type(pItem); //in-place new won't allocate memory, so it is safe
}
}
Type* mArray;
size_t mCapacity;
size_t mSize;
Allocator mAllocator;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_DYNAMICARRAY_H_ */

View File

@ -1,257 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxfile.h
#ifndef _FBXSDK_CORE_BASE_FILE_H_
#define _FBXSDK_CORE_BASE_FILE_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxstring.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxStream;
/**
Class for interfacing with files, providing a similar interface for files independant of the OS or filesystem.
*/
class FBXSDK_DLL FbxFile
{
public:
enum EMode {eNone, eReadOnly, eReadWrite, eCreateWriteOnly, eCreateReadWrite, eCreateAppend};
enum ESeekPos {eBegin, eCurrent, eEnd};
FbxFile();
virtual ~FbxFile();
/** Opens a file on disk using the specified read/write mode.
* \param pFileName_UTF8 Filename in UTF8 (compatible with ASCII)
* \param pMode Mode in which to open the file, e.g. eReadOnly, eCreateReadWrite, etc.
* \param pBinary Whether the file is to be opened in binary or text mode.
* \return True if opening is successful.
*/
virtual bool Open(const char* pFileName_UTF8, const EMode pMode=eCreateReadWrite, const bool pBinary=true);
/** Opens a file from a data stream using the specified read/write mode.
* \param pStream Stream instance with which the file will be read/written
* \param pStreamData User-defined data to pass as a parameter to the stream's Open() method.
* \param pMode Deprecated/Unused.
* \return True if opening is successful.
*/
virtual bool Open(FbxStream* pStream, void* pStreamData, const char* pMode);
/** Closes a file, freeing its handle.
* \return True if closing is successful.
*/
virtual bool Close();
/** Seek to a specific position in the file, starting from either beginning, current position or end
* \param pOffset Offset to seek to (advance the file position cursor) starting from pSeekPos
* \param pSeekPos Starting position from which to seek to. Beginning, current position or end.
*/
virtual void Seek(const FbxInt64 pOffset, const ESeekPos pSeekPos=eBegin);
/** Returns the position at which the file cursor currently is. For example, will be ==0 for beginning and ==FileSize for end.
* \return The position at which the file cursor currently is.
*/
virtual FbxInt64 Tell() const;
/** Read a part of the file into a buffer
* \param pDstBuf Pre-allocated buffer in which to read data
* \param pSize Size of the data chunk to be read in bytes
* \return Number of bytes read.
*/
virtual size_t Read(void* pDstBuf, const size_t pSize);
/** Read a part of the file as a string into a buffer
* \param pDstBuf Pre-allocated buffer in which to read the string
* \param pDstSize Size of the data chunk to be read in characters
* \param pStopAtFirstWhiteSpace If true, will stop reading at first white space, otherwise it will stop at the first line feed (\n)
* \return Pointer on the data read. Equivalent to parameter pDstBuf
*/
virtual char* ReadString(char* pDstBuf, const size_t pDstSize, bool pStopAtFirstWhiteSpace=false);
/** Write a buffer to an opened file
* \param pSrcBuf Pre-allocated buffer from which to write data
* \param pSize Size of the data chunk to be written in bytes
* \return Number of bytes written.
*/
virtual size_t Write(const void* pSrcBuf, const size_t pSize);
/** Write a formatted string to an opened file
* \param pFormat Pre-allocated format buffer from which to write data
* \param ... Variable number of arguments describing the values in the previous parameter.
* \return True if data was successfully written
*/
virtual bool WriteFormat(const char* pFormat, ...);
/** Modify the size of a file. Null characters ('\0') are appended if the file is extended.
* If the file is truncated, all data from the end of the shortened file to the original length of the file is lost.
* Please note that this function considers the current file cursor as the beginning of the file.
* It is therefore required to use Seek(0) prior to calling it if we want the size specified by the
* pSize parameter to be absolute.
* \param pSize New desired file size
* \return True if file was successfully truncated
*/
virtual bool Truncate(const FbxInt64 pSize);
/** Checks whether the current file cursor position is at the end of file.
* \return True if the cursor is at the end of file, false otherwise.
*/
virtual bool EndOfFile() const;
/** Gets the size of the currently opened file.
* \return File size
*/
virtual FbxInt64 GetSize();
/** Unused function in this default implementation. Must be implemented by memory files.
* \param pMemPtr Unused
* \param pSize Unused
*/
virtual void GetMemoryFileInfo(void** pMemPtr, size_t pSize);
/** Checks whether the file is currently opened.
* \return True if file is opened, false otherwise
*/
bool IsOpen() const;
/** Checks whether the file is currently opened with a user-provided streaming interface instead of just the file name
* \return True if file has been opened with a stream interface, false otherwise
*/
bool IsStream() const;
/** Returns the full file path name, as provided when opening it.
* \return File full path
*/
const char* GetFilePathName() const;
/** Returns the mode with which the file was opened, when calling the Open() method.
* \return Mode with which the file was opened
*/
EMode GetFileMode() const;
/** Returns last encountered error when performing any operation on the file.
* \return Last error code
*/
int GetLastError();
/** Resets the current error code and the end of file indicator of the opened file
*/
void ClearError();
protected:
FILE* mFilePtr;
FbxStream* mStreamPtr;
bool mIsOpen;
bool mIsStream;
EMode mMode;
FbxString mFileName;
};
class FBXSDK_DLL FbxFileUtils
{
public:
/** Delete a file from disk.
* \param pFileName_UTF8 The file to be deleted.
* \return True if delete is successful.
*/
static bool Delete(const char* pFileName_UTF8);
/** Rename a file on disk.
* \param pFileName_UTF8 The file to be renamed.
* \param pNewName_UTF8 The new file name upon rename.
* \return True if rename is successful.
*/
static bool Rename(const char* pFileName_UTF8, const char* pNewName_UTF8);
/** Copy one file's content to another file (if the destination file not exist, it will be created).
* \param pDestination_UTF8 The destination file path
* \param pSource_UTF8 The source file path
* \return Return true if copy is successfully.
*/
static bool Copy(const char* pDestination_UTF8, const char* pSource_UTF8);
//! Get given file's size.
static FbxInt64 Size(const char* pFilePath_UTF8);
/** Find if the specified file exist.
* \param pFilePath_UTF8 The file path to test against.
* \return Returns true if the file exist.
*/
static bool Exist(const char* pFilePath_UTF8);
/** Find if the specified file is in read-only mode.
* \param pFilePath_UTF8 The file path to test against.
* \return Returns true if the file is in read-only mode.
*/
static bool IsReadOnly(const char* pFilePath_UTF8);
// We return a KLong that in fact is a cast of a time_t.
//! Get given file's last date.
static FbxLong GetLastDate(const char* pPath_UTF8);
//! Set the given file's last date as the given date.
static bool SetLastDate(const char* pPath_UTF8, FbxLong pTime);
/** Get some content of a file.
* \param pStr The content get from file.
* \param pSize The size of content.
* \param pStream The opened stream of file.
*/
static char* FGets(char* pStr, int pSize, FILE* pStream);
};
template<class T> inline const T FbxSwab(const T x)
{
switch( sizeof(x) )
{
case 2:
{
FbxUInt8 t[2];
t[0] = ((FbxUInt8*)&x)[1];
t[1] = ((FbxUInt8*)&x)[0];
return *(T*)&t;
}
case 4:
{
FbxUInt8 t[4];
t[0] = ((FbxUInt8*)&x)[3];
t[1] = ((FbxUInt8*)&x)[2];
t[2] = ((FbxUInt8*)&x)[1];
t[3] = ((FbxUInt8*)&x)[0];
return *(T*)&t;
}
case 8:
{
FbxUInt8 t[8];
t[0] = ((FbxUInt8*)&x)[7];
t[1] = ((FbxUInt8*)&x)[6];
t[2] = ((FbxUInt8*)&x)[5];
t[3] = ((FbxUInt8*)&x)[4];
t[4] = ((FbxUInt8*)&x)[3];
t[5] = ((FbxUInt8*)&x)[2];
t[6] = ((FbxUInt8*)&x)[1];
t[7] = ((FbxUInt8*)&x)[0];
return *(T*)&t;
}
default:
return x;
}
}
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_FILE_H_ */

View File

@ -1,80 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxfolder.h
#ifndef _FBXSDK_CORE_BASE_FOLDER_H_
#define _FBXSDK_CORE_BASE_FOLDER_H_
#include <fbxsdk/fbxsdk_def.h>
#ifndef FBXSDK_ENV_WINSTORE
#include <fbxsdk/core/base/fbxstring.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** Class for iterating into file system folders and the items contained. */
class FBXSDK_DLL FbxFolder
{
public:
//! The different entry type that can be found in folders.
enum EEntryType
{
eRegularEntry, //!< Regular entry, such as file.
eFolderEntry //!< Folder entry that potentially contain more files.
};
/** Open the specified folder for browsing its content.
* \param pFolderPath_UTF8 The folder path to open.
* \return True if the folder path was successfully open, false otherwise. */
bool Open(const char* pFolderPath_UTF8);
/** Get the next item in the folder.
* \return True if another item was found after the current one. */
bool Next();
/** Get the type of the current entry in the folder.
* \return The entry type. */
EEntryType GetEntryType() const;
/** Retrieve the name of the current entry in the folder.
* \return The name of the current entry. */
FbxString GetEntryName() const;
/** Retrieve the extension name of the current entry.
* \return The extension name of the current entry. */
char* GetEntryExtension() const;
/** Close the folder when done browsing its content. */
void Close();
/** Find out if the folder was successfully opened the last time Open was called.
* \return True if the folder is currently open. */
bool IsOpen() const;
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
FbxFolder();
~FbxFolder();
private:
struct FolderImpl;
FolderImpl* mImpl;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* !FBXSDK_ENV_WINSTORE */
#endif /* _FBXSDK_CORE_BASE_FOLDER_H_ */

View File

@ -1,411 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxhashmap.h
#ifndef _FBXSDK_CORE_BASE_HASHMAP_H_
#define _FBXSDK_CORE_BASE_HASHMAP_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxarray.h>
#include <fbxsdk/core/base/fbxmap.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
template<class T> class FbxNoOpDestruct { public: static inline void DoIt(T&) {} };
template<class T> class FbxPtrDestruct { public: static inline void DoIt(T& v) { FbxDelete(v); v = NULL; } };
//True if equal, false otherwise
template<class T> class FbxDefaultComparator{ public: static inline bool CompareIt( const T& t1, const T& t2 ) { return t1 == t2; } };
/** \brief This object represents a standard hash map. You must provide the typename of KEY and VALUE as well
as the typename of the class that contains the hash function to use to hash values. The hash class must
overload operator() and be built like this.
\code
class SimpleHash
{
public:
inline unsigned int operator() ( const int pKey ) const
{
return pKey;
}
};
\endcode
* \nosubgrouping
*/
template< typename KEY, typename VALUE, typename HASH, class Destruct = FbxNoOpDestruct<VALUE>, class Comparator = FbxDefaultComparator<KEY> >
class FbxHashMap
{
public:
typedef KEY KeyType;
typedef VALUE ValueType;
typedef HASH HashFunctorType;
private:
class ListItem
{
public:
ListItem* mNext;
ValueType mValue;
KeyType mKey;
ListItem()
:
mNext(NULL)
{
}
~ListItem()
{
Destruct::DoIt(mValue);
}
};
public:
/**
Iterate through every element in a hash map.
*/
class Iterator
{
public:
typedef ListItem ListItemType;
typedef FbxPair< KeyType, ValueType > KeyValuePair;
/**
Copy constructor
*/
Iterator( const Iterator& pOther )
:
mMap( pOther.mMap ),
mBucketIndex( pOther.mBucketIndex ),
mCurrentItem( pOther.mCurrentItem )
{
}
/**
Destructor
*/
~Iterator(){};
/**
Used to dereference an iterator and give it a behavior more similar to a pointer.
\return The KeyValuePair currently referenced by the iterator
*/
KeyValuePair operator*() const
{
KeyValuePair lItem;
if( mCurrentItem )
{
lItem.mFirst = mCurrentItem->mKey;
lItem.mSecond = mCurrentItem->mValue;
return lItem;
}
FBX_ASSERT_NOW("Accessing out of bounds iterator");
return lItem;
}
/**
Advances the iterator to the next keyvaluepair in the hashmap. It does not wrap around so
advancing after reaching the last element will not point back to the first one.
*/
void Next()
{
if( !mCurrentItem )
return;
if( mCurrentItem->mNext )
{
mCurrentItem = mCurrentItem->mNext;
return;
}
else
{
mBucketIndex++;
for( ; mBucketIndex < mMap->mBuckets.GetCount(); ++mBucketIndex )
{
if( mMap->mBuckets[ mBucketIndex ] )
{
mCurrentItem = mMap->mBuckets[ mBucketIndex ];
return;
}
}
if( mBucketIndex >= mMap->mBuckets.GetCount() )
{
*this = mMap->End();
return;
}
}
}
/**
Check equivalence between two iterators. There are 3 conditions for equivalence between 2 iterators:
1) Item being referenced by the iterator must be equivalent
2) They must point at the same index
3) They must point on the same map
\return true if both iterators are equal, false otherwise
*/
bool operator==( const Iterator& pOther ) const
{
return mCurrentItem == pOther.mCurrentItem &&
mBucketIndex == pOther.mBucketIndex &&
mMap == pOther.mMap;
}
/**
Check inequivalence between 2 iterators. Please see operator== for more information.
\return true if both iterators are NOT equal, false if they are
*/
bool operator!=( const Iterator& pOther ) const
{
return !(*this == pOther);
}
/**
Assign the current iterator to the one on the right hand side of the operator. After assignment they will
reference the same object, at the same index, in the same map.
\return The new iterator
*/
Iterator& operator=( const Iterator& pOther )
{
this->mBucketIndex = pOther.mBucketIndex;
this->mMap = pOther.mMap;
this->mCurrentItem = pOther.mCurrentItem;
return *this;
}
private:
const FbxHashMap* mMap;
int mBucketIndex;
ListItemType* mCurrentItem;
Iterator(const FbxHashMap* pMap, int pBucketIndex, ListItemType* pCurrentItem)
:
mMap( pMap ),
mBucketIndex(pBucketIndex),
mCurrentItem(pCurrentItem)
{
}
friend class FbxHashMap;
};
/**
Construct a FbxHashMap with an user-defined maximum number of elements.
\param pBucketSize Initial maximum number of elements.
*/
FbxHashMap( int pBucketSize )
{
mBuckets.Resize( pBucketSize );
}
/**
Construct a FbxHashMap with the default maximum number of elements (30)
*/
FbxHashMap()
{
mBuckets.Resize(30);
}
/**
Clear all elements in the hash map before destroying itself
*/
~FbxHashMap()
{
Clear();
mBuckets.Clear();
}
/**
Calls operator delete on all elements of the hashmap, de-allocating all memory and destroying them
*/
void Clear()
{
for( int i = 0; i < mBuckets.GetCount(); ++i)
{
if( mBuckets[i] )
{
ListItem* lNext = mBuckets[i]->mNext;
while( lNext )
{
ListItem* lNextNext = lNext->mNext;
FbxDelete(lNext);
lNext = lNextNext;
}
FbxDelete(mBuckets[i]);
mBuckets[i] = NULL;
}
}
}
/**
Find an element in the hashmap. If no element exist with the specified key, returns an iterator pointing on the
end of the map (not an actual KeyValuePair).
\param pKey The value of the key corresponding to the element
\return An Iterator referencing that element
*/
const Iterator Find( const KeyType& pKey ) const
{
unsigned int lIndex = mHashFunctor(pKey);
lIndex = lIndex % mBuckets.GetCount();
ListItem* lItem = mBuckets[lIndex];
while( lItem )
{
if( Comparator::CompareIt( lItem->mKey, pKey ) )
{
Iterator lIt( this, lIndex, lItem );
return lIt;
}
lItem = lItem->mNext;
}
return End();
}
/**
Remove an element in the hashmap.
\param pKey The key value of the element to remove
\return The value of the element that was just deleted. If the element does not exist, a value created with its default constructor will be returned
*/
VALUE Remove( const KEY& pKey )
{
unsigned int lIndex = mHashFunctor(pKey);
lIndex = lIndex % mBuckets.GetCount();
ListItem* lItem = mBuckets.GetAt(lIndex);
ListItem* lLastItem = NULL;
while( lItem )
{
if( lItem->mKey == pKey )
{
if( lLastItem )
lLastItem->mNext = lItem->mNext;
if( mBuckets.GetAt(lIndex) == lItem )
mBuckets.SetAt(lIndex, lItem->mNext );
VALUE lValue = lItem->mValue;
FbxDelete(lItem);
return lValue;
}
lLastItem = lItem;
lItem = lItem->mNext;
}
return VALUE();
}
/** Add or retrieve a KeyValuePair from the Hashmap. If there is already an entry in the map for an element
with key value specified in parameter, the value will be returned. Otherwise, a new entry will be created
with this key value and the default value for ValueType will be returned. It can be modified using the
assignment operator
\param pKey The key for which to retrieve/add a value.
\return Value of the element referenced by the key specified in parameter.
*/
ValueType& operator[]( const KeyType& pKey )
{
unsigned int lIndex = 0;
Iterator lIt = InternalFind( pKey, lIndex);
if( lIt != End() )
{
return lIt.mCurrentItem->mValue;
}
lIndex = lIndex % mBuckets.GetCount();
ListItem* lItem = FbxNew< ListItem >();
lItem->mNext = NULL;
lItem->mKey = pKey;
if( !mBuckets.GetAt(lIndex) )
{
mBuckets.SetAt(lIndex, lItem);
}
else
{
lItem->mNext = mBuckets.GetAt(lIndex);
mBuckets.SetAt(lIndex, lItem);
}
return lItem->mValue;
}
/** Returns an iterator pointing on the first non-null element in the map
\return An iterator pointing on the first non-null element in the map.
*/
Iterator Start() const
{
for( int i = 0; i < mBuckets.GetCount(); ++i )
{
if( mBuckets[i] )
{
Iterator lIt( this, i, mBuckets[i] );
return lIt;
}
}
return End();
}
/** Returns an iterator pointing on the last element in the map. This is not an actual KeyValuePair but
* but an iterator pointing on a null element.
\return Iterator pointing on a null value at the end of the map
*/
Iterator End() const
{
Iterator lIt( this, 0, NULL );
return lIt;
}
private:
// Avoid calculating the hashvalue twice
const Iterator InternalFind( const KeyType& pKey, unsigned int& pOutCalculatedIndex ) const
{
pOutCalculatedIndex = mHashFunctor(pKey);
unsigned int lIndex = pOutCalculatedIndex % mBuckets.GetCount();
ListItem* lItem = mBuckets[lIndex];
while( lItem )
{
if( Comparator::CompareIt( lItem->mKey, pKey ) )
{
Iterator lIt( this, lIndex, lItem );
return lIt;
}
lItem = lItem->mNext;
}
return End();
}
// not implemented yet!
FbxHashMap( const FbxHashMap& pOther ) {};
FbxArray<ListItem*> mBuckets;
HashFunctorType mHashFunctor;
friend class Iterator;
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_HASHMAP_H_ */

View File

@ -1,262 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxintrusivelist.h
#ifndef _FBXSDK_CORE_BASE_INTRUSIVE_LIST_H_
#define _FBXSDK_CORE_BASE_INTRUSIVE_LIST_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define FBXSDK_INTRUSIVE_LIST_NODE(Class, NodeCount)\
public: inline FbxListNode<Class>& GetListNode(int index = 0){ return this->mNode[index]; }\
private: FbxListNode<Class> mNode[NodeCount];
template <typename T> class FbxListNode
{
typedef FbxListNode<T> NodeT;
public:
explicit FbxListNode(T* pData = 0):mNext(0),mPrev(0),mData(pData){}
~FbxListNode(){ Disconnect(); }
void Disconnect()
{
if ( mPrev != 0 )
mPrev->mNext = mNext;
if ( mNext != 0 )
mNext->mPrev = mPrev;
mPrev = mNext = 0;
}
NodeT* mNext;
NodeT* mPrev;
T* mData;
};
//-----------------------------------------------------------------
// template arg T: Type listed
// arg NodeIndex: If an object listed has multiple list node, which
// index corresponds to the right node
template <typename T, int NodeIndex=0> class FbxIntrusiveList
{
public:
typedef T allocator_type;
typedef T value_type;
typedef T& reference;
typedef const T& const_reference;
typedef T* pointer;
typedef const T* const_pointer;
typedef FbxListNode<T> NodeT;
// Construction / Destruction
FbxIntrusiveList():mHead(0)
{
mHead.mNext = mHead.mPrev = &mHead;
}
~FbxIntrusiveList()
{
while(!Empty())
Begin().Get()->Disconnect(); // LINUXNote: should be Erase(Begin()); but there's an issue with gcc 4.2
};
// true if the list's size is 0.
bool Empty() const
{
return ((mHead.mNext==&mHead)&&(mHead.mPrev==&mHead));
}
// Back Insertion Sequence Inserts a new element at the end.
void PushBack(T& pElement)
{
NodeT* pNode = &pElement.GetListNode(NodeIndex);
pNode->mData = &pElement;
if (Empty())
{
pNode->mNext = &mHead;
pNode->mPrev = &mHead;
mHead.mNext = pNode;
mHead.mPrev = pNode;
}
else
{
pNode->mNext = &mHead;
pNode->mPrev = mHead.mPrev;
pNode->mPrev->mNext = pNode;
mHead.mPrev = pNode;
}
}
void PushFront(T& pElement)
{
NodeT* pNode = &pElement.GetListNode(NodeIndex);
pNode->mData = &pElement;
if (Empty())
{
pNode->mNext = &mHead;
pNode->mPrev = &mHead;
mHead.mNext = pNode;
mHead.mPrev = pNode;
}
else
{
pNode->mNext = mHead.mNext;
pNode->mPrev = &mHead;
pNode->mNext->mPrev = pNode;
mHead.mNext = pNode;
}
}
void PopFront()
{
iterator begin = Begin();
Erase(begin);
}
void PopBack()
{
Erase(--(End()));
}
public:
class IntrusiveListIterator
{
public:
explicit IntrusiveListIterator(NodeT* ptr=0):mPtr(ptr){}
// pre-increment
IntrusiveListIterator& operator++()
{
mPtr = mPtr->mNext;return (*this);
}
// post-increment
const IntrusiveListIterator operator++(int)
{
IntrusiveListIterator temp = *this;
++*this;
return (temp);
}
// pre-decrement
IntrusiveListIterator& operator--()
{
mPtr = mPtr->mPrev;return *this;
}
// post-decrement
const IntrusiveListIterator operator--(int)
{
IntrusiveListIterator temp = *this;
--*this;
return (temp);
}
IntrusiveListIterator& operator=(const IntrusiveListIterator &other){mPtr = other.mPtr; return *this;}
reference operator*() const { return *(mPtr->mData); }
pointer operator->() const { return (&**this); }
bool operator==(const IntrusiveListIterator& other)const{ return mPtr==other.mPtr; }
bool operator!=(const IntrusiveListIterator& other)const{ return !(*this == other); }
inline NodeT* Get()const { return mPtr; }
private:
NodeT* mPtr;
};
class IntrusiveListConstIterator
{
public:
explicit IntrusiveListConstIterator(const NodeT* ptr=0):mPtr(ptr){}
// pre-increment
IntrusiveListConstIterator& operator++()
{
mPtr = mPtr->mNext;return (*this);
}
// post-increment
const IntrusiveListConstIterator operator++(int)
{
IntrusiveListConstIterator temp = *this;
++*this;
return (temp);
}
// pre-decrement
IntrusiveListConstIterator& operator--()
{
mPtr = mPtr->mPrev;return *this;
}
// post-decrement
const IntrusiveListConstIterator operator--(int)
{
IntrusiveListConstIterator temp = *this;
--*this;
return (temp);
}
IntrusiveListConstIterator& operator=(const IntrusiveListConstIterator &other){mPtr = other.mPtr; return *this;}
const_reference operator*() const { return *(mPtr->mData); }
const_pointer operator->() const { return (&**this); }
bool operator==(const IntrusiveListConstIterator& other)const{ return mPtr==other.mPtr; }
bool operator!=(const IntrusiveListConstIterator& other)const{ return !(*this == other); }
inline const NodeT* Get()const { return mPtr; }
private:
mutable const NodeT* mPtr;
};
// --- Iterator definitions ---
typedef IntrusiveListIterator iterator;
typedef IntrusiveListConstIterator const_iterator;
// iterator support
inline iterator Begin() { return iterator(mHead.mNext); }
inline const_iterator Begin() const { return const_iterator(mHead.mNext); }
inline iterator End() { return iterator(&mHead); }
inline const_iterator End() const { return const_iterator(&mHead); }
// Because there is no real use, for the reverse iterators,
// they have not been implemented.
reference Front(){return (*Begin());}
const_reference Front() const { return (*Begin()); }
reference Back(){ return (*(--End())); }
const_reference Back() const{ return (*(--End())); }
iterator& Erase(iterator& it)
{
it.Get()->Disconnect();
return (++it);
}
private:
NodeT mHead;
// Not copyable
FbxIntrusiveList(const FbxIntrusiveList&);
FbxIntrusiveList& operator=(const FbxIntrusiveList& Right){return (*this);}
};
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_INTRUSIVE_LIST_H_ */

View File

@ -1,408 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxmap.h
#ifndef _FBXSDK_CORE_BASE_MAP_H_
#define _FBXSDK_CORE_BASE_MAP_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxstring.h>
#include <fbxsdk/core/base/fbxredblacktree.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxObject;
/** Default compare functor for FbxMap and FbxSet, which assumes operator < is defined.
Here is examples of different compare class implementations:
With Key = int
\code
class IntCompare
{
inline int operator()(int pKeyA, int pKeyB) const
{
return pKeyA < pKeyB ? -1 : (pKeyA > pKeyB ? 1 : 0);
}
};
\endcode
With Key = Class
\code
class ClassCompare
{
inline int operator()(const Class& pKeyA, const Class& pKeyB) const
{
return pKeyA < pKeyB ? -1 : (pKeyA > pKeyB ? 1 : 0);
}
};
\endcode
With Key = char*
\code
class StrCompare
{
inline int operator()(const char* pKeyA, const char* pKeyB) const
{
return strcmp(pKeyA, pKeyB);
}
};
\endcode
*/
template <typename Type> struct FbxLessCompare
{
inline int operator()(const Type& pLeft, const Type& pRight) const
{
return (pLeft < pRight) ? -1 : ((pRight < pLeft) ? 1 : 0);
}
};
/** This class implements an efficient map based on key comparison, which stores key-value pairs.
It executes insertion, deletion and query operations in O(log(n)) time. */
template <typename Key, typename Type, typename Compare=FbxLessCompare<Key>, typename Allocator=FbxBaseAllocator> class FbxMap
{
protected:
//! This class defines the key-value pairs used by the map.
class KeyValuePair : private FbxPair<const Key, Type>
{
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
typedef const Key KeyType;
typedef const Key ConstKeyType;
typedef Type ValueType;
typedef const Type ConstValueType;
KeyValuePair(const Key& pFirst, const Type& pSecond) : FbxPair<const Key, Type>(pFirst, pSecond){}
ConstKeyType& GetKey() const { return this->mFirst; }
KeyType& GetKey(){ return this->mFirst; }
ConstValueType& GetValue() const { return this->mSecond; }
ValueType& GetValue(){ return this->mSecond; }
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
//! Declaration of the storage type used by the map.
typedef FbxRedBlackTree<KeyValuePair, Compare, Allocator> StorageType;
public:
typedef Type ValueType;
typedef Key KeyType;
typedef typename StorageType::RecordType RecordType;
typedef typename StorageType::IteratorType Iterator;
typedef typename StorageType::ConstIteratorType ConstIterator;
/** Preallocate memory.
* \param pRecordCount The number of elements. */
inline void Reserve(unsigned int pRecordCount)
{
mTree.Reserve(pRecordCount);
}
//! Retrieve the number of key-value pairs it holds.
inline int GetSize() const
{
return mTree.GetSize();
}
/** Insert a key-value pair.
* \param pKey The key.
* \param pValue The value.
* \return If the key is already present in the map, returns the existing pair and false; else returns the pointer to the new key-value and true. */
inline FbxPair<RecordType*, bool> Insert(const KeyType& pKey, const ValueType& pValue)
{
return mTree.Insert(KeyValuePair(pKey, pValue));
}
/** Delete a key-value pair.
* \param pKey The key.
* \return \c true if success, \c false if key is not found. */
inline bool Remove(const KeyType& pKey)
{
return mTree.Remove(pKey);
}
//! Clear the map.
inline void Clear()
{
mTree.Clear();
}
//! Query whether the map is empty.
inline bool Empty() const
{
return mTree.Empty();
}
//! Retrieve the begin iterator of the map.
Iterator Begin()
{
return Iterator(Minimum());
}
//! Retrieve the end iterator of the map.
Iterator End()
{
return Iterator();
}
//! Retrieve the begin iterator of the map.
ConstIterator Begin() const
{
return ConstIterator(Minimum());
}
//! Retrieve the end iterator of the map.
ConstIterator End() const
{
return ConstIterator();
}
/** Query a key.
* \param pKey The key.
* \return A key-value pair if success, NULL if the key is not found. */
inline const RecordType* Find(const KeyType& pKey) const
{
return mTree.Find(pKey);
}
/** Query a key.
* \param pKey The key.
* \return A key-value pair if success, NULL if it's not found. */
inline RecordType* Find(const KeyType& pKey)
{
return mTree.Find(pKey);
}
/** Find the key-value pair with the smallest key greater than a specified key.
* \param pKey The key.
* \return The found key-value pair. */
inline const RecordType* UpperBound(const KeyType& pKey) const
{
return mTree.UpperBound(pKey);
}
/** Find the key-value pair with the smallest key greater than a specified key.
* \param pKey The key.
* \return The found key-value pair. */
inline RecordType* UpperBound(const KeyType& pKey)
{
return mTree.UpperBound(pKey);
}
/** Retrieve the reference of the value in the key-value pairs in map.
* \param pKey The key.
* \return The reference of the value.
* \remark If the key is not found, a new key-value pair will be inserted. */
inline ValueType& operator[](const KeyType& pKey)
{
RecordType* lRecord = Find(pKey);
if( !lRecord )
{
lRecord = Insert(pKey, ValueType()).mFirst;
}
return lRecord->GetValue();
}
//! Retrieve the key-value pair which is the minimum key in map.
inline const RecordType* Minimum() const
{
return mTree.Minimum();
}
//! Retrieve the key-value pair which is the minimum key in map.
inline RecordType* Minimum()
{
return mTree.Minimum();
}
//! Retrieve the key-value pair which is the maximum key in map.
inline const RecordType* Maximum() const
{
return mTree.Maximum();
}
//! Retrieve the key-value pair which is the maximum key in map.
inline RecordType* Maximum()
{
return mTree.Maximum();
}
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
inline FbxMap(){}
inline FbxMap(const FbxMap& pMap) : mTree(pMap.mTree){}
inline ~FbxMap(){ Clear(); }
private:
StorageType mTree;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
/** A simple map class representing a dictionary-like data structure.
* \nosubgrouping */
template <class Key, class Type, class Compare> class FbxSimpleMap
{
public:
typedef typename FbxMap<Key, Type, Compare>::RecordType* Iterator;
/** Add a key-value pair as an element.
* \param pKey The new key.
* \param pValue The new value. */
inline void Add(const Key& pKey, const Type& pValue)
{
mMap.Insert(pKey, pValue);
}
/** Find an element with a given key.
* \param pKey The given key.
* \return The iterator pointing to the found element or NULL if fails. */
inline Iterator Find(const Key& pKey) const
{
return (Iterator)mMap.Find(pKey);
}
/** Find an element with a given value.
* \param pValue The given value.
* \return The iterator pointing to the found element or NULL if fails. */
inline Iterator Find(const Type& pValue) const
{
Iterator lIterator = GetFirst();
while( lIterator )
{
if( lIterator->GetValue() == pValue )
{
return lIterator;
}
lIterator = GetNext(lIterator);
}
return 0;
}
/** Remove an element from the map.
* \param pIterator The given element. */
inline void Remove(Iterator pIterator)
{
if( pIterator ) mMap.Remove(pIterator->GetKey());
}
/** Get the first element.
* \return The the heading element. */
inline Iterator GetFirst() const
{
return (Iterator)mMap.Minimum();
}
/** Get the next element of a given element.
* \param pIterator The given element.
* \return The next element. */
inline Iterator GetNext(Iterator pIterator) const
{
return (Iterator)pIterator ? pIterator->Successor() : 0;
}
//! Remove all of the elements.
inline void Clear()
{
mMap.Clear();
}
/** Reserve the space for given number elements.
* \param pSize The given number. */
inline void Reserve(int pSize)
{
mMap.Reserve(pSize);
}
/** Query the count of elements in the map.
* \return The count of elements. */
inline int GetCount() const
{
return mMap.GetSize();
}
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
inline FbxSimpleMap(){}
private:
FbxMap<Key, Type, Compare> mMap;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
/** This class template declare a simple FbxObject map.
* \nosubgrouping */
template <class Type, class Compare> class FbxObjectMap : public FbxSimpleMap<Type, FbxObject*, Compare>
{
public:
//! Constructor
inline FbxObjectMap(){}
/** Get the object contained in an element.
* \param pIterator The given element.
* \return The object.
*/
inline FbxObject* Get(typename FbxSimpleMap<Type, FbxObject*, Compare>::Iterator pIterator)
{
return pIterator ? pIterator->GetValue() : 0;
}
};
/** A class that maps strings to objects with a basic string comparator.
* \nosubgrouping */
class FbxObjectStringMap : public FbxObjectMap<FbxString, FbxStringCompare>
{
public:
//! Constructor
inline FbxObjectStringMap(){}
};
//! Call FbxFree on each element of the map, and then clear it.
template <typename K, typename V, typename C, typename A> inline void FbxMapFree(FbxMap<K, V, C, A>& pMap)
{
for( typename FbxMap<K, V, C, A>::Iterator i = pMap.Begin(); i != pMap.End(); ++i )
{
FbxFree(i->GetValue());
}
pMap.Clear();
}
//! Call FbxDelete on each element of the map, and then clear it.
template <typename K, typename V, typename C, typename A> inline void FbxMapDelete(FbxMap<K, V, C, A>& pMap)
{
for( typename FbxMap<K, V, C, A>::Iterator i = pMap.Begin(); i != pMap.End(); ++i )
{
FbxDelete(i->GetValue());
}
pMap.Clear();
}
//! Call Destroy on each element of the map, and then clear it.
template <typename K, typename V, typename C, typename A> inline void FbxMapDestroy(FbxMap<K, V, C, A>& pMap)
{
for( typename FbxMap<K, V, C, A>::Iterator i = pMap.Begin(); i != pMap.End(); ++i )
{
i->GetValue()->Destroy();
}
pMap.Clear();
}
template class FbxSimpleMap<FbxString, FbxObject*, FbxStringCompare>;
template class FbxObjectMap<FbxString, FbxStringCompare>;
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_MAP_H_ */

View File

@ -1,67 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxmemorypool.h
#ifndef _FBXSDK_CORE_BASE_MEMORY_H_
#define _FBXSDK_CORE_BASE_MEMORY_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/sync/fbxatomic.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** \brief Class to create a simple fixed-size-blocks memory pool to allocate memory dynamically. */
class FBXSDK_DLL FbxMemoryPool
{
public:
/** Memory pool constructor.
* \param pBlockSize The size of one memory block.
* \param pBlockCount The count of block that should be pre-allocated.
* \param pResizable Whether memory pool can grow if no block are availalbe upon calling Allocate.
* \param pConcurrent Whether the pool supports concurrent allocation and release operations.
* \remark All memory blocks must be released before the memory pool is destroyed, otherwise a memory leak will occur. */
FbxMemoryPool(size_t pBlockSize, FbxInt64 pBlockCount=0, bool pResizable=true, bool pConcurrent=true);
/** Memory pool destructor. Upon destruction, all memory blocks of the pool will be de-allocated. */
~FbxMemoryPool();
/** Free memory of all memory blocks from this memory pool, also effectively resetting the block count to zero.
* \remark The block size and alignment/resize/concurrent support will remain unchanged. */
void Reset();
/** Allocate or lock a memory block for usage.
* \return An memory block pointer that can be NULL if the memory pool cannot grow in size and no blocks are available. */
void* Allocate();
/** Dispose or unlock a memory block.
* \param pMemBlock A pointer to the memory block to release. This will not free the block's memory, instead simply putting it back in the available stack. */
void Release(void* pMemBlock);
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
void* Pop();
FbxInt64 mMaxBlockCount;
FbxAtomic mFreeBlockCount;
void* mFreeBlocksStack;
size_t mBlockSize;
bool mResizable;
bool mSupportConcurrentAccess;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_MEMORY_H_ */

View File

@ -1,115 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxmultimap.h
#ifndef _FBXSDK_CORE_BASE_MULTIMAP_H_
#define _FBXSDK_CORE_BASE_MULTIMAP_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** Class to manipulate a map that can contain multiple times the same key.
* \nosubgrouping */
class FBXSDK_DLL FbxMultiMap
{
public:
struct Pair
{
FbxHandle mKey;
FbxHandle mItem;
};
/** If can't find the matching item,append a item at the end of the array.
* If find the matching item ,insert the new item before the matching item.
* \param pKey The value of Key in new item, also is the character for matching.
* \param pItem The value of Item in new item.
* \return If add successfully return true,otherwise return false.
*/
bool Add(FbxHandle pKey, FbxHandle pItem);
/** Remove the first matching item, whose reference is the same as given.
* \param pKey The given reference.
* \return If remove successfully return true,otherwise return false.
*/
bool Remove(FbxHandle pKey);
/** Remove all the matching item, whose item is the same as given.
* \param pItem The given item.
* \return If remove successfully return true,otherwise return false.
*/
bool RemoveItem(FbxHandle pItem);
/** Set first matching item with the given parameter.
* \param pKey The character for matching.
* \param pItem The value of Item that the matching item will be set.
* \return If set successfully return true,otherwise return false.
*/
bool SetItem(FbxHandle pKey, FbxHandle pItem);
/** Get first matching item with the given parameter.
* \param pKey The character for matching.
* \param pIndex The pointer to the index of the matching item.
* \return The value of Item in the matching item.
* \remarks If there are multiple elements that match the character, the index returned is unspecified.
*/
FbxHandle Get(FbxHandle pKey, int* pIndex=NULL);
//! Delete the array.
void Clear();
/** Get the item of the given index.
* \param pIndex The index for matching.
* \param pKey The pointer to the Key of the matching item.
* \return The value of Item in the matching item.
*/
FbxHandle GetFromIndex(int pIndex, FbxHandle* pKey=NULL);
/** Remove the item of the given index
* \param pIndex The given index.
* \return If remove successfully return true,otherwise return false.
*/
bool RemoveFromIndex(int pIndex);
/** Get number of items in the array.
* \return The number of items in the array. */
int GetCount() const { return mSetCount; }
/** Swap the value of Key and Item in every item of array, and sort the new array with the value of Key. */
void Swap();
/** Sort the array according the value of Key in each item. */
void Sort();
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
FbxMultiMap(int pItemPerBlock=20);
FbxMultiMap(const FbxMultiMap& pOther);
~FbxMultiMap();
FbxMultiMap& operator=(const FbxMultiMap&);
private:
Pair* FindEqual(FbxHandle pKey) const;
Pair* mSetArray;
int mSetCount;
int mBlockCount;
int mItemPerBlock;
bool mIsChanged;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_MULTIMAP_H_ */

View File

@ -1,62 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxpair.h
#ifndef _FBXSDK_CORE_BASE_PAIR_H_
#define _FBXSDK_CORE_BASE_PAIR_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** This class template holds a pair of objects.
* \nosubgrouping */
template <typename First, typename Second> class FbxPair
{
public:
//! Constructor.
inline FbxPair() : mFirst(), mSecond() {}
/** Constructor.
* \param pFirst The first object.
* \param pSecond The second object. */
inline FbxPair(const First& pFirst, const Second& pSecond) : mFirst(pFirst), mSecond(pSecond) {}
/** Assignment operator.
* \param pOther The pair to be copied. */
inline FbxPair<First, Second>& operator=(const FbxPair<First, Second>& pOther)
{
mFirst = pOther.mFirst;
mSecond = pOther.mSecond;
return *this;
}
/** Comparison operator.
* \param pOther The pair to be compared. */
inline bool operator==(const FbxPair<First, Second>& pOther)
{
return mFirst == pOther.mFirst && mSecond == pOther.mSecond;
}
/** Inverse comparison operator.
* \param pOther The pair to be compared. */
inline bool operator!=(const FbxPair<First, Second>& pOther)
{
return !operator==(pOther);
}
First mFirst; //!< The first object in the pair.
Second mSecond; //!< The second object in the pair.
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_PAIR_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,227 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxset.h
#ifndef _FBXSDK_CORE_BASE_SET_H_
#define _FBXSDK_CORE_BASE_SET_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxredblacktree.h>
#include <fbxsdk/core/base/fbxmap.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** This class implements an efficient set based on value comparison, which stores values.
* It executes insertion, deletion and query operations in O(log(n)) time. */
template <typename Type, typename Compare=FbxLessCompare<Type>, typename Allocator=FbxBaseAllocator> class FbxSet
{
protected:
//! This class defines the value type used by the set.
class Value
{
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
typedef const Type KeyType;
typedef const Type ConstKeyType;
typedef const Type ValueType;
typedef const Type ConstValueType;
inline Value(const Type& pValue) : mValue(pValue){}
inline KeyType& GetKey() const { return mValue; }
inline ConstKeyType& GetKey(){ return mValue; }
inline ValueType& GetValue() const { return mValue; }
inline ConstValueType& GetValue(){ return mValue; }
protected:
ValueType mValue;
private:
Value& operator=(const Value&);
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
//! Declaration of the storage type used by the set.
typedef FbxRedBlackTree<Value, Compare, Allocator> StorageType;
public:
typedef Type ValueType;
typedef typename StorageType::RecordType RecordType;
typedef typename StorageType::IteratorType Iterator;
typedef typename StorageType::ConstIteratorType ConstIterator;
/** Preallocate memory.
* \param pRecordCount The number of elements.
*/
inline void Reserve(unsigned int pRecordCount)
{
mTree.Reserve(pRecordCount);
}
//! Retrieve the number of values it holds.
inline int GetSize() const
{
return mTree.GetSize();
}
/** Insert a value.
* \param pValue The value.
* \return If the value is already present in the map, returns the existing value and false; else returns the pointer to the new value and true. */
inline FbxPair<RecordType*, bool> Insert(const ValueType& pValue)
{
return mTree.Insert(Value(pValue));
}
/** Delete a value.
* \param pValue The value.
* \return \c true if success, \c false if value is not found. */
inline int Remove(const ValueType& pValue)
{
return mTree.Remove(pValue);
}
//! Clear the set.
inline void Clear()
{
mTree.Clear();
}
//! Query whether the set is empty.
inline bool Empty() const
{
return mTree.Empty();
}
//! Retrieve the begin iterator of the set.
Iterator Begin()
{
return Iterator(Minimum());
}
//! Retrieve the end iterator of the set.
Iterator End()
{
return Iterator();
}
//! Retrieve the begin iterator of the set.
ConstIterator Begin() const
{
return ConstIterator(Minimum());
}
//! Retrieve the end iterator of the set.
ConstIterator End() const
{
return ConstIterator();
}
/** Find a given value in the set.
* \param pValue The value to find.
* \return The value in the set, or NULL if the value is not found in the set. */
inline const RecordType* Find(const ValueType& pValue) const
{
return mTree.Find(pValue);
}
/** Find a given value in the set.
* \param pValue The value to find.
* \return The value in the set, or NULL if the value is not found in the set. */
inline RecordType* Find(const ValueType& pValue)
{
return mTree.Find(pValue);
}
//! Retrieve the minimum value in the set.
inline const RecordType* Minimum() const
{
return mTree.Minimum();
}
//! Retrieve the minimum value in the set.
inline RecordType* Minimum()
{
return mTree.Minimum();
}
//! Retrieve the maximum value in the set.
inline const RecordType* Maximum() const
{
return mTree.Maximum();
}
//! Retrieve the maximum value in the set.
inline RecordType* Maximum()
{
return mTree.Maximum();
}
//! Equality operator.
inline bool operator==(const FbxSet<Type, Compare, Allocator>& pOther) const
{
return (this == &pOther) || (mTree == pOther.mTree);
}
//! Inequality operator.
inline bool operator != (const FbxSet<Type, Compare, Allocator>& pOther) const
{
return !(*this == pOther);
}
/** Intersect with another set.
* \param pOther The other set.
* \return The intersection set of the two sets. */
inline FbxSet Intersect(const FbxSet& pOther) const
{
FbxSet lReturn;
ConstIterator lBegin = Begin();
for (; lBegin != End(); ++lBegin)
{
if (pOther.Find(lBegin->GetValue()) != NULL)
lReturn.Insert(lBegin->GetValue());
}
return lReturn;
}
/** Unite with another set.
* \param pOther The other set.
* \return The union set of the two sets (no duplicated items). */
inline FbxSet Union(const FbxSet& pOther) const
{
FbxSet lReturn(*this);
ConstIterator lBegin = pOther.Begin();
for (; lBegin != End(); ++lBegin)
{
if (Find(lBegin->GetValue()) == NULL)
lReturn.Insert(lBegin->GetValue());
}
return lReturn;
}
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
inline FbxSet(){}
inline FbxSet(const FbxSet& pSet) : mTree(pSet.mTree){}
inline ~FbxSet(){ Clear(); }
private:
StorageType mTree;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_SET_H_ */

View File

@ -1,120 +0,0 @@
/****************************************************************************************
Copyright (C) 2016 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxstatus.h
#ifndef _FBXSDK_CORE_BASE_STATUS_H_
#define _FBXSDK_CORE_BASE_STATUS_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxstring.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** This class facilitates the testing/reporting of errors. It encapsulates the
* status code and the internal FBXSDK error code as returned by the API functions.
* \nosubgrouping
*/
class FBXSDK_DLL FbxStatus
{
public:
//! Available status codes.
enum EStatusCode {
eSuccess = 0, //!< Operation was successful
eFailure, //!< Operation failed
eInsufficientMemory, //!< Operation failed due to insufficient memory
eInvalidParameter, //!< An invalid parameter was provided
eIndexOutOfRange, //!< Index value outside the valid range
ePasswordError, //!< Operation on FBX file password failed
eInvalidFileVersion, //!< File version not supported (anymore or yet)
eInvalidFile, //!< Operation on the file access failed
eSceneCheckFail //!< Scene validation failure
};
//! Default constructor.
FbxStatus();
FbxStatus(EStatusCode pCode);
FbxStatus(const FbxStatus& rhs);
FbxStatus& operator=(const FbxStatus& rhs);
/** Equivalence operator.
* \param rhs Status object to compare.
* \return \c True if all the members of \e rhs are equal to this instance members and \c False otherwise.
*/
bool operator==(const FbxStatus& rhs) const { return (mCode == rhs.mCode); }
/** Equivalence operator.
* \param pCode Status code to compare.
* \return \c True if the code member of this instance equals \e pCode and \c False otherwise.
*/
bool operator==(const EStatusCode pCode) const { return (mCode == pCode); }
/** Non-Equivalence operator.
* \param rhs Status object to compare.
* \return \c True if at least one member of \e rhs is not equal to this instance member and \c True otherwise.
*/
bool operator!=(const FbxStatus& rhs) const { return (mCode != rhs.mCode); }
/** Non-Equivalence operator.
* \param rhs Status code to compare.
* \return \c True if the code member of this instance equals \e rhs and \c False otherwise.
*/
bool operator!=(const EStatusCode rhs) const { return (mCode != rhs); }
/** The conversion operator that converts a FbxStatus object to bool.
* The result it returns will be \c True if the FbxStatus does not contain
* an error, and \c False if it does.
*/
operator bool() const { return mCode==eSuccess; }
/** Determines whether there is an error.
* \return \c True if an error occured and \c False if the operation was sucessful.
*/
bool Error() const { return !this->operator bool(); }
//! Clear error code and message from the instance. After this call, it will behave as if it contained eSuccess.
void Clear();
//! Retrieve the type of error that occurred, as specified in the enumeration.
EStatusCode GetCode() const { return mCode; }
/** Change the current code of the instance.
* \param rhs New code value.
*/
void SetCode(const EStatusCode rhs);
/** Change the current code of the instance.
* \param rhs New code value.
* \param pErrorMsg Optional error description string. This string can have formatting characters
* The function will use the vsnprintf function to assemble the final string
* using an internal buffer of 4096 characters.
*/
void SetCode(const EStatusCode rhs, const char* pErrorMsg, ...);
//! Get the error message string corresponding to the current code.
const char* GetErrorString() const;
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
EStatusCode mCode;
FbxString mErrorString;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS */
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_STATUS_H_ */

View File

@ -1,505 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxstring.h
#ifndef _FBXSDK_CORE_BASE_STRING_H_
#define _FBXSDK_CORE_BASE_STRING_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** Convert string from UTF8 to wide-char
* \param pInUTF8 Input string
* \param pOutWideChar output string
* \param pOutWideCharSize size of the allocated output string buffer
* \remark Output buffer should be release by caller */
FBXSDK_DLL void FbxUTF8ToWC(const char* pInUTF8, wchar_t*& pOutWideChar, size_t* pOutWideCharSize=NULL);
/** Convert string from wide-char to UTF8
* \param pInWideChar input string
* \param pOutUTF8 output string
* \param pOutUTF8Size size of the allocated output string buffer
* \remark Output buffer should be release by caller */
FBXSDK_DLL void FbxWCToUTF8(const wchar_t* pInWideChar, char*& pOutUTF8, size_t* pOutUTF8Size=NULL);
#if defined(FBXSDK_ENV_WIN)
/** Convert string from wide-char to ANSI
* \param pInWideChar input string
* \param pOutANSI output string
* \param pOutANSISize size of the allocated output string buffer
* \remark Output buffer should be release by caller */
FBXSDK_DLL void FbxWCToAnsi(const wchar_t* pInWideChar, char*& pOutANSI, size_t* pOutANSISize=NULL);
/** Convert string from ANSI to wide-char
* \param pInANSI input string
* \param pOutWideChar output string
* \param pOutWideCharSize size of the allocated output string buffer
* \remark Output buffer should be release by caller */
FBXSDK_DLL void FbxAnsiToWC(const char* pInANSI, wchar_t*& pOutWideChar, size_t* pOutWideCharSize=NULL);
/** Convert string from ANSI to UTF8
* \param pInANSI input string
* \param outUTF8 output string
* \param pOutUTF8Size size of the allocated output string buffer
* \remark Output buffer should be release by caller */
FBXSDK_DLL void FbxAnsiToUTF8(const char* pInANSI, char*& pOutUTF8, size_t* pOutUTF8Size=NULL);
/** Convert string from UTF8 to ANSI
* \param pInUTF8 input string
* \param pOutANSI output string
* \param pOutANSISize size of the allocated output string buffer
* \remark Output buffer should be release by caller */
FBXSDK_DLL void FbxUTF8ToAnsi(const char* pInUTF8, char*& pOutANSI, size_t* pOutANSISize=NULL);
#endif
/** Utility class to manipulate strings.
* \nosubgrouping */
class FBXSDK_DLL FbxString
{
public:
/**
* \name Constructors and Destructor
*/
//@{
//! Default constructor.
FbxString();
/** Copy constructor.
* \param pString The FbxString to be copied. */
FbxString(const FbxString& pString);
/** String constructor.
* \param pString The string used to construct FbxString. */
FbxString(const char* pString);
/** Character constructor.
* \param pChar The character used to construct FbxString.
* \param pNbRepeat The number of times to repeat the character. Default value is 1 */
FbxString(char pChar, size_t pNbRepeat=1);
/** String constructor with maximum length.
* \param pCharPtr The string used to construct FbxString.
* \param pLength Maximum length. */
FbxString(const char* pCharPtr, size_t pLength);
/** Integer constructor.
* \param pValue The int value used to construct FbxString. */
FbxString(const int pValue);
/** Float constructor.
* \param pValue The float value used to construct FbxString. */
FbxString(const float pValue);
/** Double constructor.
* \param pValue The double value used to construct FbxString. */
FbxString(const double pValue);
//! Destructor.
~FbxString();
//@}
/**
* \name Buffer Access and Validation
*/
//@{
//! Get string length like "C" strlen().
size_t GetLen() const;
//! Get string length like "C" strlen().
size_t Size() const;
//! Return \c true if string length equal zero.
bool IsEmpty() const;
//! Discard the content of the string.
FbxString& Clear();
/** Access by reference.
* \param pIndex The index.
* \return The reference of the char at pIndex. */
char& operator[](int pIndex);
/** Access by copy.
* \param pIndex The index.
* \return The char at pIndex. */
char operator[](int pIndex) const;
//! Non-const buffer access.
char* Buffer();
//! Const buffer access.
const char* Buffer()const;
//@}
/**
* \name String Operations
*/
//@{
/** FbxString assignment operator.
* \param pString The FbxString to be assigned. */
const FbxString& operator=(const FbxString& pString);
/** Character assignment operator.
* \param pChar The character to be assigned. */
const FbxString& operator=(char pChar);
/** String assignment operator.
* \param pString The string to be assigned. */
const FbxString& operator=(const char* pString);
/** Int assignment operator.
* \param pValue The int value to be assigned. */
const FbxString& operator=(int pValue);
/** Float assignment operator.
* \param pValue The float value to be assigned. */
const FbxString& operator=(float pValue);
/** Double assignment operator.
* \param pValue The double value to be assigned. */
const FbxString& operator=(double pValue);
/** FbxString append.
* \param pString The FbxString to be appended. */
const FbxString& operator+=(const FbxString& pString);
/** Character append.
* \param pChar The character to be appended. */
const FbxString& operator+=(char pChar);
/** String append.
* \param pString The string to be appended. */
const FbxString& operator+=(const char* pString);
/** Integer append.
* \param pValue The int value to be appended. */
const FbxString& operator+=(int pValue);
/** Float append.
* \param pValue The float value to be appended. */
const FbxString& operator+=(float pValue);
/** Double append.
* \param pValue The double value to be appended. */
const FbxString& operator+=(double pValue);
/** Equality operator.
* \param pString The FbxString to be compared. */
bool operator== (const FbxString& pString) const;
/** Inequality operator.
* \param pString The FbxString to be compared. */
bool operator!= (const FbxString& pString) const;
/** Inferior to operator.
* \param pString The FbxString to be compared. */
bool operator< (const FbxString& pString) const;
/** Inferior or equal to operator.
* \param pString The FbxString to be compared. */
bool operator<= (const FbxString& pString) const;
/** Superior or equal to operator.
* \param pString The FbxString to be compared. */
bool operator>= (const FbxString& pString) const;
/** Superior to operator.
* \param pString The FbxString to be compared. */
bool operator> (const FbxString& pString) const;
/** Equality operator.
* \param pString The string to be compared. */
bool operator== (const char* pString) const;
/** Inequality operator.
* \param pString The string to be compared. */
bool operator!= (const char* pString) const;
/** Inferior to operator.
* \param pString The string to be compared. */
bool operator< (const char* pString) const;
/** Inferior or equal to operator.
* \param pString The string to be compared. */
bool operator<= (const char* pString) const;
/** Superior or equal to operator.
* \param pString The string to be compared. */
bool operator>= (const char* pString) const;
/** Superior to operator.
* \param pString The string to be compared. */
bool operator> (const char* pString) const;
/** FbxString concatenation.
* \param pString1 FbxString 1 to be concatenated to FbxString 2.
* \param pString2 FbxString 2 to be concatenated to FbxString 1 */
friend FBXSDK_DLL FbxString operator+(const FbxString& pString1, const FbxString& pString2);
/** Character concatenation.
* \param pString FbxString to be concatenated to Character.
* \param pChar Character to be concatenated to FbxString */
friend FBXSDK_DLL FbxString operator+(const FbxString& pString, char pChar);
/** Character concatenation.
* \param pChar Character to be concatenated to FbxString
* \param pString FbxString to be concatenated to Character. */
friend FBXSDK_DLL FbxString operator+(char pChar, const FbxString& pString);
/** String concatenation.
* \param pString1 FbxString to be concatenated to String.
* \param pString2 String to be concatenated to FbxString */
friend FBXSDK_DLL FbxString operator+(const FbxString& pString1, const char* pString2);
/** String concatenation.
* \param pString1 String to be concatenated to FbxString
* \param pString2 FbxString to be concatenated to String. */
friend FBXSDK_DLL FbxString operator+(const char* pString1, const FbxString& pString2);
/** Integer concatenation.
* \param pString FbxString to be concatenated to Integer.
* \param pValue Integer to be concatenated to FbxString */
friend FBXSDK_DLL FbxString operator+(const FbxString& pString, int pValue);
/** Integer concatenation.
* \param pValue Integer to be concatenated to FbxString
* \param pString FbxString to be concatenated to Integer. */
friend FBXSDK_DLL FbxString operator+(int pValue, const FbxString& pString);
/** Float concatenation.
* \param pString FbxString to be concatenated to Float.
* \param pValue Float to be concatenated to FbxString */
friend FBXSDK_DLL FbxString operator+(const FbxString& pString, float pValue);
/** Float concatenation.
* \param pValue Float to be concatenated to FbxString
* \param pString FbxString to be concatenated to Float. */
friend FBXSDK_DLL FbxString operator+( float pValue, const FbxString& pString);
/** Double concatenation.
* \param pString FbxString to be concatenated to Double.
* \param pValue Double to be concatenated to FbxString */
friend FBXSDK_DLL FbxString operator+(const FbxString& pString, double pValue);
//! Cast operator.
operator const char*() const;
/** String assignment function with maximum length.
* \param pString The string to be assigned.
* \param pLength The maximum length of string to be assigned. */
const FbxString& Copy(const char* pString, size_t pLength);
/** Append as "C" strncat().
* \param pString The string to be appended.
* \param pLength The length of chars to be appended. */
const FbxString& Append(const char* pString, size_t pLength);
/** Compare as "C" strcmp().
* \param pString The string to be compared. */
int Compare(const char* pString) const;
/** Compare as "C" stricmp().
* \param pString The string to be compared. */
int CompareNoCase(const char* pString) const;
/** Swap the contents of two strings.
* \param pString The FbxString to be swapped. */
void Swap(FbxString& pString);
//! Uppercase conversion.
FbxString Upper() const;
//! Lowercase conversion.
FbxString Lower() const;
//@}
/**
* \name Substring Extraction
*/
//@{
/** Extract middle string for a given length.
* \param pFirst The start index of FbxString to be extracted.
* \param pCount The length of sub-string to be extracted. */
FbxString Mid(size_t pFirst, size_t pCount) const;
/** Extract middle string up to the end.
* \param pFirst The start index of FbxString to be extracted. */
FbxString Mid(size_t pFirst) const;
/** Extract left string.
* \param pCount The length of sub-string to be extracted. */
FbxString Left(size_t pCount) const;
/** Extract right string.
* \param pCount The length of sub-string to be extracted. */
FbxString Right(size_t pCount) const;
//@}
/**
* \name Padding
*/
//@{
/** \enum EPaddingType Padding types.
* - \e eRight
* - \e eLeft
* - \e eBoth */
enum EPaddingType {eRight, eLeft, eBoth};
/** Add padding characters.
* \param pPadding The padding type.
* \param pLen The length limit of FbxString after padding.
* \param pCar The character to be padded. */
FbxString Pad(EPaddingType pPadding, size_t pLen, char pCar=' ') const;
/** Remove padding characters.
* \param pPadding The padding type.
* \param pCar The character to be padded.
* \remark If pCar == '\0' the function will remove all the characters that are tested by isspace(). */
FbxString UnPad(EPaddingType pPadding, char pCar='\0') const;
//@}
/**
* \name Search
*/
//@{
/** Look for a single character match, like "C" strchr().
* \param pChar The character to look for.
* \param pStartPosition Start position to look for.
* \return Index or -1 if not found. */
int Find(char pChar, size_t pStartPosition=0) const;
/** Look for a substring match, like "C" strstr().
* \param pStrSub The substring to look for.
* \param pStartPosition Start position to look for.
* \return Starting index or -1 if not found. */
int Find(const char* pStrSub, size_t pStartPosition=0) const;
/** Look for the last occurrence of character in string, like "C" strrchr().
* \param pChar The character to look for.
* \return Index or -1 if not found. */
int ReverseFind(char pChar) const;
/** Look for a single character match, like "C" strpbrk().
* \param pStrCharSet The character set.
* \param pStartPosition The start position.
* \return Index or -1 if not found. */
int FindOneOf(const char* pStrCharSet, size_t pStartPosition=0) const;
/** Replace a substring.
* \param pFind The substring to look for.
* \param pReplaceBy The string to replace by.
* \param pStartPosition The start position.
* \return \c true if substring found and replaced. */
bool FindAndReplace(const char* pFind, const char* pReplaceBy, size_t pStartPosition=0);
/** Replace all occurrence of a substring.
* \param pFind The substring to look for.
* \param pReplaceBy The string to replace by.
* \return \c true if something got replaced. */
bool ReplaceAll(const char* pFind, const char* pReplaceBy);
/** Replace all occurrence of character to find by replacement character.
* \param pFind The character to look for.
* \param pReplaceBy The character to replace by.
* \return \c true if character found and replaced. */
bool ReplaceAll(char pFind, char pReplaceBy);
//@}
/**
* \name Token Extraction
*/
//@{
/** Get number of tokens.
* \param pSpans The span
* \return The number of tokens. */
int GetTokenCount(const char* pSpans) const;
/** Get token at given index.
* \param pTokenIndex The token index.
* \param pSpans The span */
FbxString GetToken(int pTokenIndex, const char* pSpans) const;
//@}
private:
// Lengths/sizes in characters.
// Note: an extra character is always allocated.
char* mData; // Actual string (zero terminated).
FbxString(size_t pSrc1Len, const char* pSrc1Data, size_t pSrc2Len, const char* pSrc2Data); // Previously ConcatCopy
void Init();
//! Invalidate string.
void Invalidate();
void FreeBuffer();
void FreeBuffer(char *&pOldData);
bool AllocCopy(FbxString& pDest, size_t pCopyLen, size_t pCopyIndex) const;
bool AllocBuffer(size_t pLen);
bool AllocBuffer(size_t pLen, char*& pOldData);
bool AssignCopy(size_t pSrcLen, const char* pSrcData);
bool ConcatInPlace(size_t pSrcLen, const char* pSrcData);
bool IsIn(char pChar, const char* pString) const;
bool InternalFindAndReplace(const char* pFind, const char* pReplaceBy, size_t& pStartPosition);
};
FBXSDK_INCOMPATIBLE_WITH_ARRAY(FbxString);
//! FbxString concatenation.
FBXSDK_DLL FbxString operator+(const FbxString& pString1, const FbxString& pString2);
//! Character concatenation.
FBXSDK_DLL FbxString operator+(const FbxString& pString, char pChar);
//! String concatenation.
FBXSDK_DLL FbxString operator+(const FbxString& pString1, const char* pString2);
//! Integer concatenation.
FBXSDK_DLL FbxString operator+(const FbxString& pString, int pValue);
//! Float concatenation.
FBXSDK_DLL FbxString operator+(const FbxString& pString, float pValue);
//! Double concatenation.
FBXSDK_DLL FbxString operator+(const FbxString& pString, double pValue);
//! Functor to compare FbxString
struct FbxStringCompare { inline int operator()(const FbxString& pKeyA, const FbxString& pKeyB) const { return pKeyA.Compare(pKeyB); } };
//! Functor to compare FbxString without case sensitivity
struct FbxStringCompareNoCase { inline int operator()(const FbxString& pKeyA, const FbxString& pKeyB) const { return pKeyA.CompareNoCase(pKeyB); } };
//! Functor to compare "C" strings
struct FbxCharPtrCompare { inline int operator()(const char* pKeyA, const char* pKeyB) const { return strcmp(pKeyA, pKeyB); } };
//! Functor to compare "C" strings without case sensitivity
struct FbxCharPtrCompareNoCase { inline int operator()(const char* pKeyA, const char* pKeyB) const { return FBXSDK_stricmp(pKeyA, pKeyB); } };
/** Remove the given char in the given string.
* \param pString The given string.
* \param pToRemove The given char that ought to be removed.
* \remarks Strings used in this function are case-sensitive. */
inline void FbxRemoveChar(FbxString& pString, char pToRemove)
{
int lPos = pString.ReverseFind(pToRemove);
while( lPos >= 0 )
{
pString = pString.Left(lPos) + pString.Mid(lPos + 1);
lPos = pString.ReverseFind(pToRemove);
}
}
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_STRING_H_ */

View File

@ -1,368 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxstringlist.h
#ifndef _FBXSDK_CORE_BASE_STRING_LIST_H_
#define _FBXSDK_CORE_BASE_STRING_LIST_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxarray.h>
#include <fbxsdk/core/base/fbxstring.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
//! Wraps a string (FbxString) and a pointer (FbxHandle).
class FbxStringListItem
{
public:
FbxStringListItem(){ mReference = 0; }
FbxStringListItem(const char* pString, FbxHandle pRef=0){ mString = pString; mReference = pRef; }
FbxString mString;
FbxHandle mReference;
};
inline int FbxCompareStringListSort(const void* E1, const void* E2)
{
return FBXSDK_stricmp((*(FbxStringListItem**)E1)->mString.Buffer(), (*(FbxStringListItem**)E2)->mString.Buffer());
}
inline int FbxCompareStringListFindEqual(const void* E1, const void* E2)
{
return FBXSDK_stricmp((*(FbxStringListItem*)E1).mString.Buffer(), (*(FbxStringListItem**)E2)->mString.Buffer());
}
inline int FbxCompareCaseSensitiveStringList(const void *E1,const void *E2)
{
return strcmp((*(FbxStringListItem*)E1).mString.Buffer(), (*(FbxStringListItem**)E2)->mString.Buffer());
}
//! Base class of FbxStringList.
template <class Type> class FbxStringListT
{
protected:
FbxArray<Type*> mList;
public:
/**
* \name Operation With The Array
*/
//@{
/** Append a item at the end of the array.
* \return Index of appended pointer.
*/
int AddItem( Type* pItem ) { return mList.Add( pItem ); }
/** Insert a item in the array.
* \param pIndex Position where to insert the item.
* \param pItem Item to insert.
* \return Position of the inserted item in the array.
* \remarks If the given index is out of range, the pointer is appended at the end of the array.
*/
int InsertItemAt( int pIndex, Type* pItem ) { return mList.InsertAt( pIndex, pItem ); }
//! Access item at given index.
Type* GetItemAt( int pIndex ) const { return mList[pIndex]; }
/** Find first matching item.
* \return Index of first matching item found or -1 if there is no matching element.
*/
int FindItem( Type* pItem ) const { return mList.Find( pItem ); }
//}@
public :
/**
* \name Constructor and Destructor
*/
//@{
//! Default constructor.
FbxStringListT()
{
}
//! Destructor.
virtual ~FbxStringListT() { Clear(); }
//}@
//!Remove the item at the end of the array and delete the associated object.
void RemoveLast() { RemoveAt( mList.GetCount()-1 ); }
/** Get number of items in the array.
* \return The number of items in the array.
*/
inline int GetCount() const { return mList.GetCount(); }
//! Access the string in the item at given index.
FbxString& operator[](int pIndex) { return mList[pIndex]->mString; }
//! Access the value of reference in the item at given index.
FbxHandle GetReferenceAt(int pIndex) const { return mList[pIndex]->mReference; }
//! Set the value of reference at given index.
void SetReferenceAt(int pIndex, FbxHandle pRef) { mList[pIndex]->mReference = pRef; }
//! Access the pointer of string at given index.
char* GetStringAt(int pIndex) const { if (pIndex<mList.GetCount()) return mList[pIndex]->mString.Buffer(); else return NULL; }
//! Set string at given index.
virtual bool SetStringAt(int pIndex, const char* pString)
{
if (pIndex<mList.GetCount())
{
mList[pIndex]->mString = pString;
return true;
} else return false;
}
/** Find first matching item.
* \return Index of first matching item found or -1 if there is no
* matching element.
*/
int Find( Type& pItem ) const
{
for (int Count=0; Count<mList.GetCount(); Count++) {
if (mList[Count]==&pItem) {
return Count;
}
}
return -1;
}
/** Find first matching item which has the same reference as given parameter.
* \return Index of first matching item found or -1 if there is no
* matching element.
*/
int FindIndex( FbxHandle pReference ) const
{
for (int Count=0; Count<mList.GetCount(); Count++) {
if (mList[Count]->mReference==pReference) {
return Count;
}
}
return -1;
}
/** Find first matching item in array whose string address is the same as given pointer.
* \return Index of first matching item found or -1 if there is no
* matching element.
*/
int FindIndex( const char* pString ) const
{
for (int lCount=0; lCount<mList.GetCount(); lCount++) {
if (mList[lCount]->mString==pString) {
return lCount;
}
}
return -1;
}
/** Access the value of reference of the first matching item in array
* whose string address is the same as given pointer.
* \return The value of reference of the first matching item found or NULL if there is no
* matching element.
*/
FbxHandle FindReference(const char* pString ) const
{
int lIndex = FindIndex( pString );
if (lIndex!=-1) {
return mList[lIndex]->mReference;
}
return 0; // NULL
}
//! Remove first matching item.
bool Remove ( Type& pItem )
{
int lIndex = Find( pItem );
if (lIndex>=0) {
RemoveAt( lIndex );
return true;
}
return false;
}
//! Remove first matching item in array whose string address is the same as given pointer.
bool Remove (const char* pString )
{
int lIndex = FindIndex( pString );
if (lIndex>=0) {
RemoveAt( lIndex );
return true;
}
return false;
}
//! Remove first matching item.
bool RemoveIt ( Type& pItem )
{
int lIndex = Find( pItem );
if (lIndex>=0) {
RemoveAt( lIndex );
return true;
}
return false;
}
//! Sort the array by the string of every item,not case sensitive.
void Sort( )
{
qsort( &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*),FbxCompareStringListSort );
}
/** Find first matching item which has the same string as given parameter,not case sensitive.
* \return the pointer of matching item found or NULL if there is no
* matching element.
* \remark To cast the returned pointer to the FbxStringListItem you need a double indirection: (FbxStringListItem**)
*/
void* FindEqual(const char* pString) const
{
FbxStringListItem Key(pString);
if (mList.GetCount() != 0)
{
return bsearch ( &Key, &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*),FbxCompareStringListFindEqual );
}
else
{
return NULL ;
}
}
/** Find first matching item which has the same string as given parameter, case sensitive.
* \return the pointer of matching item found or NULL if there is no
* matching element.
* \remark To cast the returned pointer to the FbxStringListItem you need a double indirection: (FbxStringListItem**)
*/
void* FindCaseSensitive(const char* pString) const
{
FbxStringListItem Key(pString);
if (mList.GetCount() != 0)
{
return bsearch ( &Key, &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*), FbxCompareCaseSensitiveStringList);
}
else
{
return NULL ;
}
}
//! Add a new item at the end of array.
int Add( const char* pString, FbxHandle pItem=0 )
{
return InsertAt( mList.GetCount(),pString,pItem );
}
virtual int InsertAt( int pIndex, const char* pString, FbxHandle pItem=0 )
{
return mList.InsertAt( pIndex,FbxNew< Type >( pString,(FbxHandle)pItem ));
}
/** Remove the item at the given position in the array and delete the associated object.
* \param pIndex Position of the item to remove.
* \remarks If the index is not valid, nothing is performed. Otherwise,
* the item is removed from the array and the items are shifted to fill the
* empty slot.
*/
virtual void RemoveAt(int pIndex)
{
FbxDelete(mList.RemoveAt(pIndex));
}
//! Delete the array.
virtual void Clear()
{
FbxArrayDelete(mList);
}
/** Get the string of all the item.
* \return The text of string, each item's string separated by '~'.
*/
virtual void GetText(FbxString& pText) const
{
int lCount;
for (lCount=0; lCount<mList.GetCount(); lCount++)
{
pText += mList[lCount]->mString;
if (lCount<mList.GetCount()-1)
{
pText += "~";
}
}
}
/** Clear the array and set the array's new items with the substring separated by '~' from the given string.
* \param pList The string which used to generate the new items.
* \return The last index of the item in the new array.
* \remarks The number of items in the new array is the same as the number of substrings,
* and the string of each item is decided by the content of each substring.
*/
virtual int SetText(const char* pList)
{
int lPos=0, lOldPos = 0;
int lLastIndex=0;
FbxString lName=pList;
Clear();
for (lPos=0; lName.Buffer()[lPos]!=0; lPos++) {
if (lName.Buffer()[lPos]=='~') {
lName.Buffer()[lPos]=0;
lLastIndex = Add(lName.Buffer()+lOldPos);
lOldPos=lPos+1;
}
}
if(lOldPos != lPos)
{
lLastIndex = Add(lName.Buffer()+lOldPos);
}
return lLastIndex;
}
};
/** Array that stores pairs of FbxString and a pointer.
*/
class FBXSDK_DLL FbxStringList : public FbxStringListT<FbxStringListItem>
{
public:
/**
* \name Constructors
*/
//@{
//! Default constructor.
FbxStringList();
//! Copy constructor.
FbxStringList( const FbxStringList& pOriginal );
//@}
/**
* \name Assignment Operators
*/
//@{
//! FbxStringList assignment function.
void CopyFrom( const FbxStringList* pOriginal );
//! FbxStringList assignment operator.
FbxStringList& operator=(const FbxStringList& pOriginal);
//@}
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_STRING_LIST_H_ */

View File

@ -1,648 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxtime.h
#ifndef _FBXSDK_CORE_BASE_TIME_H_
#define _FBXSDK_CORE_BASE_TIME_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxtimecode.h>
#include <fbxsdk/core/base/fbxstring.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
#define FBXSDK_TIME_INFINITE FbxTime(FBXSDK_TC_INFINITY)
#define FBXSDK_TIME_MINUS_INFINITE FbxTime(FBXSDK_TC_MINFINITY)
#define FBXSDK_TIME_ZERO FbxTime(FBXSDK_TC_ZERO)
#define FBXSDK_TIME_EPSILON FbxTime(FBXSDK_TC_EPSILON)
#define FBXSDK_TIME_ONE_SECOND FbxTime(FBXSDK_TC_SECOND)
#define FBXSDK_TIME_ONE_MINUTE FbxTime(FBXSDK_TC_MINUTE)
#define FBXSDK_TIME_ONE_HOUR FbxTime(FBXSDK_TC_HOUR)
#define FBXSDK_TIME_ASSERT_EPSILON 0.5
#define FBXSDK_TIME_FORWARD 1
#define FBXSDK_TIME_BACKWARD -1
class FbxTimeModeObject;
/** Class to encapsulate time units.
* \nosubgrouping
* FbxTime can measure time in hour, minute, second, frame, field, residual and also combination of these units.
* It is recommended to use FbxTime for all time related operations. For example, currently it is used in FbxGlobalSettings,
* FbxGlobalTimeSettings, FbxCache, all curve filters and all animation-related classes, etc.
* FbxTime is just used to represent a moment, to represent a period of time, FbxTimeSpan should be used.
* \see FbxTimeSpan
*/
class FBXSDK_DLL FbxTime
{
public:
/** Long long constructor.
* \param pTime Initial value defined as a 64bit integer.
*/
FbxTime(const FbxLongLong pTime=0){ mTime = pTime; }
/**
* \name Time Modes and Protocols
*/
//@{
/** Time modes.
* \remarks
* EMode \c eNTSCDropFrame is used for broadcasting operations where
* clock time must be (almost) in sync with time code. To bring back color
* NTSC time code with clock time, this mode drops 2 frames per minute
* except for every 10 minutes (00, 10, 20, 30, 40, 50). 108 frames are
* dropped per hour. Over 24 hours the error is 2 frames and 1/4 of a
* frame. A time-code of 01:00:03:18 equals a clock time of 01:00:00:00
*
* \par
* EMode \c eNTSCFullFrame represents a time address and therefore is NOT
* IN SYNC with clock time. A time code of 01:00:00:00 equals a clock time
* of 01:00:03:18.
*
* - \e eDefaultMode
* - \e eFrames120 120 frames/s
* - \e eFrames100 100 frames/s
* - \e eFrames60 60 frames/s
* - \e eFrames50 50 frames/s
* - \e eFrames48 48 frame/s
* - \e eFrames30 30 frames/s (black and white NTSC)
* - \e eFrames30Drop 30 frames/s (use when display in frame is selected, equivalent to NTSC drop)
* - \e eNTSCDropFrame ~29.97 frames/s drop color NTSC
* - \e eNTSCFullFrame ~29.97 frames/s color NTSC
* - \e ePAL 25 frames/s PAL/SECAM
* - \e eFrames24 24 frames/s Film/Cinema
* - \e eFrames1000 1000 milli/s (use for date time)
* - \e eFilmFullFrame ~23.976 frames/s
* - \e eCustom Custom frame rate value
* - \e eFrames96 96 frames/s
* - \e eFrames72 72 frames/s
* - \e eFrames59dot94 ~59.94 frames/s
* - \e eModesCount Number of time modes
*/
enum EMode
{
eDefaultMode,
eFrames120,
eFrames100,
eFrames60,
eFrames50,
eFrames48,
eFrames30,
eFrames30Drop,
eNTSCDropFrame,
eNTSCFullFrame,
ePAL,
eFrames24,
eFrames1000,
eFilmFullFrame,
eCustom,
eFrames96,
eFrames72,
eFrames59dot94,
eModesCount
};
/** Time protocols enumaration
* - \e eSMPTE SMPTE EProtocol
* - \e eFrameCount Frame count
* - \e eDefaultProtocol Default protocol (initialized to eFRAMES)
*/
enum EProtocol {eSMPTE, eFrameCount, eDefaultProtocol};
/** Set default time mode.
* \param pTimeMode Time mode identifier.
* \param pFrameRate Custom framerate, only have effect in case of pTimeMode = FbxTime::eCustom
* \remarks It is meaningless to set default time mode to \c eDefaultMode.
*/
static void SetGlobalTimeMode(EMode pTimeMode, double pFrameRate=0.0);
/** Get default time mode.
* \return Currently set time mode identifier.
* \remarks Default time mode initial value is eFrames30.
*/
static EMode GetGlobalTimeMode();
/** Set default time protocol.
* \param pTimeProtocol Time protocol identifier.
* \remarks It is meaningless to set default time protocol to \c eDefaultProtocol.
*/
static void SetGlobalTimeProtocol(EProtocol pTimeProtocol);
/** Get default time protocol.
* \return Currently set time protocol identifier.
* \remarks Default time protocol initial value is eSMPTE.
*/
static EProtocol GetGlobalTimeProtocol();
/** Get frame rate associated with time mode, in frames per second.
* \param pTimeMode Time mode identifier.
* \return Frame rate value.
*/
static double GetFrameRate(EMode pTimeMode);
/** Get time mode associated with frame rate.
* \param pFrameRate The frame rate value.
* \param pPrecision The tolerance value.
* \return The corresponding time mode identifier or \c eDefaultMode if no time
* mode associated to the given frame rate is found.
*/
static EMode ConvertFrameRateToTimeMode(double pFrameRate, double pPrecision=0.00000001);
//@}
/**
* \name Time Conversion
*/
//@{
/** Set time in internal format.
* \param pTime Time value to set.
*/
inline void Set(FbxLongLong pTime){ mTime = pTime; }
/** Get time in internal format.
* \return Time value.
*/
inline FbxLongLong Get() const { return mTime; }
/** Set time in milliseconds.
* \param pMilliSeconds Time value to set.
*/
inline void SetMilliSeconds(FbxLongLong pMilliSeconds){ mTime = pMilliSeconds * FBXSDK_TC_MILLISECOND; }
/** Get time in milliseconds.
* \return Time value.
*/
inline FbxLongLong GetMilliSeconds() const { return mTime / FBXSDK_TC_MILLISECOND; }
/** Set time in seconds.
* \param pTime Time value to set.
*/
void SetSecondDouble(double pTime);
/** Get time in seconds.
* \return Time value.
*/
double GetSecondDouble() const;
/** Set time in hour/minute/second/frame/field format.
* \param pHour The hours value.
* \param pMinute The minutes value.
* \param pSecond The seconds value.
* \param pFrame The frames values.
* \param pField The field value.
* \param pTimeMode Time mode identifier.
* \remarks Parameters pHour, pMinute, pSecond, pFrame and pField are summed together.
* For example, it is possible to set the time to 83 seconds in the following
* ways: SetTime(0,1,23) or SetTime(0,0,83).
*/
void SetTime(int pHour, int pMinute, int pSecond, int pFrame=0, int pField=0, EMode pTimeMode=eDefaultMode);
/** Set time in hour/minute/second/frame/field/residual format.
* \param pHour The hours value.
* \param pMinute The minutes value.
* \param pSecond The seconds value.
* \param pFrame The frames values.
* \param pField The field value.
* \param pResidual The hundredths of frame value.
* \param pTimeMode Time mode identifier.
* \remarks Parameters pHour, pMinute, pSecond, pFrame, pField and pResidual
* are summed together, just like above.
* pResidual represents hundredths of frame, and won't necessarily
* correspond to an exact internal value.
*
* \remarks The time mode can't have a default value, because
* otherwise SetTime(int, int, int, int, int, int)
* would be ambiguous. Please specify DEFAULT_MODE.
*/
void SetTime(int pHour, int pMinute, int pSecond, int pFrame, int pField, int pResidual, EMode pTimeMode);
/** Get time in hour/minute/second/frame/field/residual format.
* \param pHour The returned hours value.
* \param pMinute The returned minutes value.
* \param pSecond The returned seconds value.
* \param pFrame The returned frames values.
* \param pField The returned field value.
* \param pResidual The returned hundredths of frame value.
* \param pTimeMode The time mode identifier which will dictate the extraction algorithm.
* \return \c true if the pTimeMode parameter is a valid identifier and thus the extraction
* succeeded. If the function returns \c false, all the values are set to 0.
*/
bool GetTime(int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField, int& pResidual, EMode pTimeMode=eDefaultMode) const;
/** Snaps a time value to the time value associated with the nearest frame.
* \param pRound If \c true the return value is rounded to the nearest integer.
* \return The snapped time value.
*/
FbxTime GetFramedTime(bool pRound=true) const;
/** Set time in frame format.
* \param pFrames The number of frames.
* \param pTimeMode The time mode identifier which will dictate the extraction algorithm.
*/
void SetFrame(FbxLongLong pFrames, EMode pTimeMode=eDefaultMode);
/** Set time in frame format, including fractions.
* \param pFrames The number of frames in decimal value.
* \param pTimeMode The time mode identifier which will dictate the extraction algorithm.
*/
void SetFramePrecise(FbxDouble pFrames, EMode pTimeMode=eDefaultMode);
/** Get number of hours in time.
* \return Hours value.
*/
int GetHourCount() const;
/** Get number of minutes in time.
* \return Minutes value.
*/
int GetMinuteCount() const;
/** Get number of seconds in time.
* \return Seconds value.
*/
int GetSecondCount() const;
/** Get number of frames in time.
* \param pTimeMode Time mode identifier.
* \return Integer value representing the frame count.
*/
FbxLongLong GetFrameCount(EMode pTimeMode=eDefaultMode) const;
/** Get precise number of frames in time, including fractions.
* \param pTimeMode Time mode identifier.
* \return Decimal value representing the frame count, including fractions.
*/
FbxDouble GetFrameCountPrecise(EMode pTimeMode=eDefaultMode) const;
/** Get number of fields in time.
* \param pTimeMode Time mode identifier.
* \return Fields value.
*/
FbxLongLong GetFieldCount(EMode pTimeMode=eDefaultMode) const;
/** Get residual time exceeding last full field.
* \param pTimeMode Time mode identifier.
* \return Residual value.
*/
int GetResidual(EMode pTimeMode=eDefaultMode) const;
/** Test for Drop Frame mode
* \param pTimeMode Time mode identifier.
* \return True if the pTimeMode is a Drop Frame mode.
*/
static bool IsDropFrame(EMode pTimeMode=eDefaultMode);
/** Separator char between second and frame.
* \param pTimeMode Time mode identifier.
* \return ';' is returned if pTimeMode is a DropFrame mode otherwise ':'.
*/
char GetFrameSeparator(EMode pTimeMode=eDefaultMode) const;
/** Get time in a human readable format.
* \param pTimeString An array large enough to contain a minimum of 19 characters.
* \param pTimeStringSize Size of the pTimeString buffer used with secure functions.
* \param pInfo The amount of information if time protocol is \c eSMPTE:
* <ul><li>1 means hours only
* <li>2 means hours and minutes
* <li>3 means hours, minutes and seconds
* <li>4 means hours, minutes, seconds and frames
* <li>5 means hours, minutes, seconds, frames and field
* <li>6 means hours, minutes, seconds, frames, field and residual value</ul>
* \param pTimeMode Requested time mode.
* \param pTimeFormat Requested time protocol.
* \return pTimeString parameter filled with a time value or set to a empty string
* if parameter pInfo is not valid.
*/
char* GetTimeString(char* pTimeString, const FbxUShort& pTimeStringSize, int pInfo=5, EMode pTimeMode=eDefaultMode, EProtocol pTimeFormat=eDefaultProtocol) const;
enum EElement {eHours, eMinutes, eSeconds, eFrames, eField, eResidual};
/** Get the time in a human readable format.
* \param pStart The starting element type used to format the time string.
* \param pEnd The last element type used to format the time string.
* \param pTimeMode The time mode requested.
* \param pTimeFormat The time format requested.
* \return The human readable time string. */
FbxString GetTimeString(EElement pStart=eHours, EElement pEnd=eResidual, EMode pTimeMode=eDefaultMode, EProtocol pTimeFormat=eDefaultProtocol) const;
/** Set time in a human readable format.
* \param pTime An array of a maximum of 18 characters.
* If time protocol is \c eSMPTE, pTimeString must be formatted this way:
* "[hours:]minutes[:seconds[.frames[.fields]]]". Hours, minutes, seconds,
* frames and fields are parsed as integers and brackets indicate optional
* parts.
* If time protocol is \c eFRAME, pTimeString must be formatted this way:
* "frames". Frames is parsed as a 64 bits integer.
* \param pTimeMode Given time mode.
* \param pTimeFormat Given time protocol.
* \return True if the set time string succeed, otherwise return false.
*/
bool SetTimeString(const char* pTime, EMode pTimeMode=eDefaultMode, EProtocol pTimeFormat=eDefaultProtocol);
//@}
/**
* \name Time Operators
*/
//@{
/** Equality operator.
* \param pTime The FbxTime to be compared.
* \return \c true if equal, \c false otherwise.
*/
inline bool operator==(const FbxTime& pTime) const { return mTime == pTime.mTime; }
/** Inequality operator.
* \param pTime The FbxTime to be compared.
* \return \c true if unequal, \c false otherwise.
*/
inline bool operator!=(const FbxTime& pTime) const { return mTime != pTime.mTime; }
/** Superior or equal to operator.
* \param pTime The FbxTime to be compared.
* \return \c true if this FbxTime is superior or equal to the passed FbxTime, \c false otherwise.
*/
inline bool operator>=(const FbxTime& pTime) const { return mTime >= pTime.mTime; }
/** Inferior or equal to operator.
* \param pTime The FbxTime to be compared.
* \return \c true if this FbxTime is inferior or equal to the passed FbxTime, \c false otherwise.
*/
inline bool operator<=(const FbxTime& pTime) const { return mTime <= pTime.mTime; }
/** Superior to operator.
* \param pTime The FbxTime to be compared.
* \return \c true if this FbxTime is superior to the passed FbxTime, \c false otherwise.
*/
inline bool operator>(const FbxTime& pTime) const { return mTime > pTime.mTime; }
/** Inferior to operator.
* \param pTime The FbxTime to be compared.
* \return \c true if this FbxTime is inferior to the passed FbxTime, \c false otherwise.
*/
inline bool operator<(const FbxTime& pTime) const { return mTime < pTime.mTime; }
/** Assignment operator.
* \param pTime The FbxTime to be assigned.
*/
inline FbxTime& operator=(const FbxTime& pTime) { mTime = pTime.mTime; return *this; }
/** Addition operator.
* \param pTime The FbxTime to be added.
* \return This FbxTime after addition.
*/
inline FbxTime& operator+=(const FbxTime& pTime) { mTime += pTime.mTime; return *this; }
/** Subtraction operator.
* \param pTime The FbxTime to be subtracted.
* \return This FbxTime after subtraction.
*/
inline FbxTime& operator-=(const FbxTime& pTime) { mTime -= pTime.mTime; return *this; }
/** Addition operator.
* \param pTime The FbxTime to be added.
* \return A temporary FbxTime after addition.
*/
FbxTime operator+(const FbxTime& pTime) const;
/** Subtraction operator.
* \param pTime The FbxTime to be subtracted.
* \return A temporary FbxTime after subtraction.
*/
FbxTime operator-(const FbxTime& pTime) const;
/** Multiplication operator.
* \param Mult Multiply this FbxTime by int Mult.
* \return A temporary FbxTime after multiplication.
*/
FbxTime operator*(const int Mult) const;
/** Division operator.
* \param pTime Divide this FbxTime by pTime.
* \return A temporary FbxTime after division.
*/
FbxTime operator/(const FbxTime& pTime) const;
/** Multiplication operator.
* \param pTime Multiply this FbxTime by pTime.
* \return A temporary FbxTime after multiplication.
*/
FbxTime operator*(const FbxTime& pTime) const;
/*
//! Increment time of one unit of the internal format (prefix form).
inline FbxTime& operator++() { mTime += 1; return (*this); }
//! Increment time of one unit of the internal format (postfix form).
inline const FbxTime operator++(int) { FbxTime lOld = *this; ++(*this); return lOld; }
//! Decrement time of one unit of the internal format (prefix form).
inline FbxTime& operator--() { mTime -= 1; return (*this); }
//! Decrement time of one unit of the internal format (postfix form).
inline const FbxTime operator--(int) { FbxTime lOld = *this; --(*this); return lOld; }*/
//@}
/** One frame value for a specified time mode.
* \param pTimeMode Time mode identifier.
* \return the time code of a one frame.
*/
static FbxLongLong GetOneFrameValue(EMode pTimeMode=eDefaultMode);
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Keep compatibility with old fbx format
enum EOldMode
{
eOLD_DEFAULT_MODE, //Default mode set using FbxTime::SetGlobalTimeMode(EMode pTimeMode)
eOLD_CINEMA, //24 frameOLD_s/s
eOLD_PAL, //25 frameOLD_s/s PAL/SECAM
eOLD_FRAMES30, //30 frameOLD_s/s BLACK & WHITE NTSC
eOLD_NTSC_DROP_FRAME, //29.97002617 frameOLD_s/s COLOR NTSC
eOLD_FRAMES50, //50 frameOLD_s/s
eOLD_FRAMES60, //60 frameOLD_s/s
eOLD_FRAMES100, //100 frameOLD_s/s
eOLD_FRAMES120, //120 frameOLD_s/s
eOLD_NTSC_FULL_FRAME, //29.97002617 frameOLD_s/s COLOR NTSC
eOLD_FRAMES30_DROP, //30 frameOLD_s/s
eOLD_FRAMES1000 //1000 frameOLD_s/s
};
private:
FbxLongLong mTime; //In 1 / 46,186,158,000 Seconds
static EMode gsGlobalTimeMode;
static EProtocol gsGlobalTimeProtocol;
static FbxTimeModeObject* gsTimeObject;
void InternalSetTime(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField, EMode pTimeMode);
friend FBXSDK_DLL FbxTime::EMode FbxGetGlobalTimeMode();
friend FBXSDK_DLL FbxTimeModeObject* FbxGetGlobalTimeModeObject();
friend FBXSDK_DLL FbxTime::EProtocol FbxGetGlobalTimeFormat();
friend FBXSDK_DLL void FbxSetGlobalTimeMode(FbxTime::EMode pTimeMode, double pFrameRate);
friend FBXSDK_DLL void FbxSetGlobalTimeFormat(FbxTime::EProtocol pTimeFormat);
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
/** FbxTime in seconds constructor.
* \param pTime
*/
FBXSDK_DLL inline FbxTime FbxTimeSeconds(const FbxDouble& pTime=0.0)
{
FbxTime lTime;
lTime.SetSecondDouble(pTime);
return lTime;
}
/** Class to encapsulate time intervals.
* \nosubgrouping
* \see FbxTime
*/
class FBXSDK_DLL FbxTimeSpan
{
public:
//! Constructor.
FbxTimeSpan() {}
/** Constructor.
* \param pStart Beginning of the time interval.
* \param pStop Ending of the time interval.
*/
FbxTimeSpan(FbxTime pStart, FbxTime pStop){ mStart = pStart; mStop = pStop; }
/** Set start and stop time.
* \param pStart Beginning of the time interval.
* \param pStop Ending of the time interval.
*/
inline void Set(FbxTime pStart, FbxTime pStop){ mStart = pStart; mStop = pStop; }
/** Set start time.
* \param pStart Beginning of the time interval.
*/
inline void SetStart(FbxTime pStart){ mStart = pStart; }
/** Set stop time.
* \param pStop Ending of the time interval.
*/
inline void SetStop(FbxTime pStop){ mStop = pStop; }
/** Get start time.
* \return Beginning of time interval.
*/
inline FbxTime GetStart() const { return mStart; }
/** Get stop time.
* \return Ending of time interval.
*/
inline FbxTime GetStop() const { return mStop; }
/** Get time interval in absolute value.
* \return Time interval.
*/
inline FbxTime GetDuration() const { if( mStop > mStart ) return mStop - mStart; else return mStart - mStop; }
/** Get time interval.
* \return Signed time interval.
*/
inline FbxTime GetSignedDuration() const { return mStop - mStart; }
/** Get direction of the time interval.
* \return \c FBXSDK_TIME_FORWARD if time interval is forward, \c FBXSDK_TIME_BACKWARD if backward.
*/
inline int GetDirection() const { if( mStop >= mStart ) return FBXSDK_TIME_FORWARD; else return FBXSDK_TIME_BACKWARD; }
/** Return \c true if the time is inside the timespan.
* \param pTime Judge whether pTime is inside the timespan.
* \return \c True if is, \c false otherwise.
*/
bool IsInside(FbxTime pTime) const;
/** Return the intersection of the two time spans.
* \param pTime
* \return The intersection of pTime and this FbxTimeSpan.
*/
FbxTimeSpan Intersect(const FbxTimeSpan& pTime) const;
/** Inequality operator.
* \param pTime FbxTimeSpan compared with this one.
* \return \c True if unequal, \c false otherwise.
*/
bool operator!=(const FbxTimeSpan& pTime) const;
/** Equality operator.
* \param pTime FbxTimeSpan compared with this one.
* \return \c True if equal, \c false otherwise.
*/
bool operator==(const FbxTimeSpan& pTime) const;
/** Unite with another FbxTimeSpan
* \param pSpan The FbxTimeSpan
* \param pDirection FBXSDK_TIME_FORWARD or FBXSDK_TIME_BACKWARD
* \remarks This function assumes both of the FbxTimeSpan objects are in the same direction.
* Use FBXSDK_TIME_FORWARD when start < stop in both timespan
* Use FBXSDK_TIME_BACKWARD when start > stop in both timespan
*/
void UnionAssignment(const FbxTimeSpan& pSpan, int pDirection=FBXSDK_TIME_FORWARD);
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
FbxTime mStart;
FbxTime mStop;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
class FBXSDK_DLL FbxLocalTime
{
public:
FbxLocalTime();
int mYear;
int mMonth;
int mDay;
int mHour;
int mMinute;
int mSecond;
int mMillisecond;
};
FBXSDK_DLL void FbxGetCurrentLocalTime(FbxLocalTime& pLocalTime);
FBXSDK_DLL FbxTime::EMode FbxGetGlobalTimeMode();
FBXSDK_DLL FbxTimeModeObject* FbxGetGlobalTimeModeObject();
FBXSDK_DLL FbxTime::EProtocol FbxGetGlobalTimeFormat();
FBXSDK_DLL void FbxSetGlobalTimeMode(FbxTime::EMode pTimeMode, double pFrameRate=0.0);
FBXSDK_DLL void FbxSetGlobalTimeFormat(FbxTime::EProtocol pTimeFormat);
// Use those functions to keep the compatibility with old time mode since we added new time mode.
FBXSDK_DLL FbxTime::EOldMode FbxGetOldTimeModeCorrespondance(FbxTime::EMode pMode);
FBXSDK_DLL FbxTime::EMode FbxGetTimeModeFromOldValue(FbxTime::EOldMode pOldMode);
// We now store the framerate instead of the time mode.
FBXSDK_DLL FbxTime::EMode FbxGetTimeModeFromFrameRate(char* pFrameRate);
FBXSDK_DLL void FbxGetControlStringList(char* pControlString, FbxTime::EProtocol pTimeFormat);
FBXSDK_DLL const char* FbxGetGlobalFrameRateString(FbxTime::EMode pTimeMode);
FBXSDK_DLL const char* FbxGetGlobalTimeModeString(FbxTime::EMode pTimeMode);
FBXSDK_DLL double FbxGetFrameRate(FbxTime::EMode pTimeMode);
// Time format
FBXSDK_DLL FbxTime::EProtocol FbxSelectionToTimeFormat(int pSelection);
FBXSDK_DLL FbxTime::EMode FbxSelectionToTimeMode(int pSelection);
FBXSDK_DLL int FbxTimeToSelection(FbxTime::EMode pTimeMode=FbxTime::eDefaultMode, int pTimeFormat=FbxTime::eDefaultProtocol);
FBXSDK_DLL const char* FbxGetTimeModeName(FbxTime::EMode pTimeMode);
FBXSDK_DLL int FbxGetFrameRateStringListIndex(FbxTime::EMode pTimeMode);
FBXSDK_DLL bool FbxIsValidCustomFrameRate(double pFramerate);
FBXSDK_DLL bool FbxGetNearestCustomFrameRate(double pFramerate, double& pNearestRate);
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_TIME_H_ */

View File

@ -1,99 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxtimecode.h
#ifndef _FBXSDK_CORE_BASE_TIMECODE_H_
#define _FBXSDK_CORE_BASE_TIMECODE_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
#define FBXSDK_TC_ZERO FBXSDK_LONGLONG(0)
#define FBXSDK_TC_EPSILON FBXSDK_LONGLONG(1)
#define FBXSDK_TC_MINFINITY FBXSDK_LONGLONG(-0x7fffffffffffffff)
#define FBXSDK_TC_INFINITY FBXSDK_LONGLONG(0x7fffffffffffffff)
#define FBXSDK_TC_FIX_DEN FBXSDK_LONGLONG(100000000)
#define FBXSDK_TC_MILLISECOND FBXSDK_LONGLONG(46186158)
#define FBXSDK_TC_SECOND FbxLongLong(FBXSDK_TC_MILLISECOND*1000)
#define FBXSDK_TC_MINUTE FbxLongLong(FBXSDK_TC_SECOND*60)
#define FBXSDK_TC_HOUR FbxLongLong(FBXSDK_TC_MINUTE*60)
#define FBXSDK_TC_DAY FbxLongLong(FBXSDK_TC_HOUR*24)
// Frame @ 30 Hz
#define FBXSDK_TC_NTSC_FIELD FbxLongLong(FBXSDK_TC_SECOND/30/2)
#define FBXSDK_TC_NTSC_FRAME FbxLongLong(FBXSDK_TC_SECOND/30)
// Frame @ 29.9700299700 Hz
#define FBXSDK_TC_MNTSC_FIELD FbxLongLong(FBXSDK_TC_MNTSC_FRAME/2)
#define FBXSDK_TC_MNTSC_FRAME FbxLongLong(FBXSDK_TC_SECOND/30*1001/1000)
#define FBXSDK_TC_MNTSC_2_FRAMES FbxLongLong(FBXSDK_TC_MNTSC_FRAME*2)
#define FBXSDK_TC_MNTSC_30_FRAMES FbxLongLong(FBXSDK_TC_MNTSC_FRAME*30)
#define FBXSDK_TC_MNTSC_1798_FRAMES FbxLongLong(FBXSDK_TC_MNTSC_FRAME*1798) // leap minute
#define FBXSDK_TC_MNTSC_1800_FRAMES FbxLongLong(FBXSDK_TC_MNTSC_FRAME*1800) // ~1 minute
#define FBXSDK_TC_MNTSC_17982_FRAMES FbxLongLong(FBXSDK_TC_MNTSC_FRAME*17982) // ~10 minutes
#define FBXSDK_TC_MNTSC_107892_FRAMES FbxLongLong(FBXSDK_TC_MNTSC_FRAME*107892) // ~1 hour
#define FBXSDK_TC_MNTSC_108000_FRAMES FbxLongLong(FBXSDK_TC_MNTSC_FRAME*108000)
// For 29.9700299700 non-drop, btw : same values as with 23.976
#define FBXSDK_TC_MNTSC_1_SECOND FbxLongLong(FBXSDK_TC_MNTSC_FRAME*30) // 1 frame * 30
#define FBXSDK_TC_MNTSC_1_MINUTE FbxLongLong(FBXSDK_TC_MNTSC_1_SECOND*60) // 1 minute (1800 frames)
#define FBXSDK_TC_MNTSC_1_HOUR FbxLongLong(FBXSDK_TC_MNTSC_1_SECOND*3600) // 1 hour
#define FBXSDK_TC_MNTSC_NUM FbxULong(FBXSDK_TC_FIX_DEN*1000*30/1001)
#define FBXSDK_TC_MNTSC_DEN FBXSDK_TC_FIX_DEN
// Frame @ 25 Hz
#define FBXSDK_TC_PAL_FIELD FbxLongLong(FBXSDK_TC_SECOND/25/2)
#define FBXSDK_TC_PAL_FRAME FbxLongLong(FBXSDK_TC_SECOND/25)
// Frame @ 24 Hz
#define FBXSDK_TC_FILM_FRAME FbxLongLong(FBXSDK_TC_SECOND/24)
// Frame @ 23.9760239760 Hz
#define FBXSDK_TC_MFILM_FIELD FbxLongLong(FBXSDK_TC_MFILM_FRAME/2)
#define FBXSDK_TC_MFILM_FRAME FbxLongLong(FBXSDK_TC_SECOND/24*1001/1000)
#define FBXSDK_TC_MFILM_1_SECOND FbxLongLong(FBXSDK_TC_MFILM_FRAME*24) // 1 frame * 24
#define FBXSDK_TC_MFILM_1_MINUTE FbxLongLong(FBXSDK_TC_MFILM_1_SECOND*60) // 1 minute (1440 frames)
#define FBXSDK_TC_MFILM_1_HOUR FbxLongLong(FBXSDK_TC_MFILM_1_SECOND*3600) // 1 hour
#define FBXSDK_TC_MFILM_NUM FbxULong(FBXSDK_TC_FIX_DEN*1000*24/1001)
#define FBXSDK_TC_MFILM_DEN FBXSDK_TC_FIX_DEN
//////////////////////////////////////////////////////////////////////////////////////////
#define FBXSDK_TC_REM(quot, num, den) ((quot) = (num) / (den), (quot) * (den))
#define FBXSDK_TC_HOUR_REM(quot, num, den) ((quot) = ((num - (-FbxLongLong(num < 0) & (den - 1))) / (den)), (quot) * (den))
FBXSDK_DLL FbxLongLong FbxTCSeconds(FbxLongLong pTime);
FBXSDK_DLL FbxLongLong FbxTCMinutes(FbxLongLong pTime);
FBXSDK_DLL FbxLongLong FbxTCHours(FbxLongLong pTime);
FBXSDK_DLL FbxLongLong FbxTCSetRate(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, FbxLongLong pPeriod);
FBXSDK_DLL FbxLongLong FbxTCGetRate(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, FbxLongLong pPeriod);
FBXSDK_DLL FbxLongLong FbxTCSetNTSC(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
FBXSDK_DLL FbxLongLong FbxTCGetNTSC(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
FBXSDK_DLL FbxLongLong FbxTCSetMNTSCnd(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
FBXSDK_DLL FbxLongLong FbxTCGetMNTSCnd(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
FBXSDK_DLL FbxLongLong FbxTCSetMNTSC_2Xnd(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
FBXSDK_DLL FbxLongLong FbxTCGetMNTSC_2Xnd(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
FBXSDK_DLL FbxLongLong FbxTCSetMNTSC(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
FBXSDK_DLL FbxLongLong FbxTCGetMNTSC(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
FBXSDK_DLL FbxLongLong FbxTCSetPAL(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
FBXSDK_DLL FbxLongLong FbxTCGetPAL(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
FBXSDK_DLL FbxLongLong FbxTCSetFILM(int pHour, int pMinute, int pSecond, FbxLongLong pFrame);
FBXSDK_DLL FbxLongLong FbxTCGetFILM(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame);
FBXSDK_DLL FbxLongLong FbxTCSetFILMND(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
FBXSDK_DLL FbxLongLong FbxTCGetFILMND(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_TIMECODE_H_ */

View File

@ -1,172 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxutils.h
#ifndef _FBXSDK_CORE_BASE_UTILITIES_H_
#define _FBXSDK_CORE_BASE_UTILITIES_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxstring.h>
#include <fbxsdk/core/base/fbxstatus.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
#ifndef FBXSDK_ENV_WINSTORE
/** Retrieve the environment variable value.
* \return A new string containing the environment variable value. */
FBXSDK_DLL FbxString FbxGetEnv(const char* pEnvVar);
/** Get the application directory
* \return The application directory. */
FBXSDK_DLL FbxString FbxGetApplicationDirectory();
#endif
/** Retrieve the system temporary folder path name.
* \return A new string containing the system temporary folder path name. */
FBXSDK_DLL FbxString FbxGetSystemTempPath();
/** Override the system temporary folder path name.
* \param pPathUTF8 The system temporary folder to use for override.
* \return True if the system temporary folder path has been set and False otherwise.
* \remark The system temporary folder is limited to _MAX_PATH characters. Trying to set
* a longer value will fail and the current system temporary folder path is left unchanged.
*/
FBXSDK_DLL bool FbxSetSystemTempPath(const char* pPathUTF8);
/** Retrieve the working directory of the system in UTF8 format.
* \return A string that contain the current working directory of the system. */
FBXSDK_DLL FbxString FbxGetCurrentWorkPath();
/** Change the working directory of the system. */
FBXSDK_DLL void FbxSetCurrentWorkPath(const char* pPath_UTF8);
class FBXSDK_DLL FbxPathUtils
{
public:
/** Bind together a root path with a file path.
* \param pRootPath The root path that will get binded to the file path.
* \param pFilePath The file path to bind to the root path.
* \param pCleanPath If true, the resulting path will be cleaned via FbxPathUtils::Clean().
* \return Both paths binded together forming a new file path.
* \remark If the file path is already a full valid path, pFilePath is returned.
*/
static FbxString Bind(const char* pRootPath, const char* pFilePath, bool pCleanPath=true);
/** Extract the folder name from the given file path.
* \param pFilePath The given file path.
* \return The folder name. If there isn't any '\\' or '/' in the given file path, it will return pFilePath.
*/
static FbxString GetFolderName(const char* pFilePath);
/** Extract file name from the given file path.
* \param pFilePath The given file path.
* \param pWithExtension Decide the file name with extension or without extension.
* If it is true, return the file name with extension;
* if it is false, return the file name without extension.
*/
static FbxString GetFileName(const char* pFilePath, bool pWithExtension=true);
/** Extract the file extension in the given file path.
* \param pFilePath The file path to extract the extension.
* \return The file extension without the '.' character.
* \remark Return empty string if the file path doesn't contain a valid extension.
*/
static FbxString GetExtensionName(const char* pFilePath);
/** Change or append a file extension to the specified file path.
* \param pFilePath The file path to change the file extension
* \param pExtension The extension to change or append to the file path.
* \return The file path with the file extension changed/added.
* \remark If the file path doesn't end with a valid file name, pFilePath is returned.
*/
static FbxString ChangeExtension(const char* pFilePath, const char* pExtension);
//! Test if the given path is relative path, if it is return true.
static bool IsRelative(const char* pPath);
/** Get the given new path's relative path to the given root path.
* \param pRootPath The given root path
* \param pNewPath The given new path. If it is only file name, the default directory is work directory.
* \return The relative path.
* \remarks If the given two paths have the same drive, the function will turn '\\' in the relative path to '/'.
*/
static FbxString GetRelativePath(const char* pRootPath, const char* pNewPath);
//! Get the given new path's relative path to the given root path.
static FbxString GetRelativeFilePath(const char* pRootPath, const char* pNewFilePath);
/** Get the full path of given path (if the given path is relative path,
* it will take current directory as default root path.)
*/
static FbxString Resolve(const char* pRelPath);
//! Clean the redundant and useless denotations in given path name.
static FbxString Clean(const char* pPath);
/** Generate full safe file path name you can use to create new file.
* \param pFolder The folder where the file name should be attempted to be created.
* \param pPrefix The prefix of generated file name.
* \return A valid file path that can safely be used to create a new file.
*/
static FbxString GenerateFileName(const char* pFolder, const char* pPrefix);
/** Verify if the specified folder path exist.
* \param pFolderPathUTF8 The folder path to test its existance.
* \return True if the folder path exist, false otherwise.
* \remark This function work for relative paths. It will search from the current work path. */
static bool Exist(const char* pFolderPathUTF8);
/** Create the specified folder path if it doesn't exist.
* \param pFolderPathUTF8 The folder path to create, in UTF8 encoding.
* \return True if folder path already exist, or if it was successfully created, false otherwise.
* \remark This function will create multiple folders if needed, and it also work for relative paths. */
static bool Create(const char* pFolderPathUTF8);
/** Delete the specified folder path and all its content recursively.
* \param pFolderPathUTF8 The folder path to delete, in UTF8 encoding.
* \return True if folder path was successfully deleted, false otherwise.
* \remark This function work for relative paths. It will search from the current work path. */
static bool Delete(const char* pFolderPathUTF8);
#ifndef FBXSDK_ENV_WINSTORE
/** Verify if the folder contains items or not.
* \param pFolderPath_UTF8 The folder path to test if it contains items.
* \return True if the folder contain any kind of entry type. */
static bool IsEmpty(const char* pFolderPath_UTF8);
#endif
};
/** Global accessor to an FbxStatus object.
* This object is not used internally by the FBX SDK. It is provided for convenience and its usage is shown in the custom reader/writers samples. */
class FBXSDK_DLL FbxStatusGlobal
{
public:
static FbxStatus& GetRef()
{
if( !mStatusPtr )
{
mStatusPtr = FbxNew<FbxStatus>();
}
return *mStatusPtr;
}
private:
FbxStatusGlobal(){ mStatusPtr = NULL; }
~FbxStatusGlobal(){ FbxDelete<FbxStatus>(mStatusPtr); }
static FbxStatusGlobal sgFbxStatusGlobal;
static FbxStatus* mStatusPtr;
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_BASE_UTILITIES_H_ */

View File

@ -1,166 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxclassid.h
#ifndef _FBXSDK_CORE_CLASSID_H_
#define _FBXSDK_CORE_CLASSID_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxClassIdInfo;
class FbxObject;
class FbxPropertyHandle;
class FbxManager;
//! The function pointer type for object constructor functions.
typedef FbxObject* (*FbxObjectCreateProc)(FbxManager& pManager, const char* pName, const FbxObject* pFrom);
/** Internal class used to differentiate objects during run-time. Essentially, each class has an unique ClassId, that the
* system can request in order to test if the class match the description. This class implement the necessary tools to be able
* to perform hierarchic class testing. This means that a class B that inherits from the class A will answer yes to a "Is A"
* query of type A or B, but will answer no to a class C that can still inherit from A. All class must inherit from FbxObject
* before they can have their own ClassId. When using the standard macros to create new types of objects in the FBX SDK, a
* static ClassId will automatically be generated for that new class.
*
* When objects are exported to an FBX file, their class type is maintained using 3 sort of strings. They are the Object Type
* string, the Object Sub Type string and the Object Type Prefix. There is no good or bad way to choose the value of these
* identifiers, but it is preferable to use meaningful values to keep the ASCII version of FBX readable and easy to understand.
* \see FbxObject */
class FBXSDK_DLL FbxClassId
{
public:
//! Constructor.
FbxClassId();
/** Advanced constructor were we can specify the general parameters for this ClassId.
* \param pClassName The name of the class represented.
* \param pParentClassId The parent ClassId of this class.
* \param pConstructor A function pointer to a construction method for this ClassId.
* \param pFBXType The FBX file Object Type string associated to this class.
* \param pFBXSubType The FBX file Object Sub Type string associated to this class. */
FbxClassId(const char* pClassName, const FbxClassId& pParentClassId, FbxObjectCreateProc pConstructor=0, const char* pFBXType=NULL, const char* pFBXSubType=NULL);
//! Destructor.
void Destroy();
/** Retrieve the class name.
* \return The class identification string name. */
const char* GetName() const;
/** Retrieve the parent ClassId.
* \return The parent ClassId. */
FbxClassId GetParent() const;
/** Create an instance of this class.
* \param pManager The FBX SDK Manager to be used to instantiate this object. This allow the object to use the same memory manager as the provided manager.
* \param pName The name to assign to this new object instance.
* \param pFrom An object to clone if it matches the same ClassId. This is an optional parameter.
* \return The newly created instance of this class. */
FbxObject* Create(FbxManager& pManager, const char* pName, const FbxObject* pFrom);
/** Override the function pointer method to construct this object.
* \param pConstructor A newly defined function pointer to a construction method to replace the existing one.
* \return True if the operation was successful. */
bool Override(FbxObjectCreateProc pConstructor);
/** Test if this class is a hierarchical children of the specified class type. This is the standard method to differentiate object classes.
* \param pId The class type to test against self.
* \return True if the object is a hierarchical children of the type specified.
* \remark This function will perform a complete search until it reaches the top level class, but it will stop as soon as one ClassId matches the test. */
bool Is(const FbxClassId& pId) const;
/** Equivalence operator.
* \param pClassId The class type to test against self.
* \return \c true if the ClassId is exactly the same, \c false otherwise.
* \remark This function only perform direct equality test, and doesn't test hierarchic children. */
bool operator==(const FbxClassId& pClassId) const;
/** Inequivalence operator.
* \param pClassId The class type to test against self.
* \return \c true if the ClassId is not the same, \c false otherwise.
* \remark This function only perform direct inequality test, and doesn't test hierarchic children. */
bool operator!=(const FbxClassId& pClassId) const;
/** Retrieve the FBX file Object Type string associated to this class.
* \param pAskParent If \c true, retrieve the parent ClassId, but only if self ClassId is not valid.
* \return The FBX file Object Type string associated to this class. */
const char* GetFbxFileTypeName(bool pAskParent=false) const;
/** Retrieve the FBX file Object Sub Type string associated to this class.
* \return The FBX file Object Sub Type string associated to this class. */
const char* GetFbxFileSubTypeName() const;
/** Find out if self ClassId is valid or not.
* \return \c true if self ClassId is valid, \c false otherwise. */
inline bool IsValid() const { return mClassInfo ? true : false; }
/** Set the Object Type Prefix string associated to this class. This will change the "ObjectTypePrefix::" found in front
* of object name in the FBX file. This is useful to differentiate objects by their name without using the Object Type or
* Sub Type strings in the file.
* \param pObjectTypePrefix The Object Type prefix string. */
void SetObjectTypePrefix(const char* pObjectTypePrefix);
/** Retrieve the Object Type Prefix string associated to this class.
* \return The Object Type Prefix string. */
const char* GetObjectTypePrefix();
/** Retrieve the root property handle of this class. This is useful to access the default property hierarchy for this
* class. This allow users to retrieve information such as the default value for all properties of this class.
* \return The root property handle for this class. */
FbxPropertyHandle* GetRootClassDefaultPropertyHandle();
/** Increase the instance reference count for this class type.
* \return the new count of reference to this class after increment. */
int ClassInstanceIncRef();
/** Decrease the instance reference count for this class type.
* \return the new count of reference to this class after decrement. */
int ClassInstanceDecRef();
/** Retrieve the instance reference count for this class type.
* \return The reference count of this class type. */
int GetInstanceRef();
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
inline FbxClassIdInfo* GetClassIdInfo() { return mClassInfo; }
inline const FbxClassIdInfo* GetClassIdInfo() const { return mClassInfo; }
private:
FbxClassId(FbxClassIdInfo* mClassInfo);
bool SetFbxFileTypeName(const char* pName);
bool SetFbxFileSubTypeName(const char* pName);
FbxClassIdInfo* mClassInfo;
friend class FbxManager;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
//! Functor to compare FbxClassId
struct FbxClassIdCompare
{
inline int operator()(const FbxClassId& pKeyA, const FbxClassId& pKeyB) const
{
const FbxClassIdInfo* lKeyA = pKeyA.GetClassIdInfo();
const FbxClassIdInfo* lKeyB = pKeyB.GetClassIdInfo();
return lKeyA < lKeyB ? -1 : (lKeyA > lKeyB ? 1 : 0);
}
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_CLASSID_H_ */

View File

@ -1,312 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxconnectionpoint.h
#ifndef _FBXSDK_CORE_CONNECTION_POINT_H_
#define _FBXSDK_CORE_CONNECTION_POINT_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxarray.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FBXSDK_DLL FbxConnection
{
public:
enum EType
{
eNone = 0,
// System or user
eSystem = 1 << 0,
eUser = 1 << 1,
eSystemOrUser = eUser | eSystem,
// Type of Link
eReference = 1 << 2,
eContains = 1 << 3,
eData = 1 << 4,
eLinkType = eReference | eContains | eData,
eDefault = eUser | eReference,
eUnidirectional = 1 << 7
};
};
class FbxConnectionPointFilter;
class FBXSDK_DLL FbxConnectionPoint
{
public:
enum EDirection
{
eDirSrc = 1 << 0, // Contains sources
eDirDst = 1 << 1, // Contains destinations
eDirUni = 1 << 2, // Connection is not 2 ways
eDirBoth = eDirSrc | eDirDst,
eDirMask = eDirSrc | eDirDst | eDirUni
};
enum EType
{
eStandard = 0,
eSubConnection = 1 << 3, // Connect is a sub Connect of another
eTypeMask = eSubConnection
};
enum EAttribute
{
eDefault = 0,
eCache = 1 << 4,
eAttributeMask = eCache
};
enum EAllocFlag
{
eNotAllocated = 0,
eAllocated = 1 << 5,
eAllocFlagMask = eAllocated
};
enum ECleanedFlag
{
eNotCleaned = 0,
eCleaned = 1 << 6,
eCleanedFlagMask = eCleaned
};
enum EEvent
{
eSrcConnectRequest,
eDstConnectRequest,
eSrcConnect,
eDstConnect,
eSrcConnected,
eDstConnected,
eSrcDisconnect,
eDstDisconnect,
eSrcDisconnected,
eDstDisconnected,
eSrcReplaceBegin,
eSrcReplaceEnd,
eDstReplaceBegin,
eDstReplaceEnd,
eSrcReorder,
eSrcReordered
};
// Constructor/Destructor
FbxConnectionPoint(void* pData=0);
virtual ~FbxConnectionPoint();
void SetFilter(FbxConnectionPointFilter* pConnectFilter, EType pType=eStandard);
void InternalClear();
//! Clear the ConnectList without any regards to what is connected
void WipeConnectionList();
void Destroy();
void SubConnectRemoveAll();
inline FbxConnectionPoint* GetSubOwnerConnect(){ return GetConnectType() == eSubConnection ? mOwner : NULL; }
inline FbxConnectionPointFilter* GetFilter(){ return mFilter; }
virtual bool IsInReplace(FbxConnectionPoint* p1, FbxConnectionPoint* p2);
inline void SetConnectType(EType pType){ mFlags = (mFlags & ~eTypeMask) | pType; }
inline EType GetConnectType(){ return EType(mFlags & eTypeMask); }
inline void SetDirection(int pDirections){ mFlags = (mFlags & ~eDirMask) | pDirections; }
inline EDirection GetDirection(){ return EDirection(mFlags & eDirMask); }
inline void SetAttribute(int pAttributes){ mFlags = (mFlags & ~eAttributeMask) | pAttributes; }
inline EAttribute GetAttribute(){ return EAttribute(mFlags & eAttributeMask); }
inline void SetAllocatedFlag(bool pBool){ mFlags = ( pBool ) ? mFlags | eAllocated : mFlags & ~eAllocFlagMask; }
inline bool GetAllocatedFlag(){ return ( mFlags & eAllocFlagMask ) ? true : false; }
inline void SetCleanedFlag(bool pBool){ mFlags = ( pBool ) ? mFlags | eCleaned : mFlags & ~eCleanedFlagMask; }
inline bool GetCleanedFlag(){ return ( mFlags & eCleanedFlagMask ) ? true : false; }
bool IsValidSrc(FbxConnectionPoint* pConnect);
bool IsValidDst(FbxConnectionPoint* pConnect);
bool IsValidSrcConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType);
bool IsValidDstConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType);
bool RequestValidSrcConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType );
bool RequestValidDstConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType );
bool ConnectSrc(FbxConnectionPoint* pSrc,FbxConnection::EType pConnectionType=FbxConnection::eNone);
bool ConnectDst(FbxConnectionPoint* pDst,FbxConnection::EType pConnectionType=FbxConnection::eNone);
bool ConnectSrcAt(int pDst_SrcIndex, FbxConnectionPoint* pSrc, FbxConnection::EType pConnectionType=FbxConnection::eNone);
bool ConnectDstAt(int pSrc_DstIndex, FbxConnectionPoint* pDst, FbxConnection::EType pConnectionType=FbxConnection::eNone);
static bool ConnectConnect(FbxConnectionPoint* pSrc,FbxConnectionPoint* pDst,FbxConnection::EType pConnectionType);
static bool ConnectAt(FbxConnectionPoint* pSrc, int pSrc_DstIndex, FbxConnectionPoint* pDst, int pDst_SrcIndex, FbxConnection::EType pConnectionType);
bool DisconnectDst(FbxConnectionPoint* pSrc);
bool DisconnectSrc(FbxConnectionPoint* pSrc);
void DisconnectAllSrc();
void DisconnectAllDst();
static bool DisconnectConnect(FbxConnectionPoint* pSrc,FbxConnectionPoint* pDst);
bool DisconnectDstAt(int pIndex);
bool DisconnectSrcAt(int pIndex);
bool ReplaceInDst(FbxConnectionPoint* pDstOld, FbxConnectionPoint* pDstNew, int pIndexInNew);
bool ReplaceInSrc(FbxConnectionPoint* pSrcOld, FbxConnectionPoint* pSrcNew, int pIndexInNew);
bool ReplaceDstAt(int pIndex, FbxConnectionPoint* pDst);
bool ReplaceSrcAt(int pIndex, FbxConnectionPoint* pSrc);
bool SwapSrc(int pIndexA, int pIndexB);
/** Change the position of a source Connect.
* \param pIndex Position of the Connect to move.
* \param pAtIndex Position where to move the Connect.
* \return \c True if the Connect was moved.
* \remarks After the move, the Connect will be precisely at position pAtIndex.
*/
bool MoveSrcAt(int pIndex, int pAtIndex);
/** Change the position of a source Connect.
* \param pSrc Connect to move.
* \param pAtSrc Connect at which position to move.
* \return \c True if the Connect was moved.
* \remarks After the move, the Connect will be precisely at the position where pAtSrc was before the move.
*/
bool MoveSrcAt(FbxConnectionPoint* pSrc, FbxConnectionPoint* pAtSrc);
// Access services
bool IsConnectedSrc(FbxConnectionPoint*);
bool IsConnectedDst(FbxConnectionPoint*);
inline bool IsConnected(FbxConnectionPoint* pConnect) { return IsConnectedSrc(pConnect) || IsConnectedDst(pConnect); }
inline int GetSrcCount() const { return mConnectionList.GetSrcCount(); }
inline FbxConnectionPoint* GetSrc(int pIndex) const { return mConnectionList.GetSrc(pIndex);}
inline FbxConnection::EType GetSrcType(int pIndex) const { return mConnectionList.GetSrcType(pIndex);}
inline int GetDstCount() const { return mConnectionList.GetDstCount(); }
inline FbxConnectionPoint* GetDst(int pIndex) const { return mConnectionList.GetDst(pIndex);}
inline FbxConnection::EType GetDstType(int pIndex) const { return mConnectionList.GetDstType(pIndex);}
inline int FindSrc(FbxConnectionPoint* pConnect){ return mConnectionList.FindSrc(pConnect); }
inline int FindDst(FbxConnectionPoint* pConnect){ return mConnectionList.FindDst(pConnect); }
// Filtered versions
inline int GetSrcCount(FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetSrcCount() : GetSrcCount(); }
inline FbxConnectionPoint* GetSrc(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetSrc(pIndex) : GetSrc(pIndex); }
inline FbxConnection::EType GetSrcType(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetSrcType(pIndex) : GetSrcType(pIndex); }
inline int GetDstCount(FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetDstCount() : GetDstCount(); }
inline FbxConnectionPoint* GetDst(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetDst(pIndex): GetDst(pIndex); }
inline FbxConnection::EType GetDstType(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetDstType(pIndex) : GetDstType(pIndex); }
void* GetData(){ return mData; }
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
class ConnectionList
{
public:
ConnectionList();
~ConnectionList();
void Clear();
void InsertSrcAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pType);
void AddSrc(FbxConnectionPoint* pConnect, FbxConnection::EType pType);
void RemoveSrcAt(int pIndex);
int FindSrc(FbxConnectionPoint* pConnect) const;
int GetSrcCount() const;
FbxConnectionPoint* GetSrc(int pIndex) const;
FbxConnection::EType GetSrcType(int pIndex) const;
void InsertDstAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pType);
void AddDst(FbxConnectionPoint* pConnect, FbxConnection::EType pType);
void RemoveDstAt(int pIndex);
int FindDst(FbxConnectionPoint* pConnect) const;
int GetDstCount() const;
FbxConnectionPoint* GetDst(int pIndex) const;
FbxConnection::EType GetDstType(int pIndex) const;
protected:
struct Connection {
Connection(FbxConnectionPoint* pPoint, FbxConnection::EType pType) : mPoint(pPoint), mType(pType){}
FbxConnectionPoint* mPoint; FbxConnection::EType mType;
};
FbxArray<Connection> mSrcList;
FbxArray<Connection> mDstList;
};
void SubConnectAdd(FbxConnectionPoint* pConnect);
void SubConnectRemove(FbxConnectionPoint* pConnect);
FbxConnectionPoint* SubConnectFind(FbxConnectionPointFilter* pFilter);
FbxConnectionPoint* SubConnectGetOrCreate(FbxConnectionPointFilter* pFilter);
void SubConnectFill(FbxConnectionPoint* pConnect);
virtual bool ConnectNotify(EEvent pAction, FbxConnectionPoint* pThis, int pIndex, FbxConnectionPoint* pConnect=NULL, FbxConnection::EType pConnectionType=FbxConnection::eNone, FbxConnectionPoint* pNewConnect=NULL);
virtual void ConnectCleanUp(FbxConnectionPoint* pThis);
int FindSrcIndexFromOwnerConnectIndex(FbxConnectionPoint* pOwner, int pOwnerIndex);
int FindDstIndexFromOwnerConnectIndex(FbxConnectionPoint* pOwner, int pOwnerIndex);
bool InternalMoveSrcBefore(int pIndex, int pBeforeIndex);
private:
inline void InsertSrcAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType){ mConnectionList.InsertSrcAt(pIndex, pConnect, pConnectionType); }
inline void InsertDstAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType){ mConnectionList.InsertDstAt(pIndex, pConnect, pConnectionType); }
inline void RemoveSrcAt(int pIndex){ mConnectionList.RemoveSrcAt(pIndex); }
inline void RemoveDstAt(int pIndex){ mConnectionList.RemoveDstAt(pIndex); }
static bool InternalConnectBefore(FbxConnectionPoint* pSrc, FbxConnectionPoint* pSrc_BeforeDst, FbxConnectionPoint* pDst, FbxConnectionPoint* pDst_BeforeSrc, FbxConnection::EType pConnectionType);
static bool UserConnectBefore(FbxConnectionPoint* pSrc, FbxConnectionPoint* pSrc_BeforeDst, FbxConnectionPoint* pDst, FbxConnectionPoint* pDst_BeforeSrc, FbxConnection::EType pConnectionType);
static bool EmitReplaceNotify(FbxConnectionPoint* pDstOwner, FbxConnectionPoint* pSrcOwner, FbxConnectionPoint* pDst, FbxConnectionPoint* pSrc, EEvent pConnectAction, FbxConnectionPoint* pNew);
virtual bool SetOwnerConnect(FbxConnectionPoint* pConnect);
inline FbxConnectionPoint* GetOwnerConnect(){ return mOwner; }
bool ConnectOwnedConnect(FbxConnectionPoint* pConnect);
bool DisconnectOwnedConnect(FbxConnectionPoint* pConnect);
void* mData;
int mFlags;
FbxConnectionPoint* mOwner;
ConnectionList mConnectionList;
FbxArray<FbxConnectionPoint*> mSubConnectList;
FbxArray<FbxConnectionPoint*> mSubConnectCreatedList;
FbxConnectionPointFilter* mFilter;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
/** Class to manage Connect Filter */
class FBXSDK_DLL FbxConnectionPointFilter
{
public:
virtual ~FbxConnectionPointFilter() {};
//! Return reference ConnectionPoint filter.
virtual FbxConnectionPointFilter* Ref();
//! Cancel reference
virtual void Unref();
//! Get unique filter ID
virtual FbxInt GetUniqueId() const { return 0; }
/** Judge if the given Connection Point is valid
* \param pConnect The given Connection Point.
* \return \c True if valid, \c false if not valid. */
virtual bool IsValid(FbxConnectionPoint* pConnect) const;
/** Judge if the given Connection Point is a valid connection
* \param pConnect The given Connection Point.
* \param pType Connection type.
* \return \c True if valid, \c false if not valid. */
virtual bool IsValidConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pType) const;
/** Judge if it is equal with the given ConnectionPoint filter.
* \param pConnectFilter The given ConnectionPoint filter.
* \return \c True if equal, \c false if unequal. */
virtual bool IsEqual(FbxConnectionPointFilter* pConnectFilter) const;
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_CONNECTION_POINT_H_ */

View File

@ -1,267 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxdatatypes.h
#ifndef _FBXSDK_CORE_DATA_TYPES_H_
#define _FBXSDK_CORE_DATA_TYPES_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/fbxpropertytypes.h>
#include <fbxsdk/core/fbxpropertyhandle.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** FBX SDK data type class
* \nosubgrouping
*/
class FBXSDK_DLL FbxDataType
{
public:
static FbxDataType Create(const char* pName, const EFbxType pType);
static FbxDataType Create(const char* pName, const FbxDataType& pDataType);
/**
*\name Constructor and Destructor.
*/
//@{
//! Constructor.
FbxDataType();
/** Copy constructor.
* \param pDataType Another FbxDataType object copied to this one.
*/
FbxDataType(const FbxDataType& pDataType);
//! Destroy this datatype.
void Destroy();
/** Constructor.
* \param pTypeInfoHandle Type information handle
*/
FbxDataType(const FbxPropertyHandle& pTypeInfoHandle);
//! Destructor.
~FbxDataType();
//@}
/** Assignment operator
* \param pDataType Datatype whose value is assigned to this datatype.
* \return This datatype
*/
inline FbxDataType& operator=(const FbxDataType& pDataType){ mTypeInfoHandle=pDataType.mTypeInfoHandle; return *this; }
/**
* \name boolean operation
*/
//@{
/** Equality operator
* \param pDataType Datatype to compare to.
* \return \c true if equal,\c false otherwise.
*/
inline bool operator==(const FbxDataType& pDataType) const { return mTypeInfoHandle==pDataType.mTypeInfoHandle; }
/** Non-equality operator
* \param pDataType Datatype to compare to.
* \return \c true if unequal,\c false otherwise.
*/
inline bool operator!=(const FbxDataType& pDataType) const { return mTypeInfoHandle!=pDataType.mTypeInfoHandle; }
//@}
/** Test whether this datatype is a valid datatype.
* \return \c true if valid, \c false otherwise.
*/
inline bool Valid() const { return mTypeInfoHandle.Valid(); }
/** Test if this datatype is the specified datatype.
* \param pDataType Datatype to compare to.
* \return \c true if this datatype is the specified datatype, \c false otherwise.
*/
inline bool Is(const FbxDataType& pDataType) const { return mTypeInfoHandle.Is(pDataType.mTypeInfoHandle); }
/** Retrieve this data type.
* \return This data type.
*/
EFbxType GetType() const;
/** Retrieve data type name.
* \return Data type name.
*/
const char* GetName() const;
/** Retrieve the information handle of this data type.
* \return Information handle of this data type.
*/
inline const FbxPropertyHandle& GetTypeInfoHandle() const { return mTypeInfoHandle; }
private:
FbxPropertyHandle mTypeInfoHandle;
friend class FbxManager;
};
/** Retrieve data type from type enumeration index
* \param pType The type enumeration index
* \return The corresponding data type
*/
FBXSDK_DLL const FbxDataType& FbxGetDataTypeFromEnum(const EFbxType pType);
/** Retrieve data type name string used by I/O operations
* \param pDataType The data type instance to retrieve its I/O name string
* \return The data type name string
* \remark This function is only used during I/O operations. It is not equal
* to the actual data type name.
*/
FBXSDK_DLL const char* FbxGetDataTypeNameForIO(const FbxDataType& pDataType);
//! \name Basic Data Types
//@{
extern FBXSDK_DLL FbxDataType FbxUndefinedDT;
extern FBXSDK_DLL FbxDataType FbxBoolDT;
extern FBXSDK_DLL FbxDataType FbxCharDT;
extern FBXSDK_DLL FbxDataType FbxUCharDT;
extern FBXSDK_DLL FbxDataType FbxShortDT;
extern FBXSDK_DLL FbxDataType FbxUShortDT;
extern FBXSDK_DLL FbxDataType FbxIntDT;
extern FBXSDK_DLL FbxDataType FbxUIntDT;
extern FBXSDK_DLL FbxDataType FbxLongLongDT;
extern FBXSDK_DLL FbxDataType FbxULongLongDT;
extern FBXSDK_DLL FbxDataType FbxFloatDT;
extern FBXSDK_DLL FbxDataType FbxHalfFloatDT;
extern FBXSDK_DLL FbxDataType FbxDoubleDT;
extern FBXSDK_DLL FbxDataType FbxDouble2DT;
extern FBXSDK_DLL FbxDataType FbxDouble3DT;
extern FBXSDK_DLL FbxDataType FbxDouble4DT;
extern FBXSDK_DLL FbxDataType FbxDouble4x4DT;
extern FBXSDK_DLL FbxDataType FbxEnumDT;
extern FBXSDK_DLL FbxDataType FbxStringDT;
extern FBXSDK_DLL FbxDataType FbxTimeDT;
extern FBXSDK_DLL FbxDataType FbxReferenceDT;
extern FBXSDK_DLL FbxDataType FbxBlobDT;
extern FBXSDK_DLL FbxDataType FbxDistanceDT;
extern FBXSDK_DLL FbxDataType FbxDateTimeDT;
//@}
//! \name Extended Data Types
//@{
extern FBXSDK_DLL FbxDataType FbxColor3DT;
extern FBXSDK_DLL FbxDataType FbxColor4DT;
extern FBXSDK_DLL FbxDataType FbxCompoundDT;
extern FBXSDK_DLL FbxDataType FbxReferenceObjectDT;
extern FBXSDK_DLL FbxDataType FbxReferencePropertyDT;
extern FBXSDK_DLL FbxDataType FbxVisibilityDT;
extern FBXSDK_DLL FbxDataType FbxVisibilityInheritanceDT;
extern FBXSDK_DLL FbxDataType FbxUrlDT;
extern FBXSDK_DLL FbxDataType FbxXRefUrlDT;
//@}
//! \name Transform Data Types
//@{
extern FBXSDK_DLL FbxDataType FbxTranslationDT;
extern FBXSDK_DLL FbxDataType FbxRotationDT;
extern FBXSDK_DLL FbxDataType FbxScalingDT;
extern FBXSDK_DLL FbxDataType FbxQuaternionDT;
extern FBXSDK_DLL FbxDataType FbxLocalTranslationDT;
extern FBXSDK_DLL FbxDataType FbxLocalRotationDT;
extern FBXSDK_DLL FbxDataType FbxLocalScalingDT;
extern FBXSDK_DLL FbxDataType FbxLocalQuaternionDT;
extern FBXSDK_DLL FbxDataType FbxTransformMatrixDT;
extern FBXSDK_DLL FbxDataType FbxTranslationMatrixDT;
extern FBXSDK_DLL FbxDataType FbxRotationMatrixDT;
extern FBXSDK_DLL FbxDataType FbxScalingMatrixDT;
//@}
//! \name Material Data Types
//@{
extern FBXSDK_DLL FbxDataType FbxMaterialEmissiveDT;
extern FBXSDK_DLL FbxDataType FbxMaterialEmissiveFactorDT;
extern FBXSDK_DLL FbxDataType FbxMaterialAmbientDT;
extern FBXSDK_DLL FbxDataType FbxMaterialAmbientFactorDT;
extern FBXSDK_DLL FbxDataType FbxMaterialDiffuseDT;
extern FBXSDK_DLL FbxDataType FbxMaterialDiffuseFactorDT;
extern FBXSDK_DLL FbxDataType FbxMaterialBumpDT;
extern FBXSDK_DLL FbxDataType FbxMaterialNormalMapDT;
extern FBXSDK_DLL FbxDataType FbxMaterialTransparentColorDT;
extern FBXSDK_DLL FbxDataType FbxMaterialTransparencyFactorDT;
extern FBXSDK_DLL FbxDataType FbxMaterialSpecularDT;
extern FBXSDK_DLL FbxDataType FbxMaterialSpecularFactorDT;
extern FBXSDK_DLL FbxDataType FbxMaterialShininessDT;
extern FBXSDK_DLL FbxDataType FbxMaterialReflectionDT;
extern FBXSDK_DLL FbxDataType FbxMaterialReflectionFactorDT;
extern FBXSDK_DLL FbxDataType FbxMaterialDisplacementDT;
extern FBXSDK_DLL FbxDataType FbxMaterialVectorDisplacementDT;
extern FBXSDK_DLL FbxDataType FbxMaterialCommonFactorDT;
extern FBXSDK_DLL FbxDataType FbxMaterialCommonTextureDT;
//@}
//! \name Layer Element Data Types
//@{
extern FBXSDK_DLL FbxDataType FbxLayerElementUndefinedDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementNormalDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementBinormalDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementTangentDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementMaterialDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementTextureDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementPolygonGroupDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementUVDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementVertexColorDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementSmoothingDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementCreaseDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementHoleDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementUserDataDT;
extern FBXSDK_DLL FbxDataType FbxLayerElementVisibilityDT;
//@}
//! \name I/O Specialized Data Types
//@{
extern FBXSDK_DLL FbxDataType FbxAliasDT;
extern FBXSDK_DLL FbxDataType FbxPresetsDT;
extern FBXSDK_DLL FbxDataType FbxStatisticsDT;
extern FBXSDK_DLL FbxDataType FbxTextLineDT;
extern FBXSDK_DLL FbxDataType FbxUnitsDT;
extern FBXSDK_DLL FbxDataType FbxWarningDT;
extern FBXSDK_DLL FbxDataType FbxWebDT;
//@}
//! \name External Support Data Types
//@{
extern FBXSDK_DLL FbxDataType FbxActionDT;
extern FBXSDK_DLL FbxDataType FbxCameraIndexDT;
extern FBXSDK_DLL FbxDataType FbxCharPtrDT;
extern FBXSDK_DLL FbxDataType FbxConeAngleDT;
extern FBXSDK_DLL FbxDataType FbxEventDT;
extern FBXSDK_DLL FbxDataType FbxFieldOfViewDT;
extern FBXSDK_DLL FbxDataType FbxFieldOfViewXDT;
extern FBXSDK_DLL FbxDataType FbxFieldOfViewYDT;
extern FBXSDK_DLL FbxDataType FbxFogDT;
extern FBXSDK_DLL FbxDataType FbxHSBDT;
extern FBXSDK_DLL FbxDataType FbxIKReachTranslationDT;
extern FBXSDK_DLL FbxDataType FbxIKReachRotationDT;
extern FBXSDK_DLL FbxDataType FbxIntensityDT;
extern FBXSDK_DLL FbxDataType FbxLookAtDT;
extern FBXSDK_DLL FbxDataType FbxOcclusionDT;
extern FBXSDK_DLL FbxDataType FbxOpticalCenterXDT;
extern FBXSDK_DLL FbxDataType FbxOpticalCenterYDT;
extern FBXSDK_DLL FbxDataType FbxOrientationDT;
extern FBXSDK_DLL FbxDataType FbxRealDT;
extern FBXSDK_DLL FbxDataType FbxRollDT;
extern FBXSDK_DLL FbxDataType FbxScalingUVDT;
extern FBXSDK_DLL FbxDataType FbxShapeDT;
extern FBXSDK_DLL FbxDataType FbxStringListDT;
extern FBXSDK_DLL FbxDataType FbxTextureRotationDT;
extern FBXSDK_DLL FbxDataType FbxTimeCodeDT;
extern FBXSDK_DLL FbxDataType FbxTimeWarpDT;
extern FBXSDK_DLL FbxDataType FbxTranslationUVDT;
extern FBXSDK_DLL FbxDataType FbxWeightDT;
//@}
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_DATA_TYPES_H_ */

View File

@ -1,94 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxemitter.h
#ifndef _FBXSDK_CORE_EMITTER_H_
#define _FBXSDK_CORE_EMITTER_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/base/fbxintrusivelist.h>
#include <fbxsdk/core/fbxeventhandler.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxListener;
/** Base class to emit event with the specified event type.
* The event type could be a specific class which derived from FbxEvent. Please read FbxEmitter::Emit() for more details.
* Event emitter contains a list of event handlers.
* FBX object could be used as emitter, since FbxObject is derived from FbxEmitter.
* Before using emitter to emit an event, one or more event handlers must be added to the handlers list of current emitter.
* In other words, it's "bind event handlers to emitter".
* There are two ways to bind event handlers to emitter.
* \li 1. If you already got an event handler and would like to bind it to current emitter, please call FbxEmitter::AddListener().
* \li 2. Or you can create an event listener first and then call FbxListener::Bind().
* It will create an event handler automatically and bind the handler to the specified emitter.
* It's similar to unbind or remove an even handler. For more details,
* \see FbxEmitter::RemoveListener()
* \see FbxListener::Unbind()
* \remarks An object(emitter) can emit a certain type of event, the plug-in(listener) who are listening to that type of event,
* will receive a signal and take action to process the event data.
* \par The whole process of event is:
* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
* \li 3. Once an event is emitted, the listener to this event will receive a signal.
* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
* \note The event data is process by the callback function of event handler.
* \nosubgrouping
* \see FbxListener FbxEventHandler FbxEvent FbxEventBase
*/
class FBXSDK_DLL FbxEmitter
{
public:
/** Add the specified event handler to current emitter list.
* \param pHandler The event handler will be added to the handlers list of current emitter. */
void AddListener(FbxEventHandler& pHandler);
/** Remove the specified event handler from current emitter list.
* \param pHandler The event handler will be removed from the handlers list of current emitter. */
void RemoveListener(FbxEventHandler& pHandler);
/** Emit an event with the specified the event type. One the event is emitted, the listener to this event will receive a signal.
* \param pEvent Specify the event type to emit. Could be a specific class which derived from FbxEvent, such as FbxObjectPropertyChanged.
* \see FbxEventBase FbxObjectPropertyChanged FbxEventReferencedDocument FbxEventPostExport
* \see FbxEventPostImport FbxEventPreExport FbxEventPreImport FbxEventPopulateSystemLibrary */
template <typename EventType> void Emit(const EventType& pEvent) const
{
if( !mData ) return;
EventHandlerList::iterator itBegin = mData->mEventHandlerList.Begin();
EventHandlerList::iterator itEnd = mData->mEventHandlerList.End();
for( EventHandlerList::iterator it = itBegin; it != itEnd; ++it )
{
if ((*it).GetHandlerEventType() == pEvent.GetTypeId())
{
(*it).FunctionCall(pEvent);
}
}
}
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
FbxEmitter();
~FbxEmitter();
protected:
typedef FbxIntrusiveList<FbxEventHandler, FbxEventHandler::eEmitter> EventHandlerList;
struct EventData { EventHandlerList mEventHandlerList; };
EventData* mData;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_EMITTER_H_ */

View File

@ -1,188 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxevent.h
#ifndef _FBXSDK_CORE_EVENT_H_
#define _FBXSDK_CORE_EVENT_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/fbxpropertytypes.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** FBX SDK event base class.
* An event is something that is emitted by an emitter, with the goal of being filled by the listener that listen to it.
* You can see that like a form that you send to some people. If those people know how to fill the form, they fill it and return
* it to you with the right information in it. FBX object could be used as emitter, since FbxObject is derived from FbxEmitter.
* Meanwhile, plug-in could be used as listener, since FbxPlugin is derived from FbxListener.
* The derived class of FbxEventBase contains a type ID to distinguish different types of events.
* FBX object can emit different types of FBX events at different conditions.
* \par The whole process of event is:
* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
* \li 3. Once an event is emitted, the listener to this event will receive a signal.
* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
* \note The event data is process by the callback function of event handler.
* For example, if a certain property of a FBX object is changed, the FBX object(emitter) can emit an event which type is FbxObjectPropertyChanged.
* The plug-in(listener) who are listening to FbxObjectPropertyChanged, will receive a signal and take action to process the event data.
* \nosubgrouping
* \see FbxEvent FbxEventHandler FbxListener FbxEmitter
*/
class FBXSDK_DLL FbxEventBase
{
public:
/**
* \name Constructor and Destructor
*/
//@{
//!Destructor
virtual ~FbxEventBase();
//@}
/** Retrieve the event type ID
* \return type id
*/
virtual int GetTypeId() const = 0;
/** Force events to give us a name
* \return event name
*/
virtual const char* GetEventName() const = 0;
protected:
static int GetStaticTypeId(const char*);
};
// Force events to declare a name by using an abstract method, and force them to use
// the proper name by making the call from FbxEvent<> go through the private static
// method.
#define FBXSDK_EVENT_DECLARE(Class) \
public: virtual const char* GetEventName() const { return FbxEventName(); } \
private: static const char* FbxEventName() { return #Class; } \
friend class FbxEvent<Class>; \
//
// Similar to above, but to be used when you've got an event template, and the
// type is something know to FBX
//
#define FBXSDK_EVENT_TYPE_DECLARE(Class, FBXType) \
public: virtual const char* GetEventName() const { return FbxEventName(); } \
private: \
static const char* FbxEventName() { \
static FbxString lEventName = FbxString(#Class) + FbxString("<") + \
FbxGetDataTypeFromEnum(FbxTypeOf(FBXType())).GetName() + ">"; \
\
return lEventName.Buffer(); \
} \
friend class FbxEvent< Class<FBXType> >;
//This is for templates classes that will uses non fbxtypes in their templates
//We force the the creation of an UNIQUE string for each types so that we can
//retrieve the event within multiple DLLs
//to be able to use this, the char EventName[] = "uniqueEventName"; must be declared
//globally.
#define FBXSDK_EVENT_TEMPLATE_HEADER(ClassName, TemplateName)\
template < class TemplateName, const char* T > \
class ClassName: public FbxEvent< ClassName <TemplateName,T> >\
{\
public: virtual const char* GetEventName() const {return FbxEventName();}\
private: static const char* FbxEventName() {\
static FbxString lEventName = (FbxString(#ClassName) +"<"+ FbxString(T) +">");\
return lEventName.Buffer();\
}\
friend class FbxEvent< ClassName<TemplateName, T> >;
//This is the footer macro, to put at the end to close the template class
//created by FBXSDK_EVENT_TEMPLATE_HEADER
#define FBXSDK_EVENT_TEMPLATE_FOOTER()\
};
/** FBX event class, derived from FbxEventBase, and it contains a type ID for event.
* It's a template class. You can derive your own types of even. Such as:
* \code class FbxEventCustom : public FbxEvent<FbxEventCustom> \endcode
* \see FbxObjectPropertyChanged FbxEventReferencedDocument FbxEventPostExport
* \see FbxEventPostImport FbxEventPreExport FbxEventPreImport FbxEventPopulateSystemLibrary
* \nosubgrouping
* \remarks A FBX event is something that is emitted by an emitter, with the goal of being filled by the listener that listen to it.
* An object(emitter) can emit a certain type of event, the plug-in(listener) who are listening to that type of event,
* will receive a signal and take action to process the event data.
* \par The whole process of event is:
* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
* \li 3. Once an event is emitted, the listener to this event will receive a signal.
* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
* \note The event data is process by the callback function of event handler.
* \see FbxEventBase FbxEventHandler FbxListener FbxEmitter
*/
//---------------------------------------------------
// T : We use the curiously recurring template pattern
// to initialize the typeId of each event type
template<typename T> class FbxEvent : public FbxEventBase
{
public:
//!Destructor
virtual ~FbxEvent(){}
/** Update the type ID of current event with the given type ID.
* \param pTypeId the new type ID.
*/
static void ForceTypeId(int pTypeId)
{
// This is to handle specific cases where the type ID must be hard coded
// It is useful for shared event across DLL. We can then guarantee that
// The ID of a certain type will always have the same ID
smTypeId = pTypeId;
}
/** Retrieve the event type ID
* \note This may be called from multiple threads.
* \return type id
*/
virtual int GetTypeId() const
{
return GetStaticTypeId();
}
/** Retrieve the event type ID
* \return type id
*/
static int GetStaticTypeId()
{
if( !smTypeId )
{
if( !smTypeId )
{
// If this does not compile, you need to add
// FBXSDK_EVENT_DECLARE(YourEventClassName) to your class declaration
smTypeId = FbxEventBase::GetStaticTypeId(T::FbxEventName());
}
}
return smTypeId;
}
private:
//! The type ID of event
static int smTypeId;
};
// Static members implementation
template<typename T> int FbxEvent<T>::smTypeId = 0;
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_EVENT_H_ */

View File

@ -1,129 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxeventhandler.h
#ifndef _FBXSDK_CORE_EVENT_HANDLER_H_
#define _FBXSDK_CORE_EVENT_HANDLER_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/fbxevent.h>
#include <fbxsdk/core/base/fbxintrusivelist.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxListener;
/** Event handler class contains a listener and a callback function.
* Event handler is used to bind emitter and listener together. Its callback function can process event data.
* To generate a valid event handler, you can create an event emitter and event listener first and then call FbxListener::Bind().
* It will create an event handler automatically and bind the handler to the listener and the created emitter.
* After that, the emitter and listener are bound together via event handler.
* \remarks An object(emitter) can emit a certain type of event, the object(listener) who are listening to that type of event,
* will receive a signal and take action to process the event data.
* \par The whole process of event is:
* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
* \li 3. Once an event is emitted, the listener to this event will receive a signal.
* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
* \note The event data is process by the callback function of event handler.
* \nosubgrouping
* \see FbxListener FbxEventBase FbxEvent FbxEmitter
*/
class FbxEventHandler
{
public:
//! Event handler base type.
enum EType
{
eListener, //!< Listener event handler type.
eEmitter, //!< Emitter event handler type.
eCount //!< Count of different event handler types.
};
/** Get event type of current handler.
* \return The type ID of event. */
virtual int GetHandlerEventType()=0;
/** Call function that process event data.
* \param pEvent specify the event type. pEvent could be a specific class which derived from FbxEventBase.
* \see FbxEventBase */
virtual void FunctionCall(const FbxEventBase& pEvent)=0;
/** Get listener of current handler.
* \return A pointer to the listener object. */
virtual FbxListener* GetListener()=0;
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
FbxEventHandler(){}
virtual ~FbxEventHandler(){}
FBXSDK_INTRUSIVE_LIST_NODE(FbxEventHandler, eCount);
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <typename EventType, typename ListenerType> class FbxMemberFuncEventHandler : public FbxEventHandler
{
typedef void (ListenerType::*CallbackFnc)(const EventType*);
public:
FbxMemberFuncEventHandler(ListenerType* pListenerInstance, CallbackFnc pFunction) : mListener(pListenerInstance), mFunction(pFunction){}
virtual int GetHandlerEventType(){ return EventType::GetStaticTypeId(); }
virtual void FunctionCall(const FbxEventBase& pEvent){ (*mListener.*mFunction)(reinterpret_cast<const EventType*>(&pEvent)); }
virtual FbxListener* GetListener(){ return mListener; }
private:
ListenerType* mListener;
CallbackFnc mFunction;
};
template <typename EventType, typename ListenerType> class FbxConstMemberFuncEventHandler : public FbxEventHandler
{
typedef void (ListenerType::*CallbackFnc)(const EventType*) const;
public:
FbxConstMemberFuncEventHandler(ListenerType* pListenerInstance, CallbackFnc pFunction) : mListener(pListenerInstance), mFunction(pFunction){}
virtual int GetHandlerEventType(){ return EventType::GetStaticTypeId(); }
virtual void FunctionCall(const FbxEventBase& pEvent){ (*mListener.*mFunction)(reinterpret_cast<const EventType*>(&pEvent)); }
virtual FbxListener* GetListener(){ return mListener; }
private:
ListenerType* mListener;
CallbackFnc mFunction;
};
template <typename EventType> class FbxFuncEventHandler : public FbxEventHandler
{
typedef void (*CallbackFnc)(const EventType*, FbxListener*);
public:
FbxFuncEventHandler(FbxListener* pListener, CallbackFnc pFunction) : mListener(pListener), mFunction(pFunction){}
virtual int GetHandlerEventType(){ return EventType::GetStaticTypeId(); }
virtual void FunctionCall(const FbxEventBase& pEvent){ (*mFunction)(reinterpret_cast<const EventType*>(&pEvent), mListener); }
virtual FbxListener* GetListener(){ return mListener; }
private:
FbxListener* mListener;
CallbackFnc mFunction;
};
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_EVENT_HANDLER_H_ */

View File

@ -1,121 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxlistener.h
#ifndef _FBXSDK_CORE_LISTENER_H_
#define _FBXSDK_CORE_LISTENER_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/fbxemitter.h>
#include <fbxsdk/core/fbxeventhandler.h>
#include <fbxsdk/core/base/fbxintrusivelist.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/**FBX SDK listener class. Once an event is emitted by an emitter, a listener should be created to listen to the event.
* The listener could receive a signal and take action to process the event data.
* \note The data will be process by the callback function of FbxListener::Bind().
* Plug-in could be used as listener, since FbxPlugin is derived from FbxListener.
* To emit event, you could create an emitter and a listener, and then bind them together via event handler.
* To listen to an event which is emitted by an emitter, you should bind current listener to the emitter by calling FbxListener::Bind().
* Event listener contains a list of event handlers.
* \remarks An object(emitter) can emit a certain type of event, the plug-in(listener) who are listening to that type of event,
* will receive a signal and take action to process the event data.
* \par The whole process of event is:
* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
* \li 3. Once an event is emitted, the listener to this event will receive a signal.
* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
* \note The event data is process by the callback function of event handler.
* \see FbxEmitter FbxEventHandler FbxEvent FbxEventBase
*/
class FBXSDK_DLL FbxListener
{
public:
/**
* \name Constructor and Destructor
*/
//@{
//!Destructor.
~FbxListener();
//!Constructor.
FbxListener(){}
//@}
////////////////////////////////////////////////////////////////////////////////////////
/**
* \name Bind and unbind methods
*/
//@{
/**Bind current listener and the specified emitter together via an automatically created event handler.
* An event handler will be created automatically and added to the handlers list of current listener and the specified emitter.
* After that, the listener can listen to the event which is emitted by the specified emitter.
* \param pEmitter Event emitter to bind. Current listener can listen to the event which is emitted by pEmitter.
* \param pFunc The callback function to process event date.
* \return The automatically created event handler.
*/
template <typename EventType,typename ListenerType> FbxEventHandler* Bind(FbxEmitter& pEmitter, void (ListenerType::*pFunc)(const EventType*))
{
FbxMemberFuncEventHandler<EventType,ListenerType>* eventHandler =
FbxNew< FbxMemberFuncEventHandler<EventType,ListenerType> >(static_cast<ListenerType*>(this),pFunc);
pEmitter.AddListener(*eventHandler);
mEventHandler.PushBack(*eventHandler);
return eventHandler;
}
/**Bind current listener and the specified emitter together via an automatically created event handler.
* An event handler will be created automatically and added to the handlers list of current listener and the specified emitter.
* After that, the listener can listen to the event which is emitted by the specified emitter.
* \param pEmitter Event emitter to bind. Current listener can listen to the event which is emitted by pEmitter.
* \param pFunc The callback function to process event date.
* \return The automatically created event handler.
*/
template <typename EventType,typename ListenerType> FbxEventHandler* Bind(FbxEmitter& pEmitter, void (ListenerType::*pFunc)(const EventType*)const)
{
FbxConstMemberFuncEventHandler<EventType,ListenerType>* eventHandler =
FbxNew< FbxConstMemberFuncEventHandler<EventType,ListenerType> >(static_cast<ListenerType*>(this),pFunc);
pEmitter.AddListener(*eventHandler);
mEventHandler.PushBack(*eventHandler);
return eventHandler;
}
/**Bind current listener and the specified emitter together via an automatically created event handler.
* An event handler will be created automatically and added to the handlers list of current listener and the specified emitter.
* After that, the listener can listen to the event which is emitted by the specified emitter.
* \param pEmitter Event emitter to bind. Current listener can listen to the event which is emitted by pEmitter.
* \param pFunc The callback function to process event date.
* \return The automatically created event handler.
*/
template <typename EventType> FbxEventHandler* Bind(FbxEmitter& pEmitter, void (*pFunc)(const EventType*,FbxListener*))
{
FbxFuncEventHandler<EventType>* eventHandler =
FbxNew< FbxFuncEventHandler<EventType> >(this, pFunc);
pEmitter.AddListener(*eventHandler);
mEventHandler.PushBack(*eventHandler);
return eventHandler;
}
/**Unbind an event handler. The specified event handler will be removed from the handlers list of current listener.
* \param aBindId The event handler to unbind.
*/
void Unbind(const FbxEventHandler* aBindId);
//@}
private:
typedef FbxIntrusiveList<FbxEventHandler, FbxEventHandler::eListener> EventHandlerList;
EventHandlerList mEventHandler;
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_LISTENER_H_ */

View File

@ -1,86 +0,0 @@
/****************************************************************************************
Copyright (C) 2016 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxloadingstrategy.h
#ifndef _FBXSDK_CORE_LOADING_STRATEGY_H_
#define _FBXSDK_CORE_LOADING_STRATEGY_H_
#include <fbxsdk/fbxsdk_def.h>
#ifndef FBXSDK_ENV_WINSTORE
#include <fbxsdk/core/fbxplugin.h>
#include <fbxsdk/core/fbxplugincontainer.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/**
* Abstract class used to implemented some plug-in loading strategy.
* A loading strategy dictate how some plug-ins will be loaded for instance.
* We could have a simple strategy that loads only a single dll on PC.
* We could also implement a strategy that load multiple dlls from a directory.
*/
class FBXSDK_DLL FbxLoadingStrategy : public FbxPluginContainer
{
public:
/** Result state of loading plug-in.
*/
enum EState
{
eAllLoaded, //!< Plug-ins are loaded.
eNoneLoaded, //!< No plug-ins are loaded.
eAllFailed, //!< Plug-ins failed to load.
eSomeFailed //!< Not all found plug-ins are loaded.
};
/**
*\name Public interface
*/
//@{
/** Execute the operation of loading the plug-in(s). The way it is executed is determined by the specific implementations.
* \param pData Plug in data that can be access inside the plug-ins.
* \return The state of the loading action.
*/
EState Load(FbxPluginData& pData);
/** Execute the operation of unloading the plug-in(s). The way it is executed is determined by the specific implementations.
*/
void Unload();
//@}
protected:
/**
*\name User implementation
*/
//@{
/** Called by the Load method, it contains the specific user implementation strategy to load the desired plug-in(s).
* \param pData Plug in data that can be access inside the plug-ins.
* \return If the plugin loading is successful return \c true, otherwise return \c false
*/
virtual bool SpecificLoad(FbxPluginData& pData) = 0;
/** Called by the Unload method, it contains the specific user implementation strategy to unload the desired plug-in(s).
*/
virtual void SpecificUnload(FbxPluginData& pData) = 0;
//@}
//! Whether the plugin is loaded or not.
EState mPluginsLoadedState;
private:
FbxPluginData mData;
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* !FBXSDK_ENV_WINSTORE */
#endif /* _FBXSDK_CORE_LOADING_STRATEGY_H_ */

View File

@ -1,555 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxmanager.h
#ifndef _FBXSDK_CORE_MANAGER_H_
#define _FBXSDK_CORE_MANAGER_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/fbxobject.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxIOSettings;
class FbxIOPluginRegistry;
class FbxAnimEvaluator;
class FbxSceneReference;
class FbxUserNotification;
class FbxMessageEmitter;
class FbxLocalizationManager;
class FbxXRefManager;
class FbxManager_internal;
#ifndef FBXSDK_ENV_WINSTORE
class FbxPlugin;
#endif
/** SDK object manager.
* The SDK manager is in charge of:
* \li scene element allocation, for example, FbxScene::Create(pSdkManager, "").
* \li scene element deallocation, call FbxManager::Destroy() to deallocates all object created by the SDK manager.
* \li scene element search and access, please see \ref GlobalObjectManagement section.
*
* It is possible to override memory allocation functions throughout the FBX SDK by
* providing system memory allocation functions using the handler set functions below.
* It must be done before the first FbxManager creation.
*
* FbxSetMallocHandler();
* FbxSetCallocHandler();
* FbxSetReallocHandler();
* FbxSetFreeHandler();
*
* Upon destruction, all objects allocated by the SDK manager and not explicitly destroyed are destroyed as well.
* A derived class can be defined to allocate and deallocate specialized scene elements.
* \remarks You could create more than one SDK manager. However, it's better to NOT share the same object among different managers.
* \nosubgrouping
*/
class FBXSDK_DLL FbxManager
{
public:
/**
* \name FBX SDK Manager Creation/Destruction
*/
//@{
/** SDK manager allocation method.
* \return A pointer to the SDK manager or \c NULL if this is an
* evaluation copy of the FBX SDK and it is expired.
*/
static FbxManager* Create();
/** Destructor.
* Deallocates all object previously created by the SDK manager.
*/
virtual void Destroy();
//@}
/**
* \name Versions Queries
*/
//@{
/** Get FBX SDK version string.
* \param pFull If true, the complete version string including revision number and release date will be returned,
* otherwise only the version numbering is returned.
*/
static const char* GetVersion(bool pFull=true);
/** Get the current default FBX file format version number for this version of the FBX SDK.
* \param pMajor Version major number.
* \param pMinor Version minor number.
* \param pRevision Version revision number.
*/
static void GetFileFormatVersion(int& pMajor, int& pMinor, int& pRevision);
//@}
/**
* \name Object Registration, Definition and Management
*/
//@{
/** Class registration.
* \param pName The class name. For example, "FbxMesh" for FbxMesh class.
* \param T1 FBX type of the specified class.
* \param T2 FBX type of parent class.
* \param pFbxFileTypeName The type name of the class in FBX file.
* \param pFbxFileSubTypeName The sub type name of the class in FBX file.
* \return The class Id of the newly register class.
* Such as:
* \code RegisterFbxClass("FbxCamera", FBX_TYPE(FbxCamera), FBX_TYPE(FbxNodeAttribute)); \endcode
*/
template <typename T1, typename T2> inline FbxClassId RegisterFbxClass(const char* pName, const T1* /*T1*/, const T2* /*T2*/, const char* pFbxFileTypeName=0, const char* pFbxFileSubTypeName=0)
{
T1::ClassId = Internal_RegisterFbxClass(pName, T2::ClassId, (FbxObjectCreateProc)T1::Allocate, pFbxFileTypeName, pFbxFileSubTypeName);
return T1::ClassId;
}
/** Runtime class registration.
* \param pName The class name. For example, "FbxUIWidgetBoolean".
* \param T FBX type of parent class.
* \param pFbxFileTypeName The type name of the class in FBX file.
* \param pFbxFileSubTypeName The sub type name of the class in FBX file.
* \return The class Id of the newly register class.
* Such as:
* \code RegisterRuntimeFbxClass( "FbxUIWidgetBoolean", FBX_TYPE(FbxUIWidgetDefinition), NULL, "FbxUIWidgetBoolean"); \endcode
*/
template <typename T> inline FbxClassId RegisterRuntimeFbxClass(const char* pName, const T* /*T*/, const char* pFbxFileTypeName=0,const char* pFbxFileSubTypeName=0)
{
return Internal_RegisterFbxClass(pName, T::ClassId, (FbxObjectCreateProc)T::Allocate, pFbxFileTypeName, pFbxFileSubTypeName);
}
/** Runtime class unregistration.
* \param pName The class name.
*/
inline void UnregisterRuntimeFbxClass(const char* pName)
{
FbxClassId lClassId = FindClass(pName);
if( !(lClassId == FbxClassId()) )
{
Internal_UnregisterFbxClass(lClassId);
}
}
/** Override class.
* \param pFBX_TYPE_Class FBX type of class.
* \param pFBX_TYPE_OverridenClass FBX type of overridden class.
* \return The class Id
*/
template <typename T1,typename T2> inline FbxClassId OverrideFbxClass(const T1* pFBX_TYPE_Class, const T2* pFBX_TYPE_OverridenClass)
{
T1::ClassId = Internal_OverrideFbxClass(T2::ClassId,(FbxObjectCreateProc)T1::Allocate );
return T1::ClassId;
}
/** Create a new object of the specified ClassId.
* \param pClassId The ClassId of the object to be created.
* \param pName The name given to the newly created object.
* \param pContainer An optional parameter to specify which object will "contain" the new object. By contain, we mean
* the new object will become a source to the container, connection-wise.
* \param pCloneFrom A valid object pointer to use as the reference for cloning the object upon construction.
* \return If not null, a new instance of the specified class.
* \remark This function will return NULL if the ClassId used is invalid. New ClassId can be registered using
* the function RegisterFbxClass().
*/
FbxObject* CreateNewObjectFromClassId(FbxClassId pClassId, const char* pName, FbxObject* pContainer=NULL, const FbxObject* pCloneFrom=NULL);
/** Find class by the specified name.
* \param pClassName Class Name to find.
*/
FbxClassId FindClass(const char* pClassName) const;
/** Find file class.
* \param pFbxFileTypeName Specify the type name in FBX file to find.
* \param pFbxFileSubTypeName Specify by The sub type name in FBX file to find.
*/
FbxClassId FindFbxFileClass(const char* pFbxFileTypeName, const char* pFbxFileSubTypeName) const;
/** Class unregistration.
* \param pFBX_TYPE_Class FBX type of unregistered class.
*/
template <typename T> inline void UnregisterFbxClass(const T*)
{
Internal_UnregisterFbxClass(T::ClassId);
T::ClassId = FbxClassId();
}
//@}
/**
* \name Data Type Management
*/
//@{
/** Register a new data type to the manager
* \param pName The type name.
* \param pType The data type.
* \return The newly created FbxDataType
*/
FbxDataType CreateDataType(const char* pName, const EFbxType pType);
/** List the data types
* \return the number of registered datatypes
*/
int GetDataTypeCount() const;
/** Find a data types at pIndex.
* \param pIndex The data type index.
* \return the found datatype. return null if not found
*/
FbxDataType& GetDataType(const int pIndex) const;
/** Find a data type from the type name.
* \param pDataType The type name.
* \return the found datatype. return null if not found
*/
FbxDataType& GetDataTypeFromName(const char* pDataType) const;
//@}
/**
* \name User Notification Object
*/
//@{
/** Access to the unique UserNotification object.
* \return The pointer to the user notification or \c NULL \c if the object
* has not been allocated.
*/
FbxUserNotification* GetUserNotification() const;
/** Set the user notification
* \param pUN
*/
void SetUserNotification(FbxUserNotification* pUN);
//@}
/**
* \name IOSettings Object
*/
//@{
/** Access to a IOSettings object.
* \return The pointer to IOSettings or \c NULL \c if the object
* has not been allocated.
*/
virtual FbxIOSettings* GetIOSettings() const;
/** Set the IOSettings pointer
* \param pIOSettings
*/
virtual void SetIOSettings(FbxIOSettings* pIOSettings);
//@}
/**
* \name Message Emitter (for Message Logging)
*/
//@{
/** Access to the unique FbxMessageEmitter object.
* \return The pointer to the message emitter.
*/
FbxMessageEmitter& GetMessageEmitter();
/** Sets to the unique FbxMessageEmitter object.
* \param pMessageEmitter the emitter to use, passing NULL will reset to the default emitter.
* The object will be deleted when the SDK manager is destroyed, thus ownership is transfered.
*/
bool SetMessageEmitter(FbxMessageEmitter* pMessageEmitter);
//@}
/**
* \name Localization Hierarchy
*/
//@{
/** Add a localization object to the known localization providers.
* \param pLocManager the localization object to register.
*/
void AddLocalization(FbxLocalizationManager* pLocManager);
/** Remove a localization object from the known localization providers.
* \param pLocManager the localization object to remove.
*/
void RemoveLocalization(FbxLocalizationManager* pLocManager);
/** Select the current locale for localization.
* \param pLocale the locale name, for example "fr" or "en-US".
*/
bool SetLocale(const char* pLocale);
/** Localization helper function. Calls each registered localization manager
* until one can localizes the text.
* \param pID the identifier for the text to localize.
* \param pDefault the default text. Uses pID if NULL.
* \return the potentially localized text. May return the parameter passed in.
*/
const char* Localize(const char* pID, const char* pDefault=NULL) const;
//@}
/**
* \name XRef Manager
*/
//@{
/** Retrieve the manager responsible for managing object XRef resolution.
* \return The XRef manager for this SDK manager.
*/
FbxXRefManager& GetXRefManager();
//@}
/**
* \name Library Management
*/
//@{
/** Retrieve the main object Libraries
* \return The Root library
*/
FbxLibrary* GetRootLibrary() const;
FbxLibrary* GetSystemLibraries() const;
FbxLibrary* GetUserLibraries() const;
//@}
/**
* \name Plug-in Registry Object
*/
//@{
/** Access to the unique FbxIOPluginRegistry object.
* \return The pointer to the user FbxIOPluginRegistry
*/
FbxIOPluginRegistry* GetIOPluginRegistry() const;
//@}
/**
* \name Fbx Generic Plugins Management
*/
//@{
#ifndef FBXSDK_ENV_WINSTORE
/** Load plug-ins directory
* \param pFilename The directory path.
* \param pExtensions The plug in extension.
* \return \c True
*/
bool LoadPluginsDirectory(const char* pFilename, const char* pExtensions=NULL);
/** Load plug-in
* \param pFilename The file name
* \return \c True
*/
bool LoadPlugin(const char* pFilename);
/** Unload all plug-ins
*/
bool UnloadPlugins();
/** Emit plugins event.
* \param pEvent The event to be emitted.
*/
bool EmitPluginsEvent(const FbxEventBase& pEvent);
//!Get plugins.
FbxArray<const FbxPlugin*> GetPlugins() const;
/** get plugins count
* \return The number of plugins.
*/
int GetPluginCount() const;
/** Find plug in.
* \param pName The plug in name.
* \param pVersion The plug in version.
* \return The plugin, \c null if not found.
*/
FbxPlugin* FindPlugin(const char* pName, const char* pVersion) const;
#endif /* !FBXSDK_ENV_WINSTORE */
//@}
/**
* \name IO Settings
*/
//@{
// Add IOSettings in hierarchy from different modules
/** Fill IO Settings for registered readers.
* \param pIOS The properties hierarchies to fill.
*/
void FillIOSettingsForReadersRegistered(FbxIOSettings& pIOS);
/** Fill IO Settings for registered writers.
* \param pIOS The properties hierarchies to fill.
*/
void FillIOSettingsForWritersRegistered(FbxIOSettings& pIOS);
/** Fill common IO Settings
* \param pIOS The properties hierarchies to fill.
* \param pImport If \c true, import properties are set, otherwise export properties are set.
*/
void FillCommonIOSettings(FbxIOSettings& pIOS, bool pImport);
//@}
/**
* \name Global Object Management
*/
//@{
/** Register object with the manager.
* \internal
* \param pObject The object to be registered.
* \anchor GlobalObjectManagement
*/
void RegisterObject(FbxObject* pObject);
/** Unregister object with the manager.
* \internal
* \param pObject The object to be unregistered.
*/
void UnregisterObject(FbxObject* pObject);
/** Register a list of objects with the manager.
* \internal
* \param pArray The list of object to be registered.
*/
void RegisterObjects(const FbxArray<FbxObject*>& pArray);
/** Unregister a list of objects with the manager.
* \internal
* \param pArray The list of object to be unregistered.
*/
void UnregisterObjects(const FbxArray<FbxObject*>& pArray);
/** Increment the scene destroying counter.
* \remarks Call this function before the destroying list is changed.
*/
void IncreaseDestroyingSceneFlag();
/** Shrink the object list and decrements the scene destroying counter.
* \remarks Call this function after the destroying is changed.
* Use IncreasDestroyingSceneFlag() and DecreaseDestroyingSceneFlag() in pairs.
*/
void DecreaseDestroyingSceneFlag();
/**
* \name Reference Management
*/
//@{
/** Get number of references.
* \return Number of references.
*/
int GetReferenceCount() const;
/** Get reference at given index.
* \param pIndex Position in the list of references.
* \return Pointer to the reference or \c NULL if index is out of bounds.
*/
FbxSceneReference* GetReference(int pIndex) const;
/** Add a reference.
* \param pReference The reference to be added.
* \return If the reference is correctly added to the scene, return \c true otherwise, if the reference is
* already there, returns \c false.
*/
int AddReference(FbxSceneReference* pReference);
/** Remove the specified reference from reference list.
* \param pReference The reference to be removed.
* \return If the reference was successfully removed, return \c true otherwise, if the
* reference could not be found returns \c false.
*/
bool RemoveReference(FbxSceneReference* pReference);
/** Clear the specified reference from the SDK manager.
* \param pReference The reference to be removed.
* \return If the reference was successfully cleared from the SDK manager, return \c true otherwise, if the
* reference could not be found returns \c false.
*/
bool ClearReference(FbxSceneReference* pReference);
//@}
/** Add a prefix to a name.
* \param pPrefix The prefix to be added to the \c pName. This
* string must contain the "::" characters in order to be considered
* as a prefix.
* \param pName The name to be prefix.
* \return The prefixed string
* \remarks If a prefix already exists, it is removed before
* adding \c pPrefix.
*/
static FbxString PrefixName(const char* pPrefix, const char* pName);
/** Get the count of document available in this manager
* \return The count of document owned by this manager.
*/
int GetDocumentCount();
/** Get the document at pIndex in the manager's list.
* \param pIndex The index of the document to retrieve.
* \return The document at the specified index. Will return NULL if index is invalid.
*/
FbxDocument* GetDocument(int pIndex);
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static FbxManager* GetDefaultManager();
void CreateMissingBindPoses(FbxScene* pScene);
int GetBindPoseCount(FbxScene *pScene) const;
int GetFbxClassCount() const;
FbxClassId GetNextFbxClass(FbxClassId pClassId /* invalid id: first one */) const;
protected:
FbxManager();
virtual ~FbxManager();
void Clear();
void ClassInit();
void ClassRelease();
void DataTypeInit();
void DataTypeRelease();
private:
bool CanAutoDestroySrcObject(FbxObject* pObject, FbxObject* pSrcObject, bool pRecursive) const;
void Create_Common_Import_IOSettings_Groups(FbxIOSettings& pIOS);
void Create_Common_Export_IOSettings_Groups(FbxIOSettings& pIOS);
void Add_Common_Import_IOSettings(FbxIOSettings& pIOS);
void Add_Common_Export_IOSettings(FbxIOSettings& pIOS);
void Add_Common_RW_Import_IOSettings(FbxIOSettings& pIOS);
void Add_Common_RW_Export_IOSettings(FbxIOSettings& pIOS);
FbxClassId Internal_RegisterFbxClass(const char* pClassName, FbxClassId pParentClassId, FbxObjectCreateProc=0, const char* pFbxFileTypeName=0, const char* pFbxFileSubTypeName=0);
bool Internal_RegisterFbxClass(FbxClassId pClassId);
FbxClassId Internal_OverrideFbxClass(FbxClassId pClassId, FbxObjectCreateProc=0);
void Internal_UnregisterFbxClass(FbxClassId pClassId);
void RemoveObjectsOfType(const FbxClassId& pClassId);
FbxAnimEvaluator* GetDefaultAnimationEvaluator();
FbxArray<FbxObject*> mObjects;
FbxArray<FbxDocument*> mDocuments;
FbxIOSettings* mIOSettings;
FbxIOPluginRegistry* mRegistry;
FbxUserNotification* mUserNotification;
FbxMessageEmitter* mMessageEmitter;
FbxArray<FbxLocalizationManager*> mLocalizationManagerArray;
FbxArray<FbxSceneReference*> mSceneReferenceArray;
FbxAnimEvaluator* mDefaultAnimationEvaluator;
FbxArray<FbxObject*> mDestroyingObjects;
FbxArray<FbxDocument*> mDestroyingDocuments;
int mIsDestroyingScene;
FbxManager_internal* mInternal;
static FbxManager* smDefaultManager;
FBXSDK_FRIEND_NEW();
friend class FbxObject;
friend class FbxProperty; //For GetDefaultAnimationEvaluator()
friend class FbxNode; //For GetDefaultAnimationEvaluator()
friend class FbxScene; //For GetDefaultAnimationEvaluator()
friend class FbxAnimEvaluator; //For GetDefaultAnimationEvaluator()
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_MANAGER_H_ */

View File

@ -1,49 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxmodule.h
#ifndef _FBXSDK_CORE_MODULE_H_
#define _FBXSDK_CORE_MODULE_H_
#include <fbxsdk/fbxsdk_def.h>
#ifndef FBXSDK_ENV_WINSTORE
#include <fbxsdk/fbxsdk_nsbegin.h>
typedef void* FbxModule;
/** Loads the specified module into the address space of the calling process.
* \param pFilePath The full file path name of the module to load.
* \return The module handle if it successfully loaded, otherwise NULL.
* \remark The specified module may cause other modules to be loaded.
*/
FBXSDK_DLL FbxModule FbxModuleLoad(const char* pFilePath);
/** Retrieves the address of an exported function or variable from the specified module.
* \param pModuleHandle A valid module handle.
* \param pProcName The procedure name to search.
* \return The procedure handle if valid, otherwise NULL.
*/
FBXSDK_DLL void* FbxModuleGetProc(FbxModule pModuleHandle, const char* pProcName);
/** Frees the loaded module and, if necessary, decrements its reference count.
* \param pModuleHandle A valid module handle.
* \return \c true on success, \c false otherwise.
* \remark When the reference count reaches zero, the module is unloaded from the address space of the calling process and the handle is no longer valid.
*/
FBXSDK_DLL bool FbxModuleFree(FbxModule pModuleHandle);
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* !FBXSDK_ENV_WINSTORE */
#endif /* _FBXSDK_CORE_MODULE_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,96 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxperipheral.h
#ifndef _FBXSDK_CORE_PERIPHERAL_H_
#define _FBXSDK_CORE_PERIPHERAL_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxObject;
/** FbxPeripheral is an interface to load/unload content of FbxObject from memory to
somewhere you defined, for example, to a temporary file on disk .
* \nosubgrouping
* You need to inherited your own peripheral class from this class and overload
* the functions to control what information of a FbxObject you want to load/unload,
* and where you are going to load/unload these information to.
* For example, you can ask an object to dump itself on disk to free some memory and vice-versa
* when you want to load/unload this object from your scene flexibly.
*/
class FBXSDK_DLL FbxPeripheral
{
public:
/**
* \name Constructor and Destructor
*/
//@{
//!Constructor.
FbxPeripheral();
//!Destructor.
virtual ~FbxPeripheral();
//@}
/** Reset the peripheral to its initial state.
*/
virtual void Reset() = 0;
/** Unload the content of pObject.
* \param pObject Object whose content is to be offloaded into
* the peripheral storage area.
* \return \c true if the object content has been successfully transferred.
* \c false otherwise.
*/
virtual bool UnloadContentOf(FbxObject* pObject) = 0;
/** Load the content of pObject.
* \param pObject Object whose content is to be loaded from
* the peripheral storage area.
* \return \c true if the object content has been successfully transferred.
* \c false otherwise.
*/
virtual bool LoadContentOf(FbxObject* pObject) = 0;
/** Check if this peripheral can unload the given object content.
* \param pObject Object whose content has to be transferred.
* \return \c true if the peripheral can handle this object content and
* has enough space in its storage area.\c false otherwise.
*/
virtual bool CanUnloadContentOf(FbxObject* pObject) = 0;
/** Check if this peripheral can load the given object content.
* \param pObject Object whose content has to be transferred.
* \return \c true if the peripheral can handle this object content.
* \c false otherwise.
*/
virtual bool CanLoadContentOf(FbxObject* pObject) = 0;
/** Initialize the connections of an object
* \param pObject Object on which the request for connection is done.
*/
virtual void InitializeConnectionsOf(FbxObject* pObject) = 0;
/** Uninitialize the connections of an object
* \param pObject Object on which the request for disconnection is done.
*/
virtual void UninitializeConnectionsOf(FbxObject* pObject) = 0;
};
// predefined offload peripherals
extern FBXSDK_DLL FbxPeripheral* NULL_PERIPHERAL;
extern FBXSDK_DLL FbxPeripheral* TMPFILE_PERIPHERAL;
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_PERIPHERAL_H_ */

View File

@ -1,264 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxplugin.h
#ifndef _FBXSDK_CORE_PLUGIN_H_
#define _FBXSDK_CORE_PLUGIN_H_
#include <fbxsdk/fbxsdk_def.h>
#ifndef FBXSDK_ENV_WINSTORE
#include <fbxsdk/core/fbxobject.h>
#include <fbxsdk/core/fbxmodule.h>
#include <fbxsdk/core/fbxlistener.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxManager;
class FbxPluginContainer;
//! Plug-in declaration macro that must to be used when defining new FbxPlugin objects.
#define FBXSDK_PLUGIN_DECLARE(Plugin)\
FBXSDK_FRIEND_NEW();\
public:\
static Plugin * Create(const FbxPluginDef& pDefinition, FbxModule pModuleHandle);\
void Destroy();
//! Plug-in implementation macro that must be used when implementing new FbxPlugin objects.
#define FBXSDK_PLUGIN_IMPLEMENT(Plugin)\
Plugin* Plugin::Create(const FbxPluginDef& pDefinition, FbxModule pModuleHandle){ return FbxNew<Plugin>(pDefinition, pModuleHandle); }\
void Plugin::Destroy(){ FbxDelete(this); }
/** Structure used by plug-ins for identification purposes.
* \note To avoid confusions in the system, it is recommended to choose an appropriate unique identifier string name when
* defining your plug-in, as well as incrementing the version string to a correct value whenever something changes in the
* implementation of the plug-in. Both of these string are used when comparing plug-ins for searches, as well as
* identification in FBX files.
*/
struct FBXSDK_DLL FbxPluginDef
{
//! Constructor
FbxPluginDef() :
mName("Unknown Name"),
mVersion("Unknown Version")
{
}
FbxString mName; //!< The identifier name string of the plug-in. If the name is already used by another plug-in, the plug-in will still register.
FbxString mVersion; //!< The version string of the plug-in.
};
/** Data used to communicate information between an application and the plug-in.
*/
struct FBXSDK_DLL FbxPluginData
{
//! Constructor
FbxPluginData() :
mQueryEmitter(NULL),
mSDKManager(NULL),
mPluginContainer(NULL)
{
}
//! Copy Constructor
explicit FbxPluginData(const FbxPluginData& pOther) :
mQueryEmitter(pOther.mQueryEmitter),
mSDKManager(pOther.mSDKManager),
mPluginContainer(pOther.mPluginContainer)
{
}
FbxEmitter* mQueryEmitter; //!< The emitter on which the plug-in can listen to receive events.
FbxManager* mSDKManager; //!< The FBX SDK Manager on which the plug-in was instanced.
FbxPluginContainer* mPluginContainer; //!< The container which will have the ownership of the plug-in.
};
/** The base class to inherit from when creating new plug-ins for the FBX SDK. Plug-ins for the FBX SDK are extremely flexible
* allowing a wide-range of possibilities. For example, one can write his own plug-in to add new readers/writers to the current list
* of supported I/O formats, or add new dynamic classes to instantiate custom objects that can later be stored in FBX files. We also use the same
* interface for plug-ins written using the FBX Extension SDK, which allow additional callbacks for other various Autodesk products
* enabling greater interoperability with multiple various SDKs.
*
* Here is typical implementation of an FBX SDK plug-in that doesn't do anything else than just registering itself:
* \code
* class MyPlugin : public FbxPlugin
* {
* FBXSDK_PLUGIN_DECLARE(MyPlugin); //This macro is mandatory for any plug-in definition
*
* protected:
* explicit MyPlugin(const FbxPluginDef& pDefinition, FbxModule pModuleHandle) : FbxPlugin(pDefinition, pModuleHandle)
* {
* }
*
* //Abstract functions that *must* be implemented
* virtual bool SpecificInitialize()
* {
* //For example, here we could register as many new I/O readers/writers as we would like, or classes, etc.
* return true;
* }
*
* virtual bool SpecificTerminate()
* {
* //Here we would have to unregister whatever we registered to the FBX SDK
* return true;
* }
* };
*
* FBXSDK_PLUGIN_IMPLEMENT(MyPlugin); //This macro is mandatory for any plug-in implementation
*
* //Standard C export needed for any new FBX SDK plug-in
* extern "C"
* {
* static MyPlugin* sMyPluginInstance = NULL; //The module is owner of the plug-in
*
* //This function will be called when an application will request the plug-in
* #ifdef FBXSDK_ENV_WIN
* __declspec(dllexport) void FBXPluginRegistration(FbxPluginContainer& pContainer, FbxModule pModuleHandle)
* #else
* void FBXPluginRegistration(FbxPluginContainer& pContainer, FbxModule pModuleHandle)
* #endif
* {
* if( sPlugin == NULL )
* {
* //Create the plug-in definition which contains the information about the plug-in
* FbxPluginDef sPluginDef;
* sPluginDef.mName = "My Plugin";
* sPluginDef.mVersion = "1.0";
*
* //Create an instance of the plug-in
* sMyPluginInstance = MyPlugin::Create(sPluginDef, pLibHandle);
*
* //Register the plug-in with the FBX SDK
* pContainer.Register(*sPlugin);
* }
* }
* }
* \endcode
* \see FbxPluginDef, FbxPluginData
*/
class FBXSDK_DLL FbxPlugin : public FbxListener
{
FBXSDK_INTRUSIVE_LIST_NODE(FbxPlugin, 1);
public:
/** Abstract function called once at the end of the plug-in construction. At that moment, plug-in data have been properly initialized.
* This function must be implemented by anyone who writes a new plug-in for the FBX SDK.
*/
virtual bool SpecificInitialize()=0;
/** Abstract function called once at the beginning of the plug-in destruction. At that moment, plug-in data is fully available.
* This function must be implemented by anyone who writes a new plug-in for the FBX SDK.
*/
virtual bool SpecificTerminate()=0;
/** Virtual function called once when the FBX SDK is about to write an FBX file. Users can re-implement it in their plug-in if they need
* to perform tasks at that moment. The scene provided in parameter can be altered. If not re-implemented, this function does nothing.
* \param pScene The scene that is about to be written in the FBX file.
*/
virtual void WriteBegin(FbxScene& pScene);
/** Virtual function called once when the FBX SDK is about to write plug-in's parameters. Users can re-implement it in their plug-in if they need
* to store properties in the FBX file for their own usage. The object in parameter is used to store those properties.
* If not re-implemented, this function does nothing.
* \param pParams An abstract object that can be used as a property container, to allow the plug-in to store properties about the plug-in.
*/
virtual void WriteParameters(FbxObject& pParams);
/** Virtual function called once after the FBX SDK wrote an FBX file. Users can re-implement it in their plug-in if they need
* to perform tasks at that moment. The scene provided in parameter can be altered, but the changes will not appear in the FBX file.
* If not re-implemented, this function does nothing.
* \param pScene The scene that was written in the FBX file.
*/
virtual void WriteEnd(FbxScene& pScene);
/** Virtual function called once when the FBX SDK is about to read an FBX file. Users can re-implement it in their plug-in if they need
* to perform tasks at that moment. The scene provided in parameter can be altered. If not re-implemented, this function does nothing.
* \param pScene The scene that is about to be read in the FBX file.
*/
virtual void ReadBegin(FbxScene& pScene);
/** Virtual function called once after the FBX SDK reads the plug-in's parameters. Users can re-implement it in their plug-in if they need
* to retrieve properties for their own usage. The object in parameter is used to retrieve those properties.
* If not re-implemented, this function does nothing.
* \param pParams An abstract object that can be used as a property container, to allow the plug-in to read properties about the plug-in.
*/
virtual void ReadParameters(FbxObject& pParams);
/** Virtual function called once after the FBX SDK read an FBX file. Users can re-implement it in their plug-in if they need
* to perform tasks at that moment. The scene provided in parameter can be altered. If not re-implemented, this function does nothing.
* \param pScene The scene that was read in the FBX file.
*/
virtual void ReadEnd(FbxScene& pScene);
/** Accessor to the plug-in definition structure that contains basic information on the plug-in like its name or version. This is
* the only method available to differentiate plug-ins.
* \return The definition structure for this plug-in.
*/
const FbxPluginDef& GetDefinition() const;
/** Retrieve the module address pointer for this plug-in. With this module instance handle, for example someone can query procedures addresses,
* allowing more complex interactions, as well as other operating system module specific functions.
*/
FbxModule GetModuleHdl();
protected:
/** Use the Create() and Destroy() methods declared and implemented in the FBXSDK_PLUGIN_DECLARE and FBXSDK_PLUGIN_IMPLEMENT macros to construct and destroy FbxPlugin objects.
* \param pDefinition The definition associated with this plug-in. Each plug-in must have its own definition to differentiate it with other plug-ins.
* \param pModuleHandle A pointer to the plug-in module address.
*/
explicit FbxPlugin(const FbxPluginDef& pDefinition, FbxModule pModuleHandle);
/** Accessor to the plug-in private data.
* \return The data for the current plug-in.
*/
FbxPluginData& GetData();
/** Const accessor to the plug-in private data.
* \return The const data for the current plug-in.
*/
const FbxPluginData& GetData() const;
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
inline FbxObject& GetPluginSettings() { return *mPluginSettings; }
inline const FbxObject& GetPluginSettings() const { return *mPluginSettings; }
template <typename EventType, typename ListernerType> inline FbxEventHandler* Bind(void (ListernerType::*pFunc)(const EventType*))
{
return FbxListener::Bind<EventType,ListernerType>(*(GetData().mQueryEmitter), pFunc );
}
virtual void Destroy() = 0;
protected:
virtual ~FbxPlugin();
private:
bool Initialize(const FbxPluginData& pData);
bool Terminate();
bool mInitialized;
FbxPluginData mData;
FbxPluginDef mDefinition;
FbxModule mModuleHandle;
FbxObject* mPluginSettings;
friend class FbxLoadingStrategy;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* !FBXSDK_ENV_WINSTORE */
#endif /* _FBXSDK_CORE_PLUGIN_H_ */

View File

@ -1,74 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxplugincontainer.h
#ifndef _FBXSDK_CORE_PLUGIN_CONTAINER_H_
#define _FBXSDK_CORE_PLUGIN_CONTAINER_H_
#include <fbxsdk/fbxsdk_def.h>
#ifndef FBXSDK_ENV_WINSTORE
#include <fbxsdk/core/fbxplugin.h>
#include <fbxsdk/core/fbxemitter.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
/** Manages registration and ownership of FBX SDK plug-ins (FbxPlugin).
* The FBX SDK will provide a pointer to FbxPluginContainer as an argument
* to the FBXPluginRegistration() function exported from a plug-in's DLL.
* A plug-in must register itself explicitly with the FbxPluginContainer
* by calling FbxPluginContainer::Register() after it is constructed.
* For an example of this process see the code example in the FbxPlugin
* class documentation.
* \see FbxPlugin
*/
class FBXSDK_DLL FbxPluginContainer : public FbxEmitter
{
public:
//! Definition of a plug-in list.
typedef FbxIntrusiveList<FbxPlugin> PluginList;
/** The registration function that must be called when the module containing the plug-in is loaded.
* \param pPlugin The plug-in to register.
*/
void Register(FbxPlugin& pPlugin);
/** The unregistration function that must be called when the module containing the plug-in is unloaded.
* \param pPlugin The plug-in to unregister.
*/
void Unregister(FbxPlugin& pPlugin);
/** Const accessor to the list of plug-ins owned by the container.
* \return A list of plug-in registered to this container.
*/
const PluginList& GetPlugins() const;
/** Accessor to the list of plug-ins owned by the container.
* \return A list of plug-in registered to this container.
*/
PluginList& GetPlugins();
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
virtual ~FbxPluginContainer();
PluginList mPlugins;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* !FBXSDK_ENV_WINSTORE */
#endif /* _FBXSDK_CORE_PLUGIN_CONTAINER_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,146 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxpropertydef.h
#ifndef _FBXSDK_CORE_PROPERTY_DEFINITION_H_
#define _FBXSDK_CORE_PROPERTY_DEFINITION_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/fbxpropertytypes.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
#define FBXSDK_PROPERTY_ID_NULL -1
#define FBXSDK_PROPERTY_ID_ROOT 0
class FbxPropertyPage;
class FBXSDK_DLL FbxPropertyFlags
{
public:
//! Property inherit types
enum EInheritType
{
eOverride, //!< Property override this flag from its reference property.
eInherit, //!< Property inherit this flag from its reference property.
eDeleted //!< Property has been deleted, so inheritance is invalid.
};
//! Property flags that affect their behaviors
enum EFlags
{
eNone = 0, //!< No flag.
eStatic = 1 << 0, //!< Property is defined in the class declaration, so it wasn't created dynamically.
eAnimatable = 1 << 1, //!< Property can be animated, thus is can have am animation curve node connected.
eAnimated = 1 << 2, //!< Property is animated, so it also has an animation curve node connected.
eImported = 1 << 3, //!< Property has been created during import process when reading FBX file.
eUserDefined = 1 << 4, //!< Property has been defined by user, not by the FBX SDK.
eHidden = 1 << 5, //!< Property should not be displayed on user interface.
eNotSavable = 1 << 6, //!< Property value must not be exported when writing FBX files.
eLockedMember0 = 1 << 7, //!< This property has its member #0 locked.
eLockedMember1 = 1 << 8, //!< This property has its member #1 locked.
eLockedMember2 = 1 << 9, //!< This property has its member #2 locked.
eLockedMember3 = 1 << 10, //!< This property has its member #3 locked.
eLockedAll = eLockedMember0 | eLockedMember1 | eLockedMember2 | eLockedMember3,
eMutedMember0 = 1 << 11, //!< This property has its member #0 muted.
eMutedMember1 = 1 << 12, //!< This property has its member #1 muted.
eMutedMember2 = 1 << 13, //!< This property has its member #2 muted.
eMutedMember3 = 1 << 14, //!< This property has its member #3 muted.
eMutedAll = eMutedMember0 | eMutedMember1 | eMutedMember2 | eMutedMember3,
//Private flags
eUIDisabled = 1 << 15, //!< Private flag for dynamic UI in FBX plug-ins.
eUIGroup = 1 << 16, //!< Private flag for dynamic UI in FBX plug-ins.
eUIBoolGroup = 1 << 17, //!< Private flag for dynamic UI in FBX plug-ins.
eUIExpanded = 1 << 18, //!< Private flag for dynamic UI in FBX plug-ins.
eUINoCaption = 1 << 19, //!< Private flag for dynamic UI in FBX plug-ins.
eUIPanel = 1 << 20, //!< Private flag for dynamic UI in FBX plug-ins.
eUILeftLabel = 1 << 21, //!< Private flag for dynamic UI in FBX plug-ins.
eUIHidden = 1 << 22, //!< Private flag for dynamic UI in FBX plug-ins.
eCtrlFlags = eStatic | eAnimatable | eAnimated | eImported | eUserDefined | eHidden | eNotSavable | eLockedAll | eMutedAll,
eUIFlags = eUIDisabled | eUIGroup | eUIBoolGroup | eUIExpanded | eUINoCaption | eUIPanel | eUILeftLabel | eUIHidden,
eAllFlags = eCtrlFlags | eUIFlags,
eFlagCount = 23,
};
bool SetFlags(FbxPropertyFlags::EFlags pMask, FbxPropertyFlags::EFlags pFlags);
FbxPropertyFlags::EFlags GetFlags() const;
FbxPropertyFlags::EFlags GetMergedFlags(FbxPropertyFlags::EFlags pFlags) const;
bool ModifyFlags(FbxPropertyFlags::EFlags pFlags, bool pValue);
FbxPropertyFlags::EInheritType GetFlagsInheritType(FbxPropertyFlags::EFlags pFlags) const;
bool SetMask(FbxPropertyFlags::EFlags pFlags);
bool UnsetMask(FbxPropertyFlags::EFlags pFlags);
FbxPropertyFlags::EFlags GetMask() const;
bool Equal(const FbxPropertyFlags& pOther, FbxPropertyFlags::EFlags pFlags) const;
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
FbxPropertyFlags();
explicit FbxPropertyFlags(FbxPropertyFlags::EFlags pFlags);
FbxPropertyFlags Clone(FbxPropertyPage* pPage);
static const int sLockedMembersMax = 4; //Maximum number of property sub-member that can be locked.
static const int sLockedMembersBitOffset = 7; //Number of bits to shift to get to the first locked member flag.
static const int sMutedMembersMax = 4; //Maximum number of property sub-member that can be muted.
static const int sMutedMembersBitOffset = 11; //Number of bits to shift to get to the first muted member flag.
private:
FbxUInt32 mFlagData, mMaskData;
FBX_ASSERT_STATIC(sizeof(FbxUInt32) * 8 >= FbxPropertyFlags::eFlagCount);
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
class FBXSDK_DLL FbxPropertyValue
{
public:
static FbxPropertyValue* Create(void* pData, EFbxType pType);
void Destroy();
FbxPropertyValue* Clone(FbxPropertyPage*);
bool Get(void* pValue, EFbxType pValueType);
bool Set(const void* pValue, EFbxType pValueType);
size_t GetSizeOf() const;
size_t GetComponentCount() const;
void IncRef();
void DecRef();
int GetRef();
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
FbxPropertyValue();
private:
FbxPropertyValue(void* pValue, EFbxType pType);
~FbxPropertyValue();
int mRef;
EFbxType mType;
void* mValue;
FBXSDK_FRIEND_NEW();
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_PROPERTY_DEFINITION_H_ */

View File

@ -1,576 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxpropertyhandle.h
#ifndef _FBXSDK_CORE_PROPERTY_HANDLE_H_
#define _FBXSDK_CORE_PROPERTY_HANDLE_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/fbxconnectionpoint.h>
#include <fbxsdk/core/fbxpropertytypes.h>
#include <fbxsdk/core/fbxpropertydef.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxPropertyPage;
class FbxPropertyHandle;
class FbxConnectionPointFilter;
//! \brief Class to manage property handle.
class FBXSDK_DLL FbxPropertyHandle
{
public:
/**
* \name Constructor and Destructor
*/
//@{
//! Create an instance
static FbxPropertyHandle Create();
/** Create an instance with given instance.
* \param pInstanceOf The given instance. */
static FbxPropertyHandle Create(const FbxPropertyHandle& pInstanceOf);
/** Create an instance with given name and type.
* \param pName Property name.
* \param pType Property type. */
static FbxPropertyHandle Create(const char* pName, EFbxType pType=eFbxUndefined);
/** Create an instance with given name and type info.
* \param pName
* \param pTypeInfo */
static FbxPropertyHandle Create(const char* pName, FbxPropertyHandle pTypeInfo);
/** If this property is root property, delete the property page, otherwise delete the property.
* \return If succeed, return true. */
bool Destroy();
//! Default constructor.
FbxPropertyHandle();
/** Copy constructor.
* \param pAddress FbxPropertyHandle copied to this one. */
FbxPropertyHandle(const FbxPropertyHandle& pAddress);
//! Destructor
~FbxPropertyHandle();
/** Character constructor.
* \param pPage
* \param pId */
FbxPropertyHandle(FbxPropertyPage* pPage, FbxInt pId=FBXSDK_PROPERTY_ID_ROOT);
//@}
/**
* \name Assignment and basic info
*/
//@{
/** FbxPropertyHandle assignment operator.
* \param pHandle FbxPropertyHandle assigned to this one. */
FbxPropertyHandle& operator=(const FbxPropertyHandle& pHandle);
/** Equality operator.
* \param pHandle FbxPropertyHandle compared with this one.
* \return \c True if equal, \c false otherwise. */
bool operator==(const FbxPropertyHandle& pHandle) const;
/** Inequality operator.
* \param pHandle FbxPropertyHandle compared with this one.
* \return \c True if unequal, \c false otherwise. */
bool operator!=(const FbxPropertyHandle& pHandle) const;
/** Lesser operator, used to sort property handle in map.
* \param pHandle The property handle compared to this property handle.
* \return \c true if less, \c false otherwise. */
bool operator< (const FbxPropertyHandle& pHandle) const;
/** Greater operator, used to sort property handle in map.
* \param pProperty The property handle compared to this property handle.
* \return \c true if greater, \c false otherwise. */
bool operator> (const FbxPropertyHandle& pHandle) const;
/** Compare type info together
* \param pHandle FbxPropertyHandle compared with this one.
* \return \c True if equal, \c false otherwise. */
bool Is(const FbxPropertyHandle& pHandle) const;
//! Judge validity
bool Valid() const;
//! Get the property name
const char* GetName() const;
//! Get the property label
const char* GetLabel() const;
/** Set a label to the property
* \param pLabel The given label string
* \return \c true if successful. */
bool SetLabel(const char* pLabel);
//! Get the property type
EFbxType GetType() const;
//! Get the property type info
FbxPropertyHandle GetTypeInfo() const;
//! Get the property attribute state
FbxPropertyFlags::EFlags GetFlags() const;
/** Gets the inheritance type for the given flag.
* \param pFlags The flag to query
* \param pCheckReferences Decide whether check instance. If it is true, check instance.
* \return The inheritance type */
FbxPropertyFlags::EInheritType GetFlagsInheritType(FbxPropertyFlags::EFlags pFlags, bool pCheckReferences) const;
/** According the given parameter Change the attributes of the property.
* \param pFlags The given flags used as mask.
* \param pValue If pValue is true, set mask with given flags, otherwise unset mask with given flags.
* \return If succeed, return true. */
bool ModifyFlags(FbxPropertyFlags::EFlags pFlags, bool pValue);
/**Sets the inheritance type for the given flag
* \param pFlags The flag to set
* \param pType The inheritance type to set
* \return If succeed, return true. */
bool SetFlagsInheritType(FbxPropertyFlags::EFlags pFlags, FbxPropertyFlags::EInheritType pType);
//! Get the property user data.
void* GetUserData() const;
/** Set user data to the property
* \param pUserData The given user data
* \return If succeed, return true. */
bool SetUserData(const void* pUserData);
//! Get the property user tag
int GetUserTag() const;
/** Set user tag to the property
* \param pUserData The given user tag
* \return If succeed, return true. */
bool SetUserTag(int pUserData);
//@}
/**
* \name Enum management
*/
//@{
/** Add new value at the end of the enum list in the property.
* \param pStringValue The given new value
* \return The index of the value. */
int AddEnumValue(const char* pStringValue);
/** Insert new value at the given index of the enum list in property.
* \param pIndex The given index
* \param pStringValue The given new value */
void InsertEnumValue(int pIndex, const char* pStringValue);
/** Get the enum count of enum list in property
* \return The enum count of enum list in property */
int GetEnumCount();
/** Set value at the given index of the enum list in the property.
* \param pIndex The given index
* \param pStringValue The given new value used to instead the old value. */
void SetEnumValue(int pIndex, const char* pStringValue);
/** Remove the value at the index of the enum list in the property.
* \param pIndex The given index */
void RemoveEnumValue(int pIndex);
/** Get the value at the index of enum list in the property.
* \param pIndex The given index
* \return The value at the given index */
char* GetEnumValue(int pIndex);
//@}
/**
* \name Child and Struct management
*/
//@{
//! Create the map for find property in the property page
void BeginCreateOrFindProperty();
//! Clear the map which created for find property.
void EndCreateOrFindProperty();
/** Judge if the property is the root property.
* \return Return true if this property is root property. */
inline bool IsRoot() const { return ( mPage && mId == 0 ) ? true : false; }
/** Judge if the property is the child property of the given parent property.
* \param pParent The given parent property handle
* \return Return true if this property is child of given property. */
bool IsChildOf(const FbxPropertyHandle& pParent) const;
/** Judge if the property is descendent property of the given property.
* \param pParent The given parent property handle
* \return Return true if this property is descendant of given property. */
bool IsDescendentOf(const FbxPropertyHandle& pParent) const;
/** Set parent property handle.No matter what enters,the result is always false.
* \param pOther
* \return False */
bool SetParent(const FbxPropertyHandle& pOther );
/** Add a property to the property page.
* \param pName The name of property.
* \param pTypeInfo The added property's type info.
* \return The handle of the new added property */
FbxPropertyHandle Add(const char* pName, const FbxPropertyHandle& pTypeInfo);
/** Get parent property
* \return If the parent property exists, return the property handle,otherwise return -1. */
FbxPropertyHandle GetParent() const;
/** Get child property
* \return If the child property is exist, return the property handle,otherwise return -1. */
FbxPropertyHandle GetChild() const;
/** Get sibling property
* \return If the sibling property is exist, return the property handle,otherwise return -1. */
FbxPropertyHandle GetSibling() const;
/** Get first descendent property
* \return If the descendent property is exist, return the first descendent property handle,otherwise return -1. */
FbxPropertyHandle GetFirstDescendent() const;
/** Get first descendent property which after the given property
* \param pHandle The given property handle
* \return If the descendent property can be found after the given property,
* return the first found property handle,otherwise return -1. */
FbxPropertyHandle GetNextDescendent(const FbxPropertyHandle& pHandle) const;
/** Find the property with given name
* \param pName The given property name
* \param pCaseSensitive Decide if the given property name is case sensitive
* \return Return a property handle which be created with the found property. */
FbxPropertyHandle Find(const char* pName, bool pCaseSensitive) const;
/** Find the property with given name and type info.
* \param pName The given property name
* \param pTypeInfo The given property type info
* \param pCaseSensitive Decide if the given property name is case sensitive
* \return Return a property handle which be created with the found property. */
FbxPropertyHandle Find(const char* pName, const FbxPropertyHandle& pTypeInfo, bool pCaseSensitive) const;
/** Separate the given name by children separator string and then find the property.The step is
* strip the first part of the name and search, if the property can be found, strip the second part
* of the name and continue search, until no property be found,then return the last found property.
* \param pName The given property name
* \param pChildrenSeparator The given children separator string
* \param pCaseSensitive Decide if the given property name is case sensitive
* \return Return a property handle which be created with the found property. */
FbxPropertyHandle Find(const char* pName, const char* pChildrenSeparator, bool pCaseSensitive) const;
/** Separate the given name by children separator string and then find the property.The step is
* strip the first part of the name and search, if the property can be found, strip the second part
* of the name and continue search, until no property be found,then return the last found property.
* \param pName The given property name
* \param pChildrenSeparator The given children separator string
* \param pTypeInfo The given property type info
* \param pCaseSensitive Decide if the given property name is case sensitive
* \return Return a property handle which be created with the found property. */
FbxPropertyHandle Find(const char* pName, const char* pChildrenSeparator, const FbxPropertyHandle& pTypeInfo, bool pCaseSensitive) const;
//@}
/**
* \name Connection management
*/
//@{
/** Connect source property.
* \param pSrc The given source property
* \param pType The given property type
* \return If connect successfully, return true,otherwise, return false. */
bool ConnectSrc(const FbxPropertyHandle& pSrc, const FbxConnection::EType pType=FbxConnection::eDefault);
/** Get source properties' count.
* \param pFilter The filter used to get sub connection point. If it is not zero, return the source count of the sub connection point.
* Otherwise, return the src count of this property.
* \return The count of source properties */
int GetSrcCount(FbxConnectionPointFilter* pFilter=0) const;
/** Get source property with the given index.
* \param pFilter The filter used to get sub connection point. If it is not zero, return the source property of the sub connection point.
* Otherwise, return the source property of this property.
* \param pIndex The given index
* \return The source property handle. */
FbxPropertyHandle GetSrc(FbxConnectionPointFilter* pFilter=0, int pIndex=0) const;
/** Disconnect source property.
* \param pSrc The given source property
* \return If disconnect successfully, return true, otherwise return false. */
bool DisconnectSrc(const FbxPropertyHandle& pSrc);
/** Judge if it is connected with the given source property.
* \param pSrc The given source property
* \return If it is connected, return true, otherwise return false. */
bool IsConnectedSrc(const FbxPropertyHandle& pSrc);
/** Connect destination property.
* \param pDst The given destination property
* \param pType The given property type
* \return If connect successfully, return true,otherwise, return false. */
bool ConnectDst(const FbxPropertyHandle& pDst, const FbxConnection::EType pType=FbxConnection::eDefault);
/** Get destination properties' count.
* \param pFilter The filter used to get sub connection point.If it is not zero,return the destination count of the sub connection point.
* Otherwise, return the destination count of this property.
* \return The count of destination properties */
int GetDstCount(FbxConnectionPointFilter* pFilter=0) const;
/** Get destination property with the given index.
* \param pFilter The filter used to get sub connection point.If it is not zero,return the destination property of the sub connection point.
* Otherwise, return the destination property of this property.
* \param pIndex The given index
* \return The destination property handle. */
FbxPropertyHandle GetDst(FbxConnectionPointFilter* pFilter=0, int pIndex=0) const;
/** Disconnect destination property.
* \param pDst The given destination property
* \return If disconnect successfully, return true,otherwise, return false. */
bool DisconnectDst(const FbxPropertyHandle& pDst);
/** Judge if it is connected with the given destination property.
* \param pDst The given destination property
* \return If it is connected, return true,otherwise, return false. */
bool IsConnectedDst(const FbxPropertyHandle& pDst);
//! Clear connect cache
void ClearConnectCache();
//! Clear all connect without sending any notification (Internal use ONLY)
void WipeAllConnections();
//@}
/** \name Limits Functions
* Minimum and maximum value limits can be associated with properties, but FBX
* will not verify that these limits are respected. FBX however will store and
* retrieve limits from files, and will assure that they are persistent in memory
* while the property handle object exists.
*
* Soft minimums and maximums values are specifying a second set of limits that can be
* used for UI objects such as sliders. FBX will handle them the same way it does
* with the normal limits. */
//@{
/** Judge if this property has a minimum value.
* \return If the minimum value exist, return true,otherwise, return false. */
bool HasMin() const;
/** Get the minimum value and value type of this property.
* \param pValue The minimum value of this property.
* \param pValueType The value type of this property.
* \return If the minimum value exist, return true,otherwise, return false. */
bool GetMin(void* pValue, EFbxType pValueType) const;
/** Set the minimum value and value type for this property.
* \param pValue The given minimum value .
* \param pValueType The given value type .
* \return If it be set successfully, return true,otherwise, return false. */
bool SetMin(const void* pValue, EFbxType pValueType);
/** According the given value and its value type, set the minimum value and value type for this property.
* \param pValue The given value .
* \return If it be set successfully, return true,otherwise, return false.
*/
template <class T> inline bool SetMin(const T& pValue){ return SetMin(&pValue, FbxTypeOf(pValue)); }
/** Get the minimum value of this property.
* \param pFBX_TYPE Not used in this function. This is a dummy argument for
* the correct instantiation of the templated function.
* \return The minimum value of this property */
template <class T> inline T GetMin(const T* pFBX_TYPE) const { T lValue; GetMin(&lValue, FbxTypeOf(lValue)); return lValue; }
/** Judge if this property has soft minimum value.
* \return If the soft minimum value exist, return true,otherwise, return false. */
bool HasSoftMin() const;
/** Get the soft minimum value and value type of this property.
* \param pValue The soft minimum value of this property.
* \param pValueType The value type of this property.
* \return If the soft minimum value exist, return true,otherwise, return false. */
bool GetSoftMin(void* pValue, EFbxType pValueType) const;
/** Set the soft minimum value and value type for this property.
* \param pValue The given soft minimum value .
* \param pValueType The given value type .
* \return If it be set successfully, return true,otherwise, return false. */
bool SetSoftMin(const void* pValue, EFbxType pValueType);
/** According the given value and its value type, set the soft minimum value and value type for this property.
* \param pValue The given value .
* \return If it be set successfully, return true,otherwise, return false. */
template <class T> inline bool SetSoftMin(const T& pValue){ return SetSoftMin(&pValue, FbxTypeOf(pValue)); }
/** Get the soft minimum value of this property.
* \param pFBX_TYPE Not used in this function. This is a dummy argument for
* the correct instantiation of the templated function.
* \return The soft minimum value of this property */
template <class T> inline T GetSoftMin(const T* pFBX_TYPE) const { T lValue; GetSoftMin(&lValue, FbxTypeOf(lValue)); return lValue; }
/** Judge if this property has maximum value.
* \return If the maximum value exist, return true,otherwise, return false. */
bool HasMax() const;
/** Get the maximum value and value type of this property.
* \param pValue The maximum value of this property.
* \param pValueType The value type of this property.
* \return If the maximum value exist, return true,otherwise, return false. */
bool GetMax(void* pValue, EFbxType pValueType) const;
/** Set the maximum value and value type for this property.
* \param pValue The given maximum value .
* \param pValueType The given value type .
* \return If it be set successfully, return true,otherwise, return false. */
bool SetMax(const void* pValue, EFbxType pValueType);
/** According the given value and its value type, set the maximum value and value type for this property.
* \param pValue The given value .
* \return If it be set successfully, return true,otherwise, return false. */
template <class T> inline bool SetMax(const T& pValue){ return SetMax(&pValue, FbxTypeOf(pValue)); }
/** Get the maximum value of this property.
* \param pFBX_TYPE Not used in this function. This is a dummy argument for
* the correct instantiation of the templated function.
* \return The maximum value of this property */
template <class T> inline T GetMax(const T* pFBX_TYPE) const { T lValue; GetMax(&lValue, FbxTypeOf(lValue)); return lValue; }
/** Judge if this property has soft maximum value.
* \return If the soft maximum value exist, return true,otherwise, return false. */
bool HasSoftMax() const;
/** Get the soft maximum value and value type of this property.
* \param pValue The soft maximum value of this property.
* \param pValueType The value type of this property.
* \return If the soft maximum value exist, return true,otherwise, return false. */
bool GetSoftMax(void* pValue, EFbxType pValueType) const;
/** Set the soft maximum value and value type for this property.
* \param pValue The given soft maximum value .
* \param pValueType The given value type .
* \return If it be set successfully, return true,otherwise, return false. */
bool SetSoftMax(const void* pValue, EFbxType pValueType);
/** According the given value and its value type, set the soft maximum value and value type for this property.
* \param pValue The given value .
* \return If it be set successfully, return true,otherwise, return false. */
template <class T> inline bool SetSoftMax(const T& pValue){ return SetSoftMax(&pValue, FbxTypeOf(pValue)); }
/** Get the soft maximum value of this property.
* \param pFBX_TYPE Not used in this function. This is a dummy argument for
* the correct instantiation of the templated function.
* \return The soft maximum value of this property */
template <class T> inline T GetSoftMax(const T* pFBX_TYPE) const { T lValue; GetSoftMax(&lValue, FbxTypeOf(lValue)); return lValue; }
//@}
/**
* \name Value
*/
//@{
/** Get value inherit type of this property.
* \param pCheckReferences If it is true,check instance of this property page,otherwise,only check this page.
* \return The value inherit type of this property */
FbxPropertyFlags::EInheritType GetValueInheritType(bool pCheckReferences) const;
/** Set value inherit type for this property .
* \param pType The given value inherit type.
* \return If set successfully, return true,otherwise, return false. */
bool SetValueInheritType(FbxPropertyFlags::EInheritType pType);
/** Get default value and value type of this property .
* \param pValue The gotten default value of this property.
* \param pValueType The gotten default value type of this property.
* \return If default value be gotten successfully, return true,otherwise, return false. */
bool GetDefaultValue(void* pValue, EFbxType pValueType) const;
/** Get value and value type of this property .
* \param pValue The gotten value of this property.
* \param pValueType The gotten value type of this property.
* \return If value be gotten successfully, return true,otherwise, return false. */
bool Get(void* pValue, EFbxType pValueType) const;
/** Set property value and value type for this property.
* \param pValue The given property value .
* \param pValueType The given property value type
* \param pCheckValueEquality If it is true, when the given value is equal with
* the property value, the property value will not be set.
* \return If the property value be set successfully, return true,otherwise, return false. */
bool Set(const void* pValue, EFbxType pValueType, bool pCheckValueEquality);
/** Set property value with the given value .
* \param pValue The given value .
* \return If set successfully, return true,otherwise, return false. */
template <class T> inline bool Set(const T& pValue){ return Set(&pValue, FbxTypeOf(pValue)); }
/** get property value.
* \param pFBX_TYPE Not be used.
* \return The gotten property value. */
template <class T> inline T Get(const T* pFBX_TYPE) const { T lValue; Get(&lValue, FbxTypeOf(lValue)); return lValue; }
//@}
/**
* \name Page settings
*/
//@{
/** Set the property page data pointer.
* \param pData The given page data pointer. */
void SetPageDataPtr(void* pData);
/** Get property page data pointer.
* \return The gotten property page data pointer. */
void* GetPageDataPtr() const;
//@}
/**
* \name Page Internal Entry Management
*/
//@{
/** Push properties to parent instance.
* \return If push successful return true,otherwise,return false. */
bool PushPropertiesToParentInstance();
//@}
/**
* \name Reference Management
*/
//@{
/** Judge if this property page is a instance of other page.
* \return If this property page is a instance of other page, return true,otherwise,return false. */
bool IsAReferenceTo(void) const;
/** Get the property page which this property page make reference to
* \return The property page which this property page make reference to */
void* GetReferenceTo(void) const;
/** Judge if this property page is referenced by other pages.
* \return If this property page is referenced by other pages, return true,otherwise,return false. */
bool IsReferencedBy(void) const;
/** Get the count of property pages which make reference to this property page.
* \return The count of property pages which make reference to this property page. */
int GetReferencedByCount(void) const;
/** According the given index,get the property page which make reference to this property page.
* \param pIndex The given index
* \return The pointer to the property page which reference to this property page and be found by index. */
void* GetReferencedBy(int pIndex) const;
//@}
private:
FbxPropertyPage* mPage;
FbxInt mId;
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_PROPERTY_HANDLE_H_ */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,260 +0,0 @@
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxquery.h
#ifndef _FBXSDK_CORE_QUERY_H_
#define _FBXSDK_CORE_QUERY_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/fbxclassid.h>
#include <fbxsdk/core/fbxconnectionpoint.h>
#include <fbxsdk/core/base/fbxmap.h>
#include <fbxsdk/core/base/fbxmemorypool.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
#define FBXSDK_QUERY_UNIQUE_ID 0x14000000
class FbxProperty;
/** Base class to manage query. A query contains a filter and reference ID, which will be used to search and retrieve objects.
* The derived query classes are used to create FbxCriteria.
* \nosubgrouping */
class FBXSDK_DLL FbxQuery
{
public:
//! Get unique filter Id
virtual FbxInt GetUniqueId() const { return FBXSDK_QUERY_UNIQUE_ID; }
/** Judge if the given property is valid.
* \param pProperty The given property.
* \return \c true always, not implemented. */
virtual bool IsValid(const FbxProperty& pProperty) const;
/** This compares whether two FbxQuery are the same, NOT whether the query matches or not. It's strictly the equivalent of an operator==, but virtual.
* \param pOtherQuery The given FbxQuery */
virtual bool IsEqual(FbxQuery* pOtherQuery) const;
//! Add one to ref count.
void Ref();
//! Minus one to ref count, if ref count is zero, delete this query object.
void Unref();
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
FbxQuery();
virtual ~FbxQuery();
private:
class InternalFilter : public FbxConnectionPointFilter
{
public:
InternalFilter(FbxQuery* pQuery);
~InternalFilter();
public:
FbxConnectionPointFilter* Ref();
void Unref();
FbxInt GetUniqueId() const { return mQuery->GetUniqueId(); }
bool IsValid(FbxConnectionPoint* pConnect) const;
bool IsEqual(FbxConnectionPointFilter* pConnectFilter) const;
FbxQuery* mQuery;
};
InternalFilter mFilter;
int mRefCount;
FBXSDK_FRIEND_NEW();
friend class FbxProperty;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
/** Defines a filtering criteria for a query of objects, connections and properties, so that only those satisfying the criteria are
* affected by the query. Some examples of kinds of criteria are object type, connection type, or property. Criteria can be combined
* using logical operators such as "and" and "or".
* \note
* Objects are basic elements in FBX. Each of them has a hierarchy type and some properties. Objects and properties can be connected
* through a connection to represent a relationship between them. (e.g. child-parent, container membership, reference, etc.,). In a
* query, you could select object or properties based on these criteria.
* Here are some examples:
* \code
* FbxObject* lObject = FbxObject::Create(lManager, "Object");
* int lSrcLightCount = lObject->RootProperty.GetSrcObjectCount(FbxCriteria::ObjectType(FbxLight::ClassId));
* int lSrcDeformerCount = lObject->RootProperty.GetSrcObjectCount(FbxCriteria::ObjectTypeStrict(FbxDeformer::ClassId));
* int lSrcPropertyCount = lObject->RootProperty.GetSrcCount(FbxCriteria::IsProperty());
* \endcode
* \see FbxQuery
* \see FbxProperty::GetSrcObjectCount(const FbxCriteria&) const
* \see FbxCollection::GetMemberCount(const FbxCriteria&) const
* \nosubgrouping */
class FBXSDK_DLL FbxCriteria
{
public:
/** Creates a new query criteria that only selects objects which have a specific
* class ID or derive from a class with a specific class ID.
* \param pClassId The base type class ID */
static FbxCriteria ObjectType(const FbxClassId& pClassId);
/** Creates a new query criteria that only selects objects which have a specific class ID.
* \param pClassId The type class ID */
static FbxCriteria ObjectTypeStrict(const FbxClassId& pClassId);
//! Creates a new query criteria that only selects properties.
static FbxCriteria IsProperty();
/** Gets a logical conjunction (and) criteria from this and the specified criteria.
* \param pCriteria The specified criteria */
FbxCriteria operator&&(const FbxCriteria& pCriteria) const;
/** Gets a logical disjunction (or) criteria from this and the specified criteria.
* \param pCriteria The specified criteria */
FbxCriteria operator||(const FbxCriteria& pCriteria) const;
//! Returns a negated version of the criteria.
FbxCriteria operator!() const;
/** Retrieves the query.
* \return The query of this criteria */
FbxQuery* GetQuery() const;
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
FbxCriteria();
FbxCriteria(const FbxCriteria& pCriteria);
FbxCriteria(FbxQuery* pQuery);
~FbxCriteria();
FbxCriteria& operator=(const FbxCriteria& pCriteria);
private:
FbxQuery* mQuery;
static void FreeGlobalCache();
FBXSDK_FRIEND_NEW();
friend class FbxManager;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
//! Functor to compare FbxCriteria
struct FbxCriteriaCompare
{
inline int operator()(const FbxCriteria& pKeyA, const FbxCriteria& pKeyB) const
{
const FbxQuery* lKeyA = pKeyA.GetQuery();
const FbxQuery* lKeyB = pKeyB.GetQuery();
return lKeyA < lKeyB ? -1 : (lKeyA > lKeyB ? 1 : 0);
}
};
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
class FBXSDK_DLL FbxQueryOperator : public FbxQuery
{
public:
FBXSDK_FRIEND_NEW();
enum EType {eAND, eOR};
static FbxQueryOperator* Create(FbxQuery* pA, EType pOperator, FbxQuery* pB);
virtual FbxInt GetUniqueId() const { return FBXSDK_QUERY_UNIQUE_ID+1; }
virtual bool IsValid(const FbxProperty& pProperty) const;
virtual bool IsEqual(FbxQuery* pOtherQuery) const;
protected:
FbxQueryOperator(FbxQuery* pA, EType pOperator, FbxQuery* pB);
virtual ~FbxQueryOperator();
private:
FbxQuery *mA, *mB;
EType mOperator;
};
class FBXSDK_DLL FbxQueryOperatorUnary : public FbxQuery
{
public:
FBXSDK_FRIEND_NEW();
static FbxQueryOperatorUnary* Create(FbxQuery* pA);
virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+2; }
virtual bool IsValid(const FbxProperty& pProperty) const;
virtual bool IsEqual(FbxQuery* pOtherQuery) const;
protected:
FbxQueryOperatorUnary(FbxQuery* pA);
virtual ~FbxQueryOperatorUnary();
private:
FbxQuery* mA;
};
class FBXSDK_DLL FbxQueryClassId : public FbxQuery
{
public:
FBXSDK_FRIEND_NEW();
static FbxQueryClassId* Create(const FbxClassId& pClassId);
virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+3; }
virtual bool IsValid(const FbxProperty& pProperty) const;
virtual bool IsEqual(FbxQuery* pOtherQuery) const;
protected:
FbxQueryClassId(const FbxClassId& pClassId);
private:
FbxClassId mClassId;
};
class FBXSDK_DLL FbxQueryIsA : public FbxQuery
{
public:
FBXSDK_FRIEND_NEW();
static FbxQueryIsA* Create(const FbxClassId& pClassId);
virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+4; }
virtual bool IsValid(const FbxProperty& pProperty) const;
virtual bool IsEqual(FbxQuery* pOtherQuery) const;
protected:
FbxQueryIsA(const FbxClassId& pClassId);
private:
FbxClassId mClassId;
};
class FBXSDK_DLL FbxQueryIsProperty : public FbxQuery
{
public:
FBXSDK_FRIEND_NEW();
static FbxQueryIsProperty* Create();
virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+5; }
virtual bool IsValid(const FbxProperty& pProperty) const;
virtual bool IsEqual(FbxQuery* pOtherQuery) const;
protected:
FbxQueryIsProperty();
};
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_CORE_QUERY_H_ */

Some files were not shown because too many files have changed in this diff Show More