本文整理汇总了C#中BulletDotNET.btTransform.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# btTransform.Dispose方法的具体用法?C# btTransform.Dispose怎么用?C# btTransform.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BulletDotNET.btTransform
的用法示例。
在下文中一共展示了btTransform.Dispose方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: changemove
private void changemove(float timestep)
{
m_log.Debug("[PHYSICS]: _________ChangeMove");
if (!m_isphysical)
{
tempTransform2 = Body.getWorldTransform();
btQuaternion quat = tempTransform2.getRotation();
tempPosition2.setValue(_position.X, _position.Y, _position.Z);
tempTransform2.Dispose();
tempTransform2 = new btTransform(quat, tempPosition2);
Body.setWorldTransform(tempTransform2);
changeSelectedStatus(timestep);
resetCollisionAccounting();
}
else
{
if (Body != null)
{
if (Body.Handle != IntPtr.Zero)
{
DisableAxisMotor();
_parent_scene.removeFromWorld(this, Body);
//Body.Dispose();
}
//Body = null;
// TODO: dispose parts that make up body
}
/*
if (_parent_scene.needsMeshing(_pbs))
{
// Don't need to re-enable body.. it's done in SetMesh
float meshlod = _parent_scene.meshSculptLOD;
if (IsPhysical)
meshlod = _parent_scene.MeshSculptphysicalLOD;
IMesh mesh = _parent_scene.mesher.CreateMesh(SOPName, _pbs, _size, meshlod, IsPhysical);
// createmesh returns null when it doesn't mesh.
CreateGeom(IntPtr.Zero, mesh);
}
else
{
_mesh = null;
CreateGeom(IntPtr.Zero, null);
}
SetCollisionShape(prim_geom);
*/
if (m_isphysical)
SetBody(Mass);
else
SetBody(0);
changeSelectedStatus(timestep);
resetCollisionAccounting();
}
m_taintposition = _position;
}