expose texture unique id after loading URD file, so you can restore to the original texture after changing it to a custom texture. See also getTextureUid.py example.

This commit is contained in:
Erwin Coumans
2018-07-08 11:23:12 +02:00
parent bfc85ff1fd
commit 127b82ec1b
8 changed files with 227 additions and 26 deletions

View File

@@ -595,6 +595,11 @@ typedef union {
#define MAX_RAY_HITS MAX_RAY_INTERSECTION_BATCH_SIZE
#define VISUAL_SHAPE_MAX_PATH_LEN 1024
enum b3VisualShapeDataFlags
{
eVISUAL_SHAPE_DATA_TEXTURE_UNIQUE_IDS = 1,
};
struct b3VisualShapeData
{
int m_objectUniqueId;
@@ -605,6 +610,10 @@ struct b3VisualShapeData
double m_localVisualFrame[7];//pos[3], orn[4]
//todo: add more data if necessary (material color etc, although material can be in asset file .obj file)
double m_rgbaColor[4];
int m_tinyRendererTextureId;
int m_textureUniqueId;
int m_openglTextureId;
};
struct b3VisualShapeInformation