您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetOrigin函数代码示例

51自学网 2021-06-01 21:12:01
  C++
这篇教程C++ GetOrigin函数代码示例写得很实用,希望能帮到您。

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

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

示例1: StartSound

//--------------------------------// hhProxDoor::Event_Touch//--------------------------------void hhProxDoor::Event_Touch( idEntity *other, trace_t *trace ) {	if ( sndTrigger && trace->c.id == sndTrigger->GetId() ) {		if (other && other->IsType(hhPlayer::Type) && IsLocked() && gameLocal.time > nextSndTriggerTime) {			StartSound("snd_locked", SND_CHANNEL_ANY, 0, false, NULL );			nextSndTriggerTime = gameLocal.time + 10000;		}		return;	}	if( proxState == PROXSTATE_Active ) {		return;	}	if ( !other ) {		gameLocal.Warning("hhProxDoor:  Event_Touch given NULL for other/n");		return;	}	float dist = ( other->GetOrigin() - GetOrigin() ).Length();	if (dist > movementDistance) {		return;	}	if( !IsLocked() ) {		SetDoorState( PROXSTATE_Active );	}}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:29,


示例2: GetOrigin

/* Calculate the bounding box of this, when rotated */const EDA_RECT EDA_RECT::GetBoundingBoxRotated( wxPoint aRotCenter, double aAngle ){    wxPoint corners[4];    // Build the corners list    corners[0]   = GetOrigin();    corners[2]   = GetEnd();    corners[1].x = corners[0].x;    corners[1].y = corners[2].y;    corners[3].x = corners[2].x;    corners[3].y = corners[0].y;    // Rotate all corners, to find the bounding box    for( int ii = 0; ii < 4; ii ++ )        RotatePoint( &corners[ii], aRotCenter, aAngle );    // Find the corners bounding box    wxPoint start = corners[0];    wxPoint end = corners[0];    for( int ii = 1; ii < 4; ii ++ )    {        start.x = std::min( start.x, corners[ii].x);        start.y = std::min( start.y, corners[ii].y);        end.x = std::max( end.x, corners[ii].x);        end.y = std::max( end.y, corners[ii].y);    }    EDA_RECT bbox;    bbox.SetOrigin( start );    bbox.SetEnd( end );    return bbox;}
开发者ID:OpenEE,项目名称:micad,代码行数:36,


示例3: clipBounds

/*=================hhProjectileCrawlerGrenade::Event_ApplyExpandWound=================*/void hhProjectileCrawlerGrenade::Event_ApplyExpandWound() {	trace_t trace;	if( !modelProxy.IsValid() || !modelProxy->GetCombatModel() ) {		return;	}	idBounds clipBounds( modelProxy->GetRenderEntity()->bounds );	idVec3 traceEnd = GetOrigin();	idVec3 traceStart = traceEnd + hhUtils::RandomPointInShell( clipBounds.Expand(1.0f).GetRadius(), clipBounds.Expand(2.0f).GetRadius() );	idVec3 jointOrigin, localOrigin, localNormal;	idMat3 jointAxis, axisTranspose;	jointHandle_t jointHandle = INVALID_JOINT;	CancelEvents( &EV_ApplyExpandWound );	PostEventSec( &EV_ApplyExpandWound, spawnArgs.GetFloat("expandWoundDelay") );	if( !gameLocal.clip.TracePoint(trace, traceStart, traceEnd, modelProxy->GetCombatModel()->GetContents(), NULL) ) {		return;	}		if( trace.c.entityNum != entityNumber ) {//Make sure we hit ourselves		return;	}				modelProxy->AddDamageEffect( trace, vec3_zero, spawnArgs.GetString("def_expandDamage"), (!fl.networkSync || netSyncPhysics) );}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:32,


示例4: StopSound

/*=================hhProjectileCrawlerGrenade::Event_Collision_Bounce=================*/void hhProjectileCrawlerGrenade::Event_Collision_Bounce( const trace_t* collision, const idVec3 &velocity ) {	static const float minCollisionVelocity = 20.0f;	static const float maxCollisionVelocity = 90.0f;	StopSound( SND_CHANNEL_BODY, true );	// Velocity in normal direction	float len = velocity * -collision->c.normal;	if( collision->fraction < VECTOR_EPSILON || len < minCollisionVelocity ) {		idThread::ReturnInt( 0 );		return;	}	StartSound( "snd_bounce", SND_CHANNEL_BODY, 0, true, NULL );	float volume = hhUtils::CalculateSoundVolume( len, minCollisionVelocity, maxCollisionVelocity );	HH_SetSoundVolume( volume, SND_CHANNEL_BODY );	BounceSplat( GetOrigin(), -collision->c.normal );	SIMDProcessor->Memcpy( &collisionInfo, collision, sizeof(trace_t) );	collisionInfo.fraction = 0.0f;//Sometimes fraction == 1.0f	physicsObj.SetAngularVelocity( 0.5f*physicsObj.GetAngularVelocity() );	idThread::ReturnInt( 0 );}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:32,


示例5: GetOrigin

void csCameraBase::MoveWorld (const csVector3 &v, bool cd){  csVector3 new_position = GetOrigin () + v;  if (sector)  {    csVector3 remember_position = new_position;    // Test if the motion crosses a portal    iSector *new_sector = sector->FollowSegment (        *this,        new_position,        mirror,        only_portals);    if (new_sector != sector)    {      sector = new_sector;      cameranr = cur_cameranr++;      FireCameraSectorListeners (sector);    }  }  FireCameraMovedListeners ();  SetOrigin (new_position);  cameranr = cur_cameranr++;}
开发者ID:GameLemur,项目名称:Crystal-Space,代码行数:28,


示例6: GetOrigin

void hhProxDoorRotator::Event_PostSpawn( void ) {	idVec3	sectionOffset;	idVec3	rotVector;	float	rotAngle;	if( !spawnArgs.GetVector("section_offset", "0 0 0", sectionOffset) ) {		common->Warning( "No section offset found for '%s'", this->GetEntityDefName() );	}	if( !spawnArgs.GetVector("rot_vector", "0 0 0", rotVector) ) {		common->Warning( "No rotation vector found for '%s'", this->GetEntityDefName() );	}	if( !spawnArgs.GetFloat("rot_angle", "0 0 0", rotAngle) ) {		common->Warning( "No rotation angle found for '%s'", this->GetEntityDefName() );	}	idDict args;	args.SetVector( "origin", GetOrigin() + (sectionOffset * GetAxis()) );	args.SetMatrix( "rotation", GetAxis() );	args.SetVector( "rot_vector", rotVector );	args.SetFloat( "rot_angle", rotAngle );	bindParent = static_cast<hhProxDoorSection*>( gameLocal.SpawnEntityType(hhProxDoorRotMaster::Type, &args) );	if( !bindParent.IsValid() ) {		common->Warning( "Failed to spawn bindParent for '%s'", GetEntityDefName() );	}	else {		bindParent->proxyParent = this;	}	Bind( bindParent.GetEntity(), true );}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:29,


示例7: Precache

void CCeilingTurret::Spawn(){ 	Precache( );	SetModel( "models/combine_turrets/ceiling_turret.mdl" );		BaseClass::Spawn( );	m_iHealth			= sk_turret_health.GetFloat();	m_HackedGunPos		= Vector( 0, 0, 12.75 );	AngleVectors( GetAngles(), NULL, NULL, &m_vecViewOffset );	m_vecViewOffset		= m_vecViewOffset * Vector( 0, 0, -64 );	m_flFieldOfView		= VIEW_FIELD_FULL;	m_iRetractHeight = 16;	m_iDeployHeight = 32;	m_iMinPitch	= -45;	UTIL_SetSize(this, Vector(-32, -32, -m_iRetractHeight), Vector(32, 32, m_iRetractHeight));		SetThink(Initialize);		m_pEyeGlow = CSprite::SpriteCreate( TURRET_GLOW_SPRITE, GetOrigin(), FALSE );	m_pEyeGlow->SetTransparency( kRenderGlow, 255, 0, 0, 0, kRenderFxNoDissipation );	m_pEyeGlow->SetAttachment( this, 2 );	m_eyeBrightness = 0;	SetNextThink( gpGlobals->curtime + 0.3 );}
开发者ID:Muini,项目名称:Nag-asw,代码行数:30,


示例8: Vector2D

void LaserBeam::OnCollision(ICollidable *other){    Entity *entity = (Entity*)other;    Damage_t damage;    damage.damage = entity->GetHealth();    if (entity->IsPlayer())    {        damage.damage = 1;    }    damage.direction = Vector2D(-1, 0);    damage.inflictor = GetOwner();    if (GetOwner() != nullptr)    {        damage.statsInflictorName = GetOwner()->GetEntityClassName();        damage.statsInflictorClass = GetOwner()->GetEntityResourceClass();    }    damage.statsWeaponName = GetEntityClassName();    damage.statsWeaponClass = GetEntityResourceClass();    entity->TakeDamage(damage);    Vector2D laserCenter = GetOrigin();    laserCenter.x = entity->GetOrigin().x;    GetGameContext()->GetParticleRoot()->CreateParticles("laser_cannon_hit", laserCenter, Vector2D(-1, 0));}
开发者ID:Biohazard90,项目名称:Project-Neo-Gemini,代码行数:31,


示例9: MOZ_ASSERT

voidCDMProxy::Init(PromiseId aPromiseId){  MOZ_ASSERT(NS_IsMainThread());  nsresult rv = mKeys->GetOrigin(mOrigin);  if (NS_FAILED(rv)) {    RejectPromise(aPromiseId, NS_ERROR_DOM_INVALID_STATE_ERR);    return;  }  EME_LOG("Creating CDMProxy for origin='%s'",          NS_ConvertUTF16toUTF8(GetOrigin()).get());  if (!mGMPThread) {    nsCOMPtr<mozIGeckoMediaPluginService> mps =      do_GetService("@mozilla.org/gecko-media-plugin-service;1");    if (!mps) {      RejectPromise(aPromiseId, NS_ERROR_DOM_INVALID_STATE_ERR);      return;    }    mps->GetThread(getter_AddRefs(mGMPThread));    if (!mGMPThread) {      RejectPromise(aPromiseId, NS_ERROR_DOM_INVALID_STATE_ERR);      return;    }  }  nsRefPtr<nsIRunnable> task(NS_NewRunnableMethodWithArg<uint32_t>(this, &CDMProxy::gmp_Init, aPromiseId));  mGMPThread->Dispatch(task, NS_DISPATCH_NORMAL);}
开发者ID:chenhequn,项目名称:gecko,代码行数:30,


示例10: GetAxis

END_CLASSvoid hhShuttleTransport::Spawn() {	dockingBeam = NULL;	dockedShuttle = NULL;	shuttleCount = 0;	bLocked = false;	amountHealth = spawnArgs.GetInt("amounthealth");	amountPower = spawnArgs.GetInt("amountpower");	bCanExitLocked = spawnArgs.GetBool("canExitLocked");	bLockOnEntry = spawnArgs.GetBool("lockOnEntry");	bAllowFiring = spawnArgs.GetBool("allowFiring");	offsetNozzle = spawnArgs.GetVector("offset_nozzle1");//	offsetNozzle2 = spawnArgs.GetVector("offset_nozzle2");	offsetShuttlePoint = spawnArgs.GetVector("offset_shuttlepoint");//	dockingBeam = SpawnDockingBeam(offsetNozzle);	dockingForce.SetRestoreFactor(spawnArgs.GetFloat("dockingforce"));	dockingForce.SetTarget(GetOrigin() + offsetShuttlePoint * GetAxis());	// Fade in	SetShaderParm(SHADERPARM_TIMEOFFSET, -MS2SEC(gameLocal.time));	// Growth start time	SetShaderParm(5, 1.0f);											// Growth direction (in)	SetShaderParm(6, 1.0f);											// Make Beam opaque	StartSound("snd_fadein", SND_CHANNEL_ANY);}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:29,


示例11: GetAxis

	Matrix4 Matrix4::InversedFast() const {		Matrix4 out = Matrix4::Identity();		Vector3 axis1 = GetAxis(0);		Vector3 axis2 = GetAxis(1);		Vector3 axis3 = GetAxis(2);		Vector3 norm1 = axis1 / axis1.GetPoweredLength();		Vector3 norm2 = axis2 / axis2.GetPoweredLength();		Vector3 norm3 = axis3 / axis3.GetPoweredLength();		out.m[0] = norm1.x;		out.m[1] = norm2.x;		out.m[2] = norm3.x;		out.m[4] = norm1.y;		out.m[5] = norm2.y;		out.m[6] = norm3.y;		out.m[8] = norm1.z;		out.m[9] = norm2.z;		out.m[10] = norm3.z;				Vector3 s = (out * GetOrigin()).GetXYZ();		out.m[12] = -s.x;		out.m[13] = -s.y;		out.m[14] = -s.z;				return out;	}
开发者ID:harrisonpartch,项目名称:openspades,代码行数:25,


示例12: ASSERT

/////////////////////////////////////////////////////////////////////////////// CMyListCtrl message handlersvoid CMyListCtrl::OnBeginDrag(LPNMHDR pnmhdr, LRESULT *pResult){    CPoint			ptItem, ptAction, ptImage;    NM_LISTVIEW		*pnmListView = (NM_LISTVIEW *)pnmhdr;    ((CListCtrlPage *)GetParent())->ShowNotification(pnmhdr, pResult);    ASSERT(!m_bDragging);    m_bDragging = TRUE;    m_iItemDrag = pnmListView->iItem;    ptAction = pnmListView->ptAction;    GetItemPosition(m_iItemDrag, &ptItem);  // ptItem is relative to (0,0) and not the view origin    GetOrigin(&m_ptOrigin);    ASSERT(m_pimageListDrag == NULL);    m_pimageListDrag = CreateDragImage(m_iItemDrag, &ptImage);    m_sizeDelta = ptAction - ptImage;   // difference between cursor pos and image pos    m_ptHotSpot = ptAction - ptItem + m_ptOrigin;  // calculate hotspot for the cursor    m_pimageListDrag->DragShowNolock(TRUE);  // lock updates and show drag image    m_pimageListDrag->SetDragCursorImage(0, m_ptHotSpot);  // define the hot spot for the new cursor image    m_pimageListDrag->BeginDrag(0, CPoint(0, 0));    ptAction -= m_sizeDelta;    m_pimageListDrag->DragEnter(this, ptAction);    m_pimageListDrag->DragMove(ptAction);  // move image to overlap original icon    SetCapture();}
开发者ID:ehershey,项目名称:development,代码行数:27,


示例13: GetExtendedStyle

void CMyListCtrl::OnBeginDrag(LPNMHDR pnmhdr,LRESULT*){  CPoint ptItem,ptAction,ptImage;  NM_LISTVIEW *pnmListView = (NM_LISTVIEW *)pnmhdr;  m_oldDNDStyle = GetExtendedStyle();  if(m_oldDNDStyle != 0)SetExtendedStyle(0);  ASSERT(!m_bDragging);  m_bDragging = TRUE;  m_iItemDrag = pnmListView->iItem;  ptAction = pnmListView->ptAction;  GetItemPosition(m_iItemDrag,&ptItem);  GetOrigin(&m_ptOrigin);  ASSERT(m_pImageListDrag == NULL);  m_pImageListDrag = CreateDragImage(m_iItemDrag,&ptImage);  m_sizeDelta = ptAction - ptImage;  m_ptHotSpot = ptAction - ptItem + m_ptOrigin;  m_pImageListDrag->DragShowNolock(TRUE);  m_pImageListDrag->SetDragCursorImage(0,CPoint(0,0));  m_pImageListDrag->BeginDrag(0,CPoint(0,0));  ptAction -=m_sizeDelta;  m_pImageListDrag->DragEnter(this,ptAction);  m_pImageListDrag->DragMove(ptAction);  m_iItemDrop = -1;  SetCapture();}
开发者ID:bblr001,项目名称:MVS,代码行数:27,


示例14: GetOrigin

void hhCenturion::AimedAttackMissile( const char *jointname, const idDict *projDef) {	idProjectile *proj;	idVec3 target, origin = GetOrigin();	bool inShuttle = false;	if ( shootTarget.IsValid() ) {		target = shootTarget->GetOrigin();	} else if ( enemy.IsValid() ) {		target = enemy->GetOrigin();		if ( enemy->IsType( idActor::Type ) ) {			target.z += enemy->EyeHeight() / 4.0f;		}	} else {		// No target?  Do the default attack		Event_AttackMissile( jointname, projDef, 1 );		return;	}	// If target is too close do a non-aimed attack	if ( fabsf( origin.x - target.x ) < 256 &&		   fabsf( origin.y - target.y ) < 256 ) {		Event_AttackMissile( jointname, projDef, 1 );		return;	}	idVec3 dist = origin - target;	if ( shootTarget.IsValid() ) {		proj = LaunchProjectile( jointname, shootTarget.GetEntity(), true, projDef );	} else {		proj = LaunchProjectile( jointname, enemy.GetEntity(), true, projDef );	}}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:33,


示例15: GetOrigin

void TextShape::BoundingBox(Point& bottemLeft, Point& topRight) const{    Coord bottem , left , width , height;    GetOrigin(bottem, left);    GetExtent(width, height);    bottemLeft = Point(bottem , left);    topRight = Point(bottem+height, left+width);}
开发者ID:fiskercui,项目名称:testcommon,代码行数:8,


示例16: switch

float Axis::DisplacementWillOverscrollAmount(int32_t aDisplacement) {  switch (DisplacementWillOverscroll(aDisplacement)) {  case OVERSCROLL_MINUS: return (GetOrigin() + aDisplacement) - GetPageStart();  case OVERSCROLL_PLUS: return (GetCompositionEnd() + aDisplacement) - GetPageEnd();  // Don't handle overscrolled in both directions; a displacement can't cause  // this, it must have already been zoomed out too far.  default: return 0;  }}
开发者ID:nhirata,项目名称:releases-mozilla-central,代码行数:9,


示例17: assert

void hhShuttleTransport::Think() {	hhDock::Think();	if (thinkFlags & TH_THINK) {		// Apply docking force to shuttle if docked, even if not in zone		assert(dockingForce.GetEntity() == dockedShuttle);		dockingForce.SetTarget(GetOrigin() + offsetShuttlePoint * GetAxis());		dockingForce.Evaluate(gameLocal.time);	}}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:9,


示例18: SetVisual

void CWall::SetVisual(){	m_visual.SetWidth(m_width);	m_visual.SetHeight(m_height);	m_visual.SetRotation(GetRotation());	m_visual.SetOrigin(GetOrigin());	m_visual.SetReferenceSystemOrigin(GetReferenceSystemOrigin());	m_visual.SetPosition(GetPosition());}
开发者ID:7kia,项目名称:CG,代码行数:9,


示例19: CheckParametres

void C2DRectangleCollision::AddToWorld(b2World * world){	CheckParametres();	CStatic2DShape::AddToWorld(world);	AddRectangleToBody(m_body		, SSize(m_width, m_height)		, GetOrigin());}
开发者ID:7kia,项目名称:CG,代码行数:9,


示例20: GetName

/*=================hhProjectileCrawlerGrenade::CopyToModelProxy=================*/void hhProjectileCrawlerGrenade::CopyToModelProxy(){	//rww - do this the right way with an inheriting entityDef	//idDict args = spawnArgs;	//args.Delete( "spawnclass" );	//args.Delete( "name" );	idDict args;	idDict *setArgs;	idStr str;	if (gameLocal.isClient)	{		setArgs = &modelProxy->spawnArgs;	}	else	{		args.Clear();		setArgs = &args;	}	setArgs->Set( "owner", GetName() );	setArgs->SetVector( "origin", GetOrigin() );	setArgs->SetMatrix( "rotation", GetAxis() );	//copy the model over	if (spawnArgs.GetString("model", "", str))	{		setArgs->Set("model", str.c_str());		if (gameLocal.isClient && modelProxy.IsValid())		{			modelProxy->SetModel(str.c_str());		}	}	//these are now taken care of in the ent def.	/*	setArgs->SetBool( "useCombatModel", true );	setArgs->SetBool( "transferDamage", false );	setArgs->SetBool( "solid", false );	*/	if (!gameLocal.isClient)	{		modelProxy = gameLocal.SpawnObject("projectile_crawler_proxy", &args);	}	if( modelProxy.IsValid() ) {		modelProxy->Bind( this, true );		modelProxy->CycleAnim( "idle", ANIMCHANNEL_ALL );	}	//for debugging	//spawnArgs.CompareArgs(modelProxy->spawnArgs);	modelProxyCopyDone = true;}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:62,


示例21: DEG2RAD

//// Event_AntiProjectileAttack()//void hhHarvesterSimple::Event_AntiProjectileAttack(hhProjectile *proj) {	if(!spawnArgs.GetBool("block_projectiles", "1")) {		return;	}	const idDict *projectileDef = gameLocal.FindEntityDefDict( spawnArgs.GetString("def_chaff") );	if ( !projectileDef ) {		gameLocal.Error( "Unknown def_chaff:  %s/n", spawnArgs.GetString("def_chaff") );	}	hhProjectile* projectile = NULL;		//bjk: new parms	int numProj = spawnArgs.GetInt("shieldNumProj", "10");	float spread = DEG2RAD( spawnArgs.GetFloat("shieldSpread", "10") );	float yaw = DEG2RAD( spawnArgs.GetFloat("shieldYawSpread", "10") );	//StartSound("snd_fire_chaff", SND_CHANNEL_ANY, 0, true, NULL);	torsoAnim.PlayAnim( GetAnimator()->GetAnim( "antiprojectile_attack" ) );	idVec3 dir = proj->GetOrigin() - GetOrigin();	dir.Normalize();	dir = dir+idVec3(0.f, 0.f, -.3f);	// bjk: bias towards ground	dir.Normalize();	idMat3 muzzleAxis = dir.ToMat3();	// todo: read this in from a bone	idVec3 launchPos = GetOrigin() + idVec3(0.0f, 0.0f, 64.0f);	for(int i=0; i<numProj; i++) {		projectile = hhProjectile::SpawnProjectile( projectileDef );		HH_ASSERT( projectile );		//bjk: uses random now		float ang = spread * hhMath::Sqrt( gameLocal.random.RandomFloat() );		float spin = hhMath::TWO_PI * gameLocal.random.RandomFloat();		dir = muzzleAxis[ 0 ] + muzzleAxis[ 2 ] * ( hhMath::Sin(ang) * hhMath::Sin(spin) ) - muzzleAxis[ 1 ] * ( hhMath::Sin(ang+yaw) * hhMath::Cos(spin) );		dir.Normalize();		projectile->Create(this, launchPos, dir);		projectile->Launch(launchPos, dir, idVec3(0.0f, 0.0f, 0.0f));	}	lastAntiProjectileAttack = gameLocal.GetTime();}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:47,


示例22: lock

void mitk::BaseGeometry::SetOrigin(const Point3D &origin){  mitk::ModifiedLock lock(this);  if (origin != GetOrigin())  {    m_GeometryTransform->SetOrigin(origin);    Modified();  }}
开发者ID:junaidnaseer,项目名称:MITK,代码行数:10,


示例23: ScaleWillOverscrollAmount

float Axis::ScaleWillOverscrollAmount(float aScale, int32_t aFocus) {  float originAfterScale = (GetOrigin() + aFocus) * aScale - aFocus;  switch (ScaleWillOverscroll(aScale, aFocus)) {  case OVERSCROLL_MINUS: return originAfterScale - GetPageStart() * aScale;  case OVERSCROLL_PLUS: return (originAfterScale + GetCompositionLength()) -                               NS_lround(GetPageEnd() * aScale);  // Don't handle OVERSCROLL_BOTH. Client code is expected to deal with it.  default: return 0;  }}
开发者ID:nhirata,项目名称:releases-mozilla-central,代码行数:10,


示例24: CheckParametres

void CWall::AddToWorld(b2World * world){	CheckParametres();	CStaticShape::AddToWorld(world);	SetVisual();	AddRectangleToBody(m_body		, SSize(m_width, m_height)		, GetOrigin());}
开发者ID:7kia,项目名称:CG,代码行数:10,


示例25: GetOrigin

//-----------------------------------------------------------------------// Purpose://-----------------------------------------------------------------------float CPlayerCar::GetAmountUnderWater(void){	if( !g_bWaterEnabled )		return 0.0f;	float distUnderWater = g_fWaterHeight - GetOrigin().y;	float carHeight = 15.0f;	float amountUnderWater = clamp(distUnderWater/carHeight, 0.0f, 1.0f);	return amountUnderWater;}
开发者ID:MGraefe,项目名称:deferred,代码行数:13,


示例26: PostEventSec

void hhProjectileSoulCannon::Event_FindEnemy( void ) {	int				i;	idEntity		*ent;	idActor			*actor;		trace_t			tr;	PostEventSec( &EV_FindSoulEnemy, 1.0f );	for ( i = 0; i < gameLocal.num_entities; i++ ) {		ent = gameLocal.entities[ i ];		if ( !ent || !ent->IsType( idActor::Type ) ) {			continue;		}		if ( ent == this || ent == this->GetOwner() ) {			continue;		}		// Ignore dormant entities!		if( ent->IsHidden() || ent->fl.isDormant ) { // HUMANHEAD JRM - changed to fl.isDormant			continue;					}		actor = static_cast<idActor *>( ent );		if ( ( actor->health <= 0 ) ) {			continue;		}		idVec3 center = actor->GetPhysics()->GetAbsBounds().GetCenter();		// Cannot see this enemy because he is too far away		if ( maxEnemyDist > 0.0f && ( center - GetOrigin() ).LengthSqr() > maxEnemyDist * maxEnemyDist )			continue;		// Quick trace to the center of the potential enemy		if ( !gameLocal.clip.TracePoint( tr, GetOrigin(), center, 1.0f, this ) ) {			thrustDir = center - GetOrigin();			thrustDir.Normalize();			break;		}	}}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:43,


示例27: BoundingBox

        virtual void BoundingBox(            Point& bottomLeft, Point& topRight) const override         {            Coord bottom, left, width, height;            GetOrigin(bottom, left);            GetExtent(width, height);            bottomLeft = Point(bottom, left);        }
开发者ID:ordinary-developer,项目名称:book_design_patterns_4_d_e_gamma_r_helm_r_johnson_j_vlissides,代码行数:10,


示例28: fixed

inline fixedTaskLeg::GetScoredDistance(const GeoPoint &ref) const{  if (!GetOrigin())    return fixed(0);  switch (destination.GetActiveState()) {  case OrderedTaskPoint::BEFORE_ACTIVE:    // this leg totally included    return std::max(fixed(0),                    GetOrigin()->GetLocationScored().Distance(destination.GetLocationScored())                    - GetOrigin()->ScoreAdjustment()-destination.ScoreAdjustment());  case OrderedTaskPoint::CURRENT_ACTIVE:    // this leg partially included    if (destination.HasEntered()) {      return std::max(fixed(0),                      GetOrigin()->GetLocationScored().Distance(destination.GetLocationScored())                      - GetOrigin()->ScoreAdjustment()-destination.ScoreAdjustment());    } else if (ref.IsValid())      return std::max(fixed(0),                      ref.ProjectedDistance(GetOrigin()->GetLocationScored(),                                            destination.GetLocationScored())                      -GetOrigin()->ScoreAdjustment());    else      return fixed(0);  case OrderedTaskPoint::AFTER_ACTIVE:    // this leg may be partially included    if (GetOrigin()->HasEntered() && ref.IsValid()) {      return std::max(fixed(0),                      memo_travelled.calc(GetOrigin()->GetLocationScored(),                                          ref).distance                      -GetOrigin()->ScoreAdjustment());    }    return fixed(0);  }  gcc_unreachable();  assert(false);  return fixed(0);}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:43,


示例29: ProcessCollision

void hhProjectileStickyCrawlerGrenade::Event_Collision_Stick( const trace_t* collision, const idVec3 &velocity ) {	if (proximityDetonateTrigger.GetEntity()) { //rww - don't allow this to be called more than once in a crawler grenade's lifetime		return;	}	ProcessCollision( collision, velocity );	BindToCollisionObject( collision );		fl.ignoreGravityZones = true;	SetGravity( idVec3(0.f, 0.f, 0.f) );	spawnArgs.SetVector("gravity", idVec3(0.f, 0.f, 0.f) );	BounceSplat( GetOrigin(), -collision->c.normal );	idDict dict;	dict.SetVector( "origin", GetOrigin() );	//dict.SetMatrix( "rotation", GetAxis() );	dict.Set( "target", name.c_str() );	dict.SetVector( "mins", spawnArgs.GetVector("detonationMins", "-10 -10 -10") );	dict.SetVector( "maxs", spawnArgs.GetVector("detonationMaxs", "10 10 10") );	if (!gameLocal.isClient) {		proximityDetonateTrigger = gameLocal.SpawnObject( spawnArgs.GetString("def_trigger"), &dict );		proximityDetonateTrigger->Bind( this, true );		if ( proximityDetonateTrigger->IsType( hhTrigger::Type ) ) {			hhTrigger *trigger = static_cast<hhTrigger*>(proximityDetonateTrigger.GetEntity());			if ( trigger && trigger->IsEncroached() ) {				proximityDetonateTrigger->PostEventMS( &EV_Activate, 0, this );			}		}	}	if( modelProxy.IsValid() ) {		modelProxy->CycleAnim( "idle", ANIMCHANNEL_ALL );	}	// CJR:  Added this from the normal crawler collision bounce code	SIMDProcessor->Memcpy( &collisionInfo, collision, sizeof(trace_t) );	collisionInfo.fraction = 0.0f;//Sometimes fraction == 1.0f	idThread::ReturnInt( 1 );}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:43,



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


C++ GetOriginalCaster函数代码示例
C++ GetOrientation函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。