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

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

51自学网 2021-06-03 09:36:57
  C++
这篇教程C++ vector3df函数代码示例写得很实用,希望能帮到您。

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

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

示例1: windowSize

void IrrWidget::createIrrlichtDevice(){    dimension2d<u32> windowSize(this->geometry().width(), this->geometry().height());    SIrrlichtCreationParameters createParams;    createParams.WindowId = (void*)this->winId();    createParams.WindowSize = windowSize;    createParams.DriverType = EDT_OPENGL;    createParams.Stencilbuffer = true;    createParams.Vsync = false;    m_pDevice = createDeviceEx(createParams);    if(m_pDevice == NULL){        qDebug() << "failed to create irrlicht device";    }    m_pDevice->setResizable(true);    m_pScene = m_pDevice->getSceneManager();    m_pDriver = m_pDevice->getVideoDriver();    m_pGuiEnv = m_pDevice->getGUIEnvironment();    m_pBufferList = m_pGuiEnv->addListBox(core::rect<int>(5,5,200, 400), 0, true, true);        //gui::IGUITab* optTab = tabctrl->addTab(L"Demo");        //gui::IGUITab* aboutTab = tabctrl->addTab(L"About");        // add list box        //gui::IGUIListBox* box = m_pGuiEnv->addListBox(core::rect<int>(10,10,220,120), optTab, 1);        m_pBufferList->addItem(L"OpenGL 1.5");        m_pBufferList->addItem(L"Direct3D 8.1");        m_pBufferList->addItem(L"Direct3D 9.0c");        m_pBufferList->addItem(L"Burning's Video 0.47");        m_pBufferList->addItem(L"Irrlicht Software Renderer 1.0");        m_pBufferList->setSelected(true);    scene::IAnimatedMesh* mesh = m_pScene->getMesh("./media/sydney.md2");    if(mesh == NULL){        return;    }    scene::IAnimatedMeshSceneNode* node = m_pScene->addAnimatedMeshSceneNode(mesh);    if(node !=NULL){        node->setMaterialFlag(EMF_LIGHTING, false);        node->setMD2Animation(scene::EMAT_STAND);        node->setMaterialTexture(0, m_pDriver->getTexture("./media/sydney.bmp"));    }    m_pScene->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));    //m_pDevice->setEventReceiver(new IrrEventReciever());}
开发者ID:tecan,项目名称:IrrlichtDemos,代码行数:46,


示例2: AxesSceneNode

 ISceneNode* IrrFactory::addAxes() {     AxesSceneNode* scene = new AxesSceneNode(mIrr.getSceneManager()->getRootSceneNode(), mIrr.getSceneManager(), -1);     Assert(scene);     scene->setAxesScale(10);     scene->setScale(vector3df(5,5,5));     return scene; }
开发者ID:DavidDeAngelo,项目名称:opennero,代码行数:8,


示例3: trackop

TrackPartMesh::TrackPartMesh(TrackOperator*_trackop)		:	trackop(_trackop)	{	segs.clear();	seglen=1.0;	track=trackop->track;	ijkcenter=vector3df(0.0,0.0,0.0);	}
开发者ID:RollerSimmer,项目名称:DreamCoasterRider,代码行数:8,


示例4: getWindDir

core::vector3df getWindDir(){    const float time = irr_driver->getDevice()->getTimer()->getTime() / 1000.0f;    GrassShaderProvider *gsp = (GrassShaderProvider *)irr_driver->getCallback(ES_GRASS);    float m_speed = gsp->getSpeed();    return m_speed * vector3df(1., 0., 0.) * cos(time);}
开发者ID:ChristophHaag,项目名称:stk-code,代码行数:8,


示例5: vector3df

 void Entity::createLight(E_LIGHT_TYPE typ, f32 r, f32 g, f32 b, f32 a) {   type = LIGHT_TYPE;   lightNode = Scene->addLightSceneNode(0, vector3df(0,0,0), SColorf(r,g,b,a), 100.0f);   lightNode->setLightType(typ);   lightNode->enableCastShadow();   rx=ry=rz=0;   isVisible = true; }
开发者ID:paulkiernan,项目名称:hack-the-gibson,代码行数:9,


示例6: vector3df

/*----------------------------------------------------------------------------*/Smodel* OcclusionCulling::createSmodel(u16 id, vector3df pos, u16 angle, u16 upvector){ Smodel* x = new Smodel;         x->pos = vector3df(pos);         x->angle = angle;         x->upvector = upvector;         x->id = id; return x;}
开发者ID:tecan,项目名称:IrrlichtDemos,代码行数:10,


示例7: CommandDestroyBlock

CommandDestroyBlock  :: CommandDestroyBlock(CharacterInstance* owner, vector3di setBlock, int setHotBarSlot)	: CharacterCommand(owner, DESTROY_BLOCK){	hotBarSlot = setHotBarSlot;	block = setBlock;	debugObject = IRR->sceneMgr->addCubeSceneNode(1.02f, 0, -1, vector3df(block.X + 0.5f, block.Y + 0.5f, block.Z + 0.5f));	debugObject->setMaterialFlag(EMF_WIREFRAME, true);	state = inactive;}
开发者ID:JustinWang123,项目名称:Wasteland,代码行数:9,


示例8: vector3df

void Player::setPlayerBreath(){    for (int i = 0; i < 3; i++) {        b_left[i]->setPosition( vector3df( bpl[i].X * facingDirection + (facingDirection == -1 ? -10 : 0), bpl[i].Y, 0 ) );        if (judo.energy + 0.5 < i + 1)            b_left[i]->setVisible(false);        else            b_left[i]->setVisible(true);    }    for (int i = 0; i < 3; i++) {        b_right[i]->setPosition( vector3df( bpr[i].X * facingDirection + (facingDirection == -1 ? 10 : 0) ,bpr[i].Y, 0 ) );        if (judo.energy < i + 1)            b_right[i]->setVisible(false);        else            b_right[i]->setVisible(true);    }}
开发者ID:blaketrahan,项目名称:King,代码行数:18,


示例9: AddEarth

ISceneNode* AddEarth(){	ISceneNode *earth = smgr->addSphereSceneNode(4.0f, 32, 0, -1, vector3df(0, 0, 0), vector3df(0, 0, 0), vector3df(1.0, 1.0, 1.0));	SSRotationAnimator *animEarthRot = new SSRotationAnimator(vector3df(0, 5.0f / 1.0f, 0), &koeffSpeed, &IsActiveRotating);	SSFlyEllipceAnimator *animEarth = new SSFlyEllipceAnimator(sun->getPosition(), 0, 7.25f, 29.0f, &koeffSpeed, 300.0f, 280.0f, &koeffOfDist, &IsActiveMoving);	if (earth)	{		earth->setMaterialFlag(EMF_LIGHTING, false);		earth->setMaterialTexture(0, driver->getTexture(std::string(TexturesPath + "Earth/Earth.png").c_str()));		earth->addAnimator(animEarth);		earth->addAnimator(animEarthRot);		earth->setRotation(vector3df(0.0f, 23.0f, 23.0f));	}	Planets.push_back(earth);	return earth;}
开发者ID:flexoid,项目名称:SolarSystem,代码行数:18,


示例10: AddUranus

ISceneNode* AddUranus(){	ISceneNode *uranus = smgr->addSphereSceneNode(15.4f, 32, 0, -1, vector3df(0, 0, 0), vector3df(0, 0, 0), vector3df(1.0, 1.0, 1.0));	SSRotationAnimator *animUranusRot = new SSRotationAnimator(vector3df(0, 5.0f / 0.45f, 0), &koeffSpeed, &IsActiveRotating);	SSFlyEllipceAnimator *animUranus = new SSFlyEllipceAnimator(sun->getPosition(), 0, 6.48f, 6.8f, &koeffSpeed, 1400.0f, 1200.0f, &koeffOfDist, &IsActiveMoving);	if (uranus)	{		uranus->setMaterialFlag(EMF_LIGHTING, false);		uranus->setMaterialTexture(0, driver->getTexture(std::string(TexturesPath + "Uranus/Uranus.jpg").c_str()));		uranus->addAnimator(animUranus);		uranus->addAnimator(animUranusRot);		uranus->setRotation(vector3df(0.0f, 82.0f, 82.0f));	}	Planets.push_back(uranus);	return uranus;}
开发者ID:flexoid,项目名称:SolarSystem,代码行数:18,


示例11: AddNeptune

ISceneNode* AddNeptune(){	ISceneNode *neptune = smgr->addSphereSceneNode(16.0f, 32, 0, -1, vector3df(0, 0, 0), vector3df(0, 0, 0), vector3df(1.0, 1.0, 1.0));	SSRotationAnimator *animNeptuneRot = new SSRotationAnimator(vector3df(0, 5.0f / 0.63f, 0), &koeffSpeed, &IsActiveRotating);	SSFlyEllipceAnimator *animNeptune = new SSFlyEllipceAnimator(sun->getPosition(), 0, 6.4f, 5.4f, &koeffSpeed, 1800.0f, 1750.0f, &koeffOfDist, &IsActiveMoving);	if (neptune)	{		neptune->setMaterialFlag(EMF_LIGHTING, false);		neptune->setMaterialTexture(0, driver->getTexture(std::string(TexturesPath + "Neptune/Neptune.jpg").c_str()));		neptune->addAnimator(animNeptune);		neptune->addAnimator(animNeptuneRot);		neptune->setRotation(vector3df(0.0f, 29.0f, 29.0f));	}	Planets.push_back(neptune);	return neptune;}
开发者ID:flexoid,项目名称:SolarSystem,代码行数:18,


示例12: AddMars

ISceneNode* AddMars(){	ISceneNode *mars = smgr->addSphereSceneNode(2.0f, 32, 0, -1, vector3df(0, 0, 0), vector3df(0, 0, 0), vector3df(1.0, 1.0, 1.0));	SSRotationAnimator *animMarsRot = new SSRotationAnimator(vector3df(0, 5.0f / 1.0f, 0), &koeffSpeed, &IsActiveRotating);	SSFlyEllipceAnimator *animMars = new SSFlyEllipceAnimator(sun->getPosition(), 0, 5.65f, 24.1f, &koeffSpeed, 491.0f, 420.0f, &koeffOfDist, &IsActiveMoving);	if (mars)	{		mars->setMaterialFlag(EMF_LIGHTING, false);		mars->setMaterialTexture(0, driver->getTexture(std::string(TexturesPath + "Mars/Mars.jpg").c_str()));		mars->addAnimator(animMars);		mars->addAnimator(animMarsRot);		mars->setRotation(vector3df(0.0f, 25.0f, 25.0f));	}	Planets.push_back(mars);	return mars;}
开发者ID:flexoid,项目名称:SolarSystem,代码行数:18,


示例13: PxVec3

	void CSPhysXObject_Character::addForce(vector3df dir, float force)	{//		if (!m_Controller) return;//		if (!m_Controller->getActor()) return;		dir.normalize();		PxVec3 disp = PxVec3(dir.X, dir.Y, dir.Z) * force;		m_TotalForce += vector3df(disp.x, disp.y, disp.z);	}
开发者ID:SevenGameMaker,项目名称:CobbleStones,代码行数:9,


示例14: example_helloworld

int example_helloworld(){    // create device    IrrlichtDevice *device = startup();    if (device == 0) return 1; // could not create selected driver.    IVideoDriver* driver = device->getVideoDriver();    ISceneManager* smgr = device->getSceneManager();    IGUIEnvironment* guienv = device->getGUIEnvironment();    IAnimatedMesh* mesh = smgr->getMesh("media/sydney.md2");    if (!mesh) {        device->drop();        return 1;    }    IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(mesh);    /*     To let the mesh look a little bit nicer, we change its material. We     disable lighting because we do not have a dynamic light in here, and     the mesh would be totally black otherwise. Then we set the frame loop,     such that the predefined STAND animation is used. And last, we apply a     texture to the mesh. Without it the mesh would be drawn using only a     color.     */    if (node) {        node->setMaterialFlag(EMF_LIGHTING, false);        node->setMD2Animation(scene::EMAT_STAND);        node->setMaterialTexture(0, driver->getTexture("media/sydney.bmp"));    }    /*     To look at the mesh, we place a camera into 3d space at the position     (0, 30, -40). The camera looks from there to (0,5,0), which is     approximately the place where our md2 model is.     */    smgr->addCameraSceneNode(0, vector3df(0, 30, -40), vector3df(0, 5, 0));    EventReceiver_basic receiver(device);    device->setEventReceiver(&receiver);    return run(device);}
开发者ID:osom8979,项目名称:example,代码行数:44,


示例15: Building

Quarry::Quarry(int tileX, int tileY, int player, Scene* scene) : Building(tileX, tileY, player, scene){	Game* game = &Game::getInstance();	model = game->sceneManager->getMesh("res/buildingQuarry.3ds");	if (player == 0) {		texture = game->videoDriver->getTexture("res/buildingQuarry.png");	} else { 		texture = game->videoDriver->getTexture("res/buildingQuarryEnemy.png");	}	sizeX = 1;	sizeY = 1;	createModel();	node->setScale(vector3df(1.f, 1.f, 1.f));	node->setRotation(vector3df(0,0,0));	hp = 4;	defense = 2;}
开发者ID:MegaR,项目名称:ARiseofWar,代码行数:19,


示例16: infile

void game::getFieldsList() {	ifstream infile("../assets/fields.txt");	float x, y, z;		while(infile >> x >> y >> z) {		fields->push_back(vector3df(x, y, z));	}}
开发者ID:justia02,项目名称:PSI-team-3,代码行数:10,


示例17: camSetPosTar

void camSetPosTar(ICameraSceneNode *camera, vector3df position,		vector3df target, vector3df up=vector3df(0, 1, 0)){	camera->setPosition(position);	camera->updateAbsolutePosition();	camera->setTarget(target + position);	camera->updateAbsolutePosition();	camera->setUpVector(up);	camera->updateAbsolutePosition();}
开发者ID:asl97,项目名称:NodeBoxEditor,代码行数:10,


示例18: GetDesktopWindow

game::game(void){	//create the device	//and get desktop width and height	RECT desktop;	const HWND hDesktop = GetDesktopWindow();	GetWindowRect(hDesktop, &desktop);	//assign the width and height	horizontal = desktop.right;	vertical = desktop.bottom;	device = createDevice(video::EDT_OPENGL, dimension2d<u32>(horizontal, vertical), 16, false, false, false, 0);	device->setWindowCaption(L"PSI TEAM 3");	device->setResizable(false);	// initialize driver, scenemanager and gui environment	driver = device->getVideoDriver();	smgr = device->getSceneManager();	guienv = device->getGUIEnvironment();	playerCamera = new PlayerCamera(device);	IGUISkin* skin = guienv->getSkin();	IGUIFont* font = guienv->getFont("../media/fonts/candara14.bmp");	skin->setFont(font);	// initialize networkUtilities (all networking stuff is handled in in this class)	networkUtilities = new NonRealtimeNetworkingUtilities();	// initialize gameStateDTO	gameState = new GameStateDTO(16);	// initialize players	localPlayer = new Player(device);	opposingPlayer = new Player(device);	fields = new std::vector<vector3df>();	smgr->addCameraSceneNode(0, vector3df(0,8,-8), vector3df(0,0,0));}
开发者ID:justia02,项目名称:PSI-team-3,代码行数:42,


示例19: vector3df

// ----------------------------------------------------------------------------void Editor::initAfterDataDirKnown(){    m_rcs = RoadCrossSectionWndw::get();    // fonts    IGUISkin* skin = m_gui_env->getSkin();    m_font = m_gui_env->getFont(m_data_loc + L"editor/font/font.xml");    skin->setFont(m_font);    // removing gui transparency    for (s32 i = 0; i < EGDC_COUNT; ++i)    {        video::SColor col = skin->getColor((EGUI_DEFAULT_COLOR)i);        col.setAlpha(255);        skin->setColor((EGUI_DEFAULT_COLOR)i, col);    }    // free camera    ICameraSceneNode* cam;    cam = m_scene_manager->addCameraSceneNodeMaya();    cam->setID(1);    cam->setFarValue(20000.f);    cam->setTarget(vector3df(0, 0, 0));    cam->setInputReceiverEnabled(false);    // viewport init    ICameraSceneNode* norm_cam;    norm_cam = m_scene_manager->addCameraSceneNode(0, vector3df(25, 50, 30),        vector3df(5, 10, 6));    norm_cam->setID(2);    m_viewport = Viewport::get(norm_cam, &m_mouse, &m_keys);    m_viewport->setFreeCamera(cam);    m_indicator = m_viewport->getIndicator();    m_scene_manager->setActiveCamera(norm_cam);    m_msg_wndw = MsgWndw::get();    m_toolbar = ToolBar::getToolBar();    m_new_dialog_wndw = NewDialogWndw::get();    m_new_dialog_wndw->hide();    m_welcome_screen = WelcomeScreen::get();} // initAfterDataDirKnown
开发者ID:CruzR,项目名称:stk-editor,代码行数:43,


示例20: GPUParticle

RainNode::RainNode(scene::ISceneManager* mgr, ITexture *tex)    : GPUParticle(0, mgr, tex){	RenderProgram = LoadProgram(file_manager->getAsset("shaders/rain.vert").c_str(), file_manager->getAsset("shaders/rain.frag").c_str());	loc_screenw = glGetUniformLocation(RenderProgram, "screenw");	loc_screen = glGetUniformLocation(RenderProgram, "screen");	loc_invproj = glGetUniformLocation(RenderProgram, "invproj");	texloc_tex = glGetUniformLocation(RenderProgram, "tex");	texloc_normal_and_depths = glGetUniformLocation(RenderProgram, "normals_and_depth");	const char *varyings[] = { "currentPosition" };	SimulationProgram = LoadTFBProgram(file_manager->getAsset("shaders/rainsim.vert").c_str(), varyings, 1);	loc_campos = glGetUniformLocation(SimulationProgram, "campos");	loc_viewm = glGetUniformLocation(SimulationProgram, "viewm");	loc_time = glGetUniformLocation(SimulationProgram, "time");	count = 2500;	area = 3500;	u32 i;	float x, y, z, vertices[7500];	for (i = 0; i < count; i++)	{		x = ((rand() % area) - area / 2) / 100.0f;		y = ((rand() % 2400)) / 100.0f;		z = ((rand() % area) - area / 2) / 100.0f;		vertices[3 * i] = x;		vertices[3 * i + 1] = y;		vertices[3 * i + 2] = z;	}		texture = getTextureGLuint(tex);	normal_and_depth = getTextureGLuint(irr_driver->getRTT(RTT_NORMAL_AND_DEPTH));	glGenBuffers(2, tfb_vertex_buffer);	glBindBuffer(GL_ARRAY_BUFFER, tfb_vertex_buffer[0]);	glBufferData(GL_ARRAY_BUFFER, 3 * count * sizeof(float), vertices, GL_STREAM_DRAW);	glBindBuffer(GL_ARRAY_BUFFER, tfb_vertex_buffer[1]);	glBufferData(GL_ARRAY_BUFFER, 3 * count * sizeof(float), 0, GL_STREAM_DRAW);	box.addInternalPoint(vector3df((float)(-area / 2)));	box.addInternalPoint(vector3df((float)(area / 2)));}
开发者ID:toams,项目名称:stk-code,代码行数:42,


示例21: load_player

void load_player() {	IAnimatedMesh* mesh = smgr->getMesh("resources/nodes/models/ninja.b3d");	//IAnimatedMeshSceneNode* myNode = smgr->addAnimatedMeshSceneNode(mesh);	player.setNode(smgr->addAnimatedMeshSceneNode(mesh));	player.setAnimation(IDLE_2);	player.getNode()->setPosition(vector3df(-50, 20, -60));	player.getNode()->setMaterialTexture( 0, driver->getTexture("resources/textures/models/nskinrd.jpg"));	player.getNode()->setScale(vector3df(5,5,5));	player.getNode()->setRotation(vector3df(0,-90,0));	player.getNode()->addShadowVolumeSceneNode();	player.getNode()->setMaterialFlag(EMF_NORMALIZE_NORMALS, true);}
开发者ID:asxetos,项目名称:TheGame,代码行数:20,


示例22: SColor

void Game::addArrow(const vector3df& position, const vector3df& rotation){	string<char> str = "arrow" + arrow->size();	IAnimatedMesh *a = smgr->addArrowMesh(str.c_str(), SColor(255,255,255,255), SColor(255,255,255,255));	IAnimatedMeshSceneNode *arrow_sn = smgr->addAnimatedMeshSceneNode(a);	arrow_sn->setPosition(position);	arrow_sn->setScale(vector3df(150,150,0));	arrow_sn->setRotation(rotation);	arrow_sn->setMaterialType(EMT_SOLID);	arrow->push_back(arrow_sn);}
开发者ID:NinZine,项目名称:Not-So-Super-Off-Road,代码行数:11,


示例23: vector3df

void Car::initModels(ISceneManager * smgr) {    this->carMeshClean = smgr->getMesh("res/carC.obj");    this->carMeshDamaged = smgr->getMesh("res/carD.obj");    this->carNode = smgr->addAnimatedMeshSceneNode(                        this->carMeshClean,                        0,                        -1,                        vector3df(0,1,0)                    );//	this->carNode->setRotation(vector3df(0,180,0));    this->wheelMesh = smgr->getMesh("res/wheel.obj");    float wheelPosY = -0.2235f;//	float wheelPosY = -0.4f;    this->wheels[0] = smgr->addAnimatedMeshSceneNode(                          this->wheelMesh,                          this->carNode,                          -1,                          vector3df(0.3065f, wheelPosY, 0.619f)                      );    this->wheels[1] = smgr->addAnimatedMeshSceneNode(                          this->wheelMesh,                          this->carNode,                          -1,                          vector3df(-0.3065f, wheelPosY, 0.619f)                      );    this->wheels[2] = smgr->addAnimatedMeshSceneNode(                          this->wheelMesh,                          this->carNode,                          -1,                          vector3df(0.3065f, wheelPosY, -0.55f)                      );    this->wheels[3] = smgr->addAnimatedMeshSceneNode(                          this->wheelMesh,                          this->carNode,                          -1,                          vector3df(-0.3065f, wheelPosY, -0.55f)                      );}
开发者ID:Alexei-Kornienko,项目名称:Racing-Game,代码行数:41,


示例24: vector3df

ISceneNode* ArrowPrototypeFactory::getArrowPrototype(unsigned char type,		float offset) {	ISceneNode* newArrow = prototypes[type]->clone(parent, smgr);	newArrow->setVisible(true);	//if (offest != 0.0) {	newArrow->setPosition(			vector3df(newArrow->getPosition().X, ARROW_HEIGHT - offset,					newArrow->getPosition().Z));	//	printf ("offset is %f. /n", offset);	//}	return newArrow;}
开发者ID:pinbob,项目名称:Dancy,代码行数:12,


示例25: switch

bool Application::OnEvent(const SEvent &TEvent) {	static int ph = 0; 		if(TEvent.EventType == EET_KEY_INPUT_EVENT && !TEvent.KeyInput.PressedDown) {		switch(TEvent.KeyInput.Key) {			case KEY_ESCAPE:				Done = true;			break;			case KEY_KEY_Q: 				paused = ~paused; 				break; 			case KEY_KEY_T:				mRCThrottle += 10;				break;			case KEY_KEY_G:				mRCThrottle -= 10;				break;			case KEY_LEFT:				mRCRoll -= 10;				break;			case KEY_RIGHT:				mRCRoll += 10; 				break;			case KEY_UP:				ph+=1; 				mRCPitch += 10;				break;			case KEY_DOWN:				ph-=1; 				mRCPitch -= 10;				break; 			case KEY_KEY_F:				mRCYaw -= 1;				break; 			case KEY_KEY_H:				mRCYaw += 1;				break; 			case KEY_KEY_1:				CreateBox(btVector3(GetRandInt(10) - 5.0f, 7.0f, GetRandInt(10) - 5.0f), vector3df(GetRandInt(3) + 0.5f, GetRandInt(3) + 0.5f, GetRandInt(3) + 0.5f), 500.0f);			break;			case KEY_KEY_X:				CreateStartScene();			break;			default:				return false;			break;		}				return true;	}	return false;}
开发者ID:mkschreder,项目名称:bettercopter,代码行数:53,


示例26: IrrAddGravityParticleAffector

/* ----------------------------------------------------------------------------Add an affector to the particle system to alter their position with gravity*/IParticleGravityAffector* DLL_EXPORT IrrAddGravityParticleAffector(		IParticleSystemSceneNode* ps,		float x,		float y,		float z,		unsigned int timeForceLost ){	IParticleGravityAffector* paf = ps->createGravityAffector(vector3df(x,y,z), timeForceLost);	ps->addAffector(paf);	paf->drop();	return paf;}
开发者ID:brainjay,项目名称:au3irrlicht2,代码行数:15,


示例27: load_map

void load_map() {	IAnimatedMesh* mesh = smgr->getMesh("resources/nodes/maps/room.3ds");	smgr->getMeshManipulator()->makePlanarTextureMapping(mesh->getMesh(0), 0.008f);	ISceneNode* node = 0;	node = smgr->addAnimatedMeshSceneNode(mesh);	node->setMaterialTexture(0,	driver->getTexture("resources/textures/maps/wall.jpg"));	node->getMaterial(0).SpecularColor.set(0,0,0,0);	mesh = smgr->addHillPlaneMesh("myHill",			dimension2d<f32>(20,20),			dimension2d<u32>(40,40),			0,			0,			dimension2d<f32>(0,0),			dimension2d<f32>(10,10)		);	node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f);	node->setPosition(vector3df(0,7,0));	node->setMaterialTexture(0,	driver->getTexture("resources/textures/maps/stones.jpg"));	node->setMaterialTexture(1,	driver->getTexture("resources/textures/maps/water.jpg"));	node->setMaterialType(video::EMT_REFLECTION_2_LAYER);	// create light	node = smgr->addLightSceneNode(0, vector3df(0,0,0), SColorf(1.0f, 0.6f, 0.7f, 1.0f), 600.0f);	ISceneNodeAnimator* anim = 0;	anim = smgr->createFlyCircleAnimator (vector3df(0,150,0),250.0f);	node->addAnimator(anim);	anim->drop();	// attach billboard to light	node = smgr->addBillboardSceneNode(node, dimension2d<f32>(50, 50));	node->setMaterialFlag(EMF_LIGHTING, false);	node->setMaterialType(EMT_TRANSPARENT_ADD_COLOR);	node->setMaterialTexture(0,	driver->getTexture("resources/textures/particles/particlewhite.bmp"));}
开发者ID:asxetos,项目名称:TheGame,代码行数:40,


示例28: setControlSchemeEnable

CFPSController::CFPSController(IrrlichtDevice *device, irrBulletWorld *world, IAnimatedMesh *mesh){    setControlSchemeEnable(true);    setType(E_ENTITY_FPSCONTROLLER);    cameraOffset = vector3df(0,0,0);    nodeOffset = vector3df(0,0,0);    isMoving = false;    isActive = false;    Device = device;    World = world;    Smgr = Device->getSceneManager();    Video = Device->getVideoDriver();    Physics = Smgr->addCubeSceneNode();    Physics->setScale(vector3df(5,7,5));    // Physics->setPosition(vector3df(715,700,500));    Physics->setMaterialFlag(EMF_LIGHTING, false);    Node = Smgr->addAnimatedMeshSceneNode(mesh);    Smgr->getActiveCamera()->setPosition(vector3df(715,2100,500));    Node->setPosition(vector3df(715,5000,500));    //  Node->setPosition(vector3df(715,700,500));    Physics->setPosition(vector3df(715,5000,500));    Node->setMaterialFlag(EMF_LIGHTING, false);    Shape = new IBoxShape(Physics, 30.0f, false);    Body = World->addRigidBody(Shape);}
开发者ID:Ragora,项目名称:irrEngine,代码行数:30,



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


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