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

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

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

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

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

示例1: GetDirection

void CFPSCameraController::UpdateCameraValues(CCamera *Camera) const{	Vect3f l_Direction = GetDirection();	Camera->SetPosition(m_Position);	Camera->SetLookAt(m_Position + l_Direction);	Camera->SetUp(GetUp());	Camera->SetMatrixs();}
开发者ID:rcrmn,项目名称:mastervj-basic-engine,代码行数:8,


示例2: a

void Epsilon5Tests::GetDirectionTests() {    {        QPointF a(0, 0);        QPointF b(1, 0);        QCOMPARE(GetDirection(a, b), QPointF(1, 0));    }    {        QPointF a(2, 1);        QPointF b(1, 1);        QCOMPARE(GetDirection(a, b), QPointF(-1, 0));    }    {        QPointF a(-2, 0);        QPointF b(-3, 0);        QCOMPARE(GetDirection(a, b), QPointF(-1, 0));    }}
开发者ID:bakwc,项目名称:Epsilon5,代码行数:17,


示例3: PunkException

	const Math::vec3 Source::GetDirection() const	{	    #ifdef HAS_AUDIO_SOURCE		return impl->GetDirection();		#else		throw System::PunkException(L"Audio source is not available");		#endif	}
开发者ID:Mikalai,项目名称:punk_project_a,代码行数:8,


示例4: GetDirection

boolGfRay::Intersect(const GfRange3d &box,		 double *enterDistance, double *exitDistance) const{    if (box.IsEmpty())	return false;    // Compute the intersection distance of all 6 planes of the    // box. Save the largest near-plane intersection and the smallest    // far-plane intersection.    double maxNearest = -DBL_MAX, minFarthest = DBL_MAX;    for (size_t i = 0; i < 3; i++) {        // Skip dimensions almost parallel to the ray.        double d = GetDirection()[i];        if (GfAbs(d) < GF_MIN_VECTOR_LENGTH) {            // ray is parallel to this set of planes.            // If origin is not between them, no intersection.            if (GetStartPoint()[i] < box.GetMin()[i] ||                GetStartPoint()[i] > box.GetMax()[i]) {                return false;            } else {                continue;            }        }        d = 1.0 / d;        double t1 = d * (box.GetMin()[i] - GetStartPoint()[i]);        double t2 = d * (box.GetMax()[i] - GetStartPoint()[i]);        // Make sure t1 is the nearer one        if (t1 > t2) {            double tmp = t1;            t1 = t2;            t2 = tmp;        }        // Update the min and max        if (t1 > maxNearest)            maxNearest = t1;        if (t2 < minFarthest)            minFarthest = t2;    }    // If the largest near-plane intersection is after the smallest    // far-plane intersection, the ray's line misses the box. Also    // check if both intersections are completely outside the near/far    // bounds.    if (maxNearest  >  minFarthest ||        minFarthest < 0.0)        return false;            if (enterDistance)	*enterDistance = maxNearest;    if (exitDistance)        *exitDistance = minFarthest;    return true;}
开发者ID:JT-a,项目名称:USD,代码行数:58,


示例5: GetDirection

bool Game_Player::CheckEventTriggerThere(const std::vector<int>& triggers, bool triggered_by_decision_key) {	if ( Game_Map::GetInterpreter().IsRunning() ) return false;	bool result = false;	int front_x = Game_Map::XwithDirection(GetX(), GetDirection());	int front_y = Game_Map::YwithDirection(GetY(), GetDirection());	std::vector<Game_Event*> events;	Game_Map::GetEventsXY(events, front_x, front_y);	for (const auto& ev : events) {		if ( ev->GetLayer() == RPG::EventPage::Layers_same &&			std::find(triggers.begin(), triggers.end(), ev->GetTrigger() ) != triggers.end()		)		{			if (!ev->GetList().empty()) {				ev->StartTalkToHero();			}			ev->Start(triggered_by_decision_key);			result = true;		}	}	if ( !result && Game_Map::IsCounter(front_x, front_y) ) {		front_x = Game_Map::XwithDirection(front_x, GetDirection());		front_y = Game_Map::YwithDirection(front_y, GetDirection());		Game_Map::GetEventsXY(events, front_x, front_y);		for (const auto& ev : events) {			if ( ev->GetLayer() == 1 &&				std::find(triggers.begin(), triggers.end(), ev->GetTrigger() ) != triggers.end()			)			{				if (!ev->GetList().empty()) {					ev->StartTalkToHero();				}				ev->Start(triggered_by_decision_key);				result = true;			}		}	}	return result;}
开发者ID:rohkea,项目名称:Player,代码行数:45,


示例6: debug

//=============================================================================// GetDirection - need the startPoint//=============================================================================StatusCode HTBlob::GetDirection( Minerva::IDBlob *idBlob ) const{    debug() << " HTtool::GetDirection " << endmsg;    Gaudi::XYZPoint vertex = idBlob->startPoint();    GetDirection( idBlob, vertex );    return StatusCode::SUCCESS;}
开发者ID:oaltinok,项目名称:Minerva_Neutrino,代码行数:12,


示例7: GetDirection

void UNIT::MoveUnit(INTPOINT to){	m_lastWP = m_pTerrain->GetWorldPos(m_mappos);	m_rotation = GetDirection(m_mappos, to);	m_mappos = to;		//New mappos	m_movePrc = 0.0f;	m_nextWP = m_pTerrain->GetWorldPos(m_mappos);}
开发者ID:Alriightyman,项目名称:RTS,代码行数:9,


示例8: GetDirection

void clSpaceShip::Fire(){	if ( m_FireTime > 0.0f ) { return; }	const float FireCooldown = 1.0f; // seconds	m_FireTime = FireCooldown;	g_Game->FireRocket( m_Pos, m_Vel * Math::RandomInRange( 1.1f, 1.5f ) + GetDirection() );}
开发者ID:adarash,项目名称:Mastering-Android-NDK,代码行数:10,


示例9: ResGetKeyVal

static int ResGetKeyVal(int num, USHORT id){    int val;    char *res = lib_msprintf("KeySet%d%s", num ? 1 : 2, GetDirection(id));    resources_get_int(res, &val);    lib_free (res);    return val;}
开发者ID:AreaScout,项目名称:vice,代码行数:10,


示例10: GetDirection

bool Game_Player::GetOffVehicle() {	if (!InAirship()) {		int front_x = Game_Map::XwithDirection(GetX(), GetDirection());		int front_y = Game_Map::YwithDirection(GetY(), GetDirection());		if (!CanWalk(front_x, front_y))			return false;	}	GetVehicle()->GetOff();	if (!InAirship()) {		location.unboarding = true;		Unboard();		through = true;		MoveForward();		through = false;	}	return true;}
开发者ID:Uladox,项目名称:Player,代码行数:19,


示例11:

    void SegmentShape2D::SetDirection(Vector2 value)    {        if (value != Vector2::Zero)            value.Normalize();        if (GetDirection() != value)        {            direction = value;            revision = -1;        }    }
开发者ID:Darkttd,项目名称:Bibim,代码行数:11,


示例12: SetSpriteName

void Game_Event::Setup(RPG::EventPage* new_page) {	page = new_page;	// Free resources if needed	if (interpreter) {		interpreter->Clear();		Game_Map::ReserveInterpreterDeletion(interpreter);		interpreter.reset();	}	if (page == NULL) {		tile_id = 0;		SetSpriteName("");		SetSpriteIndex(0);		SetDirection(RPG::EventPage::Direction_down);		//move_type = 0;		trigger = -1;		list.clear();		return;	}	SetSpriteName(page->character_name);	SetSpriteIndex(page->character_index);	tile_id = page->character_name.empty() ? page->character_index : 0;	if (GetDirection() != page->character_direction) {		SetDirection(page->character_direction);		SetSpriteDirection(page->character_direction);	}	if (original_pattern != page->character_pattern) {		pattern = page->character_pattern;		original_pattern = pattern;	}		move_type = page->move_type;	SetMoveSpeed(page->move_speed);	SetMoveFrequency(page->move_frequency);	max_stop_count = (GetMoveFrequency() > 7) ? 0 : pow(2.0, 8 - GetMoveFrequency());	original_move_frequency = page->move_frequency;	original_move_route = page->move_route;	SetOriginalMoveRouteIndex(0);	animation_type = page->animation_type;	SetOpacity(page->translucent ? 160 : 255);	SetLayer(page->layer);	trigger = page->trigger;	list = page->event_commands;	if (trigger == RPG::EventPage::Trigger_parallel) {		interpreter.reset(new Game_Interpreter_Map());	}	CheckEventTriggerAuto();}
开发者ID:Uladox,项目名称:Player,代码行数:54,


示例13: GetDirection

void CSphericalCameraController::SetCamera(CCamera *Camera) const{	Vect3f l_Direction = GetDirection();	Camera->SetLookAt(m_Position);	Camera->SetPosition(m_Position-l_Direction);	Camera->SetUp(GetUp());	Camera->SetMatrixs();}
开发者ID:JContrerasPereira,项目名称:MasterUAB,代码行数:11,


示例14: GetPosition

bool ZActor::CanSee(ZObject* pTarget){	rvector vTargetDir = pTarget->GetPosition() - GetPosition();	rvector vBodyDir = GetDirection();	vBodyDir.z = vTargetDir.z = 0.0f;	float angle = fabs(GetAngleOfVectors(vTargetDir, vBodyDir));	if (angle <= m_pNPCInfo->fViewAngle) return true;	return false;}
开发者ID:Asunaya,项目名称:RefinedGunz,代码行数:11,


示例15: TurnEngineOff

bool CCar::TurnEngineOff(){	bool isOnNeutralGear = (m_gear == CCar::Gear::Neutral);	bool isOnZeroSpeed = (GetDirection() == CCar::Direction::StandStill);	if (m_isEngineOn && isOnNeutralGear && isOnZeroSpeed)	{		m_isEngineOn = false;		return true;	}	return false;}
开发者ID:dervesp,项目名称:cpp_lab_3,代码行数:11,


示例16: FSphere

FSphere USpotLightComponent::GetBoundingSphere() const{	float ClampedInnerConeAngle = FMath::Clamp(InnerConeAngle,0.0f,89.0f) * (float)PI / 180.0f;	float ClampedOuterConeAngle = FMath::Clamp(OuterConeAngle * (float)PI / 180.0f,ClampedInnerConeAngle + 0.001f,89.0f * (float)PI / 180.0f + 0.001f);	float CosOuterCone = FMath::Cos(ClampedOuterConeAngle);	// Use the law of cosines to find the distance to the furthest edge of the spotlight cone from a position that is halfway down the spotlight direction	const float BoundsRadius = FMath::Sqrt(1.25f * AttenuationRadius * AttenuationRadius - AttenuationRadius * AttenuationRadius * CosOuterCone);	return FSphere(ComponentToWorld.GetLocation() + .5f * GetDirection() * AttenuationRadius, BoundsRadius);}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:11,


示例17: FxIntTurnStart

func FxIntTurnStart(pTarget, effect, fTmp){	if(fTmp) return;	effect.dir = GetDirection();	var iTurnPos = 0;	if(effect.dir == COMD_Right) iTurnPos = 1;	effect.curr_rot = 24;	effect.rot = 25;	effect.turn_type = -1;	SetTurnType(0);}
开发者ID:farad91,项目名称:openclonk,代码行数:12,


示例18: GetDirectDistance

char M::SearchPathForAnt(Ant* ant, Bot* bot){				vector<Cell> closedCells, openCells, neighborCells;	Cell start;		start.col = ant->location.col;	start.row = ant->location.row;	start.gScore = 0;	start.hScore = GetDirectDistance(ant->location.row, ant->location.col, ant->destination.row, ant->destination.col);	start.fScore = start.gScore + start.hScore;	openCells.push_back(start);		while(!openCells.empty())	{		vector<Cell>::iterator cellIt = openCells.begin();		for(auto it = openCells.begin(); it != openCells.end(); it++)			if ((*it).fScore <= cellIt->fScore)				cellIt = it;		Cell *cell = new Cell((*cellIt).row, (*cellIt).col, (*cellIt).gScore,(*cellIt).hScore, 							  (*cellIt).fScore, (*cellIt).parent);				if (SearchPathIsComplete(cell, ant) || cell->gScore > DIST_TO_TARGET)		{			Cell *currentCell = cell;				if(cell->gScore > DIST_TO_TARGET)			{				ant->destination.row = cell->row;				ant->destination.col = cell->col;			}			if(currentCell->parent)			while(currentCell->parent->parent != NULL)			{				currentCell = currentCell->parent;			}							ant->direction = GetDirection(currentCell->row, currentCell->col, ant->location.row, ant->location.col);			return ant->direction;					}		closedCells.push_back(*cell);		openCells.erase(cellIt);		GetNeighborCells(cell, &neighborCells, bot->water);				for (auto it = neighborCells.begin(); it != neighborCells.end(); it++)		{			if (find(closedCells.begin(), closedCells.end(), *it) != closedCells.end())				continue;			int neighborGScore = cell->gScore + GetDistance(cell->row, cell->col, (*it).row, (*it).col);			if(find(openCells.begin(), openCells.end(), *it) == openCells.end())			{				int gScore = neighborGScore;				float hScore = (*it).hScore = 					GetDirectDistance((*it).row, (*it).col, ant->destination.row, ant->destination.col);				float fScore = neighborGScore + hScore;				openCells.push_back(Cell((*it).row, (*it).col, gScore, hScore, fScore, cell));			}			}			}}
开发者ID:Katkevich,项目名称:Ants,代码行数:53,


示例19: XRC_MAKE_INSTANCE

wxObject * MaxBannerWindowXmlHandler::DoCreateResource(){    XRC_MAKE_INSTANCE(banner, MaxBannerWindow)    banner->Create(m_parentAsWindow,                   GetID(),                   GetDirection(wxS("direction")),                   GetPosition(),                   GetSize(),                   GetStyle(wxS("style")),                   GetName());	banner->MaxBind(CB_PREF(wx_wxbannerwindow_wxBannerWindow__xrcNew)(banner));    SetupWindow(banner);    const wxColour colStart = GetColour(wxS("gradient-start"));    const wxColour colEnd = GetColour(wxS("gradient-end"));    if ( colStart.IsOk() || colEnd.IsOk() )    {        if ( !colStart.IsOk() || !colEnd.IsOk() )        {            ReportError            (                "Both start and end gradient colours must be "                "specified if either one is."            );        }        else        {            banner->SetGradient(colStart, colEnd);        }    }    wxBitmap bitmap = GetBitmap();    if ( bitmap.IsOk() )    {        if ( colStart.IsOk() || colEnd.IsOk() )        {            ReportError            (                "Gradient colours are ignored by wxBannerWindow "                "if the background bitmap is specified."            );        }        banner->SetBitmap(bitmap);    }    banner->SetText(GetText(wxS("title")), GetText(wxS("message")));    return banner;}
开发者ID:maxmods,项目名称:wx.mod,代码行数:53,


示例20: GetGlobalTimeMS

void ZActor::PostBasicInfo(){	DWORD nNowTime = GetGlobalTimeMS();	if (GetInitialized() == false) return;	if(IsDie() && ZGetGame()->GetTime() - GetDeadTime()>5.f) return;	int nMoveTick = (ZGetGameClient()->GetAllowTunneling() == false) ? PEERMOVE_TICK : PEERMOVE_AGENT_TICK;	if ((int)(nNowTime - m_nLastTime[ACTOR_LASTTIME_BASICINFO]) >= nMoveTick)	{		m_nLastTime[ACTOR_LASTTIME_BASICINFO] = nNowTime;		ZACTOR_BASICINFO pbi;		pbi.fTime = ZGetGame()->GetTime();		pbi.uidNPC = GetUID();		pbi.posx = m_Position.x;		pbi.posy = m_Position.y;		pbi.posz = m_Position.z;		pbi.velx = GetVelocity().x;		pbi.vely = GetVelocity().y;		pbi.velz = GetVelocity().z;		pbi.dirx = GetDirection().x*32000.0f;		pbi.diry = GetDirection().y*32000.0f;		pbi.dirz = GetDirection().z*32000.0f;		pbi.anistate = GetCurrAni();		ZPOSTCMD1(MC_QUEST_PEER_NPC_BASICINFO, MCommandParameterBlob(&pbi,sizeof(ZACTOR_BASICINFO)));		ZBasicInfoItem Item;		Item.info.position = m_Position;		Item.info.direction = GetDirection();		Item.info.velocity = GetVelocity();		Item.fSendTime = Item.fReceivedTime = ZGetGame()->GetTime();		AddToHistory(Item);	}}
开发者ID:Asunaya,项目名称:RefinedGunz,代码行数:40,


示例21: getFaction

bool BattleSquad::move(int tgx, int tgy, unsigned int &eventflag, bool costap){	MapDataManager* mapdatamanager = MapDataManager::getSingletonPtr();	if(mapdatamanager->getPassable(tgx, tgy, getFaction()))	{		float mapapcost = 0.0f;		if(getHorseId() != "none")			mapapcost = mapdatamanager->getCavApCost(tgx, tgy, getFaction());		else			mapapcost = mapdatamanager->getInfApCost(tgx, tgy, getFaction());		LuaTempContext* luatempcontext = new LuaTempContext();		luatempcontext->strMap["squadid"] = getSquadId();		luatempcontext->intMap["srcx"] = getGridX();		luatempcontext->intMap["srcy"] = getGridY();		luatempcontext->intMap["tgtx"] = tgx;		luatempcontext->intMap["tgty"] = tgy;		luatempcontext->floatMap["apcost"] = mapapcost;		Trigger("MoveTo", luatempcontext);		mapdatamanager->Trigger("MoveTo", luatempcontext);		mapapcost = luatempcontext->floatMap["apcost"];		delete luatempcontext;		if(costap)		{			float ap = getActionPoint();			if(mapapcost <= ap)			{				ap -= mapapcost;				setActionPoint(ap);				if(mapapcost <= 2)				{					eventflag |= MOVEEVENT_CHARGE;					int curdir = GetDirection(getGridX(), getGridY(), tgx, tgy);					eventflag &= 0x03f;					eventflag |= SetChargeDir(curdir);				}				else				{					eventflag &= ~MOVEEVENT_CHARGE;				}				return true;			}		}		else		{			return true;		}	}	eventflag |= MOVEEVENT_WRONG;	return false;}
开发者ID:weimingtom,项目名称:fdux-slg-game,代码行数:52,


示例22: GetDirection

void CSphericalCameraController::SetCamera(CCamera *Camera) const{	Vect3f l_Direction = GetDirection();	Camera->SetFOV(DEG2RAD(50.0f));	Camera->SetAspectRatio(16.0f/9.0f);	Camera->SetLookAt(m_Position);	Camera->SetPosition(m_Position-l_Direction);	Camera->SetUp(GetUp());	Camera->SetMatrixs();}
开发者ID:latorpeda,项目名称:MasterMotor22-11-15,代码行数:13,


示例23: SetDirection

void Projectile::Update(float dt){  if (position_.x < point_attack_.x )     SetDirection (EActorDirection::EAST);  if (position_.x > point_attack_.x )     SetDirection (EActorDirection::WEST);  if (position_.y < point_attack_.y )     SetDirection (EActorDirection::NORTH);  if (position_.y > point_attack_.y )    SetDirection (EActorDirection::SOUTH);  SetVelocity (directionToVector[static_cast<unsigned>(GetDirection())]);  position_ +=  velocity_*dt;}
开发者ID:USKamicadze,项目名称:fefu-mmorpg,代码行数:13,


示例24: SetGear

bool CCar::SetGear(CCar::Gear gear){	if (gear == m_gear)	{		return true;	}	if (gear == CCar::Gear::Rear)	{		if ((m_gear != CCar::Gear::Neutral) && (m_gear != CCar::Gear::First))		{			throw std::exception("Cannot set rear gear from this gear");			return false;		}		if (GetDirection() != CCar::Direction::StandStill)		{			throw std::exception("Cannot set rear gear at nonzero speed");			return false;		}	}	if ((gear == CCar::Gear::First) && (m_gear == CCar::Gear::Rear))	{		if (GetDirection() != CCar::Direction::StandStill)		{			throw std::exception("Cannot set first gear from rear gear at nonzero speed");			return false;		}	}	if ((m_speed < gearSpeedRange.at(gear).min) || (m_speed > gearSpeedRange.at(gear).max))	{		throw std::exception("Cannot set this gear at this speed");		return false;	}	m_gear = gear;	return true;}
开发者ID:dervesp,项目名称:cpp_lab_3,代码行数:39,


示例25: SetSpriteName

void Game_Event::Setup(RPG::EventPage* new_page) {	page = new_page;	if (page == NULL) {		tile_id = 0;		SetSpriteName("");		SetSpriteIndex(0);		SetDirection(RPG::EventPage::Direction_down);		//move_type = 0;		through = true;		trigger = -1;		list.clear();		interpreter.reset();		return;	}	SetSpriteName(page->character_name);	SetSpriteIndex(page->character_index);	tile_id = page->character_name.empty() ? page->character_index : 0;	if (GetDirection() != page->character_direction) {		SetDirection(page->character_direction);		SetPrelockDirection(page->character_direction);	}	if (original_pattern != page->character_pattern) {		pattern = page->character_pattern;		original_pattern = pattern;	}	//opacity = page.opacity;	//opacity = page.translucent ? 192 : 255;	//blend_type = page.blend_type;	move_type = page->move_type;	SetMoveSpeed(page->move_speed);	SetMoveFrequency(page->move_frequency);	original_move_route = page->move_route;	SetOriginalMoveRouteIndex(0);	animation_type = page->animation_type;	SetLayer(page->layer);	trigger = page->trigger;	list = page->event_commands;	through = false;	// Free resources if needed	interpreter.reset();	if (trigger == RPG::EventPage::Trigger_parallel) {		interpreter.reset(new Game_Interpreter_Map());	}	CheckEventTriggerAuto();}
开发者ID:Ancurio,项目名称:Player,代码行数:51,


示例26: GetDirection

void Player::Draw() {  TexCoords tc = Engine::Get().Scripts()->GetPlayerSprite(GetType(),                                                           GetDirection(),                                                           IsDying(),                                                           SDL_GetTicks() - m_current_action_start_time);//   std::cerr << "type = " << GetType() << ", direction = " << GetDirection().x() << ", " << GetDirection().y()// 	    << ", is dying = " << IsDying() << "dt = " << SDL_GetTicks() - m_current_action_start_time << "/n";//   std::cerr << "tc = " << tc.left << ", " << tc.bottom << ", " << tc.width << ", " << tc.height << "/n";  Engine::Get().Renderer()->DrawSprite(tc, GetPosition());  if (g_render_aabbs)    Engine::Get().Renderer()->DrawAABB(GetAABB());}
开发者ID:mmilewski,项目名称:bynadlaster,代码行数:14,


示例27: GetY

int Game_Character::GetRealY() const {	int y = GetY() * SCREEN_TILE_WIDTH;	if (IsMoving()) {		int d = GetDirection();		if (d == Down || d == DownRight || d == DownLeft)			y -= remaining_step;		else if (d == Up || d == UpRight || d == UpLeft)			y += remaining_step;	} else if (IsJumping())		y -= (GetY() - jump_y) * remaining_step;	return y;}
开发者ID:FaithFeather,项目名称:Player,代码行数:14,


示例28: GetX

int Game_Character::GetRealX() const {	int x = GetX() * SCREEN_TILE_WIDTH;	if (IsMoving()) {		int d = GetDirection();		if (d == Right || d == UpRight || d == DownRight)			x -= remaining_step;		else if (d == Left || d == UpLeft || d == DownLeft)			x += remaining_step;	} else if (IsJumping())		x -= ((GetX() - jump_x) * remaining_step);	return x;}
开发者ID:FaithFeather,项目名称:Player,代码行数:14,


示例29: XMLoadFloat3

//! Updates the view matrix.void Camera::UpdateViewMatrix(){    // Update the right vector.    XMVECTOR up = XMLoadFloat3(&mUp);    XMVECTOR dir = XMLoadFloat3(&GetDirection());    XMVECTOR right = XMVector3Cross(up, dir);    right = XMVector3Normalize(right);    XMStoreFloat3(&mRight, right);    // Update the view matrix    XMVECTOR pos = XMLoadFloat3(&mPosition);    XMVECTOR target = XMLoadFloat3(&mTarget);    XMStoreFloat4x4(&mView, XMMatrixLookAtLH(pos, target, up));}
开发者ID:simplerr,项目名称:Graphics-Library,代码行数:15,


示例30: OnPinNameMouseDown

FReply SGraphPin::OnPinNameMouseDown( const FGeometry& SenderGeometry, const FPointerEvent& MouseEvent ){	const float LocalX = SenderGeometry.AbsoluteToLocal( MouseEvent.GetScreenSpacePosition() ).X;	if ((GetDirection() == EGPD_Input) || (LocalX > SenderGeometry.GetDrawSize().X * 0.5f))	{		// Right half of the output pin or all of the input pin, treat it like a connection attempt		return OnPinMouseDown(SenderGeometry, MouseEvent);	}	else	{		return FReply::Unhandled();	}}
开发者ID:johndpope,项目名称:UE4,代码行数:14,



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


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