The texture. 更多...
#include <APITexture.h>
Public 成员函数 | |
void | SetFilePath (const Path &strFile) |
Path | GetFilePath () const |
bool | SetFileBuffer (const Path &id, const CharBuffer &buffer) |
bool | SetFileBits (const Path &id, const CharBuffer &buffer, int width, int height, int stride) |
void | SetScale (const Vector2 &scale) |
Vector2 | GetScale () const |
void | SetTranslation (const Vector2 &trans) |
Vector2 | GetTranslation () const |
void | SetRotation (Real angle) |
Real | GetRoation () const |
void | UpdateTransform () |
Matrix4 | GetTransform () const |
void | RequestUpdate () |
Public 成员函数 继承自 AnyCAD::API::RenderResource | |
void | SetName (const String &strName) |
String | GetName () const |
Public 成员函数 继承自 AnyCAD::API::Object | |
String | GetObjectClassId () const |
StringList | ListParentClassIds () const |
The texture.
TODO:
Path AnyCAD::API::Texture::GetFilePath | ( | ) | const |
Get image file name.
Real AnyCAD::API::Texture::GetRoation | ( | ) | const |
Get rotation factor.
Vector2 AnyCAD::API::Texture::GetScale | ( | ) | const |
Get scale.
Matrix4 AnyCAD::API::Texture::GetTransform | ( | ) | const |
Get transform matrix.
Vector2 AnyCAD::API::Texture::GetTranslation | ( | ) | const |
Get translation.
void AnyCAD::API::Texture::RequestUpdate | ( | ) |
Request to update the texture after the image is changed.
bool AnyCAD::API::Texture::SetFileBits | ( | const Path & | id, |
const CharBuffer & | buffer, | ||
int | width, | ||
int | height, | ||
int | stride | ||
) |
load texture image from buffer.
id | the uniqu ID |
buffer | the image buffer data. |
width | the width |
height | the height |
stride | the stride |
bool AnyCAD::API::Texture::SetFileBuffer | ( | const Path & | id, |
const CharBuffer & | buffer | ||
) |
load texture image from buffer.
id | the uniqu ID |
buffer | the image buffer data. |
void AnyCAD::API::Texture::SetFilePath | ( | const Path & | strFile | ) |
Set image file name.
strFile | the file name. |
void AnyCAD::API::Texture::SetRotation | ( | Real | angle | ) |
Rotation.
angle | the rotation factor. |
void AnyCAD::API::Texture::SetScale | ( | const Vector2 & | scale | ) |
Set scale.
scale | the scale factor. |
void AnyCAD::API::Texture::SetTranslation | ( | const Vector2 & | trans | ) |
Move.
trans | the offset factor. |
void AnyCAD::API::Texture::UpdateTransform | ( | ) |
Update the transform after change the transform factors..