|
AnyCAD Rapid API 2026
Help you to create a better world!
|
2D纹理类 更多...
Public 成员函数 | |
| Texture2D (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| Texture2D () | |
| 默认构造函数 | |
| Texture2D (TextureDesc desc) | |
| 构造函数 | |
| uint | GetWidth () |
| void | SetWidth (uint val) |
| uint | GetHeight () |
| void | SetHeight (uint val) |
| Vector2 | GetOffset () |
| void | SetOffset (Vector2 val) |
| float | GetAngle () |
| void | SetAngle (float val) |
| Vector2 | GetRepeat () |
| void | SetRepeat (Vector2 val) |
| Vector2 | GetCenter () |
| void | SetCenter (Vector2 val) |
| bool | GetGenerateMipmap () |
| void | SetGenerateMipmap (bool val) |
| void | UpdateTransform () |
| 更新变换矩阵 | |
| void | Resize (uint width, uint height) |
| 调整纹理大小 | |
Public 成员函数 继承自 AnyCAD.Foundation.Texture | |
| Texture (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| Texture () | |
| 默认构造函数 | |
| Texture (TextureDesc desc) | |
| 构造函数 | |
| string | GetName () |
| void | SetName (string val) |
| TextureDesc | GetDesc () |
| void | SetDesc (TextureDesc val) |
| UniformSet | GetUniforms () |
| uint | GetUpdateVersion () |
| EnumEncoding | GetEncoding () |
| void | SetEncoding (EnumEncoding val) |
| EnumMapping | GetMapping () |
| void | SetMapping (EnumMapping val) |
| EnumTextureTarget | GetTextureType () |
| 获取纹理类型 | |
| void | SetUniform (string name, bool val) |
| void | SetUniform (string name, int val) |
| void | SetUniform (string name, EnumTextureUnit val) |
| void | SetUniform (string name, float val) |
| void | SetUniform (string name, Vector2 val) |
| void | SetUniform (string name, Vector3 val) |
| void | SetUniform (string name, Vector4 val) |
| void | SetUniform (string name, Matrix3 val) |
| void | SetUniform (string name, Matrix4 val) |
| void | SetUniform (string name, Matrix2 val) |
| void | SetUniformBool (string name, bool val) |
| void | SetUniformInt (string name, int val) |
| void | SetUniformTextureUnit (string name, EnumTextureUnit val) |
| void | SetUniformFloat (string name, float val) |
| void | SetUniformVec2 (string name, Vector2 val) |
| void | SetUniformVec3 (string name, Vector3 val) |
| void | SetUniformVec4 (string name, Vector4 val) |
| void | SetUniformMat2 (string name, Matrix2 val) |
| void | SetUniformMat3 (string name, Matrix3 val) |
| void | SetUniformMat4 (string name, Matrix4 val) |
| virtual bool | IsValid () |
| 检查纹理是否有效 | |
| void | RequestUpdate () |
| 请求更新 | |
Public 成员函数 继承自 AnyCAD.Foundation.GfxObject | |
| GfxObject (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| void | Dispose () |
| uint | GetUuid () |
静态 Public 成员函数 | |
| static new Texture2D | Cast (GfxObject obj) |
静态 Public 成员函数 继承自 AnyCAD.Foundation.Texture | |
| static Texture | Cast (GfxObject obj) |
2D纹理类
标准的二维纹理,支持UV变换、MIPMAP生成等功能。 是最常用的纹理类型,适用于大多数渲染场景。
| AnyCAD.Foundation.Texture2D.Texture2D | ( | TextureDesc | desc | ) |
构造函数
| desc | 纹理描述对象 |
| void AnyCAD.Foundation.Texture2D.Resize | ( | uint | width, |
| uint | height ) |
调整纹理大小
| width | 新宽度 |
| height | 新高度 |
重新分配纹理内存
| void AnyCAD.Foundation.Texture2D.UpdateTransform | ( | ) |
更新变换矩阵
根据Offset、Angle、Repeat、Center计算最终的UV变换