本文整理汇总了C++中GetCurrentNode函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCurrentNode函数的具体用法?C++ GetCurrentNode怎么用?C++ GetCurrentNode使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCurrentNode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddPct
void FlightPathMovementGenerator::DoReset(Player* owner)
{
if (!owner)
return;
if (!owner->isAlive())
return;
float playerFlightSpeed = 32.0f;
// Add percentage from SPELL_AURA_MOD_TAXI_FLIGHT_SPEED.
Unit::AuraEffectList const& mIncreaseTaxiFlightSpeed = owner->GetAuraEffectsByType(SPELL_AURA_MOD_TAXI_FLIGHT_SPEED);
for (Unit::AuraEffectList::const_iterator i = mIncreaseTaxiFlightSpeed.begin(); i != mIncreaseTaxiFlightSpeed.end(); ++i)
AddPct(playerFlightSpeed, (*i)->GetAmount());
owner->getHostileRefManager().setOnlineOfflineState(false);
owner->AddUnitState(UNIT_STATE_IN_FLIGHT);
owner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(*owner);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice((*i_path)[i].x, (*i_path)[i].y, (*i_path)[i].z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetSmooth();
init.SetWalk(true);
init.SetVelocity(playerFlightSpeed);
init.Launch();
}
示例2: GetPath
void FlightPathMovementGenerator::ResendPathToOtherPlayers(Player& player)
{
TaxiPathNodeList path = GetPath();
uint32 pathEndPoint = GetPathAtMapEnd();
uint32 traveltime = uint32(PLAYER_FLIGHT_SPEED * (path.GetTotalLength(GetCurrentNode(),pathEndPoint)
- player.GetDistance(path[GetCurrentNode()].x, path[GetCurrentNode()].y, path[GetCurrentNode()].z)));
player.SendMonsterMoveByPath(path,
GetCurrentNode(),
pathEndPoint,
SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING),
traveltime,
true );
}
示例3: traveller
void FlightPathMovementGenerator::Reset(Player & player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_TAXI_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false);
TaxiPathNodeList path = GetPath();
uint32 pathEndPoint = GetPathAtMapEnd();
uint32 traveltime = uint32(PLAYER_FLIGHT_SPEED * path.GetTotalLength(GetCurrentNode(),pathEndPoint));
player.SendMonsterMoveByPath(path,GetCurrentNode(),pathEndPoint, SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING), traveltime );
}
示例4: init
void FlightPathMovementGenerator::_Reset(Player & player)
{
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice((*i_path)[i].x,(*i_path)[i].y,(*i_path)[i].z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
示例5: IECopyImage
/*
* IECopyImage - copy the current clipping rectangle to the clipboard
*
* 1) Copy the bitmap to the clipboard (so other apps can use it).
* 2) Make a copy of the XOR bitmap and the AND bitmaps so that if
* screen colors are involved, they will be preserved.
* Later, we check the owner of the clipboard to see if we really
* want to use the XOR/AND bitmaps or not.
*/
void IECopyImage( void )
{
short width;
short height;
img_node *node;
node = GetCurrentNode();
if( node == NULL ) {
return;
}
if( !fEnableCutCopy ) {
_wpi_setwrectvalues( &clipRect.rect, 0, 0, node->width, node->height );
width = node->width;
height = node->height;
} else {
width = _wpi_getwidthrect( clipRect.rect );
height = _wpi_getheightrect( clipRect.rect );
}
copyImageToClipboard( width, height, node );
if( !fEnableCutCopy ) {
PrintHintTextByID( WIE_ENTIREIMAGECOPIED, NULL );
} else {
PrintHintTextByID( WIE_AREACOPIED, NULL );
RedrawPrevClip( node->hwnd );
fEnableCutCopy = FALSE;
}
} /* IECopyImage */
示例6: NS_ASSERTION
void
nsFilteredContentIterator::Prev()
{
if (mIsOutOfRange || !mCurrentIterator) {
NS_ASSERTION(mCurrentIterator, "Missing iterator!");
return;
}
// If we are switching directions then
// we need to switch how we process the nodes
if (mDirection != eBackward) {
nsresult rv = SwitchDirections(false);
if (NS_FAILED(rv)) {
return;
}
}
mCurrentIterator->Prev();
if (mCurrentIterator->IsDone()) {
return;
}
// If we can't get the current node then
// don't check to see if we can skip it
nsINode *currentNode = mCurrentIterator->GetCurrentNode();
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(currentNode));
CheckAdvNode(node, mDidSkip, eBackward);
}
示例7: GetCurrentNode
void EdgeMenuDialogBase::PickPreviousSibling()
{
bool continueSearch = true;
BrowserNode * previousNode = 0;
BrowserNode * originalNode = GetCurrentNode();
int originalDepth = originalNode->depth();
BrowserNode * currentNode = originalNode;
while (continueSearch)
{
QLOG_INFO() << "CurrentNode is: " << currentNode->get_name();
previousNode = dynamic_cast<BrowserNode *>(currentNode->itemBelow());
QLOG_INFO() << "Nodename is: " << previousNode->get_name() << " " << previousNode->depth();
if (!previousNode)
break;
QLOG_INFO() << "Previous Node is: "<< previousNode->get_name();
int previousDepth = previousNode->depth();
bool sameType = originalNode->get_stype() == previousNode->get_stype();
QLOG_INFO() << "PREVIOUS: " << "Origin level : " << originalDepth;
QLOG_INFO() << "PREVIOUS: " << "Current level : " << previousDepth;
bool sameLevel = originalDepth == previousDepth;
if (sameLevel && sameType)
continueSearch = false;
currentNode = previousNode;
}
if (previousNode == 0)
return;
SaveData();
FillGuiElements(previousNode);
}
示例8: NS_ERROR
//------------------------------------------------------------
void
nsFilteredContentIterator::Last()
{
if (!mCurrentIterator) {
NS_ERROR("Missing iterator!");
return;
}
// If we are switching directions then
// we need to switch how we process the nodes
if (mDirection != eBackward) {
mCurrentIterator = mIterator;
mDirection = eBackward;
mIsOutOfRange = false;
}
mCurrentIterator->Last();
if (mCurrentIterator->IsDone()) {
return;
}
nsINode *currentNode = mCurrentIterator->GetCurrentNode();
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(currentNode));
bool didCross;
CheckAdvNode(node, didCross, eBackward);
}
示例9: init
void FlightPathMovementGenerator::Reset(Player & player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.AddUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice((*i_path)[i].x,(*i_path)[i].y,(*i_path)[i].z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(32.0f);
init.Launch();
}
示例10: init
void FlightPathMovementGenerator::DoReset(Player* player)
{
player->AddUnitState(UNIT_STATE_IN_FLIGHT);
player->CombatStopWithPets();
player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice(_path[i]->LocX, _path[i]->LocY, _path[i]->LocZ);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
示例11: init
void FlightPathMovementGenerator::DoReset(Player* player)
{
player->getHostileRefManager().setOnlineOfflineState(false);
player->AddUnitState(UNIT_STATE_IN_FLIGHT);
player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i < end; ++i)
{
G3D::Vector3 vertice(i_path[i]->x, i_path[i]->y, i_path[i]->z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
示例12:
nsINode *
nsFilteredContentIterator::GetCurrentNode()
{
if (mIsOutOfRange || !mCurrentIterator) {
return nsnull;
}
return mCurrentIterator->GetCurrentNode();
}
示例13: CutImage
/*
* CutImage - cuts the current clipping rectangle to the clipboard
*/
void CutImage( void )
{
WPI_PRES pres;
WPI_PRES mempres;
HDC memdc;
HBITMAP oldbitmap;
short width;
short height;
img_node *node;
WPI_RECTDIM left;
WPI_RECTDIM right;
WPI_RECTDIM top;
WPI_RECTDIM bottom;
node = GetCurrentNode();
if( node == NULL ) {
return;
}
if( !fEnableCutCopy ) {
_wpi_setwrectvalues( &clipRect.rect, 0, 0, node->width, node->height );
width = node->width;
height = node->height;
} else {
width = (short)_wpi_getwidthrect( clipRect.rect );
height = (short)_wpi_getheightrect( clipRect.rect );
}
copyImageToClipboard( width, height, node );
pres = _wpi_getpres( node->viewhwnd );
mempres = _wpi_createcompatiblepres( pres, Instance, &memdc );
_wpi_releasepres( node->viewhwnd, pres );
oldbitmap = _wpi_selectbitmap( mempres, node->hxorbitmap );
_wpi_getrectvalues( clipRect.rect, &left, &top, &right, &bottom );
_wpi_patblt( mempres, left, top, width, height, WHITENESS );
_wpi_getoldbitmap( mempres, oldbitmap );
oldbitmap = _wpi_selectbitmap( mempres, node->handbitmap );
_wpi_patblt( mempres, left, top, width, height, BLACKNESS );
_wpi_getoldbitmap( mempres, oldbitmap );
_wpi_deletecompatiblepres( mempres, memdc );
InvalidateRect( node->viewhwnd, NULL, FALSE );
RecordImage( node->hwnd );
if( !fEnableCutCopy ) {
PrintHintTextByID( WIE_ENTIREIMAGECUT, NULL );
} else {
PrintHintTextByID( WIE_AREACUT, NULL );
fEnableCutCopy = FALSE;
}
BlowupImage( node->hwnd, NULL );
} /* CutImage */
示例14: traveller
void FlightPathMovementGenerator::Reset(Player & player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_TAXI_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false);
player.SendMonsterMoveByPath(GetPath(),GetCurrentNode(),GetPathAtMapEnd(), SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING));
}
示例15: GetCurrentVolume
TGeoVolume* KVGeoNavigator::GetCurrentDetectorNameAndVolume(KVString& detector_name, Bool_t& multilayer)
{
// Returns the name of the current detector (if we are inside a detector)
// and whether it is a multilayer or simple detector.
// Returns 0x0 if we are not inside a detector volume.
//
// N.B. the returned volume corresponds to the *whole* detector (even if it has several layers).
// For a multilayer detector, GetCurrentVolume() returns the volume for the current layer.
//
// See ExtractDetectorNameFromPath(KVString&) for details on detector name formatting.
// Info("GetCurrentDetectorNameAndVolume","now i am in %s on node %s with path %s and matrix:",
// fCurrentVolume->GetName(),fCurrentNode->GetName(),fCurrentPath.Data());
// fCurrentMatrix.Print();
multilayer = kFALSE;
fCurrentDetectorNode = 0;
TString volNom = GetCurrentVolume()->GetName();
TGeoVolume* detector_volume = 0;
if (volNom.BeginsWith("DET_")) {
// simple detector
fCurrentDetectorNode = GetCurrentNode();
detector_volume = GetCurrentVolume();
} else {
// have we hit 1 layer of a multilayer detector?
TGeoVolume* mother_vol = GetCurrentNode()->GetMotherVolume();
if (mother_vol) {
TString mom = mother_vol->GetName();
if (mom.BeginsWith("DET_")) {
// it *is* a multilayer detector (youpi! :-)
if (fMotherNode) { // this is the node corresponding to the whole detector,
fCurrentDetectorNode = fMotherNode;
detector_volume = mother_vol;
multilayer = kTRUE;
}
}
}
}
if (detector_volume) ExtractDetectorNameFromPath(detector_name);
return detector_volume;
}