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

C++ aCvar_c类代码示例

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

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



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

示例1: CG_RunTestEmitter

void CG_RunTestEmitter()
{
	if ( cg_testEmitter.getStr()[0] == 0 || cg_testEmitter.getStr()[0] == '0' )
	{
		CG_FreeTestEmitter();
		return;
	}
	class particleDeclAPI_i* pDecl = g_declMgr->registerParticleDecl( cg_testEmitter.getStr() );
	if ( pDecl == 0 )
	{
		CG_FreeTestEmitter();
		return;
	}
	if ( cg_testEmitterInstance == 0 )
	{
		cg_testEmitterInstance = new emitterD3_c;
		rf->addCustomRenderObject( cg_testEmitterInstance );
		cg_testEmitterInstance->setOrigin( cg.refdefViewOrigin + cg.refdefViewAxis.getForward()*cg_testEmitter_cameraDistance.getFloat() );
	}
	else
	{
		if ( cg_testEmitter_attachToCamera.getInt() )
		{
			cg_testEmitterInstance->setOrigin( cg.refdefViewOrigin + cg.refdefViewAxis.getForward()*cg_testEmitter_cameraDistance.getFloat() );
		}
	}
	cg_testEmitterInstance->setParticleDecl( pDecl );
	
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:29,代码来源:cg_testEmitter.cpp


示例2: addDrawCalls

void procTree_c::addDrawCalls()
{
	visCount++;
	if ( nodes.size() == 0 )
	{
		for ( u32 i = 0; i < models.size(); i++ )
		{
			models[i]->addDrawCalls();
		}
		return;
	}
	camArea = pointArea( rf_camera.getPVSOrigin() );
	if ( rf_proc_printCamArea.getInt() )
	{
		g_core->Print( "camera is in area %i of %i\n", camArea, areas.size() );
	}
	// if camera is outside world or if we're debug-drawing all areas
	if ( camArea == -1 || rf_proc_ignorePortals.getInt() )
	{
		addDrawCallsForAllAreas();
		return;
	}
	frustumExt_c baseFrustum( rf_camera.getFrustum() );
	addAreaDrawCalls_r( camArea, baseFrustum, 0 );
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:25,代码来源:rf_proc.cpp


示例3: createDirectionalShadowVolumeForEntity

void rIndexedShadowVolume_c::createDirectionalShadowVolumeForEntity( class rEntityImpl_c* ent, const vec3_c& lightDirection, float lightInfinity )
{
	clear();
	// save the last light position
	//this->lightPos = light;
	
	if ( ent == 0 )
		return;
	if ( ent->getModel() == 0 )
		return;
	if ( ent->isAnimated() && rf_skipAnimatedObjectsShadows.getInt() )
		return;
	const r_model_c* m = ent->getCurrentRModelInstance();
	if ( m )
	{
		fromDirectionalRModel( m, lightDirection, lightInfinity );
	}
	else
	{
		rModelAPI_i* modAPI = ent->getModel();
		if ( modAPI )
		{
			if ( modAPI->isInlineBSPModel() )
			{
				r_model_c tmp;
				modAPI->getModelData( &tmp );
				//tmp.transform(ent->getMatrix());
				fromRModel( &tmp, lightDirection, lightInfinity );
			}
			else if ( modAPI->isStatic() )
			{
				class model_c* m = dynamic_cast<model_c*>( modAPI );
				if ( m )
				{
					fromDirectionalRModel( m->getRModel(), lightDirection, lightInfinity );
				}
				else
				{
					g_core->RedWarning( "rIndexedShadowVolume_c::createDirectionalShadowVolumeForEntity: dynamic_cast to model_c failed for model %s.\n",
										modAPI->getName() );
				}
			}
		}
	}
	if ( rf_printShadowVolumesStats.getInt() )
	{
		g_core->Print( "rIndexedShadowVolume_c::createDirectionalShadowVolumeForEntity: (time %i) %i points, %i tris for model %s (%i edge quads, %i cap pairs)\n",
					   rf_curTimeMsec, points.size(), indices.getNumIndices() / 3, ent->getModelName(), this->c_edgeQuadsAdded, this->c_capTriPairsAdded );
	}
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:50,代码来源:rf_shadowVolume.cpp


示例4:

		virtual void setupProjection3D( const projDef_s* pd )
		{
			if ( pd == 0 )
			{
				projDef.setDefaults();
			}
			else
			{
				projDef = *pd;
			}
			if ( rf_forceZFar.getFloat() >= 0.f )
			{
				projDef.zFar = rf_forceZFar.getFloat();
			}
		}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:15,代码来源:rf_api.cpp


示例5: logBoxTri

bool tsOctTreeHeader_s::logBoxTri( const class aabb& bounds, class boxTrianglesCallback_i* callback, u32 triangleNum )
{
	// see if the triangle was already checked
	if ( cms_tsOctTree_useCheckCounts.getInt() && this->triCheckCounts[triangleNum] == this->checkCount )
	{
		return false;
	}
	// mark as already checked
	this->triCheckCounts[triangleNum] = this->checkCount;
	
	const u32* indices = this->getTriIndexes();
	u32 i0 = indices[triangleNum * 3 + 0];
	u32 i1 = indices[triangleNum * 3 + 1];
	u32 i2 = indices[triangleNum * 3 + 2];
	const vec3_c& p0 = this->getTriPoints()[i0];
	const vec3_c& p1 = this->getTriPoints()[i1];
	const vec3_c& p2 = this->getTriPoints()[i2];
	aabb tmpBB;
	tmpBB.fromThreePoints( p0, p1, p2 );
	if ( tmpBB.intersect( bounds ) == false )
		return false;
		
	callback->onBoxTriangle( p0, p1, p2 );
	return true;
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:25,代码来源:cmTriSoupOctTree.cpp


示例6: addSunLightShadowVolumes

void rSunLight_c::addSunLightShadowVolumes()
{
	if ( mainVolume == 0 )
	{
		mainVolume = new rIndexedShadowVolume_c;
		const r_model_c* m = RF_GetWorldModel();
		if ( m )
		{
			for ( u32 i = 0; i < m->getNumSurfs(); i++ )
			{
				if ( m->getSurf( i )->findSunMaterial() )
					continue;
				if ( rf_usePointLightForSun.getInt() )
				{
					mainVolume->addRSurface( m->getSurf( i ), getFakePointLightPosition(), 0, getFakePointLightRadius() );
				}
				else
				{
					mainVolume->addDirectionalRSurface( m->getSurf( i ), RF_GetSunDirection(), 5000 );
				}
			}
		}
	}
	for ( u32 i = 0; i < entityInteractions.size(); i++ )
	{
		entityInteractions[i]->updateSunLightInteraction();
	}
	mainVolume->addDrawCall();
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:29,代码来源:rf_sunLight.cpp


示例7: updateSunLightInteraction

		void updateSunLightInteraction()
		{
			if ( ent->hasStageWithoutBlendFunc() == false )
			{
				if ( shadowVolume )
				{
					delete shadowVolume;
					shadowVolume = 0;
				}
				return;
			}
			if ( shadowVolume == 0 )
			{
				shadowVolume = new rIndexedShadowVolume_c;
			}
			else
			{
				if ( ent->isAnimated() == false )
				{
					if ( absSilChangeCount == ent->getSilChangeCount() )
					{
						if ( rf_sunLight_printUnchangedInteractions.getInt() )
						{
							g_core->Print( "sunLightEntityInteraction_c::updateSunLightInteraction: %s didnt change\n",
										   ent->getModelName() );
						}
						addDrawCall();
						return;
					}
				}
			}
			ent->updateAnimatedEntity();
			absSilChangeCount = ent->getSilChangeCount();
			if ( rf_usePointLightForSun.getInt() )
			{
				vec3_c pos = rf_sunLight->getFakePointLightPosition();
				ent->getMatrix().getInversed().transformPoint( pos );
				shadowVolume->createShadowVolumeForEntity( ent, pos, rf_sunLight->getFakePointLightRadius() );
			}
			else
			{
				vec3_c dir = RF_GetSunDirection();
				ent->getMatrix().getInversed().transformNormal( dir );
				shadowVolume->createDirectionalShadowVolumeForEntity( ent, dir, 5000 );
			}
			addDrawCall();
		}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:47,代码来源:rf_sunLight.cpp


示例8: cullBoundsByPortals

bool procTree_c::cullBoundsByPortals( const aabb& absBB )
{
	if ( rf_proc_ignoreCullBounds.getInt() )
		return false; // didnt cull
	arraySTD_c<u32> areaNums;
	boxAreas( absBB, areaNums );
	return cullBoundsByPortals( absBB, areaNums );
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:8,代码来源:rf_proc.cpp


示例9: CG_CalcViewValues

/*
===============
CG_CalcViewValues

Sets cg.refdef view values
===============
*/
static int CG_CalcViewValues( void )
{
    playerState_s*  ps;

    // calculate size of 3D view
    CG_CalcVrect();

    ps = &cg.predictedPlayerState;

    cg.refdefViewOrigin = ps->origin;
    cg.refdefViewAngles = ps->viewangles;

    // add first person / third person view offset
    if ( cg_thirdPerson.integer )
    {
        // back away from character
        CG_OffsetThirdPersonView();
    }
    else
    {
        // offset for local bobbing and kicks
        CG_OffsetFirstPersonView();
    }
    cg.refdefViewAxis.fromAngles( cg.refdefViewAngles );

    if ( cg_printCurCamPos.getInt() )
    {
        CG_Printf( "CG_CalcViewValues: camera eye is at %f %f %f\n", cg.refdefViewOrigin[0], cg.refdefViewOrigin[1], cg.refdefViewOrigin[2] );
    }
    if ( cg_printCurFarPlane.getInt() )
    {
        CG_Printf( "CG_CalcViewValues: cg.farPlane is %f\n", cg.farPlane );
    }

    projDef_s projDef;
    projDef.setDefaults();
    if ( cg.farPlane >= 8.f )
    {
        projDef.zFar = cg.farPlane;
    }
    rf->setupProjection3D( &projDef );
    rf->setup3DView( cg.refdefViewOrigin, cg.refdefViewAngles, cg_thirdPerson.integer );

    return 0;
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:52,代码来源:cg_view.cpp


示例10: registerPoint

u32 rIndexedShadowVolume_c::registerPoint( const vec3_c& p )
{
	bounds.addPoint( p );
	if ( rf_ssv_hashVertices.getInt() )
	{
		return points.registerVec3( p );
	}
	return points.addPoint( p );
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:9,代码来源:rf_shadowVolume.cpp


示例11: CG_DoRailgunEffect

static void CG_DoRailgunEffect()
{
	//  va("doRailgunEffect railCore railDisc railExplosion gfx/damage/plasma_mrk %f %f %f %f %f %f %i",muzzle.x,muzzle.y,muzzle.z,
	vec3_c p, d;
	str coreMaterialName = CG_Argv( 1 );
	str discMaterialName = CG_Argv( 2 );
	str explosionMaterialName = CG_Argv( 3 );
	str decalMaterialName = CG_Argv( 4 );
	p.x = atof( CG_Argv( 5 ) );
	p.y = atof( CG_Argv( 6 ) );
	p.z = atof( CG_Argv( 7 ) );
	d.x = atof( CG_Argv( 8 ) );
	d.y = atof( CG_Argv( 9 ) );
	d.z = atof( CG_Argv( 10 ) );
	int skipEntityNum = atoi( CG_Argv( 11 ) );
	CG_Printf( "CG_DoRailgunEffect: from %f %f %f, dir %f %f %f\n", p.x, p.y, p.z, d.x, d.y, d.z );
	trace_c tr;
	tr.setupRay( p, d * 100000.f );
	if ( CG_RayTrace( tr, skipEntityNum ) == false )
	{
		CG_Printf( "CG_DoRailgunEffect: no hit\n" );
		return; // no hit
	}
	mtrAPI_i* coreMaterial = g_ms->registerMaterial( coreMaterialName );
	mtrAPI_i* diskMaterial = g_ms->registerMaterial( discMaterialName );
	
	CG_AddBulletTracer( tr.getStartPos() - vec3_c( 0, 0, 12 ), tr.getHitPos(), 32.f, coreMaterial, 1000 );
	
	mtrAPI_i* decalMaterial = g_ms->registerMaterial( decalMaterialName );
	float radius = 32.f;
	centity_s* hit = tr.getHitCGEntity();
	if ( hit == 0 || hit == &cg_entities[ENTITYNUM_WORLD] )
	{
		CG_Printf( "CG_DoRailgunEffect: hit Worldspawn\n" );
		if ( cg_debugDrawBulletAttack.getInt() )
		{
			rf->addDebugLine( tr.getHitPos(), tr.getHitPos() + radius * tr.getHitPlaneNormal(), vec3_c( 1, 0, 0 ), 5.f );
		}
		rf->addWorldMapDecal( tr.getHitPos(), tr.getHitPlaneNormal(), radius, decalMaterial );
	}
	else
	{
		CG_Printf( "CG_DoRailgunEffect: hit entity\n" );
		if ( hit->rEnt )
		{
			hit->rEnt->addDecalWorldSpace( tr.getHitPos(), tr.getHitPlaneNormal(), radius, decalMaterial );
		}
		else
		{
			CG_Printf( "CG_DoRailgunEffect: hit centity has NULL rEnt\n" );
		}
	}
}
开发者ID:illwieckz,项目名称:OWEngine,代码行数:53,代码来源:cg_servercmds.cpp


示例12: CG_OnEntityOrientationChange

static void CG_OnEntityOrientationChange( centity_t* cent )
{
	// NOTE: some centities might have both rEnt and rLight present
	if ( cent->rEnt )
	{
		cent->rEnt->setOrigin( cent->lerpOrigin );
		cent->rEnt->setAngles( cent->lerpAngles );
	}
	if ( cent->rLight )
	{
		if ( cg_printLightFlags.getInt() )
		{
			g_core->Print( "Light entity %i lightFlags %i\n", cent->currentState.number, cent->currentState.lightFlags );
		}
		cent->rLight->setOrigin( cent->lerpOrigin );
		// TODO: lerp light radius?
		cent->rLight->setRadius( cent->currentState.lightRadius );
		cent->rLight->setBNoShadows( cent->currentState.lightFlags & LF_NOSHADOWS );
		if ( cent->currentState.lightFlags & LF_SPOTLIGHT )
		{
			// see if the spotlight can find it's target
			const centity_t* target = &cg_entities[cent->currentState.lightTarget];
			cent->rLight->setSpotRadius( cent->currentState.spotLightRadius );
			cent->rLight->setLightType( LT_SPOTLIGHT );
			if ( target->currentValid == false )
			{
				vec3_c targetPos = cent->lerpOrigin + cent->lerpAngles.getForward() * 64.f;
				cent->rLight->setSpotLightTarget( targetPos );
			}
			else
			{
				cent->rLight->setSpotLightTarget( target->lerpOrigin );
			}
		}
		else
		{
			cent->rLight->setLightType( LT_POINT );
		}
		if ( cent->currentState.lightFlags & LF_COLOURED )
		{
			cent->rLight->setBColoured( true );
			cent->rLight->setColor( cent->currentState.lightColor );
		}
		else
		{
			cent->rLight->setBColoured( false );
		}
	}
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:49,代码来源:cg_ents.cpp


示例13: runFrame

void FuncRotating::runFrame()
{
	float rotateSpeed = 10;
	float delta = rotateSpeed * level.frameTime;
	vec3_c a = this->getAngles();
	// rotationAxis == 1 -> rotate around Z axis
	// rotationAxis == 0 -> rotate around Y axis
	a[rotationAxis] += delta;
	this->setAngles( a );
	
	if ( g_funcRotating_printOrientation.getInt() )
	{
		g_core->Print( "FuncRotating::runFrame(): pos %f %f %f rot %f %f %f\n", getOrigin().x, getOrigin().y, getOrigin().z, a.x, a.y, a.z );
	}
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:15,代码来源:FuncRotating.cpp


示例14: CG_TestBulletAttack

static void CG_TestBulletAttack()
{
	vec3_c p, d;
	str decalMaterialName = CG_Argv( 1 );
	p.x = atof( CG_Argv( 2 ) );
	p.y = atof( CG_Argv( 3 ) );
	p.z = atof( CG_Argv( 4 ) );
	d.x = atof( CG_Argv( 5 ) );
	d.y = atof( CG_Argv( 6 ) );
	d.z = atof( CG_Argv( 7 ) );
	int skipEntityNum = atoi( CG_Argv( 8 ) );
	CG_Printf( "CG_TestBulletAttack: from %f %f %f, dir %f %f %f\n", p.x, p.y, p.z, d.x, d.y, d.z );
	trace_c tr;
	tr.setupRay( p, d * 100000.f );
	if ( CG_RayTrace( tr, skipEntityNum ) == false )
	{
		CG_Printf( "CG_TestBulletAttack: no hit\n" );
		return; // no hit
	}
	//mtrAPI_i *decalMaterial = g_ms->registerMaterial("qiotests/testdecalmaterial");
	mtrAPI_i* decalMaterial = g_ms->registerMaterial( decalMaterialName );
	float radius = 8.f;
	centity_s* hit = tr.getHitCGEntity();
	if ( hit == &cg_entities[ENTITYNUM_WORLD] )
	{
		CG_Printf( "CG_TestBulletAttack: hit Worldspawn\n" );
		if ( cg_debugDrawBulletAttack.getInt() )
		{
			rf->addDebugLine( tr.getHitPos(), tr.getHitPos() + radius * tr.getHitPlaneNormal(), vec3_c( 1, 0, 0 ), 5.f );
		}
		rf->addWorldMapDecal( tr.getHitPos(), tr.getHitPlaneNormal(), radius, decalMaterial );
		return;
	}
	else
	{
		CG_Printf( "CG_TestBulletAttack: hit entity\n" );
		if ( hit->rEnt )
		{
			hit->rEnt->addDecalWorldSpace( tr.getHitPos(), tr.getHitPlaneNormal(), radius, decalMaterial );
		}
		else
		{
			CG_Printf( "CG_TestBulletAttack: hit centity has NULL rEnt\n" );
		}
	}
}
开发者ID:illwieckz,项目名称:OWEngine,代码行数:46,代码来源:cg_servercmds.cpp


示例15: doDebugDrawing

void procTree_c::doDebugDrawing()
{
	if ( rf_proc_showAreaPortals.getInt() )
	{
		for ( u32 i = 0; i < portals.size(); i++ )
		{
			procPortal_c* p = portals[i];
			const cmWinding_c& w = p->points;
			float col[4];
			col[0] = ( i % 39 ) / 39.f;
			col[1] = ( ( i + 10 ) % 47 ) / 47.f;
			col[2] = ( i % 33 ) / 33.f;
			col[3] = 1.f;
			rb->setColor4( col );
			rb->drawWinding( w.getArray(), w.size() );
		}
	}
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:18,代码来源:rf_proc.cpp


示例16: traceRay

bool tsOctTreeHeader_s::traceRay( class trace_c& tr )
{
	this->checkCount++;
	if ( cms_tsOctTree_checkAllTris.getInt() )
	{
		bool hit = false;
		u32 numTris = this->numIndexes / 3;
		for ( u32 i = 0; i < numTris; i++ )
		{
			if ( traceTriangleRay( i, tr ) )
			{
				hit = true;
			}
		}
		return hit;
	}
	return traceNodeRay_r( 0, tr );
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:18,代码来源:cmTriSoupOctTree.cpp


示例17: CG_CalcEntityLerpPositions

static void CG_CalcEntityLerpPositions( centity_t* cent )
{
	if ( cent->currentState.parentNum != ENTITYNUM_NONE )
	{
		centity_t* parent = &cg_entities[cent->currentState.parentNum];
		if ( parent->rEnt == 0 )
			return;
		if ( cg_printAttachedEntities.getInt() )
		{
			g_core->Print( "Entity %i is attached to %i\n", cent->currentState.number, cent->currentState.parentNum );
		}
		// first we have to update parent orientation (pos + rot),
		// then we can attach current entity to it
		CG_RunCEntity( parent );
		matrix_c mat;
		parent->rEnt->getBoneWorldOrientation( cent->currentState.parentTagNum, mat );
		cent->lerpAngles = mat.getAngles();
		cent->lerpOrigin = mat.getOrigin();
		if ( cent->currentState.parentOffset.isAlmostZero() == false )
		{
			matrix_c matAngles = mat;
			matAngles.setOrigin( vec3_c( 0, 0, 0 ) );
			vec3_c ofs;
			matAngles.transformPoint( cent->currentState.parentOffset, ofs );
			cent->lerpOrigin += ofs;
		}
		if ( cent->currentState.localAttachmentAngles.isAlmostZero() == false )
		{
			cent->lerpAngles += cent->currentState.localAttachmentAngles;
		}
		// NOTE: some centities might have both rEnt and rLight present
		// update render entity and/or render light
		CG_OnEntityOrientationChange( cent );
		return;
	}
	
	if ( cent->interpolate )
	{
		CG_InterpolateEntityPosition( cent );
		return;
	}
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:42,代码来源:cg_ents.cpp


示例18: addRSurface

void rIndexedShadowVolume_c::addRSurface( const class r_surface_c* sf, const vec3_c& light, const struct extraSurfEdgesData_s* edges, float lightRadius )
{
	const rVertexBuffer_c& verts = sf->getVerts();
	const rIndexBuffer_c& indices = sf->getIndices();
	const planeArray_c& triPlanes = sf->getTriPlanes();
	// see if we have plane equations of triangles
	if ( triPlanes.size() )
	{
		// see if we have extra edges data
		if ( edges && ( rf_dontUseExtraEdgeArrays.getInt() == 0 ) )
		{
			addIndexedVertexListWithEdges( indices, verts, light, &triPlanes, edges );
		}
		else
		{
			addIndexedVertexList( indices, verts, light, &triPlanes, lightRadius, &sf->getBB() );
		}
	}
	else
	{
		addIndexedVertexList( indices, verts, light, 0, lightRadius, &sf->getBB() );
	}
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:23,代码来源:rf_shadowVolume.cpp


示例19: fromRModel

void rIndexedShadowVolume_c::fromRModel( const class r_model_c* m, const vec3_c& light, float lightRadius )
{
	clear();
	if ( m == 0 )
	{
		g_core->RedWarning( "rIndexedShadowVolume_c::fromRModel: NULL model pointer.\n" );
		return;
	}
	this->points.setEqualVertexEpsilon( 0.f );
#if 0
	( ( r_model_c* )m )->precalculateStencilShadowCaster();
#endif
	if ( m->getStencilShadowCaster() && rf_dontUsePrecomputedSSVCasters.getInt() == 0 )
	{
		this->fromPrecalculatedStencilShadowCaster( m->getStencilShadowCaster(), light );
		return;
	}
	for ( u32 i = 0; i < m->getNumSurfs(); i++ )
	{
		const r_surface_c* sf = m->getSurf( i );
		addRSurface( sf, light, sf->getExtraSurfEdgesData(), lightRadius );
	}
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:23,代码来源:rf_shadowVolume.cpp


示例20: traceTriangleRay

// ======================================
//
//  tsOctTreeHeader_s collision detection
//
// ======================================
bool tsOctTreeHeader_s::traceTriangleRay( u32 triangleNum, class trace_c& tr )
{
	// see if the triangle was already checked
	if ( cms_tsOctTree_useCheckCounts.getInt() && this->triCheckCounts[triangleNum] == this->checkCount )
	{
		return false;
	}
	// mark as already checked
	this->triCheckCounts[triangleNum] = this->checkCount;
	
	const u32* indices = this->getTriIndexes();
	u32 i0 = indices[triangleNum * 3 + 0];
	u32 i1 = indices[triangleNum * 3 + 1];
	u32 i2 = indices[triangleNum * 3 + 2];
	const vec3_c& p0 = this->getTriPoints()[i0];
	const vec3_c& p1 = this->getTriPoints()[i1];
	const vec3_c& p2 = this->getTriPoints()[i2];
	if ( tr.clipByTriangle( p0, p1, p2, true ) )
	{
		tr.setHitTriangleIndex( triangleNum );
		return true;
	}
	return false;
}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:29,代码来源:cmTriSoupOctTree.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ aabb类代码示例发布时间:2022-05-31
下一篇:
C++ _zhematrix类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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