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

C++ IS_CLASS函数代码示例

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

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



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

示例1: semBTake

STATUS semBTake(SEM_ID semId, int timeout)
{
	int level;
	int status;

	/* TODO ISR no be allowed */

again:
	level = intLock();

	if(!IS_CLASS(semId, semClassId))
	{
		intUnlock(level);
		return (ERROR);
	}

	if(NULL == semId->semOwner)
	{
		semId->semOwner = (RAIN_TCB*)taskIdCurrent;
		intUnlock(level);

		return (OK);
	}

	/* semId have been take by other task */
	kernelState = TRUE;
	intUnlock(level);

	if(OK != kernelPendQPut(&semId->qHead, timeout))
	{
		kernelExit();

		return (ERROR);
	}

	/* test for interrupt in kernelState=TRUE of semGive */
	/*{
		int j = 1000000;
		while(j >= 0)
		{
			j--;
		}
	}*/
	
	if(RESTART == (status = kernelExit()))
	{
		goto again;
	}

	return (status);
}
开发者ID:anders007,项目名称:vxworks-like-kernel,代码行数:51,代码来源:semBLib.c


示例2: do_touchofgod

void do_touchofgod(CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char arg[MAX_INPUT_LENGTH];
    int dam;

    argument = one_argument( argument, arg );
    dam = number_range(100,200);

    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_JUSTICE] < 4)
    {
        send_to_char("You cannot channel the will of God yet.\n\r",ch);
        return;
    }
    if ((victim = get_char_room(ch, arg)) == NULL)
    {
        send_to_char("They are not here.\n\r", ch);
        return;
    }
    if (IS_NPC(victim))
    {
        send_to_char("Not on mobiles.\n\r",ch);
        return;
    }
    if (is_safe(ch,victim)) return;
    if (victim == ch)
    {
        send_to_char("That doesn't seem like a good idea.\n\r",ch);
        return;
    }
    WAIT_STATE(ch, 18);
    hurt_person(ch, victim, dam);
    act("You grab $N by the forehead and channel God's justice into $S body.",ch,NULL,victim,TO_CHAR);
    act("$n grabs you by your forehead and sends a prayer to God, DAMN THAT HURT.",ch,NULL,victim,TO_VICT);
    act("$n grabs $N by the forehead and sends a prayer to God.",ch,NULL,victim,TO_NOTVICT);
    if (number_range(1,3) == 1)
    {
        if (victim->position == POS_FIGHTING) stop_fighting(victim,TRUE);
        act("$N screams in pain and drops to the ground as God's justice wrecks $S body.",ch,NULL,victim,TO_CHAR);
        act("AARGH!!! The pain is to much, you drop to the ground.",ch,NULL,victim,TO_VICT);
        act("$N screams in agony and falls to the ground.",ch,NULL,victim,TO_NOTVICT);
        victim->position = POS_STUNNED;
    }
    return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:51,代码来源:angel.c


示例3: do_lloth

void do_lloth( CHAR_DATA *ch, char *argument )
{
  char buf[MAX_STRING_LENGTH];
  CHAR_DATA *gch;
  
  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_DROW) && !IS_CLASS(ch, CLASS_DROID) )
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  send_to_char("#p          -*-  The Church of Lloth  -*-#n\n\r",ch);
  send_to_char("#7[#pName                #7] [#p  Hp   #7] [#p Mana  #7] [#p Move  #7] [#p Gen  #7 ]#n\n\r",ch);
  for ( gch = char_list; gch != NULL; gch = gch->next)
  {
    if (IS_NPC(gch)) continue;
    if (!IS_CLASS(gch, CLASS_DROW) && !IS_CLASS(gch, CLASS_DROID)) continue;
    sprintf( buf,"#7[%-20s] [%-7d] [%-7d] [%-7d] [%-7d]#n\n\r",
    capitalize( gch->name ), gch->hit, gch->mana, gch->move, gch->generation);
    send_to_char( buf, ch );
  }
  return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:23,代码来源:drow.c


示例4: do_gfavor

void do_gfavor( CHAR_DATA *ch, char *argument )
{
    char buf [MAX_STRING_LENGTH];

    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_LOVE] < 2)
    {
        send_to_char("God does not love you enough to grant his divine favor.\n\r",ch);
        return;
    }
    if (ch->alignment != 1000) ch->alignment = 1000;
    if (IS_SET(ch->newbits, NEW_CUBEFORM))
    {
        REMOVE_BIT(ch->newbits, NEW_CUBEFORM);
        REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
        act( "$n turns into a human.",ch,NULL,NULL,TO_ROOM);
        send_to_char("You turn into your normal form.\n\r",ch);
        ch->damroll -=400;
        ch->hitroll -=400;
        free_string(ch->morph);
        ch->morph=str_dup("");
        return;
    }
    if (ch->move < 2000 || ch->mana < 2000)
    {
        send_to_char("You need 2000 mana and 2000 move to make yourself a true angel.\n\r",ch);
        return;
    }
    else
    {
        act( "$n transforms into an angel.",ch,NULL,NULL,TO_ROOM);
        send_to_char("God is with you, your now one of his divine.\n\r",ch);
        SET_BIT(ch->newbits, NEW_CUBEFORM);
        SET_BIT(ch->affected_by, AFF_POLYMORPH);
        sprintf(buf,"%s the angel",ch->name);
        free_string(ch->morph);
        ch->morph = str_dup(buf);
        ch->move -= 2000;
        ch->mana -= 2000;
        ch->damroll +=400;
        ch->hitroll +=400;
        return;
    }
    return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:50,代码来源:angel.c


示例5: do_skyforge

void do_skyforge( CHAR_DATA *ch, char *argument )
{
    OBJ_INDEX_DATA *pObjIndex;
    OBJ_DATA *obj;
    int vnum = 0;



    if (IS_NPC(ch)) return;

   	if(!IS_IMMORTAL(ch))
	{
    if (!IS_CLASS(ch, CLASS_SKYBLADE))
    {
        send_to_char("What?\n\r",ch);
        return;
    }
	}

    if (ch->pcdata->powers[SKYBLADE_MAGIC] < 1)
    {
    		send_to_char("You haven't mastered enough of the magic ability yet.\n\r",ch);
         return;
    }
    if ( ch->practice < 250 )
    {
        send_to_char("You don't have the 250 primal needed.\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[SKYBLADE_MAGIC] == 1) vnum = 33178;
    if (ch->pcdata->powers[SKYBLADE_MAGIC] >= 2) vnum = 33179;
    if ( vnum == 0 || (pObjIndex = get_obj_index( vnum )) == NULL)
    {
    send_to_char("Missing object, please inform a God .\n\r",ch);
    return;
    }

    if( !IS_IMMORTAL(ch) )
	{
		ch->practice -= 250;
	}
    obj = create_object(pObjIndex, 50);
    SET_BIT(obj->spectype, SITEM_SKYBLADE);
    obj->questowner = str_dup(ch->pcdata->switchname);
    obj->ownerid = ch->pcdata->playerid;
    obj_to_char(obj, ch);
    act("$p falls from the heavens and lands before you.",ch,obj,NULL,TO_CHAR);
    act("$p falls from the heavens and lands before $n.",ch,obj,NULL,TO_ROOM);
    return;
}
开发者ID:smthbh,项目名称:Mindcloud-2.5-MUD,代码行数:50,代码来源:skyblade.c


示例6: do_entropy

void do_entropy (CHAR_DATA *ch, char *argument)
{
    char arg[MAX_INPUT_LENGTH];
    ROOM_INDEX_DATA *location;
    CHAR_DATA *victim;

    one_argument (argument, arg);
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_WIZARD))
    {
        send_to_char("Huh?\n\r", ch );
        return;
    }
    if ((victim = get_char_world(ch, arg)) == NULL)
    {
        send_to_char("Teleport to whom?\n\r", ch );
        return;
    }
    if (IS_SET(victim->in_room->room_flags, ROOM_ASTRAL))
    {
        stc( "You can't find it's room.\n\r",ch);
        return;
    }
    if (IS_IMMUNE(victim, IMM_TRAVEL) && !IS_NPC(victim))
    {
        send_to_char("I don't think they want you to do that.\n\r",ch);
        return;
    }
    if (IS_SET(ch->in_room->room_flags, ROOM_ASTRAL))
    {
        stc( "Your room is not connected to the astral plane.\n\r",ch);
        return;
    }
    location = victim->in_room;
    if (ch->mana < 250)
    {
        send_to_char("You don't have the mana to cast teleport.\n\r", ch );
        return;
    }
    act("You utter a single powerword.", ch, NULL, NULL, TO_CHAR);
    act("$n utters a strange sounding word and disappers.", ch, NULL, NULL, TO_ROOM);
    ch->mana -= 250;
    char_from_room(ch);
    char_to_room(ch, location);
    do_look(ch, "auto");
    act("You materialize.", ch, NULL, NULL, TO_CHAR);
    act("$n suddenly appear from out of nowhere.", ch, NULL, NULL, TO_ROOM);
    return;
}
开发者ID:pfchrono,项目名称:Anotherland_Mud,代码行数:49,代码来源:wizard.c


示例7: do_kanzuite

void do_kanzuite( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;

    if (!IS_CLASS(ch, CLASS_NINJA) )
    {
        send_to_char("Huh?\n\r", ch);
        return;
    }

    if (IS_CLASS(ch, CLASS_NINJA) && ch->pcdata->powers[NPOWER_SORA] < 5 )
    {
        send_to_char("You have not learned the Sora principle to 5.\n\r", ch);
        return;
    }

    else if (ch->move < 500)
    {
        send_to_char("You don't have 500 move to increase your awareness.\n\r", ch);
        return;
    }

    if ( IS_SET(ch->act, PLR_HOLYLIGHT) )
    {
        REMOVE_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char( "You're senses return to normal.\n\r", ch );
    }
    else
    {
        SET_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char( "You're senses increase into incredible proportions.\n\r", ch );
        ch->move -= 500;
    }

    return;
}
开发者ID:pfchrono,项目名称:Anotherland_Mud,代码行数:36,代码来源:ninja.c


示例8: semFlushDefer

STATUS semFlushDefer(SEM_ID semId)
{
    if(!IS_CLASS(semId, semClassId))
    {
        return (ERROR);
    }

    if(NULL == semFlushTbl[semId->semType & SEM_TYPE_MASK])
    {
        return (ERROR);
    }

    workQAdd1 (semFlushDeferTbl [semId->semType], (int) semId);

    return (OK);
}
开发者ID:chennqqi,项目名称:vxworks-like-kernel,代码行数:16,代码来源:semLib.c


示例9: do_sinsofthepast

void do_sinsofthepast( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char arg[MAX_INPUT_LENGTH];

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_JUSTICE] < 3)
    {
        send_to_char("Your not ready to punish the sinners.\n\r",ch);
        return;
    }
    if ((victim = get_char_room(ch, arg)) == NULL)
    {
        send_to_char("They are not here.\n\r", ch);
        return;
    }
    /*  if (IS_NPC(victim))
      {
        send_to_char("Not on mobiles.\n\r",ch);
        return;
      }*/
    if (is_safe(ch,victim)) return;
    if (victim == ch)
    {
        send_to_char("That doesn't seem like a good idea.\n\r",ch);
        return;
    }
    send_to_char("#RYou burn them with the fires of hell!#n\n\r",ch);
    if (!IS_AFFECTED(victim, AFF_FLAMING)) SET_BIT(victim->affected_by, AFF_FLAMING);
    send_to_char("#LTheir body is wrecked by poison!#n\n\r",ch);
    if (!IS_AFFECTED(victim, AFF_POISON)) SET_BIT(victim->affected_by, AFF_POISON);
    send_to_char("#CGod's fury upon them for they have truly sinned!!!#n\n\r",ch);
    one_hit(ch,victim, gsn_wrathofgod,1);
    one_hit(ch,victim, gsn_wrathofgod,1);
    one_hit(ch,victim, gsn_wrathofgod,1);
    one_hit(ch,victim, gsn_wrathofgod,1);
    WAIT_STATE(ch,12);
    return;
}
开发者ID:pfchrono,项目名称:Anotherland_Mud,代码行数:46,代码来源:angel.c


示例10: do_enrage

void do_enrage(CHAR_DATA *ch, char *argument)
{
    char arg[MAX_INPUT_LENGTH];
    CHAR_DATA *victim;

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_TANARRI))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (!IS_SET(ch->pcdata->powers[TANARRI_POWER], TANARRI_ENRAGE))
    {
        send_to_char("you don't have that power yet.\n\r",ch);
        return;
    }

    if ((victim = get_char_room(ch, NULL, arg)) == NULL)
    {
        send_to_char("They are not here.\n\r", ch);
        return;
    }
    if (victim == ch)
    {
        send_to_char("Your unable to enrage yourself.\n\r", ch);
        return;
    }
    if (IS_NPC(victim) || victim->level < 3)
    {
        send_to_char("Not on them\n\r",ch);
        return;
    }
    do_say(ch, "Kara, Kara, Xenos!");
    if (number_percent() > 40)
    {
        SET_BIT(victim->pcdata->tempflag, TEMP_AGGRESSIVE);
        do_berserk2(victim,"");
        REMOVE_BIT(victim->pcdata->tempflag, TEMP_AGGRESSIVE);
    }
    else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim);
    WAIT_STATE(ch,18);
    return;
}
开发者ID:smthbh,项目名称:Mindcloud-2.5-MUD,代码行数:45,代码来源:tanarri.c


示例11: do_focus

void do_focus(CHAR_DATA *ch, char *argument)
{
  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_SAMURAI))
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  if (ch->pcdata->powers[SAMURAI_FOCUS] < 10)
  {
    send_to_char("You cannot focus your weaponcontrol any more.\n\r",ch);
    return;
  }
  ch->pcdata->powers[SAMURAI_FOCUS] -= number_range(1, ch->pcdata->powers[SAMURAI_FOCUS]);
  send_to_char("You focus your control, letting the battle slow to a halt.\n\r",ch);
  WAIT_STATE(ch, 8);
  return;
}
开发者ID:smthbh,项目名称:Mindcloud-2.5-MUD,代码行数:18,代码来源:samurai.c


示例12: msgQReceive

int msgQReceive(FAST MSG_Q_ID msgQId, char* buffer, UINT maxNBytes, int timeout)
{
	FAST MSG_NODE* pMsg;
	FAST int bytesReturned;

	/* TODO int restrict */

	if((int)maxNBytes < 0)
	{
		return (ERROR);
	}

	TASK_LOCK();
restart:
	if(!IS_CLASS(msgQId, msgQClassId))
	{
		TASK_UNLOCK();
		return (ERROR);
	}

	pMsg = (MSG_NODE*)qJobGet(msgQId, &msgQId->msgQ, timeout);

	if(pMsg == (MSG_NODE*)NONE)
	{
		/* timeout recalc */
		goto restart;
	}

	if(pMsg == NULL)
	{
		msgQId->recvTimeouts++;
		TASK_UNLOCK();
		return (ERROR);
	}

	bytesReturned = MIN(pMsg->msgLength, maxNBytes);
	memcpy(buffer, MSG_NODE_DATA(pMsg), bytesReturned);

	qJobPut(msgQId, &msgQId->freeQ, &pMsg->node, Q_JOB_PRI_DONT_CARE);

	TASK_UNLOCK();

	return (bytesReturned);
}
开发者ID:anders007,项目名称:vxworks-like-kernel,代码行数:44,代码来源:msgQLib.c


示例13: do_wyrmroar

void do_wyrmroar(CHAR_DATA *ch, char *argument)
{
  CHAR_DATA *victim;
  char arg[MAX_INPUT_LENGTH];
  one_argument (argument, arg);

  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_SKYBLADE))
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  if (ch->pcdata->powers[SKYBLADE_SKILLS] < 9)
  {
    send_to_char("You have not mastered the skills ability enough yet.\n\r",ch);
    return;
  }
  if (!TIME_UP(ch, TIMER_WYRM_ROAR))
  {
    send_to_char("Your throat is still sore from the last time.\n\r",ch);
    return;
  }
  if (( victim = get_char_room(ch, NULL, arg)) == NULL)
  {
    if (ch->fighting == NULL)
    {
    send_to_char("Yes release the roar of the wyrm, but at who?\n\r",ch);
    return;
    }
    else victim = ch->fighting;
  }
  if (victim == ch)
  {
    send_to_char("Quit that stupid ass.\n\r",ch);
    return;
  }
  if (is_safe(ch, victim)) return;
  SET_TIMER(ch, TIMER_WYRM_ROAR, 6);
  WAIT_STATE(victim, 18);
  act("$n roars with the power of the wyrm, stunning you in place.",ch,NULL,victim,TO_VICT);
  act("$n roars with the power of the wyrm, stunning $N in place.", ch, NULL, victim, TO_NOTVICT);
  act("You roar with the power of the wyrm, stunning $N in place.", ch, NULL, victim, TO_CHAR);
  return;
}
开发者ID:smthbh,项目名称:Mindcloud-2.5-MUD,代码行数:44,代码来源:skyblade.c


示例14: do_enmity

void do_enmity(CHAR_DATA *ch, char *argument)
{
  char arg1[MAX_INPUT_LENGTH];
  char arg2[MAX_INPUT_LENGTH];
  CHAR_DATA *victim1;
  CHAR_DATA *victim2;

  argument = one_argument( argument, arg1 );
  argument = one_argument( argument, arg2 );

  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_TANARRI))
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  if (!IS_SET(ch->pcdata->powers[TANARRI_POWER], TANARRI_EMNITY))
  {
    send_to_char("you don't have that power yet.\n\r",ch);
    return;
  }
  if ((victim1 = get_char_room(ch, arg1)) == NULL)
  {
    send_to_char("They are not here.\n\r", ch);
    return;
  }
  if ((victim2 = get_char_room(ch, arg2)) == NULL)
  {
    send_to_char("They are not here.\n\r", ch);
    return;
  }
  if (IS_NPC(victim1) || IS_NPC(victim2))
  {
    send_to_char("Not on NPC's\n\r",ch);
    return;
  }
  do_say(ch,"Xenus, Morkain, Hau!");
  if (number_percent() > 60) do_kill(victim1, victim2->pcdata->switchname);
  else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim1);
  if (number_percent() > 60) do_kill(victim2, victim1->pcdata->switchname);
  else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim2);
  WAIT_STATE(ch,24);
  return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:44,代码来源:tanarri.c


示例15: do_fightdance

void do_fightdance(CHAR_DATA *ch, char *argument)
{
	if (IS_NPC(ch)) return;

	if (!IS_CLASS(ch, CLASS_DROW) || !IS_SET(ch->pcdata->powers[1], DPOWER_FIGHTDANCE))
	{send_to_char("Huh?\n\r", ch );
	return;}

	if (IS_SET(ch->newbits, NEW_FIGHTDANCE)) {
	send_to_char("You will no longer dance The Dance of Lloth.\n\r", ch );
	REMOVE_BIT(ch->newbits, NEW_FIGHTDANCE);
	}
	else {
	send_to_char("You will start dancing The Dance of Lloth while fighting.\n\r", ch );
	SET_BIT(ch->newbits, NEW_FIGHTDANCE);
	}

	return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:19,代码来源:drow.c


示例16: do_booming

void do_booming(CHAR_DATA *ch, char *argument)
{
  CHAR_DATA *victim;
  char arg[MAX_INPUT_LENGTH];

  argument = one_argument( argument, arg );

  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_TANARRI))
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  if (!IS_SET(ch->pcdata->powers[TANARRI_POWER], TANARRI_BOOMING))
  {
    send_to_char("You don't have that power yet.\n\r",ch);
    return;
  }
  if ((victim = get_char_room(ch, arg)) == NULL)
  {
    send_to_char("They are not here.\n\r", ch);
    return;
  }
  if (IS_NPC(victim)) one_hit(ch,victim, gsn_booming, 1);
  else
  {
    if (victim == ch)
    {
      send_to_char("That doesn't seem like a good idea.\n\r",ch);
      return;
    }
    one_hit(ch,victim, gsn_booming, 1);
    if (victim->position == POS_FIGHTING && number_range(1,4)==2)
    {
      send_to_char("Your booming voice stuns your opponent.\n\r",ch);
      send_to_char("The pain is to much, and you drop to the ground.\n\r",victim);
      stop_fighting(victim,TRUE);
      victim->position = POS_STUNNED;
    }
  }
  WAIT_STATE(ch,12);
  return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:43,代码来源:tanarri.c


示例17: while

void KinectGrabber_Rawlog2::grab()
{
    static bool grabbed; grabbed=false;

    while(!grabbed)
    {
        //Read observations until we get a CObservation3DRangeScan
        mrpt::slam::CObservationPtr obs;
        do
        {
            try
            {
                *dataset >> obs;
            }
            catch (std::exception &e)
            {
                throw std::runtime_error( std::string("\nError reading from dataset file (EOF?):\n")+std::string(e.what()) );
            }
        } while (!IS_CLASS(obs,CObservation3DRangeScan));

        // We have one observation:
        currentObservationPtr = CObservation3DRangeScanPtr(obs);
        currentObservationPtr->load(); // *Important* This is needed to load the range image if stored as a separate file.

        if (currentObservationPtr->hasRangeImage &&
            currentObservationPtr->hasIntensityImage)
        {
            //Retain the point cloud of the current frame
            currentObservationPtr->project3DPointsFromDepthImageInto(*currentColouredPointCloudPtr, false /* without obs.sensorPose */);
            currentColouredPointCloudPtr->width=640*480;
            currentColouredPointCloudPtr->height=1;

            //Retain the RGB image of the current frame
            cv::Mat currentRGBImg_aux((IplImage *) currentObservationPtr->intensityImage.getAs<IplImage>());
            currentIntensityImage=currentRGBImg_aux;

            //Retain the timestamp of the current frame
            currentTimeStamp = currentObservationPtr->timestamp;

            grabbed=true;
        }
    }
}
开发者ID:EduFdez,项目名称:KinectSLAM6D,代码行数:43,代码来源:KinectGrabber_Rawlog2.cpp


示例18: do_drowhate

void do_drowhate(CHAR_DATA *ch, char *argument)
{
	if (IS_NPC(ch)) return;

	if (!IS_CLASS(ch, CLASS_DROW) || !IS_SET(ch->pcdata->powers[1], DPOWER_DROWHATE))
	{send_to_char("Huh?\n\r", ch );
	return;}

	if (IS_SET(ch->newbits, NEW_DROWHATE)) {
	send_to_char("You calm your hatred.\n\r", ch );
	REMOVE_BIT(ch->newbits, NEW_DROWHATE);
	}
	else {
	send_to_char("You invoke your hatred for others.\n\r", ch );
	SET_BIT(ch->newbits, NEW_DROWHATE);
	}

	return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:19,代码来源:drow.c


示例19: do_darktendrils

void do_darktendrils(CHAR_DATA *ch, char *argument)
{
	if (IS_NPC(ch)) return;

	if (!IS_CLASS(ch, CLASS_DROW) || !IS_SET(ch->pcdata->powers[1], DPOWER_DARKTENDRILS))
	{send_to_char("Huh?\n\r", ch );
	return;}

	if (IS_SET(ch->newbits, NEW_DARKTENDRILS)) {
	send_to_char("Your tendrils of darkness disappear.\n\r", ch );
	REMOVE_BIT(ch->newbits, NEW_DARKTENDRILS);
	}
	else {
	send_to_char("You call forth dark tendrils to attack your foes.\n\r", ch );
	SET_BIT(ch->newbits, NEW_DARKTENDRILS);
	}

	return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:19,代码来源:drow.c


示例20: do_magics

/* syntax : magics
 * shows all class powers in effect
 */
void do_magics (CHAR_DATA *ch, char *argument)
{
  if (IS_NPC(ch)) return;
  if (!IS_CLASS(ch, CLASS_MAGE))
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }
  if (IS_ITEMAFF(ch, ITEMA_MAGESHIELD))
    send_to_char("* Your skin is covered in a layer of mystical energies.\n\r",ch);
  if (IS_ITEMAFF(ch, ITEMA_BEAST))
    send_to_char("* Your inner beast is in control of your actions.\n\r",ch);
  if (IS_ITEMAFF(ch, ITEMA_STEELSHIELD))
    send_to_char("* Your skin is solid steel.\n\r",ch);
  if (IS_ITEMAFF(ch, ITEMA_DEFLECTOR))
    send_to_char("* A shield hovers in the air, defending you.\n\r",ch);
  if (IS_ITEMAFF(ch, ITEMA_ILLUSIONS))
    send_to_char("* Several images of you stand by your side.\n\r",ch);
  return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:23,代码来源:mage.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ IS_CONCRETE函数代码示例发布时间:2022-05-30
下一篇:
C++ IS_CAN_STDID函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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