mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-06-14 03:09:18 +00:00
add pybullet.unsupportedChangeScaling feature for some small experiments, this is not general and has many limitations that are not likely are going to be resolved,
so unless it does what you want, ignore this api, it is unsupported!
This commit is contained in:
@@ -128,6 +128,7 @@ enum MultiThreadedGUIHelperCommunicationEnums
|
||||
eGUIHelperRemoveTexture,
|
||||
eGUIHelperSetVisualizerFlagCheckRenderedFrame,
|
||||
eGUIHelperUpdateShape,
|
||||
eGUIHelperChangeGraphicsInstanceScaling,
|
||||
eGUIUserDebugRemoveAllParameters,
|
||||
};
|
||||
|
||||
@@ -1035,6 +1036,19 @@ public:
|
||||
workerThreadWait();
|
||||
}
|
||||
|
||||
int m_graphicsInstanceChangeScaling;
|
||||
double m_baseScaling[3];
|
||||
virtual void changeScaling(int instanceUid, const double scaling[3])
|
||||
{
|
||||
m_graphicsInstanceChangeScaling = instanceUid;
|
||||
m_baseScaling[0] = scaling[0];
|
||||
m_baseScaling[1] = scaling[1];
|
||||
m_baseScaling[2] = scaling[2];
|
||||
m_cs->lock();
|
||||
m_cs->setSharedParam(1, eGUIHelperChangeGraphicsInstanceScaling);
|
||||
workerThreadWait();
|
||||
}
|
||||
|
||||
double m_specularColor[3];
|
||||
int m_graphicsInstanceChangeSpecular;
|
||||
virtual void changeSpecularColor(int instanceUid, const double specularColor[3])
|
||||
@@ -2181,6 +2195,16 @@ void PhysicsServerExample::updateGraphics()
|
||||
m_multiThreadedHelper->mainThreadRelease();
|
||||
break;
|
||||
}
|
||||
|
||||
case eGUIHelperChangeGraphicsInstanceScaling:
|
||||
{
|
||||
B3_PROFILE("eGUIHelperChangeGraphicsInstanceScaling");
|
||||
|
||||
m_multiThreadedHelper->m_childGuiHelper->changeScaling(m_multiThreadedHelper->m_graphicsInstanceChangeScaling, m_multiThreadedHelper->m_baseScaling);
|
||||
m_multiThreadedHelper->mainThreadRelease();
|
||||
break;
|
||||
}
|
||||
|
||||
case eGUIHelperChangeGraphicsInstanceSpecularColor:
|
||||
{
|
||||
B3_PROFILE("eGUIHelperChangeGraphicsInstanceSpecularColor");
|
||||
|
||||
Reference in New Issue
Block a user