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

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

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

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

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

示例1: wxT

bool LIB_TEXT::Save( OUTPUTFORMATTER& aFormatter ){    wxString text = m_Text;    if( text.Contains( wxT( "~" ) ) || text.Contains( wxT( "/"" ) ) )    {        // convert double quote to similar-looking two apostrophes        text.Replace( wxT( "/"" ), wxT( "''" ) );        text = wxT( "/"" ) + text + wxT( "/"" );    }    else    {        // Spaces are not allowed in text because it is not double quoted:        // changed to '~'        text.Replace( wxT( " " ), wxT( "~" ) );    }    aFormatter.Print( 0, "T %g %d %d %d %d %d %d %s ", GetOrientation(), m_Pos.x, m_Pos.y,                      m_Size.x, m_Attributs, m_Unit, m_Convert, TO_UTF8( text ) );    aFormatter.Print( 0, " %s %d", m_Italic ? "Italic" : "Normal", ( m_Bold > 0 ) ? 1 : 0 );    char hjustify = 'C';    if( m_HJustify == GR_TEXT_HJUSTIFY_LEFT )        hjustify = 'L';    else if( m_HJustify == GR_TEXT_HJUSTIFY_RIGHT )        hjustify = 'R';    char vjustify = 'C';    if( m_VJustify == GR_TEXT_VJUSTIFY_BOTTOM )        vjustify = 'B';    else if( m_VJustify == GR_TEXT_VJUSTIFY_TOP )        vjustify = 'T';    aFormatter.Print( 0, " %c %c/n", hjustify, vjustify );    return true;}
开发者ID:BTR1,项目名称:kicad-source-mirror,代码行数:40,


示例2: GetMap

void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z){    Map const* oldMap = GetMap();    Relocate(x, y, z);    // we need to create and save new Map object with 'newMapid' because if not done -> lead to invalid Map object reference...    // player far teleport would try to create same instance, but we need it NOW for transport...    RemoveFromWorld();    ResetMap();    Map* newMap = sMapMgr->CreateBaseMap(newMapid);    SetMap(newMap);    ASSERT(GetMap());    AddToWorld();    for (UnitSet::iterator itr = _passengers.begin(); itr != _passengers.end();)    {        Unit* passenger = *itr;        ++itr;        switch (passenger->GetTypeId())        {            case TYPEID_UNIT:                passenger->ToCreature()->FarTeleportTo(newMap, x, y, z, passenger->GetOrientation());                break;            case TYPEID_PLAYER:                if (passenger->isDead() && !passenger->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))                    passenger->ToPlayer()->ResurrectPlayer(1.0f);                passenger->ToPlayer()->TeleportTo(newMapid, x, y, z, GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT);                break;        }    }    if (oldMap != newMap)    {        UpdateForMap(oldMap);        UpdateForMap(newMap);    }    MoveToNextWayPoint();}
开发者ID:Devilcleave,项目名称:TrilliumEMU,代码行数:40,


示例3: GetMap

void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z){    Map const* oldMap = GetMap();    SetMapId(newMapid);    Relocate(x, y, z);    for (PlayerSet::iterator itr = m_passengers.begin(); itr != m_passengers.end();)    {        PlayerSet::iterator it2 = itr;        ++itr;        Player *plr = *it2;        if (!plr)        {            m_passengers.erase(it2);            continue;        }        if (plr->isDead() && !plr->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))        {            plr->ResurrectPlayer(1.0);        }        plr->TeleportTo(newMapid, x, y, z, GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT);        //WorldPacket data(SMSG_811, 4);        //data << uint32(0);        //plr->BroadcastPacketToSelf(&data);    }    Map* newMap = sMapMgr.CreateMap(newMapid, this);    SetMap(newMap);    if (oldMap != newMap)    {        UpdateForMap(oldMap);        UpdateForMap(newMap);    }}
开发者ID:Blumfield,项目名称:ptc2,代码行数:40,


示例4: GetMap

void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z){    Map const* oldMap = GetMap();    Relocate(x, y, z);    for (PlayerSet::iterator itr = m_passengers.begin(); itr != m_passengers.end();)    {        PlayerSet::iterator it2 = itr;        ++itr;        Player* plr = *it2;        if (!plr)        {            m_passengers.erase(it2);            continue;        }        if (plr->isDead() && !plr->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))        {            plr->ResurrectPlayer(1.0);        }        plr->TeleportTo(newMapid, x, y, z, GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT);        // WorldPacket data(SMSG_811, 4);        // data << uint32(0);        // plr->GetSession()->SendPacket(&data);    }    // we need to create and save new Map object with 'newMapid' because if not done -> lead to invalid Map object reference...    // player far teleport would try to create same instance, but we need it NOW for transport...    // correct me if I'm wrong O.o    Map* newMap = sMapMgr.CreateMap(newMapid, this);    SetMap(newMap);    if (oldMap != newMap)    {        UpdateForMap(oldMap);        UpdateForMap(newMap);    }}
开发者ID:Celtus,项目名称:portalone,代码行数:40,


示例5: switch

void SCH_TEXT::MirrorX( int aXaxis_position ){    // Text is NOT really mirrored; it is moved to a suitable position    // which is the closest position for a true mirrored text    // The center position is mirrored and the text is moved for half    // horizontal len    int py = m_Pos.y;    int dy;    switch( GetOrientation() )    {    case 0:             /* horizontal text */        dy = -m_Size.y / 2;        break;    case 1: /* Vert Orientation UP */        dy = -LenSize( m_Text ) / 2;        break;    case 2:                 /* invert horizontal text*/        dy = m_Size.y / 2;  // how to calculate text height?        break;    case 3: /*  Vert Orientation BOTTOM */        dy = LenSize( m_Text ) / 2;        break;    default:        dy = 0;        break;    }    py += dy;    py -= aXaxis_position;    NEGATE( py );    py += aXaxis_position;    py -= dy;    m_Pos.y = py;}
开发者ID:james-sakalaukus,项目名称:kicad,代码行数:39,


示例6: elemrect

void ProgressBar::OnRender(suic::DrawingContext * drawing){    // 先绘制背景    suic::Rect elemrect(0, 0, RenderSize().cx, RenderSize().cy);    suic::TriggerPtr trg(suic::UIRender::GetTriggerByStatus(this, GetStyle()));    suic::UIRender::DrawBackground(drawing, trg, &elemrect);    //    // 绘制进度条状态    //    suic::ImageBrushPtr bkgnd(trg->GetValue(_T("Thumb")));    if (bkgnd)    {        suic::Rect rcdraw(elemrect);        // 水平        if (GetOrientation() == CoreFlags::Horizontal)        {            LONG iOff = (LONG)((GetValue() - Minimum()) * (double)(rcdraw.right - rcdraw.left) / (Maximum() - Minimum()));            rcdraw.right = rcdraw.left + iOff;        }        else        {            LONG iOff = (LONG)((double)(rcdraw.bottom - rcdraw.top) * (GetValue() - Minimum()) / (Maximum() - Minimum()));            rcdraw.top = rcdraw.bottom - iOff;        }        if (!rcdraw.Empty())        {            bkgnd->Draw(drawing, &rcdraw);        }    }    suic::UIRender::DrawText(drawing, GetText(), trg, &elemrect        , GetHorizontalContentAlignment(), GetVerticalContentAlignment());}
开发者ID:tfzxyinhao,项目名称:sharpui,代码行数:38,


示例7: orderVertices

void AngularlyOrderedGraph::Initialize(vector<Vertex<FragmentInfo>*>& v, 								  vector<ContourEQW>& contours, 								  FragmentInfo& start,								  FragmentInfo& end){	for(int i=0; i<vertices.size(); ++i)	{		delete vertices[i];	}	vertices.clear();	for(int i=0; i<v.size(); ++i)	{		Vertex<FragmentInfo>* u = new Vertex<FragmentInfo>(v[i]->key);		*u = *(v[i]);		vertices.push_back(u);	}	vertices = orderVertices(vertices, contours, click);	source = findVertex(vertices, start);	assert(source);	dest = findVertex(vertices, end);	assert(dest);	if(GetOrientation(start, end, click, contours)==false)	{		swap(source, dest);	}	vertices = arrangeVertices(vertices, source);	for(int i=0; i<vertices.size(); ++i)	{		vertices[i]->Reset();	}	source->d = 0;	iter = 1;}
开发者ID:toshirokubota,项目名称:MovingDots,代码行数:38,


示例8: GetOrientation

void AreaTrigger::UpdatePolygonOrientation(){    float newOrientation = GetOrientation();    // No need to recalculate, orientation didn't change    if (G3D::fuzzyEq(_previousCheckOrientation, newOrientation))        return;    _polygonVertices.assign(GetTemplate()->PolygonVertices.begin(), GetTemplate()->PolygonVertices.end());    float angleSin = std::sin(newOrientation);    float angleCos = std::cos(newOrientation);    // This is needed to rotate the vertices, following orientation    for (Position& vertice : _polygonVertices)    {        float x = vertice.GetPositionX() * angleCos - vertice.GetPositionY() * angleSin;        float y = vertice.GetPositionY() * angleCos + vertice.GetPositionX() * angleSin;        vertice.Relocate(x, y);    }    _previousCheckOrientation = newOrientation;}
开发者ID:Rochet2,项目名称:TrinityCore,代码行数:23,


示例9: InternalInit

void ScrollBar::InternalInit(){    if (GetOrientation() == CoreFlags::Horizontal)    {        if (GetHeight() > 0)        {            _decreaseBtn.SetWidth(GetHeight());            _decreaseBtn.SetHeight(GetHeight());            _increaseBtn.SetWidth(GetHeight());            _increaseBtn.SetHeight(GetHeight());        }    }    else    {        if (GetWidth() > 0)        {            _decreaseBtn.SetWidth(GetWidth());            _decreaseBtn.SetHeight(GetWidth());            _increaseBtn.SetWidth(GetWidth());            _increaseBtn.SetHeight(GetWidth());        }    }}
开发者ID:tfzxyinhao,项目名称:sharpui,代码行数:23,


示例10: VALUES

void GameObject::SaveToDB(){	std::stringstream ss;	ss << "REPLACE INTO gameobject_spawns VALUES("		<< ((m_spawn == NULL) ? 0 : m_spawn->id) << ","		<< GetEntry() << ","		<< GetMapId() << ","		<< GetPositionX() << ","		<< GetPositionY() << ","		<< GetPositionZ() << ","		<< GetOrientation() << ","		<< GetUInt64Value(GAMEOBJECT_ROTATION) << ","		<< GetFloatValue(GAMEOBJECT_PARENTROTATION) << ","		<< GetFloatValue(GAMEOBJECT_PARENTROTATION + 2) << ","		<< GetFloatValue(GAMEOBJECT_PARENTROTATION + 3) << ","		<< ( GetByte(GAMEOBJECT_BYTES_1, 0)? 1 : 0 ) << ","		<< GetUInt32Value(GAMEOBJECT_FLAGS) << ","		<< GetUInt32Value(GAMEOBJECT_FACTION) << ","		<< GetFloatValue(OBJECT_FIELD_SCALE_X) << ","		<< m_phaseMode << ","		<< m_phaseMode << ")";	WorldDatabase.Execute(ss.str().c_str());}
开发者ID:arcticdev,项目名称:arctic-test,代码行数:23,


示例11: GetPosition

void D_PAD::Flip( const wxPoint& aCentre ){    int y = GetPosition().y;    MIRROR( y, aCentre.y );  // invert about x axis.    SetY( y );    MIRROR( m_Pos0.y, 0 );    MIRROR( m_Offset.y, 0 );    MIRROR( m_DeltaSize.y, 0 );    SetOrientation( -GetOrientation() );    // flip pads layers    // PADS items are currently on all copper layers, or    // currently, only on Front or Back layers.    // So the copper layers count is not taken in account    SetLayerSet( FlipLayerMask( m_layerMask ) );    // Flip the basic shapes, in custom pads    FlipPrimitives();    // m_boundingRadius = -1;  the shape has not been changed}
开发者ID:cpavlina,项目名称:kicad,代码行数:23,


示例12: size

suic::Size ScrollBar::MeasureOverride(const suic::Size& availableSize){    suic::Size size(availableSize);    //InternalInit();    _decreaseBtn.Measure(size);    _increaseBtn.Measure(size);    _thumb.Measure(size);    _decreasePage.Measure(size);    _increasePage.Measure(size);    if (GetOrientation() == CoreFlags::Horizontal)    {        size.cy = _decreaseBtn.GetDesiredSize().cy;    }    else    {        size.cx = _decreaseBtn.GetDesiredSize().cx;    }    return size;}
开发者ID:tfzxyinhao,项目名称:sharpui,代码行数:23,


示例13: switch

    void Node::Translate(const Vector3& delta, TransformSpace space)    {        switch (space)        {            case TS_LOCAL:                // Note: local space translation disregards local scale for scale-independent movement speed                position_ += GetOrientation() * delta;                break;            case TS_PARENT:                position_ += delta;                break;            case TS_WORLD:                {                    PNode parent = parent_.lock();                    position_ += (parent == scene_.lock() || !parent) ? delta : Vector3(parent->GetGlobalModelInvMatrix() * Vector4(delta, 0.0f));                    break;                }        }        MarkAsDirty();    }
开发者ID:dreamsxin,项目名称:nsg-library,代码行数:23,


示例14: OnKeyDown

void Slider::OnKeyDown(suic::KeyEventArg& e){    if (GetOrientation() == CoreFlags::Horizontal)     {        if (e.IsLeftArrow())        {            if (GetValue() > Minimum())            {                SetValue((int)GetValue() - 1);            }        }        else if (e.IsRightArrow())        {            if (GetValue() < Maximum())            {                SetValue((int)GetValue() + 1);            }        }    }    else    {        if (e.IsUpArrow())        {            if (GetValue() > Minimum())            {                SetValue((int)GetValue() - 1);            }        }        else if (e.IsDownArrow())        {            if (GetValue() < Maximum())            {                SetValue((int)GetValue() + 1);            }        }    }}
开发者ID:tfzxyinhao,项目名称:sharpui,代码行数:37,


示例15: RemoveFromWorld

void Transporter::TeleportTransport(uint32 newMapid, uint32 oldmap, float x, float y, float z){    //sEventMgr.RemoveEvents(this, EVENT_TRANSPORTER_NEXT_WAYPOINT);    RemoveFromWorld(false);    SetMapId(newMapid);    SetPosition(x, y, z, m_position.o, false);    AddToWorld();    WorldPacket packet(SMSG_TRANSFER_PENDING, 12);    packet << newMapid;    packet << getEntry();    packet << oldmap;    for (auto passengerGuid : m_passengers)    {        auto passenger = objmgr.GetPlayer(passengerGuid);        if (passenger == nullptr)            continue;        passenger->GetSession()->SendPacket(&packet);        bool teleport_successful = passenger->Teleport(LocationVector(x, y, z, passenger->GetOrientation()), this->GetMapMgr());        if (!teleport_successful)        {            passenger->RepopAtGraveyard(passenger->GetPositionX(), passenger->GetPositionY(), passenger->GetPositionZ(), passenger->GetMapId());        }        else        {            if (!passenger->HasUnitMovementFlag(MOVEFLAG_TRANSPORT))            {                passenger->AddUnitMovementFlag(MOVEFLAG_TRANSPORT);            }        }    }    this->RespawnCreaturePassengers();}
开发者ID:armm77,项目名称:AscEmu,代码行数:37,


示例16: RemoveComponent

void RPG_DestructibleEntity::SetDestroyed(){  m_isDestroyed = true;  // remove the attackable component  RPG_AttackableComponent* attackableComponent = static_cast<RPG_AttackableComponent*>(Components().GetComponentOfType(V_RUNTIME_CLASS(RPG_AttackableComponent)));  if (attackableComponent)  {    RemoveComponent(attackableComponent);  }  vHavokRigidBody* rigidBodyComponent = static_cast<vHavokRigidBody*>(Components().GetComponentOfType(V_RUNTIME_CLASS(vHavokRigidBody)));  if (rigidBodyComponent)  {    RemoveComponent(rigidBodyComponent);  }  // stop the ambient effect  StopEffect(DEFX_Ambient);  CreateEffect(DEFX_Destroy, GetPosition(), GetOrientation());  // remove collision if so instructed  //if (m_removeCollisionAfterDestruction)  {    RemoveObstacle();  }  if(!m_postDestructionMeshFilename.IsEmpty())  {    // swap the mesh    SetMesh(m_postDestructionMeshFilename);  }  else  {    DisposeObject();  }}
开发者ID:cDoru,项目名称:projectanarchy,代码行数:37,


示例17: GlobalLock

void PrintManager::InformTerOfCurrentPrinterSelection(CWSPrintRevisionReportDlg& dlgPrint){	TERTCHAR device[MAX_WIDTH + 1];	TERTCHAR driver[MAX_WIDTH + 1];	TERTCHAR port[MAX_WIDTH + 1];	PRINTDLG pdlg=dlgPrint.m_pd;	// Get the new orietation	PDEVMODE pDevMode= (PDEVMODE) GlobalLock(pdlg.hDevMode);	m_NewOrient=pDevMode->dmOrientation;	GlobalUnlock(pdlg.hDevMode);	CString PortName = dlgPrint.GetPortName();	CString DriverName = dlgPrint.GetDriverName();	CString DeviceName = dlgPrint.GetDeviceName();	ASSERT( PortName.GetLength() <= MAX_WIDTH );	ASSERT( DriverName.GetLength() <= MAX_WIDTH );	ASSERT( DeviceName.GetLength() <= MAX_WIDTH );	tertstrcpyn((LPTSTR)device, DeviceName, MAX_WIDTH);	tertstrcpyn((LPTSTR)driver, DriverName, MAX_WIDTH);	tertstrcpyn((LPTSTR)port, PortName, MAX_WIDTH);	// update printer selection for this view	TerSetPrinter(this->m_hWnd, device, driver, port, pdlg.hDevMode);	// Get the current orientation	m_SaveOrient = GetOrientation();	m_iCurSectOrient = TerGetSectOrient(this->m_hWnd, -1);	if(m_SaveOrient!=m_NewOrient && m_iCurSectOrient!=m_NewOrient)	{		TerSetSectOrient(this->m_hWnd, m_NewOrient, TRUE);	}}
开发者ID:killbug2004,项目名称:WSProf,代码行数:37,


示例18: ValueFromString

// Called when a pin properties changesvoid DIALOG_LIB_EDIT_PIN::OnPropertiesChange( wxCommandEvent& event ){    if( ! IsShown() )   // do nothing at init time        return;    int pinNameSize = ValueFromString( g_UserUnit, GetPinNameTextSize() );    int pinNumSize = ValueFromString( g_UserUnit, GetPadNameTextSize());    int pinOrient = LIB_PIN::GetOrientationCode( GetOrientation() );    int pinLength = ValueFromString( g_UserUnit, GetLength() );    GRAPHIC_PINSHAPE pinShape = GetStyle();    ELECTRICAL_PINTYPE pinType = GetElectricalType();    m_dummyPin->SetName( GetPinName() );    m_dummyPin->SetNameTextSize( pinNameSize );    m_dummyPin->SetNumber( GetPadName() );    m_dummyPin->SetNumberTextSize( pinNumSize );    m_dummyPin->SetOrientation( pinOrient );    m_dummyPin->SetLength( pinLength );    m_dummyPin->SetShape( pinShape );    m_dummyPin->SetVisible( GetVisible() );    m_dummyPin->SetType( pinType );    m_panelShowPin->Refresh();}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:25,


示例19: DeleteFromDB

void Corpse::SaveToDB(){    // prevent DB data inconsistence problems and duplicates    SQLTransaction trans = CharacterDatabase.BeginTransaction();    DeleteFromDB(trans);    uint16 index = 0;    PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CORPSE);    stmt->setUInt64(index++, GetOwnerGUID().GetCounter());                            // guid    stmt->setFloat (index++, GetPositionX());                                         // posX    stmt->setFloat (index++, GetPositionY());                                         // posY    stmt->setFloat (index++, GetPositionZ());                                         // posZ    stmt->setFloat (index++, GetOrientation());                                       // orientation    stmt->setUInt16(index++, GetMapId());                                             // mapId    stmt->setUInt32(index++, GetUInt32Value(CORPSE_FIELD_DISPLAY_ID));                // displayId    stmt->setString(index++, _ConcatFields(CORPSE_FIELD_ITEM, EQUIPMENT_SLOT_END));   // itemCache    stmt->setUInt32(index++, GetUInt32Value(CORPSE_FIELD_BYTES_1));                   // bytes1    stmt->setUInt32(index++, GetUInt32Value(CORPSE_FIELD_BYTES_2));                   // bytes2    stmt->setUInt8 (index++, GetUInt32Value(CORPSE_FIELD_FLAGS));                     // flags    stmt->setUInt8 (index++, GetUInt32Value(CORPSE_FIELD_DYNAMIC_FLAGS));             // dynFlags    stmt->setUInt32(index++, uint32(m_time));                                         // time    stmt->setUInt8 (index++, GetType());                                              // corpseType    stmt->setUInt32(index++, GetInstanceId());                                        // instanceId    trans->Append(stmt);    for (uint32 phaseId : GetPhases())    {        index = 0;        stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CORPSE_PHASES);        stmt->setUInt64(index++, GetOwnerGUID().GetCounter());                        // OwnerGuid        stmt->setUInt32(index++, phaseId);                                            // PhaseId        trans->Append(stmt);    }    CharacterDatabase.CommitTransaction(trans);}
开发者ID:doriangray2,项目名称:TrinityCore-devil,代码行数:36,


示例20: VALUES

void Creature::SaveToDB(){    sDatabase.BeginTransaction();    sDatabase.PExecuteLog("DELETE FROM `creature` WHERE `guid` = '%u'", m_DBTableGuid);    std::ostringstream ss;    ss << "INSERT INTO `creature` VALUES ("        << m_DBTableGuid << ","        << GetEntry() << ","        << GetMapId() <<","        << GetPositionX() << ","        << GetPositionY() << ","        << GetPositionZ() << ","        << GetOrientation() << ","        << m_respawnDelay << ","                            //respawn time        << (float) 0  << ","                                //spawn distance (float)        << (uint32) (0) << ","                              //currentwaypoint        << respawn_cord[0] << ","                           //spawn_position_x        << respawn_cord[1] << ","                           //spawn_position_y        << respawn_cord[2] << ","                           //spawn_position_z        << (float)(0) << ","                                //spawn_orientation        << GetHealth() << ","                               //curhealth        << GetPower(POWER_MANA) << ","                      //curmana        << (uint32)(m_deathState) << ","                    // is it really death state or just state?    //or    //<< (uint32)(m_state) << ","                     // is it really death state or just state?        << GetDefaultMovementType() << ","                  // default movement generator type        << "'')";                                           // should save auras    sDatabase.PExecuteLog( ss.str( ).c_str( ) );    sDatabase.CommitTransaction();}
开发者ID:chrayn,项目名称:mangos-06,代码行数:36,


示例21: SpellHitTarget

void boss_lethonAI::SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell){    if (pSpell->Id == SPELL_DRAW_SPIRIT)    {        auto pPlayer = pTarget->ToPlayer();        if (!pPlayer)            return;        float x, y, z, o;        pPlayer->GetPosition(x, y, z);        o = pPlayer->GetOrientation();        if (auto pShade = m_creature->SummonCreature(NPC_SPIRIT_SHADE, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE*IN_MILLISECONDS))        {            pShade->SetUInt32Value(UNIT_FIELD_BYTES_0, pPlayer->GetUInt32Value(UNIT_FIELD_BYTES_0));            pShade->InitPlayerDisplayIds();            pShade->SetDisplayId(pPlayer->GetDisplayId());            if (auto pShadeAI = static_cast<npc_spirit_shadeAI*>(pShade->AI()))                pShadeAI->m_lethonGuid = m_creature->GetObjectGuid();        }    }}
开发者ID:Maduse,项目名称:server,代码行数:24,


示例22: GetPosition

void D_PAD::Flip( const wxPoint& aCentre ){    int y = GetPosition().y - aCentre.y;    y = -y;         // invert about x axis.    y += aCentre.y;    SetY( y );    m_Pos0.y = -m_Pos0.y;    m_Offset.y = -m_Offset.y;    m_DeltaSize.y = -m_DeltaSize.y;    SetOrientation( -GetOrientation() );    // flip pads layers    // PADS items are currently on all copper layers, or    // currently, only on Front or Back layers.    // So the copper layers count is not taken in account    SetLayerSet( FlipLayerMask( m_layerMask ) );    // m_boundingRadius = -1;  the shape has not been changed}
开发者ID:chgans,项目名称:kicad,代码行数:24,


示例23: OrientationToDegrees

float OrientationToDegrees(int orientation){	switch (GetOrientation())	{        case ORIENTATION_DONT_CARE:            return 0;            	case ORIENTATION_PORTRAIT:		return 0;		break;	case ORIENTATION_PORTRAIT_UPSIDE_DOWN:		return 180;	case ORIENTATION_LANDSCAPE_RIGHT:		return 90;	case ORIENTATION_LANDSCAPE_LEFT:		return -90;		break;	}	assert(0);	return 0;}
开发者ID:yohanip,项目名称:proton_sdk_source,代码行数:24,


示例24: mimimum_slider_length

const sf::FloatRect Scrollbar::GetSliderRect() const {	float mimimum_slider_length( Context::Get().GetEngine().GetProperty<float>( "SliderMinimumLength", shared_from_this() ) );	Adjustment::Ptr adjustment( GetAdjustment() );	auto value_range = std::max( adjustment->GetUpper() - adjustment->GetLower() - adjustment->GetPageSize(), .0f );	auto pages = std::max( ( adjustment->GetPageSize() > .0f ) ? ( ( adjustment->GetUpper() - adjustment->GetLower() ) / adjustment->GetPageSize() ) : 1.f, 1.f );	if( GetOrientation() == Orientation::HORIZONTAL ) {		auto stepper_length = GetAllocation().height;		auto trough_length = GetAllocation().width - 2.f * stepper_length;		auto slider_length = std::max( mimimum_slider_length, trough_length / pages );		auto slider_x = stepper_length;		auto slider_y = 0.f;		if( value_range > .0f ) {			slider_x = stepper_length + ( trough_length - slider_length ) * ( adjustment->GetValue() - adjustment->GetLower() ) / value_range;		}		return sf::FloatRect( slider_x, slider_y, slider_length, GetAllocation().height );	}	auto stepper_length = GetAllocation().width;	auto trough_length = GetAllocation().height - 2.f * stepper_length;	auto slider_length = std::max( mimimum_slider_length, trough_length / pages );	auto slider_x = 0.f;	auto slider_y = stepper_length;	if( value_range > .0f ) {		slider_y = stepper_length + ( trough_length - slider_length ) * ( adjustment->GetValue() - adjustment->GetLower() ) / value_range;	}	return sf::FloatRect( slider_x, slider_y, GetAllocation().width, slider_length );}
开发者ID:Cruel,项目名称:SFGUI,代码行数:36,


示例25: GetRightDirection

vec3 MayaCamera::GetRightDirection(){	return Quaternion::Rotate(GetOrientation(), vec3::XAxis());}
开发者ID:JacobHensley,项目名称:GLEW-Graphics,代码行数:4,


示例26: GetForwardDirection

vec3 MayaCamera::GetForwardDirection(){	return Quaternion::Rotate(GetOrientation(), -vec3::ZAxis());}
开发者ID:JacobHensley,项目名称:GLEW-Graphics,代码行数:4,


示例27: GetLowGUID

void Corpse::SaveToDB(){    //save corpse to DB    std::stringstream ss;    ss << "DELETE FROM corpses WHERE guid = " << GetLowGUID();    CharacterDatabase.Execute(ss.str().c_str());    ss.rdbuf()->str("");    ss << "INSERT INTO corpses (guid, positionX, positionY, positionZ, orientation, zoneId, mapId, data, instanceId) VALUES ("        << GetLowGUID() << ", '" << GetPositionX() << "', '" << GetPositionY() << "', '" << GetPositionZ() << "', '" << GetOrientation() << "', '" << GetZoneId() << "', '" << GetMapId() << "', '";    for (uint16 i = 0; i < m_valuesCount; i++)        ss << GetUInt32Value(i) << " ";    ss << "', " << GetInstanceID() << " )";    CharacterDatabase.Execute(ss.str().c_str());}
开发者ID:AscEmu,项目名称:AscEmu_TBC,代码行数:18,



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


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