mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-18 21:10:05 +00:00
expose the double sided flag
This commit is contained in:
parent
9ca957387f
commit
cabef63b1c
@ -43,6 +43,7 @@ struct GUIHelperInterface
|
||||
virtual int registerGraphicsInstance(int shapeIndex, const float* position, const float* quaternion, const float* color, const float* scaling) = 0;
|
||||
virtual void removeAllGraphicsInstances() = 0;
|
||||
virtual void removeGraphicsInstance(int graphicsUid) {}
|
||||
virtual void changeInstanceFlags(int instanceUid, int flags) {}
|
||||
virtual void changeRGBAColor(int instanceUid, const double rgbaColor[4]) {}
|
||||
virtual void changeSpecularColor(int instanceUid, const double specularColor[3]) {}
|
||||
virtual void changeTexture(int textureUniqueId, const unsigned char* rgbTexels, int width, int height) {}
|
||||
|
@ -206,7 +206,11 @@ void DeformableContact::initPhysics()
|
||||
int numInstances = m_guiHelper->getRenderInterface()->getTotalNumInstances();
|
||||
double rgbaColors[3][4] = { { 1, 0, 0, 1 } , { 0, 1, 0, 1 } ,{ 0, 0, 1, 1 } };
|
||||
|
||||
|
||||
for (int i = 0; i < numInstances; i++)
|
||||
{
|
||||
m_guiHelper->changeInstanceFlags(i, B3_INSTANCE_DOUBLE_SIDED);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DeformableContact::exitPhysics()
|
||||
|
@ -380,6 +380,14 @@ void OpenGLGuiHelper::replaceTexture(int shapeIndex, int textureUid)
|
||||
m_data->m_glApp->m_renderer->replaceTexture(shapeIndex, textureUid);
|
||||
};
|
||||
}
|
||||
void OpenGLGuiHelper::changeInstanceFlags(int instanceUid, int flags)
|
||||
{
|
||||
if (instanceUid >= 0)
|
||||
{
|
||||
//careful, flags/instanceUid is swapped
|
||||
m_data->m_glApp->m_renderer->writeSingleInstanceFlagsToCPU( flags, instanceUid);
|
||||
}
|
||||
}
|
||||
void OpenGLGuiHelper::changeRGBAColor(int instanceUid, const double rgbaColor[4])
|
||||
{
|
||||
if (instanceUid >= 0)
|
||||
|
@ -27,6 +27,7 @@ struct OpenGLGuiHelper : public GUIHelperInterface
|
||||
virtual int registerGraphicsInstance(int shapeIndex, const float* position, const float* quaternion, const float* color, const float* scaling);
|
||||
virtual void removeAllGraphicsInstances();
|
||||
virtual void removeGraphicsInstance(int graphicsUid);
|
||||
virtual void changeInstanceFlags(int instanceUid, int flags);
|
||||
virtual void changeRGBAColor(int instanceUid, const double rgbaColor[4]);
|
||||
virtual void changeSpecularColor(int instanceUid, const double specularColor[3]);
|
||||
virtual void changeTexture(int textureUniqueId, const unsigned char* rgbTexels, int width, int height);
|
||||
|
Loading…
Reference in New Issue
Block a user