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

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

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

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

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

示例1: CreateScene

void FGLRenderer::DrawScene(int drawmode){	static int recursion=0;	if (camera != nullptr)	{		ActorRenderFlags savedflags = camera->renderflags;		if (drawmode != DM_PORTAL && !r_showviewer)		{			camera->renderflags |= RF_INVISIBLE;		}		CreateScene();		camera->renderflags = savedflags;	}	else	{		CreateScene();	}	GLRenderer->mClipPortal = NULL;	// this must be reset before any portal recursion takes place.	RenderScene(recursion);	// Handle all portals after rendering the opaque objects but before	// doing all translucent stuff	recursion++;	GLPortal::EndFrame();	recursion--;	RenderTranslucent();}
开发者ID:nashmuhandes,项目名称:GZDoom-GPL,代码行数:29,


示例2: Window3

GeometryShadersWindow::GeometryShadersWindow(Parameters& parameters)    :    Window3(parameters){    if (!SetEnvironment() || !CreateScene())    {        parameters.created = false;        return;    }    mEngine->SetClearColor({ 1.0f, 1.0f, 1.0f, 1.0f });    InitializeCamera();    mCamera->SetFrustum(60.0f, GetAspectRatio(), 0.1f, 100.0f);    Vector4<float> camPosition{ 2.8f, 0.0f, 0.0f, 1.0f };    Vector4<float> camDVector{ -1.0f, 0.0f, 0.0f, 0.0f };    Vector4<float> camUVector{ 0.0f, 0.0f, 1.0f, 0.0f };    Vector4<float> camRVector = Cross(camDVector, camUVector);    mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);#if defined(SAVE_RENDERING_TO_DISK)    mTarget = std::make_shared<DrawTarget>(1, DF_R8G8B8A8_UNORM, mXSize,        mYSize);    mTarget->GetRTTexture(0)->SetCopyType(Resource::COPY_STAGING_TO_CPU);#endif}
开发者ID:yimogod,项目名称:gt_learn,代码行数:26,


示例3: GetAspectRatio

//----------------------------------------------------------------------------bool IntersectConvexPolyhedra::OnInitialize (){    if (!WindowApplication3::OnInitialize())    {        return false;    }    // Set up the camera.    mCamera->SetFrustum(60.0f, GetAspectRatio(), 0.1f, 1000.0f);    APoint camPosition(16.0f, 0.0f, 0.0f);    AVector camDVector(-1.0f, 0.0f, 0.0f);    AVector camUVector(0.0f, 0.0f, 1.0f);    AVector camRVector = camDVector.Cross(camUVector);    mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);    CreateScene();    // Initial update of objects.    mScene->Update();    // Initial culling of scene.    mCuller.SetCamera(mCamera);    mCuller.ComputeVisibleSet(mScene);    InitializeCameraMotion(0.01f, 0.001f);    InitializeObjectMotion(mScene);    return true;}
开发者ID:rasslingcats,项目名称:calico,代码行数:29,


示例4: GetAspectRatio

//----------------------------------------------------------------------------bool BouncingSpheres::OnInitialize (){    if (!WindowApplication3::OnInitialize())    {        return false;    }    // Set up the camera.    mCamera->SetFrustum(60.0f, GetAspectRatio(), 1.0f, 1000.0f);    float angle = 0.02f*Mathf::PI;    float cs = Mathf::Cos(angle), sn = Mathf::Sin(angle);    APoint camPosition(27.5f, 8.0f, 8.9f);    AVector camDVector(-cs, 0.0f, -sn);    AVector camUVector(-sn, 0.0f, cs);    AVector camRVector = camDVector.Cross(camUVector);    mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);    CreateScene();    // Initial update of objects.    mScene->Update();    // Initialize balls with correct transformations.    PhysicsTick();    // Initial culling of scene.    mCuller.SetCamera(mCamera);    mCuller.ComputeVisibleSet(mScene);    return true;}
开发者ID:rasslingcats,项目名称:calico,代码行数:31,


示例5: main

int main (int argc, char *argv[]) {    try {        timer mainStartTime = gettimer();        global_window_title = window_title_string (argc, (const char**)argv);        argoptions opt = ParseCommandLine(argc, (const char**)argv);        if ( CreateScene(opt) != 0 )            return -1;        tachyon_video tachyon;        tachyon.threaded = true;        tachyon.init_console();        tachyon.title = global_window_title;        // always using window even if(!global_usegraphics)        global_usegraphics =             tachyon.init_window(global_xwinsize, global_ywinsize);        if(!tachyon.running)            return -1;        video = &tachyon;        tachyon.main_loop();        utility::report_elapsed_time(timertime(mainStartTime, gettimer()));        return 0;    } catch ( std::exception& e ) {        std::cerr<<"error occurred. error text is :/"" <<e.what()<<"/"/n";        return 1;    }}
开发者ID:ElaraFX,项目名称:tbb,代码行数:32,


示例6: WriteHelper

BOOL CSceneManager::OnCmdCreateSceneReq( UINT16 wCommandID, UINT64 u64ConnID, CBufferHelper *pBufferHelper ){	StSvrCreateSceneReq CreateSceneReq;	pBufferHelper->Read(CreateSceneReq);	StSvrCreateSceneAck CreateSceneAck;	CreateSceneAck.dwCreateParam = CreateSceneReq.CreateParam;	CreateSceneAck.dwSceneID = CreateSceneReq.dwSceneID;	CreateSceneAck.dwServerID= CGameService::GetInstancePtr()->GetServerID();	if (!CreateScene(CreateSceneReq.dwSceneID))	{		ASSERT_FAIELD;		CreateSceneAck.dwAckCode = E_FAILED;	}	else	{		CreateSceneAck.dwAckCode = E_SUCCESSED;	}		CBufferHelper WriteHelper(TRUE, &m_WriteBuffer);	WriteHelper.BeginWrite(CMD_SVR_CREATE_SCENE_ACK, 0, 0);	WriteHelper.Write(CreateSceneAck);	WriteHelper.EndWrite();	ServiceBase::GetInstancePtr()->SendCmdToConnection(u64ConnID, &m_WriteBuffer);	return TRUE;}
开发者ID:ylmbtm,项目名称:GameProject,代码行数:30,


示例7: GetAspectRatio

//----------------------------------------------------------------------------bool RoughPlaneSolidBox::OnInitialize (){    if (!WindowApplication3::OnInitialize())    {        return false;    }    // Set up the camera.    mCamera->SetFrustum(60.0f, GetAspectRatio(), 1.0f, 100.0f);    float angle = 0.1f*Mathf::PI;    float cs = Mathf::Cos(angle), sn = Mathf::Sin(angle);    APoint camPosition(17.695415f, 0.0f, 6.4494629f);    AVector camDVector(-cs, 0.0f, -sn);    AVector camUVector(-sn, 0.0f, cs);    AVector camRVector = camDVector.Cross(camUVector);    mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);    InitializeModule();    CreateScene();    // Initial update of objects.    mScene->Update();    // Initial culling of scene.    mCuller.SetCamera(mCamera);    mCuller.ComputeVisibleSet(mScene);    InitializeCameraMotion(0.001f, 0.001f);    InitializeObjectMotion(mScene);    return true;}
开发者ID:2asoft,项目名称:GeometricTools,代码行数:32,


示例8: Camera

//----------------------------------------------------------------------------bool ExtremalQuery::OnInitialize (){    if (!WindowApplication3::OnInitialize())    {        return false;    }    // Set up an orthogonal camera.  This projection type is used to make it    // clear that the displayed extreme points really are extreme!  (The    // perspective projection is deceptive.)    mCamera = new0 Camera(false);    mRenderer->SetCamera(mCamera);    mCamera->SetFrustum(1.0f, 1000.0f, -1.5f, 1.5f, -2.0, 2.0f);    APoint camPosition(4.0f, 0.0f, 0.0f);    AVector camDVector(-1.0f, 0.0f, 0.0f);    AVector camUVector(0.0f, 0.0f, 1.0f);    AVector camRVector = camDVector.Cross(camUVector);    mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);    // Set up the scene.    CreateScene();    // Initial update of objects.    mScene->Update();    // Initial culling of scene.    mCuller.SetCamera(mCamera);    mCuller.ComputeVisibleSet(mScene);    InitializeObjectMotion(mScene);    return true;}
开发者ID:rasslingcats,项目名称:calico,代码行数:33,


示例9: GetAspectRatio

//----------------------------------------------------------------------------bool NonuniformScale::OnInitialize (){    if (!WindowApplication3::OnInitialize())    {        return false;    }    // Set up the camera.    mCamera->SetFrustum(60.0f, GetAspectRatio(), 1.0f, 100.0f);    float cs = 0.866025f, sn = 0.5f;    APoint camPosition(0.0f, -4.0f, 2.0f);    AVector camDVector(0.0f, cs, -sn);    AVector camUVector(0.0f, sn, cs);    AVector camRVector = camDVector.Cross(camUVector);    mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);    CreateScene();    // Initial update of objects.    mScene->Update();    // Initial culling of scene.    mCuller.SetCamera(mCamera);    mCuller.ComputeVisibleSet(mScene);    InitializeCameraMotion(0.01f, 0.001f);    InitializeObjectMotion(mScene);    return true;}
开发者ID:rasslingcats,项目名称:calico,代码行数:30,


示例10: QGLWidget

ModelViewGadgetWidget::ModelViewGadgetWidget(QWidget *parent)    : QGLWidget(new GLC_Context(QGLFormat(QGL::SampleBuffers)), parent)    , m_Light()    , m_World()    , m_GlView()    , m_MoverController()    , m_ModelBoundingBox()    , m_MotionTimer()    , acFilename()    , bgFilename()    , vboEnable(false){    connect(&m_GlView, SIGNAL(updateOpenGL()), this, SLOT(updateGL()));    setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);    m_Light.setPosition(4000.0, 40000.0, 80000.0);    // m_GlView.setBackgroundColor(Qt::white);    m_Light.setAmbientColor(Qt::lightGray);    m_GlView.cameraHandle()->setDefaultUpVector(glc::Z_AXIS);    m_GlView.cameraHandle()->setRearView();    QColor repColor;    repColor.setRgbF(1.0, 0.11372, 0.11372, 0.0);    m_MoverController = GLC_Factory::instance()->createDefaultMoverController(repColor, &m_GlView);    CreateScene();    // Get required UAVObjects    ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();    UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();    attState = AttitudeActual::GetInstance(objManager);    connect(&m_MotionTimer, SIGNAL(timeout()), this, SLOT(updateAttitude()));}
开发者ID:EvalZero,项目名称:TauLabs,代码行数:34,


示例11: Window

//----------------------------------------------------------------------------PerformanceAMDWindow::PerformanceAMDWindow(Parameters& parameters)    :    Window(parameters),    mTextColor({ 0.0f, 0.0f, 0.0f, 1.0f }),    mPerformance(mEngine->GetDevice()){    if (!SetEnvironment())    {        parameters.created = false;        return;    }    CreateCamera();    CreateTextureGenerator();    CreateScene();    // Disable back-face culling.    mNoCullingState.reset(new RasterizerState());    mNoCullingState->cullMode = RasterizerState::CULL_NONE;    mEngine->SetRasterizerState(mNoCullingState);    mPerformance.SaveCounterInformation("AMD7970Counters.txt");    mPerformance.Register(Listener);    mPerformance.SetAllCounters();    UpdateCW();}
开发者ID:c0g,项目名称:FaceWarpApp,代码行数:28,


示例12: CreateScene

//----------------------------------------------------------------------------bool GelatinCube::OnInitialize (){    if (!WindowApplication3::OnInitialize())    {        return false;    }    CreateScene();    // Center-and-fit for camera viewing.    mScene->Update();    mTrnNode->LocalTransform.SetTranslate(-mScene->WorldBound.GetCenter());    mCamera->SetFrustum(60.0f, GetAspectRatio(), 0.1f, 100.0f);    AVector camDVector(0.0f, 1.0f, 0.0f);    AVector camUVector(0.0f, 0.0f, 1.0f);    AVector camRVector = camDVector.Cross(camUVector);    APoint camPosition = APoint::ORIGIN -        2.0f*mScene->WorldBound.GetRadius()*camDVector;    mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);    // Initial update of objects.    mScene->Update();    // Initial culling of scene.    mCuller.SetCamera(mCamera);    mCuller.ComputeVisibleSet(mScene);    // Sort the box faces based on current camera parameters.    mBox->SortFaces(mCamera->GetDVector());    InitializeCameraMotion(0.01f, 0.001f);    InitializeObjectMotion(mScene);    return true;}
开发者ID:vijaynerella,项目名称:GeometricTools,代码行数:35,


示例13: GetAspectRatio

//----------------------------------------------------------------------------bool Terrains::OnInitialize (){	if (!WindowApplication3::OnInitialize())	{		return false;	}	// Set up the camera.  Position the camera in the middle of page[0][0].	// Orient it to look diagonally across the terrain pages.	mCamera->SetFrustum(60.0f, GetAspectRatio(), 1.0f, 1500.0f);	APoint camPosition(64.0f, 64.0f, mHeightAboveTerrain);	AVector camDVector(Mathf::INV_SQRT_2, Mathf::INV_SQRT_2, 0.0f);	AVector camUVector(0.0f, 0.0f, 1.0f);	AVector camRVector = camDVector.Cross(camUVector);	mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);	CreateScene();	// Initial update of objects.	mScene->Update();	// Initial culling of scene.	mCuller.SetCamera(mCamera);	mCuller.ComputeVisibleSet(mScene);	InitializeCameraMotion(1.0f, 0.01f);	MoveForward();	return true;}
开发者ID:bhlzlx,项目名称:WildMagic,代码行数:30,


示例14: Window3

BSplineSurfaceFitterWindow::BSplineSurfaceFitterWindow(Parameters& parameters)    :    Window3(parameters){    if (!SetEnvironment())    {        parameters.created = false;        return;    }    mNoCullState = std::make_shared<RasterizerState>();    mNoCullState->cullMode = RasterizerState::CULL_NONE;    mNoCullWireState = std::make_shared<RasterizerState>();    mNoCullWireState->cullMode = RasterizerState::CULL_NONE;    mNoCullWireState->fillMode = RasterizerState::FILL_WIREFRAME;    mBlendState = std::make_shared<BlendState>();    mBlendState->target[0].enable = true;    mBlendState->target[0].srcColor = BlendState::BM_SRC_ALPHA;    mBlendState->target[0].dstColor = BlendState::BM_INV_SRC_ALPHA;    mBlendState->target[0].srcAlpha = BlendState::BM_SRC_ALPHA;    mBlendState->target[0].dstAlpha = BlendState::BM_INV_SRC_ALPHA;    mEngine->SetRasterizerState(mNoCullState);    mEngine->SetClearColor({ 0.0f, 0.5f, 0.75f, 1.0f });    CreateScene();    InitializeCamera();}
开发者ID:c0g,项目名称:FaceWarpApp,代码行数:30,


示例15: main

int main (int argc, char *argv[]) {    try {        if ( CreateScene() != 0 ) return -1;        tachyon_video tachyon;        tachyon.threaded = true;        tachyon.init_console();        global_usegraphics = tachyon.init_window(global_xwinsize, global_ywinsize);        if(!tachyon.running) return -1;        //TODO: add a demo loop.        video = &tachyon;        if (video)video->running = true;        memset(g_pImg, 0, sizeof(unsigned int) * global_xsize * global_ysize);        tachyon.main_loop();        video->running=false;        return NULL;    } catch ( std::exception& e ) {        std::cerr<<"error occurred. error text is :/"" <<e.what()<<"/"/n";        return 1;    }}
开发者ID:BigR-Lab,项目名称:CodeRes_Cpp,代码行数:25,


示例16: tempCLoc

//----------------------------------------------------------------------------bool DefaultShader::OnInitialize(){    if( !SEWindowApplication3::OnInitialize() )    {        return false;    }    m_spCamera->SetFrustum(-0.55f, 0.55f, -0.4125f, 0.4125f, 1.0f, 100.0f);    SEVector3f tempCLoc(0.0f, 0.0f, -10.0f);    SEVector3f tempCDir(0.0f, 0.0f, 1.0f);    SEVector3f tempCUp(0.0f, 1.0f, 0.0f);    SEVector3f tempCRight = tempCUp.Cross(tempCDir);    m_spCamera->SetFrame(tempCLoc, tempCRight, tempCUp, tempCDir);    CreateScene();    // initial update of objects    m_spScene->UpdateGS();    m_spScene->UpdateRS();    // initial culling of scene    m_Culler.SetCamera(m_spCamera);    m_Culler.ComputeUnculledSet(m_spScene);    InitializeCameraMotion(0.01f, 0.001f);    InitializeObjectMotion(m_spScene);    return true;}
开发者ID:jazzboysc,项目名称:SwingEngine1,代码行数:29,


示例17: QGLWidget

ModelViewGadgetWidget::ModelViewGadgetWidget(QWidget *parent)    : QGLWidget(new GLC_Context(QGLFormat(QGL::SampleBuffers)), parent)    , m_Light()    , m_World()    , m_GlView(this)    , m_MoverController()    , m_ModelBoundingBox()    , m_MotionTimer()    , acFilename()    , bgFilename()    , vboEnable(false){    setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);    CreateScene();    QColor repColor;    repColor.setRgbF(1.0, 0.11372, 0.11372, 0.0);    m_MoverController = GLC_Factory::instance()->createDefaultMoverController(repColor, &m_GlView);    // Get required UAVObjects    ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();    UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();    attActual = AttitudeActual::GetInstance(objManager);    connect(&m_MotionTimer, SIGNAL(timeout()), this, SLOT(updateAttitude()));}
开发者ID:MorS25,项目名称:OpenPilot,代码行数:26,


示例18: GetBestSampleCount

void VkRenderBuffers::BeginFrame(int width, int height, int sceneWidth, int sceneHeight){	VkSampleCountFlagBits samples = GetBestSampleCount();	if (width != mWidth || height != mHeight || mSamples != samples)	{		auto fb = GetVulkanFrameBuffer();		fb->GetRenderPassManager()->RenderBuffersReset();		fb->GetPostprocess()->RenderBuffersReset();	}	if (width != mWidth || height != mHeight)		CreatePipeline(width, height);	if (width != mWidth || height != mHeight || mSamples != samples)		CreateScene(width, height, samples);	CreateShadowmap();	mWidth = width;	mHeight = height;	mSamples = samples;	mSceneWidth = sceneWidth;	mSceneHeight = sceneHeight;}
开发者ID:coelckers,项目名称:gzdoom,代码行数:25,


示例19: CreateScene

//----------------------------------------------------------------------------bool Rope::OnInitialize (){    if ( !Application::OnInitialize() )        return false;    CreateScene();    // center-and-fit for camera viewing    m_spkScene->UpdateGS(0.0f);    Bound kWBound = m_spkScene->WorldBound();    m_spkTrnNode->Translate() = -kWBound.Center();    ms_spkCamera->SetFrustum(1.0f,100.0f,-0.55f,0.55f,0.4125f,-0.4125f);    Vector3f kCLeft(1.0f,0.0f,0.0f);    Vector3f kCUp(0.0f,0.0f,1.0f);    Vector3f kCDir(0.0f,-1.0f,0.0f);    Vector3f kCLoc = -3.0f*kWBound.Radius()*kCDir - 0.5f*kCUp;    ms_spkCamera->SetFrame(kCLoc,kCLeft,kCUp,kCDir);    // initial update of objects    ms_spkCamera->Update();    m_spkScene->UpdateGS(0.0f);    m_spkScene->UpdateRS();    // camera turret and tumble mode    m_spkMotionObject = m_spkScene;    m_fTrnSpeed = 0.01f;    m_fRotSpeed = 0.01f;    m_bTurretActive = true;    SetTurretAxes();    return true;}
开发者ID:Hengplank,项目名称:kucgbowling,代码行数:33,


示例20: _tmain

int _tmain(int argc, _TCHAR* argv[]){    osgDB::FilePathList filepath;    char* ptr = getenv( "SIGMAOSG_DATA_PATH" );    if ( ptr )    {        osgDB::convertStringPathIntoFilePathList( ptr, filepath );        osgDB::appendPlatformSpecificResourceFilePaths(filepath);        osgDB::setDataFilePathList(filepath);    }    // construct the viewer    osg::ref_ptr<osgViewer::Viewer> rViewer = new osgViewer::Viewer;    rViewer->setThreadingModel( osgViewer::ViewerBase::SingleThreaded );    rViewer->setUpViewInWindow( 32, 32, 800, 600 );    osg::Group* pScene = CreateScene( rViewer );    rViewer->setSceneData( pScene );    // execute main loop    return rViewer->run();}
开发者ID:chengMeyi,项目名称:sigmaosg,代码行数:25,


示例21: CreateScene

//----------------------------------------------------------------------------bool WaterDropFormation::OnInitialize (){	if (!WindowApplication3::OnInitialize())	{		return false;	}	CreateScene();	// Center-and-fit for camera viewing.	mScene->Update();	mTrnNode->LocalTransform.SetTranslate(-mScene->WorldBound.GetCenter());	mCamera->SetFrustum(60.0f, GetAspectRatio(), 0.1f, 1000.0f);	float angle = 0.01f*Mathf::PI;	float cs = Mathf::Cos(angle), sn = Mathf::Sin(angle);	AVector camDVector(-cs, 0.0f, -sn);	AVector camUVector(sn, 0.0f, -cs);	AVector camRVector = camDVector.Cross(camUVector);	APoint camPosition = APoint::ORIGIN -	                     0.9f*mScene->WorldBound.GetRadius()*camDVector;	mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);	// Initial update of objects.	mScene->Update();	// Initial culling of scene.	mCuller.SetCamera(mCamera);	mCuller.ComputeVisibleSet(mScene);	InitializeCameraMotion(0.01f, 0.001f);	InitializeObjectMotion(mScene);	mLastSeconds = (float)GetTimeInSeconds();	return true;}
开发者ID:dodong471520,项目名称:WildMagic,代码行数:36,


示例22: Window3

Delaunay3DWindow::Delaunay3DWindow(Parameters& parameters)    :    Window3(parameters),    mLightGray({ 0.75f, 0.75f, 0.75f, 1.0f }){    if (!SetEnvironment() || !CreateScene())    {        parameters.created = false;        return;    }    InitializeCamera();    mNoCullState = std::make_shared<RasterizerState>();    mNoCullState->cullMode = RasterizerState::CULL_NONE;    mNoCullWireState = std::make_shared<RasterizerState>();    mNoCullWireState->cullMode = RasterizerState::CULL_NONE;    mNoCullWireState->fillMode = RasterizerState::FILL_WIREFRAME;    mBlendState = std::make_shared<BlendState>();    mBlendState->target[0].enable = true;    mBlendState->target[0].srcColor = BlendState::BM_SRC_ALPHA;    mBlendState->target[0].dstColor = BlendState::BM_INV_SRC_ALPHA;    mBlendState->target[0].srcAlpha = BlendState::BM_SRC_ALPHA;    mBlendState->target[0].dstAlpha = BlendState::BM_INV_SRC_ALPHA;}
开发者ID:c0g,项目名称:FaceWarpApp,代码行数:27,


示例23: CreateScene

//----------------------------------------------------------------------------bool SphereMaps::OnInitialize (){    if (!WindowApplication3::OnInitialize())    {        return false;    }    CreateScene();    // Center-and-fit for camera viewing.    mScene->Update();    mTrnNode->LocalTransform.SetTranslate(-mScene->WorldBound.GetCenter());    mCamera->SetFrustum(60.0f, GetAspectRatio(), 1.0f, 1000.0f);    AVector camDVector(0.0f, 1.0f, 0.0f);    AVector camUVector(0.0f, 0.0f, 1.0f);    AVector camRVector = camDVector.Cross(camUVector);    APoint camPosition = APoint::ORIGIN -        3.0f*mScene->WorldBound.GetRadius()*camDVector;    mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);    // Initial update of objects.    mScene->Update();    CopyNormalToTCoord1(mScene);    // Initial culling of scene.    mCuller.SetCamera(mCamera);    mCuller.ComputeVisibleSet(mScene);    InitializeCameraMotion(0.001f, 0.001f);    InitializeObjectMotion(mScene);    return true;}
开发者ID:2asoft,项目名称:GeometricTools,代码行数:33,


示例24: CreateScene

//----------------------------------------------------------------------------bool ScreenPolygons::OnInitialize (){	if (!WindowApplication3::OnInitialize())	{		return false;	}	CreateScene();	// Set up the camera.	mCamera->SetFrustum(60.0f, GetAspectRatio(), 1.0f, 1000.0f);	APoint camPosition(80.0f, 0.0f, 23.0f);	AVector camDVector(-1.0f, 0.0f, 0.0f);	AVector camUVector(0.0f, 0.0f, 1.0f);	AVector camRVector = camDVector.Cross(camUVector);	mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);	// Initial update of objects.	mScene->Update();	mCuller.SetCamera(mCamera);	mCuller.ComputeVisibleSet(mScene);	InitializeCameraMotion(0.01f, 0.01f);	InitializeObjectMotion(mScene);	return true;}
开发者ID:bhlzlx,项目名称:WildMagic,代码行数:27,


示例25: GetAspectRatio

//----------------------------------------------------------------------------bool ReflectionsAndShadows::OnInitialize (){    if (!WindowApplication3::OnInitialize())    {        return false;    }    // Set up the camera.    mCamera->SetFrustum(60.0f, GetAspectRatio(), 1.0f, 1000.0f);    APoint camPosition(180.0f, 0.0f, 23.0f);    AVector camDVector(-1.0f, 0.0f, 0.0f);    AVector camUVector(0.0f, 0.0f, 1.0f);    AVector camRVector = camDVector.Cross(camUVector);    mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector);    CreateScene ();    // Initial update of objects.    mScene->Update();    mBiped->Update(mUpdateTime);    // Initial culling of scene,    mSceneCuller.SetCamera(mCamera);    mSceneCuller.ComputeVisibleSet(mScene);    mBipedCuller.SetCamera(mCamera);    mBipedCuller.ComputeVisibleSet(mBiped);    InitializeCameraMotion(0.1f, 0.01f);    InitializeObjectMotion(mScene);    return true;}
开发者ID:rasslingcats,项目名称:calico,代码行数:32,


示例26: KeyboardInput

////////////////////////////////////////////////////////////////////////// Called by GLut when there are keyboard messages.void KeyboardInput(unsigned char key, int, int){	switch(key) {	case '1':	case '2':	case '3':	case '4':	case '5':	case '6':	case '7':	case '8':	case '9':		sceneID = key - '0';		scene.Clear();	    CreateScene(scene);	    PreprocessScene(scene);		glutIdleFunc(&Update);	    break;	case 'g':		scene.UseOpenGLRendering = !scene.UseOpenGLRendering;		glutIdleFunc(&Update);		break;	case 'a':		scene.UseAntiAliasing = !scene.UseAntiAliasing;		glutIdleFunc(&Update);		break;	case 27:					// Escape key	case 'q':		exit(EXIT_SUCCESS);	}}
开发者ID:yxrkt,项目名称:DigiPen,代码行数:34,



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


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