This commit is contained in:
Misaki
2025-12-04 19:11:29 +08:00
commit bb600bbbc4
2741 changed files with 364700 additions and 0 deletions
+371
View File
@@ -0,0 +1,371 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 2025-07-17
### Changed
* [Unity,Native,Java] Implement support for Android 16KB page size.
## 2025-04-24
### Added
* Add the function `csmGetParameterRepeats`.
* This function retrieves whether the parameters are set to repeat.
### Changed
* Upgrade Core version to 05.01.0000.
### Fixed
* Fix `csmGetParameterKeyCounts()` and `csmGetParameterKeyValues()` symbols in the DLL.
## 2024-12-19
### Removed
* [Native] Remove Visual Studio 2013 (MSVC 120) static library.
## 2024-11-07
### Added
* [Native] Add experimental support `arm64` library for linux.
### Removed
* [Unity,Native,Java] Remove Android ARM v7 library.
## 2024-04-04
### Added
* [Unity] Add library(.so) for HarmonyOS build.
## 2024-03-26
### Remove
* [Unity] Remove built with Emscripten 1.38.48.
* Unity 2021.2 or later uses only Core under `Assets/Live2D/Cubism/Plugins/Experimental/Emscripten/latest`.
## 2023-09-28
### Remove
* Remove bitcode from IOS build.
## 2023-08-17
### Added
* Enhance Blend Shape features.
* Please see [here](https://docs.live2d.com/en/cubism-editor-manual/blend-shape/).
### Changed
* Upgrade Core version to 05.00.0000.
## 2023-05-09
### Changed
* Change the GCC version of the library for Linux from 6.5.0 to 8.3.0.
## 2023-03-16
### Fixed
* Fix a case in which the index of the mask's drawable object was negative value for `csmGetDrawableMasks()`.
* Fix a problem in which `csmHasMocConsistency()` was returned as 0 even though the MOC3 file was in the correct format.
* This problem was occurring in some models using the blendshape weight limit settings.
* Fix a problem that could cause a crash if a MOC3 file that is not in the correct format is loaded with `csmHasMocConsistency()`.
### Changed
* Upgrade Core version to 04.02.0004.
## 2023-03-10
### Added
* Add the function `csmHasMocConsistency`.
* This function verifies that the `MOC3` file is valid.
### Changed
* Upgrade Core version to 04.02.0003.
## 2023-02-21
### Added
* [Web] Added classes related to `Memory`.
* Add the funciton `initializeAmountOfMemory()` to adjust the amount of memory at initialization.
## 2022-10-28
### Fixed
* [Java] Remove unnecessary methods.
## 2022-10-06
### Added
* [Java] Add AAR file for Android.
## 2022-09-08
### Added
* Add the multilingual supported documents.
* Support Visual Studio 2022.
## 2022-08-04
### Fixed
* [Web] Fix `csmGetMocVersion` function argument.
## 2022-07-07
### Added
* Add functions
* `csmGetParameterTypes`
* `csmGetDrawableParentPartIndices`
* Add type `csmMocVersion` and enum. This type is the return value of `csmGetMocVersion`, `csmGetLatestMocVersion`.
### Changed
* Upgrade Core version to 04.02.0002.
## 2022-06-02
### Changed
* Upgrade Core version to 04.02.0001.
### Fixed
* Fixed a bug that caused Multiply Color / Screen Color of different objects to be applied.
## 2022-05-19
### Added
* Support new Multiply Color / Screen Color features.
* Support new Blend Shape features.
### Changed
* Upgrade Core version to 04.02.0000. This upgrade is following Cubism Editor 4.2 features.
## 2022-02-10
### Added
* [Unity] Add bitcode library(.bc) for Emscripten latest version build.
### Changed
* [Unity] Change the bitcode file directory location.
* emsdk latest version build bitcode file in `latest` directory.
* emsdk 1.38.48 build bitcode file in `1_38_48` directory.
## 2021-12-09
### Added
* Add static library(.a) for Mac Catalyst.
## 2021-10-07
### Added
* Add `x86_64` library for Android.
* Add `arm64` library for macOS.
## 2021-03-09
### Added
* Add funtcions for Viewer.
* `csmGetParameterKeyCounts`
* `csmGetParameterKeyValues`
### Changed
* Update Core version to `04.01.0000`.
## 2020-01-30
### Added
* Add static library(.lib) for statically linking DLL.
* Add symbol file for Windows dynamic library (dll).
## 2019-11-19
### Fixed
* Fix linking static libraries for Windows (.lib).
## 2019-11-14
### Added
* Support Visual Studio 2019.
* Support macOS dynamic library (dylib).
### Changed
* Update Windows dynamic library: Use Visual Studio 2019 for building.
### Security
* Bundle certificate and notary ticket to macOS shared library.
## 2019-09-04
### Added
* Support new Inverted Masking features.
* Support ARM64 architecture for Universal Windows Platform.
### Changed
* Upgrade Core version to 04.00.0000 (67108864). This upgrade is following Cubism Editor 4.0 features.
* Add calling convention for *Windows/x86 DLL* only.
### Removed
* Remove bitcode binary due to suspension of *Cubism Bindings.*
## 2019-04-09
### Added
* Support Universal Windows Platform for Windows Store Application.
## 2019-01-31
### Added
* Add API to get the parent part of the specified part.
* Add API to get moc3 version.
## 2018-12-20
### Added
* [Native] Add new function: `csmGetPartParentPartIndices`.
* [Native, 3.3 Support] Support new Warp Deformer features.
### Changed
* Upgrade Core version to 03.03.0000 (50528256). This upgrade is following Cubism Editor 3.3 features.
## 2018-08-22
### Added
* [Native] Add support for Neon.
## 2018-05-14
### Added
* [Native] Add Windows **Visual C++ 2013** library.
* [Windows] Add runtime library choice `MT`, `MD`, `MTd`, `MDd`.
* [iOS] Add support for iPhone Simulator SDK.
### Fixed
* Fix an error occurred when linking libraries for Android `arm64-v8a`.
## 2017-11-17
### Fixed
* Fix processing of vertex index.
## 2017-10-05
### Added
* Provide bitcode for iOS.
## 2017-08-09
### Added
* [Native] Add Android *arm64-v8a* ABI library.
### Fixed
* Fix drawing order in certain scenarios.
## 2017-07-12
### Added
* Add experimental support for Emscripten.
* Add `CHANGELOG.md`.
### Fixed
* Fix access violation in certain scenarios.
* Fix update result in certain scenarios.
## 2017-05-02
### Added
* [Native] Add experimental support for Raspberry PI.
* Add `README.md`.
+7
View File
@@ -0,0 +1,7 @@
## Live2D Proprietary Software License
Live2D Cubism Core is available under Live2D Proprietary Software License.
* [Live2D Proprietary Software License Agreement](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html)
* [Live2D Proprietary Software 使用許諾契約書](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_jp.html)
* [Live2D Proprietary Software 使用授权协议](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_cn.html)
+71
View File
@@ -0,0 +1,71 @@
[English](README.md) / [日本語](README.ja.md)
---
# Live2D Cubism Core
このフォルダーには、ネイティブアプリケーションを開発するためのヘッダーおよびプラットフォーム固有のライブラリファイルが含まれています。
Cubism Coreは、Cubismモデルをアプリケーションにロードするための小さなライブラリです。
## はじめに
モデルを画面に表示して、アニメーションを再生するための情報については、[CubismNativeSamples](https://github.com/Live2D/CubismNativeSamples)をご覧ください。
## ファイル構造
```
Core
├─ dll # Shared (Dynamic) Library files
├─ include # Header file
└─ lib # Static Library files
```
## ライブラリリスト
| プラットフォーム | アーキテクチャ | dll | lib | パス | 注記 |
| --- | --- | --- | --- | --- | --- |
| Android | ARM64 | ✓ | ✓ | android/arm64-v8a | |
| Android | x86 | ✓ | ✓ | android/x86 | |
| Android | x86_64 | ✓ | ✓ | android/x86_64 | |
| iOS | ARM64 | | ✓ | ios/xxx-iphoneos | iOSデバイス |
| iOS | x86_64 | | ✓ | ios/xxx-iphonesimulator | iOS Simulator |
| Linux | x86_64 | ✓ | ✓ | linux/x86_64 | |
| Linux | ARM64 | ✓ | ✓ | experimental/linux/ARM64 | |
| macOS | ARM64 | ✓ | ✓ | macos/arm64 | |
| macOS | x86_64 | ✓ | ✓ | macos/x86_64 | |
| Mac Catalyst | ARM64 | | ✓ | experimental/catalyst | Universal Binary |
| Mac Catalyst | x86_64 | | ✓ | experimental/catalyst | Universal Binary |
| Raspberry Pi | ARM | ✓ | ✓ | experimental/rpi | |
| UWP | ARM | ✓ | | experimental/uwp/arm | |
| UWP | ARM64 | ✓ | | experimental/uwp/arm64 | |
| UWP | x64 | ✓ | | experimental/uwp/x64 | |
| UWP | x86 | ✓ | | experimental/uwp/x86 | |
| Windows | x86 | ✓ | ✓ | windows/x86 | |
| Windows | x86_64 | ✓ | ✓ | windows/x86_64 | |
### 実験的ライブラリ
`Raspberry Pi``UWP``catalyst`は実験的なライブラリです。
### Windows用スタティックライブラリ
ライブラリは、VC++バージョン名ディレクトリの下にあります。
以下は、VC++バージョンのVisual Studioバージョンです。
| VC++バージョン | Visual Studioバージョン |
| ---: | --- |
| 140 | Visual Studio 2015 |
| 141 | Visual Studio 2017 |
| 142 | Visual Studio 2019 |
| 143 | Visual Studio 2022 |
また、サフィックスライブラリ(`_MD``_MDd``_MT``_MTd`)は、ライブラリのコンパイルに使用される[ランタイムライブラリの使用](https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library) オプションを参照します。
### 呼び出し規約
*Windows/x86*のダイナミックリンクライブラリを使用する場合は、呼び出し規約として明示的に`__stdcall`を使用してください。
+73
View File
@@ -0,0 +1,73 @@
[English](README.md) / [日本語](README.ja.md)
---
# Live2D Cubism Core
This folder contains header and platform-specific library files for developing native applications.
What's the Core anyway? It's a small library that allows you to load Cubism models into your application.
## Getting Started
You probably want to play back animations and want to display your models on screen, too.
[Go here](https://github.com/Live2D/CubismNativeSamples) for further information.
## File Structure
```
Core
├─ dll # Shared (Dynamic) Library files
├─ include # Header file
└─ lib # Static Library files
```
## Library List
| Platform | Architecture | dll | lib | Path | Note |
| --- | --- | --- | --- | --- | --- |
| Android | ARM64 | ✓ | ✓ | android/arm64-v8a | |
| Android | x86 | ✓ | ✓ | android/x86 | |
| Android | x86_64 | ✓ | ✓ | android/x86_64 | |
| iOS | ARM64 | | ✓ | ios/xxx-iphoneos | iOS Devices |
| iOS | x86_64 | | ✓ | ios/xxx-iphonesimulator | iOS Simulator |
| Linux | x86_64 | ✓ | ✓ | linux/x86_64 | |
| Linux | ARM64 | ✓ | ✓ | experimental/linux/ARM64 | |
| macOS | ARM64 | ✓ | ✓ | macos/arm64 | |
| macOS | x86_64 | ✓ | ✓ | macos/x86_64 | |
| Mac Catalyst | ARM64 | | ✓ | experimental/catalyst | Universal Binary |
| Mac Catalyst | x86_64 | | ✓ | experimental/catalyst | Universal Binary |
| Raspberry Pi | ARM | ✓ | ✓ | experimental/rpi | |
| UWP | ARM | ✓ |   | experimental/uwp/arm |   |
| UWP | ARM64 | ✓ | | experimental/uwp/arm64 | |
| UWP | x64 | ✓ | | experimental/uwp/x64 | |
| UWP | x86 | ✓ | | experimental/uwp/x86 | |
| Windows | x86 | ✓ | ✓ | windows/x86 | |
| Windows | x86_64 | ✓ | ✓ | windows/x86_64 | |
### Experimental Library
`Raspberry Pi`, `UWP` and `catalyst` are experimental libraries.
### Windows Static Library
Libraries are located under the VC++ version name directory.
Below is the Visual Studio version for the VC++ version.
| VC++ version | Visual Studio version |
| ---: | --- |
| 140 | Visual Studio 2015 |
| 141 | Visual Studio 2017 |
| 142 | Visual Studio 2019 |
| 143 | Visual Studio 2022 |
Also, the suffix library (`_MD`, `_MDd`, `_MT`, `_MTd`) refers to the [Use Run-Time Library] option used to compile the library.
### Calling convention
When using the dynamic library of *Windows/x86*, explicitly use `__stdcall` as the calling convention.
+68
View File
@@ -0,0 +1,68 @@
[English](README.md) / [日本語](README.ja.md)
---
# Live2D Cubism Core
本文件夹包含用于开发原生应用程序的头文件以及各平台专用的库文件。
Cubism Core 是一个轻量级库,用于在应用程序中加载 Cubism 模型。
## 入门
若要将模型显示到屏幕上并播放动画,请参考 [CubismNativeSamples](https://github.com/Live2D/CubismNativeSamples)。
## 文件结构
```
Core
├─ dll # 共享(动态)库文件
├─ include # 头文件
└─ lib # 静态库文件
```
## 库列表
| 平台 | 架构 | dll | lib | 路径 | 备注 |
| --- | --- | --- | --- | --- | --- |
| Android | ARM64 | ✓ | ✓ | android/arm64-v8a | |
| Android | x86 | ✓ | ✓ | android/x86 | |
| Android | x86_64 | ✓ | ✓ | android/x86_64 | |
| iOS | ARM64 | | ✓ | ios/xxx-iphoneos | iOS 真机 |
| iOS | x86_64 | | ✓ | ios/xxx-iphonesimulator | iOS 模拟器 |
| Linux | x86_64 | ✓ | ✓ | linux/x86_64 | |
| Linux | ARM64 | ✓ | ✓ | experimental/linux/ARM64 | |
| macOS | ARM64 | ✓ | ✓ | macos/arm64 | |
| macOS | x86_64 | ✓ | ✓ | macos/x86_64 | |
| Mac Catalyst | ARM64 | | ✓ | experimental/catalyst | Universal Binary |
| Mac Catalyst | x86_64 | | ✓ | experimental/catalyst | Universal Binary |
| Raspberry Pi | ARM | ✓ | ✓ | experimental/rpi | |
| UWP | ARM | ✓ | | experimental/uwp/arm | |
| UWP | ARM64 | ✓ | | experimental/uwp/arm64 | |
| UWP | x64 | ✓ | | experimental/uwp/x64 | |
| UWP | x86 | ✓ | | experimental/uwp/x86 | |
| Windows | x86 | ✓ | ✓ | windows/x86 | |
| Windows | x86_64 | ✓ | ✓ | windows/x86_64 | |
### 实验性库
`Raspberry Pi``UWP``Catalyst` 属于实验性库。
### Windows 静态库说明
库文件位于以 VC++ 版本命名的目录下。
各 VC++ 版本对应的 Visual Studio 版本如下:
| VC++ 版本 | Visual Studio 版本 |
| ---: | --- |
| 140 | Visual Studio 2015 |
| 141 | Visual Studio 2017 |
| 142 | Visual Studio 2019 |
| 143 | Visual Studio 2022 |
后缀库(`_MD``_MDd``_MT``_MTd`)表示编译该库时所使用的[运行时库](https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library)选项。
### 调用约定
使用 *Windows/x86* 的动态链接库时,请显式采用 `__stdcall` 调用约定。
+599
View File
@@ -0,0 +1,599 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Proprietary Software license
* that can be found at https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html.
*/
#ifndef LIVE2D_CUBISM_CORE_H
#define LIVE2D_CUBISM_CORE_H
#if defined(__cplusplus)
extern "C"
{
#endif
/* ------- *
* DEFINES *
* ------- */
/** Core API attribute. */
#if !defined(csmApi)
#define csmApi
#endif
/* ----- *
* TYPES *
* ----- */
/** Cubism moc. */
typedef struct csmMoc csmMoc;
/** Cubism model. */
typedef struct csmModel csmModel;
/** Cubism version identifier. */
typedef unsigned int csmVersion;
/** Alignment constraints. */
enum
{
/** Necessary alignment for mocs (in bytes). */
csmAlignofMoc = 64,
/** Necessary alignment for models (in bytes). */
csmAlignofModel = 16
};
/** Bit masks for non-dynamic drawable flags. */
enum
{
/** Additive blend mode mask. */
csmBlendAdditive = 1 << 0,
/** Multiplicative blend mode mask. */
csmBlendMultiplicative = 1 << 1,
/** Double-sidedness mask. */
csmIsDoubleSided = 1 << 2,
/** Clipping mask inversion mode mask. */
csmIsInvertedMask = 1 << 3
};
/** Bit masks for dynamic drawable flags. */
enum
{
/** Flag set when visible. */
csmIsVisible = 1 << 0,
/** Flag set when visibility did change. */
csmVisibilityDidChange = 1 << 1,
/** Flag set when opacity did change. */
csmOpacityDidChange = 1 << 2,
/** Flag set when draw order did change. */
csmDrawOrderDidChange = 1 << 3,
/** Flag set when render order did change. */
csmRenderOrderDidChange = 1 << 4,
/** Flag set when vertex positions did change. */
csmVertexPositionsDidChange = 1 << 5,
/** Flag set when blend color did change. */
csmBlendColorDidChange = 1 << 6
};
/** Bitfield. */
typedef unsigned char csmFlags;
/** moc3 file format version. */
enum
{
/** unknown */
csmMocVersion_Unknown = 0,
/** moc3 file version 3.0.00 - 3.2.07 */
csmMocVersion_30 = 1,
/** moc3 file version 3.3.00 - 3.3.03 */
csmMocVersion_33 = 2,
/** moc3 file version 4.0.00 - 4.1.05 */
csmMocVersion_40 = 3,
/** moc3 file version 4.2.00 - 4.2.04 */
csmMocVersion_42 = 4,
/** moc3 file version 5.0.00 - */
csmMocVersion_50 = 5
};
/** moc3 version identifier. */
typedef unsigned int csmMocVersion;
/** Parameter types. */
enum
{
/** Normal parameter. */
csmParameterType_Normal = 0,
/** Parameter for blend shape. */
csmParameterType_BlendShape = 1
};
/** Parameter type. */
typedef int csmParameterType;
/** 2 component vector. */
typedef struct
{
/** First component. */
float X;
/** Second component. */
float Y;
} csmVector2;
/** 4 component vector. */
typedef struct
{
/** 1st component. */
float X;
/** 2nd component. */
float Y;
/** 3rd component. */
float Z;
/** 4th component. */
float W;
} csmVector4;
/** Log handler.
*
* @param message Null-terminated string message to log.
*/
typedef void (*csmLogFunction)(const char* message);
#if CSM_CORE_WIN32_DLL
#define csmCallingConvention __stdcall
#else
#define csmCallingConvention
#endif
/* ------- *
* VERSION *
* ------- */
/**
* Queries Core version.
*
* @return Core version.
*/
csmApi csmVersion csmCallingConvention csmGetVersion();
/**
* Gets Moc file supported latest version.
*
* @return csmMocVersion (Moc file latest format version).
*/
csmApi csmMocVersion csmCallingConvention csmGetLatestMocVersion();
/**
* Gets Moc file format version.
*
* @param address Address of moc.
* @param size Size of moc (in bytes).
*
* @return csmMocVersion
*/
csmApi csmMocVersion csmCallingConvention csmGetMocVersion(const void* address, const unsigned int size);
/* ----------- *
* CONSISTENCY *
* ----------- */
/**
* Checks consistency of a moc.
*
* @param address Address of unrevived moc. The address must be aligned to 'csmAlignofMoc'.
* @param size Size of moc (in bytes).
*
* @return '1' if Moc is valid; '0' otherwise.
*/
csmApi int csmCallingConvention csmHasMocConsistency(void* address, const unsigned int size);
/* ------- *
* LOGGING *
* ------- */
/**
* Queries log handler.
*
* @return Log handler.
*/
csmApi csmLogFunction csmCallingConvention csmGetLogFunction();
/**
* Sets log handler.
*
* @param handler Handler to use.
*/
csmApi void csmCallingConvention csmSetLogFunction(csmLogFunction handler);
/* --- *
* MOC *
* --- */
/**
* Tries to revive a moc from bytes in place.
*
* @param address Address of unrevived moc. The address must be aligned to 'csmAlignofMoc'.
* @param size Size of moc (in bytes).
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi csmMoc* csmCallingConvention csmReviveMocInPlace(void* address, const unsigned int size);
/* ----- *
* MODEL *
* ----- */
/**
* Queries size of a model in bytes.
*
* @param moc Moc to query.
*
* @return Valid size on success; '0' otherwise.
*/
csmApi unsigned int csmCallingConvention csmGetSizeofModel(const csmMoc* moc);
/**
* Tries to instantiate a model in place.
*
* @param moc Source moc.
* @param address Address to place instance at. Address must be aligned to 'csmAlignofModel'.
* @param size Size of memory block for instance (in bytes).
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi csmModel* csmCallingConvention csmInitializeModelInPlace(const csmMoc* moc,
void* address,
const unsigned int size);
/**
* Updates a model.
*
* @param model Model to update.
*/
csmApi void csmCallingConvention csmUpdateModel(csmModel* model);
/* ------ *
* CANVAS *
* ------ */
/**
* Reads info on a model canvas.
*
* @param model Model query.
*
* @param outSizeInPixels Canvas dimensions.
* @param outOriginInPixels Origin of model on canvas.
* @param outPixelsPerUnit Aspect used for scaling pixels to units.
*/
csmApi void csmCallingConvention csmReadCanvasInfo(const csmModel* model,
csmVector2* outSizeInPixels,
csmVector2* outOriginInPixels,
float* outPixelsPerUnit);
/* ---------- *
* PARAMETERS *
* ---------- */
/**
* Gets number of parameters.
*
* @param[in] model Model to query.
*
* @return Valid count on success; '-1' otherwise.
*/
csmApi int csmCallingConvention csmGetParameterCount(const csmModel* model);
/**
* Gets parameter IDs.
* All IDs are null-terminated ANSI strings.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const char** csmCallingConvention csmGetParameterIds(const csmModel* model);
/**
* Gets parameter types.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const csmParameterType* csmCallingConvention csmGetParameterTypes(const csmModel* model);
/**
* Gets minimum parameter values.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const float* csmCallingConvention csmGetParameterMinimumValues(const csmModel* model);
/**
* Gets maximum parameter values.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const float* csmCallingConvention csmGetParameterMaximumValues(const csmModel* model);
/**
* Gets default parameter values.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const float* csmCallingConvention csmGetParameterDefaultValues(const csmModel* model);
/**
* Gets read/write parameter values buffer.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi float* csmCallingConvention csmGetParameterValues(csmModel* model);
/**
* Gets Parameter Repeat informations.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const int* csmCallingConvention csmGetParameterRepeats(const csmModel* model);
/**
* Gets number of key values of each parameter.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const int* csmCallingConvention csmGetParameterKeyCounts(const csmModel* model);
/**
* Gets key values of each parameter.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const float** csmCallingConvention csmGetParameterKeyValues(const csmModel* model);
/* ----- *
* PARTS *
* ----- */
/**
* Gets number of parts.
*
* @param model Model to query.
*
* @return Valid count on success; '-1' otherwise.
*/
csmApi int csmCallingConvention csmGetPartCount(const csmModel* model);
/**
* Gets parts IDs.
* All IDs are null-terminated ANSI strings.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const char** csmCallingConvention csmGetPartIds(const csmModel* model);
/**
* Gets read/write part opacities buffer.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi float* csmCallingConvention csmGetPartOpacities(csmModel* model);
/**
* Gets part's parent part indices.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const int* csmCallingConvention csmGetPartParentPartIndices(const csmModel* model);
/* --------- *
* DRAWABLES *
* --------- */
/**
* Gets number of drawables.
*
* @param model Model to query.
*
* @return Valid count on success; '-1' otherwise.
*/
csmApi int csmCallingConvention csmGetDrawableCount(const csmModel* model);
/**
* Gets drawable IDs.
* All IDs are null-terminated ANSI strings.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const char** csmCallingConvention csmGetDrawableIds(const csmModel* model);
/**
* Gets constant drawable flags.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const csmFlags* csmCallingConvention csmGetDrawableConstantFlags(const csmModel* model);
/**
* Gets dynamic drawable flags.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const csmFlags* csmCallingConvention csmGetDrawableDynamicFlags(const csmModel* model);
/**
* Gets drawable texture indices.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const int* csmCallingConvention csmGetDrawableTextureIndices(const csmModel* model);
/**
* Gets drawable draw orders.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const int* csmCallingConvention csmGetDrawableDrawOrders(const csmModel* model);
/**
* Gets drawable render orders.
* The higher the order, the more up front a drawable is.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0'otherwise.
*/
csmApi const int* csmCallingConvention csmGetDrawableRenderOrders(const csmModel* model);
/**
* Gets drawable opacities.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const float* csmCallingConvention csmGetDrawableOpacities(const csmModel* model);
/**
* Gets numbers of masks of each drawable.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const int* csmCallingConvention csmGetDrawableMaskCounts(const csmModel* model);
/**
* Gets mask indices of each drawable.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const int** csmCallingConvention csmGetDrawableMasks(const csmModel* model);
/**
* Gets number of vertices of each drawable.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const int* csmCallingConvention csmGetDrawableVertexCounts(const csmModel* model);
/**
* Gets vertex position data of each drawable.
*
* @param model Model to query.
*
* @return Valid pointer on success; a null pointer otherwise.
*/
csmApi const csmVector2** csmCallingConvention csmGetDrawableVertexPositions(const csmModel* model);
/**
* Gets texture coordinate data of each drawables.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const csmVector2** csmCallingConvention csmGetDrawableVertexUvs(const csmModel* model);
/**
* Gets number of triangle indices for each drawable.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const int* csmCallingConvention csmGetDrawableIndexCounts(const csmModel* model);
/**
* Gets triangle index data for each drawable.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const unsigned short** csmCallingConvention csmGetDrawableIndices(const csmModel* model);
/**
* Gets multiply color data for each drawable.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const csmVector4* csmCallingConvention csmGetDrawableMultiplyColors(const csmModel* model);
/**
* Gets screen color data for each drawable.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const csmVector4* csmCallingConvention csmGetDrawableScreenColors(const csmModel* model);
/**
* Gets drawable's parent part indices.
*
* @param model Model to query.
*
* @return Valid pointer on success; '0' otherwise.
*/
csmApi const int* csmCallingConvention csmGetDrawableParentPartIndices(const csmModel* model);
/**
* Resets all dynamic drawable flags.
*
* @param model Model containing flags.
*/
csmApi void csmCallingConvention csmResetDrawableDynamicFlags(csmModel* model);
#if defined(__cplusplus)
}
#endif
#endif