• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ delete0函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中delete0函数的典型用法代码示例。如果您正苦于以下问题:C++ delete0函数的具体用法?C++ delete0怎么用?C++ delete0使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了delete0函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: inFile

bool ConvexHull2<Real>::Load (const char* filename, int mode)
{
	FileIO inFile(filename, mode);
	if (!inFile)
	{
		return false;
	}

	ConvexHull<Real>::Load(inFile);

	delete0(mQuery);
	delete1(mSVertices);
	if (mOwner)
	{
		delete1(mVertices);
	}

	mOwner = true;
	mVertices = new1<Vector2<Real> >(mNumVertices);
	mSVertices = new1<Vector2<Real> >(mNumVertices);

	inFile.Read(sizeof(Real), 2*mNumVertices, mVertices);
	inFile.Read(sizeof(Real), 2*mNumVertices, mSVertices);
	inFile.Read(sizeof(Real), 2, &mLineOrigin);
	inFile.Read(sizeof(Real), 2, &mLineDirection);

	inFile.Close();

	switch (mQueryType)
	{
	case Query::QT_INT64:
	{
		mQuery = new0 Query2Int64<Real>(mNumVertices, mSVertices);
		break;
	}
	case Query::QT_INTEGER:
	{
		mQuery = new0 Query2Integer<Real>(mNumVertices, mSVertices);
		break;
	}
	case Query::QT_RATIONAL:
	{
		mQuery = new0 Query2Rational<Real>(mNumVertices, mSVertices);
		break;
	}
	case Query::QT_REAL:
	{
		mQuery = new0 Query2<Real>(mNumVertices, mSVertices);
		break;
	}
	case Query::QT_FILTERED:
	{
		mQuery = new0 Query2Filtered<Real>(mNumVertices, mSVertices,
		                                   mEpsilon);
		break;
	}
	}

	return true;
}
开发者ID:bhlzlx,项目名称:WildMagic,代码行数:60,代码来源:Wm5ConvexHull2.cpp


示例2: LogShutdown

//----------------------------------------------------------------------------
void LogShutdown ()
{
	for (int i=0; i<sNumHandlers; i++)
	{
		delete0(sHandlers[i]);
		sHandlers[i] = 0;
	}
}
开发者ID:manyxu,项目名称:Phoenix3D_2.0,代码行数:9,代码来源:PX2Log.cpp


示例3:

MiniPS::Parser::~Parser() {
  /* We delete the master here! */
  if (master!=NULLP) delete master; /* recursive ~Parser() call */
  if (free_level>=2) delete tok;
  if (free_level>=3) delete rd;
  if (free_level>=4) fclose(PTS_align_cast(FILE*,f));
  if (specRunsDelete) delete0((VALUE)specRuns);
}
开发者ID:endriff,项目名称:sam2p,代码行数:8,代码来源:minips.cpp


示例4: delete0

//----------------------------------------------------------------------------
void Delaunay3D::OnTerminate ()
{
    delete0(mDelaunay);

    mScene = 0;
    mCullState = 0;

    WindowApplication3::OnTerminate();
}
开发者ID:rasslingcats,项目名称:calico,代码行数:10,代码来源:Delaunay3D.cpp


示例5: delete1

 ConvexHull2<Real>::~ConvexHull2 ()
 {
     if ( mOwner )
     {
         delete1( mVertices );
     }
     delete1( mSVertices );
     delete0( mQuery );
 }
开发者ID:kanbang,项目名称:myexercise,代码行数:9,代码来源:Wm5ConvexHull2.cpp


示例6: delete0

//----------------------------------------------------------------------------
SegmentGraph::~SegmentGraph ()
{
    VMap::iterator iter = mVertexMap.begin();
    VMap::iterator end = mVertexMap.end();
    for (/**/; iter != end; ++iter)
    {
        Vertex* vertex = iter->second;
        delete0(vertex);
    }
}
开发者ID:2asoft,项目名称:GeometricTools,代码行数:11,代码来源:SegmentGraph.cpp


示例7: delete1

//----------------------------------------------------------------------------
SceneBuilder::~SceneBuilder ()
{
	delete1(mFileName);
	mScene = 0;
	std::vector<ModifierInfo*>::iterator iter;
	for (iter=mModifierList.begin(); iter<mModifierList.end(); iter++)
	{
		delete0(*iter);
	}
}
开发者ID:PhoenixSteam,项目名称:Phoenix3D,代码行数:11,代码来源:PX2SceneBuilder.cpp


示例8: delete0

void ConvexHull3<Real>::DeleteHull ()
{
    typename std::set<Triangle*>::iterator iter = mHull.begin();
    typename std::set<Triangle*>::iterator end = mHull.end();
    for (/**/; iter != end; ++iter)
    {
        Triangle* tri = *iter;
        delete0(tri);
    }
    mHull.clear();
}
开发者ID:Kiichi77,项目名称:WildMagic,代码行数:11,代码来源:Wm5ConvexHull3.cpp


示例9: delete0

//----------------------------------------------------------------------------
void CollisionsBoundTree::OnTerminate ()
{
    delete0(mGroup);

    mScene = 0;
    mCylinder0 = 0;
    mCylinder1 = 0;
    mWireState = 0;

    WindowApplication3::OnTerminate();
}
开发者ID:2asoft,项目名称:GeometricTools,代码行数:12,代码来源:CollisionsBoundTree.cpp


示例10: delete0

//----------------------------------------------------------------------------
void IntersectingBoxes::OnTerminate ()
{
    delete0(mManager);

    mScene = 0;
    mWireState = 0;
    mNoIntersectEffect = 0;
    mIntersectEffect = 0;

    WindowApplication3::OnTerminate();
}
开发者ID:vijaynerella,项目名称:GeometricTools,代码行数:12,代码来源:IntersectingBoxes.cpp


示例11: delete1

//----------------------------------------------------------------------------
Smoke2D::~Smoke2D ()
{
    delete1(mVortexCenter);
    delete1(mVortexVariance);
    delete1(mVortexAmplitude);
    delete2(mTimelessDensity);
    delete3(mTimelessVortex);
    delete2(mTimelessWind);
    delete2(mTimelessVelocity);
    delete0(mIP);
}
开发者ID:rasslingcats,项目名称:calico,代码行数:12,代码来源:Smoke2D.cpp


示例12: delete0

//----------------------------------------------------------------------------
void WaterDropFormation::OnTerminate ()
{
	delete0(mSpline);
	delete0(mCircle);
	delete1(mCtrlPoints);
	delete1(mTargets);

	mScene = 0;
	mTrnNode = 0;
	mWaterRoot = 0;
	mWireState = 0;
	mPlane = 0;
	mWall = 0;
	mWaterSurface = 0;
	mWaterDrop = 0;
	mWaterEffect = 0;
	mWaterTexture = 0;

	WindowApplication3::OnTerminate();
}
开发者ID:dodong471520,项目名称:WildMagic,代码行数:21,代码来源:WaterDropFormation.cpp


示例13: delete0

//----------------------------------------------------------------------------
void GelatinCube::OnTerminate ()
{
    delete0(mModule);

    mScene = 0;
    mTrnNode = 0;
    mWireState = 0;
    mBox = 0;

    WindowApplication3::OnTerminate();
}
开发者ID:vijaynerella,项目名称:GeometricTools,代码行数:12,代码来源:GelatinCube.cpp


示例14: delete0

//----------------------------------------------------------------------------
void PhysicsModule::Initialize (double time, double deltaTime, double x,
    double w, double theta, double xDot, double wDot, double thetaDot)
{
    mTime = time;
    mDeltaTime = deltaTime;

    // state variables
    mState[0] = x;
    mState[1] = xDot;
    mState[2] = w;
    mState[3] = wDot;
    mState[4] = theta;
    mState[5] = thetaDot;

    // auxiliary variables
    SinAngle = Mathd::Sin(Angle);
    CosAngle = Mathd::Cos(Angle);
    mAux[0] = Mu*Gravity;  // c/m in the one-particle system example
    mAux[1] = Gravity*SinAngle;

    // RK4 differential equation solver.  Since mSolver is a base class
    // pointer, you can instead create a solver of whatever class you prefer.
    delete0(mSolver);
    mSolver = new0 OdeRungeKutta4d(4, mDeltaTime, OdeFunction, mAux);

    // Set up for angular speed.
    mTheta0 = theta;
    mThetaDer0 = thetaDot;

    double xx = XLocExt*XLocExt;
    double xy = XLocExt*YLocExt;
    double yy = YLocExt*YLocExt;
    double tmp1 = xx + yy;
    double tmp2 = Mathd::Sqrt(tmp1);
    double tmp3 = 4.0*xy/3.0;
    double tmp4 = 0.5*Mathd::Log((tmp2 + XLocExt)/(tmp2 - XLocExt));
    double tmp5 = 0.5*Mathd::Log((tmp2 + YLocExt)/(tmp2 - YLocExt));
    double numer = tmp3*tmp2 + XLocExt*xx*tmp5 + YLocExt*yy*tmp4;
    double denom = tmp3*tmp1;
    double coeff = Mu*Gravity*numer/denom;

    double angSpeed = Mathd::FAbs(thetaDot);
    if (angSpeed > Mathd::ZERO_TOLERANCE)
    {
        mAngVelCoeff = coeff/angSpeed;
    }
    else
    {
        mAngVelCoeff = 0.0;
    }
}
开发者ID:rasslingcats,项目名称:calico,代码行数:52,代码来源:PhysicsModule.cpp


示例15: delete0

//----------------------------------------------------------------------------
void PointInPolyhedron::DeleteQuery ()
{
    delete0(mQuery);

#ifdef TRIANGLE_FACES
    delete1(mTFaces);
#endif
#if defined(CVXFACES0) || defined(CVXFACES1) || defined(CVXFACES2)
    delete1(mCFaces);
#endif
#if defined (SIMFACES0) || defined (SIMFACES1)
    delete1(mSFaces);
#endif
}
开发者ID:rasslingcats,项目名称:calico,代码行数:15,代码来源:PointInPolyhedron.cpp


示例16: assertion

//----------------------------------------------------------------------------
void PhysicsModule::Initialize (double time, double deltaTime, double radius,
    double theta, double radiusDot, double thetaDot)
{
    mTime = time;
    mDeltaTime = deltaTime;

    // state variables
    mState[0] = theta;
    mState[1] = thetaDot;
    mState[2] = radius;
    mState[3] = radiusDot;

    // Compute c0 and c1 in the potential energy function V(theta).
    double gm = Gravity*Mass;
    double gm2 = gm*Mass;
    double radiusSqr = radius*radius;
    double alpha = Mass*radiusSqr*thetaDot;
    double g2m4da2 = gm2*gm2/(alpha*alpha);
    double v0 = -gm/radius;
    double dv0 = gm2*radiusDot/alpha;
    double v0Plus = v0 + g2m4da2;
    double sinTheta0 = Mathd::Sin(theta);
    double cosTheta0 = Mathd::Cos(theta);
    double c0 = v0Plus*sinTheta0 + dv0*cosTheta0;
    double c1 = v0Plus*cosTheta0 - dv0*sinTheta0;

    // Auxiliary variables needed by function DTheta(...).
    mAux[0] = c0;
    mAux[1] = c1;
    mAux[2] = g2m4da2;
    mAux[3] = alpha/(gm*gm2);

    // ellipse parameters
    double gamma0 = radiusSqr*Mathd::FAbs(thetaDot);
    double tmp0 = radiusSqr*radius*thetaDot*thetaDot - gm;
    double tmp1 = radiusSqr*radiusDot*thetaDot;
    double gamma1 = Mathd::Sqrt(tmp0*tmp0 + tmp1*tmp1);
    mEccentricity = gamma1/gm;
    mRho = gamma0*gamma0/gamma1;
    double tmp2 = 1.0 - mEccentricity*mEccentricity;
    assertion(tmp2 > 0.0, "Invalid eccentricity.\n");
    mMajorAxis = mRho*mEccentricity/tmp2;
    mMinorAxis = mMajorAxis*Mathd::Sqrt(tmp2);

    // RK4 differential equation solver.  Since mSolver is a base class
    // pointer, you can instead create a solver of whatever class you prefer.
    delete0(mSolver);
    mSolver = new0 OdeRungeKutta4d(1, mDeltaTime, OdeFunction, mAux);
}
开发者ID:vijaynerella,项目名称:GeometricTools,代码行数:50,代码来源:PhysicsModule.cpp


示例17: ImageRGB82D

//----------------------------------------------------------------------------
int SimplePendulum::Main (int, char**)
{
	msImage = new0 ImageRGB82D(SIZE, SIZE);

	SolveMethod(ExplicitEuler, "Data/explicit.im", "Data/explicit.txt");
	SolveMethod(ImplicitEuler, "Data/implicit.im", "Data/implicit.txt");
	SolveMethod(RungeKutta, "Data/runge.im", "Data/runge.txt");
	SolveMethod(LeapFrog, "Data/leapfrog.im", "Data/leapfrog.txt");
	Stiff1();
	Stiff2True();
	Stiff2Approximate();

	delete0(msImage);
	return 0;
}
开发者ID:bhlzlx,项目名称:WildMagic,代码行数:16,代码来源:SimplePendulum.cpp


示例18: delete0

    void ConvexHull2<Real>::Edge::DeleteSelf ()
    {
        if ( E[0] )
        {
            E[0]->E[1] = 0;
        }

        if ( E[1] )
        {
            E[1]->E[0] = 0;
        }

        Edge* tmpThis = this;
        delete0( tmpThis );
    }
开发者ID:kanbang,项目名称:myexercise,代码行数:15,代码来源:Wm5ConvexHull2.cpp


示例19: delete0

//----------------------------------------------------------------------------
void BouncingSpheres::OnTerminate()
{
    for (int i = 0; i < NUM_BALLS; ++i)
    {
        delete0(mBalls[i]);
        mBallNodes[i] = 0;
    }

    mScene = 0;
    mWireState = 0;
    mFloor = 0;
    mSideWall1 = 0;
    mSideWall2 = 0;
    mBackWall = 0;

    WindowApplication3::OnTerminate();
}
开发者ID:rasslingcats,项目名称:calico,代码行数:18,代码来源:BouncingSpheres.cpp


示例20: delete1

void delete1 (arbore **t, int info, arbore **rad)
{
   if ((*t)->dr != NULL && (*t)->stg !=NULL)  // are 2 fii
    {
        arbore *pred;
        int a;
        rad=*t;
        pred=findMax((*t)->stg);
        //pred=findMin((*t)->dr);
        a=(*t)->info;
        (*t)->info = pred->info;
        pred->info=a;

        delete0(&rad, pred->info, 1);

    }
}
开发者ID:Seydis,项目名称:Lab-6-ABC,代码行数:17,代码来源:main.c



注:本文中的delete0函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ delete2函数代码示例发布时间:2022-05-30
下一篇:
C++ delete函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap