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

C++ processNode函数代码示例

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

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



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

示例1: QString

void IDefReader::processScriptItemNode( P_ITEM madeItem, QDomElement &Node )
{
	for( UI16 k = 0; k < Node.childNodes().count(); k++ )
	{
		QDomElement currChild = Node.childNodes().item( k ).toElement();
		if( currChild.nodeName() == "amount" )
		{
			QString Value = QString();
			UI16 i = 0;
			if( currChild.hasChildNodes() ) // <random> i.e.
				for( i = 0; i < currChild.childNodes().count(); i++ )
				{
					if( currChild.childNodes().item( i ).isText() )
						Value += currChild.childNodes().item( i ).toText().data();
					else if( currChild.childNodes().item( i ).isElement() )
						Value += processNode( currChild.childNodes().item( i ).toElement() );
				}
			else
				Value = currChild.nodeValue();

			if( Value.toInt() < 1 )
				Value = QString("1");

			if( madeItem->isPileable() )
				madeItem->setAmount( Value.toInt() );
			else
				for( i = 1; i < Value.toInt(); i++ ) //dupe it n-1 times
					Commands->DupeItem(-1, madeItem, 1);
		}
		else if( currChild.nodeName() == "color" ) //process <color> tags
		{
			QString Value = QString();
			if( currChild.hasChildNodes() ) // colorlist or random i.e.
				for( UI16 i = 0; i < currChild.childNodes().count(); i++ )
				{
					if( currChild.childNodes().item( i ).isText() )
						Value += currChild.childNodes().item( i ).toText().data();
					else if( currChild.childNodes().item( i ).isElement() )
						Value += processNode( currChild.childNodes().item( i ).toElement() );
				}
			else
				Value = currChild.nodeValue();
			
			if( Value.toInt() < 0 )
				Value = QString("0");

			madeItem->setColor( Value.toInt() );
		}
		else if( currChild.nodeName() == "inherit" && currChild.attributes().contains("id") )
		{
			QDomElement* derivalSection = DefManager->getSection( WPDT_ITEM, currChild.attribute("id") );
			if( !derivalSection->isNull() )
				this->applyNodes( madeItem, derivalSection );
		}
	}
}
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:56,代码来源:wpxmlparser.cpp


示例2: processNode

Path PathCreator::calculatePath(DebugNode* start, DebugNode* end)
{
    startNode = start;
    endNode = end;

    PathingNode* currentParentNode;
    for(processNode(start, 0, NULL), currentParentNode=processedNodes[0]; !endNodeHasLowestTEC() && openNodesRemaining(); currentParentNode = getOpenNodeWithLowestTEC())
    {
        currentParentNode->open=false;
        for(int i = 0; i<currentParentNode->node->numConnections; i++)
        {
            float connectionCostSquared = glm::pow(currentParentNode->node->connections[i]->cost, 2.0f);
            float costSoFar = connectionCostSquared + currentParentNode->costSoFar;
            processNode(currentParentNode->node->connections[i]->node, costSoFar, currentParentNode);
        }
    }
    Path p = Path(nullptr, 0);
    if(openNodesRemaining())//If the end node could actually be reached
    {
        QList <DebugNode*> reversePath;
        bool reachedStartNode = false;
        uint numNodesInPath = 0;
        PathingNode* currentNode = currentParentNode;//current parent node will be end node
        while(!reachedStartNode)
        {
            reversePath.prepend(currentNode->node);
            numNodesInPath++;
            if(currentNode->node == startNode)
            {
                reachedStartNode = true;
            }
            else
            {
                currentNode = currentNode->parentNode;
            }
        }
        DebugNode** path = new DebugNode*[numNodesInPath];
        for(uint i = 0; i<numNodesInPath; i++)
        {
            path[i] = reversePath[i];
        }
        reversePath.clear();
        p = Path(path, numNodesInPath);
    }
    else
    {
        cout << "IMPOSSIBLE PATH" << endl;
    }
    processedNodes.clear();
    return p;
}
开发者ID:tmgarcia,项目名称:CPPGameEngine,代码行数:51,代码来源:PathCreator.cpp


示例3: processLeaf

    //-----------------------------------------------------------------------
    bool BspRaySceneQuery::processNode(const BspNode* node, const Ray& tracingRay, 
        RaySceneQueryListener* listener, Real maxDistance, Real traceDistance)
    {
        if (node->isLeaf())
        {
            return processLeaf(node, tracingRay, listener, maxDistance, traceDistance);
        }

        bool res = true;
        std::pair<bool, Real> result = tracingRay.intersects(node->getSplitPlane());
        if (result.first && result.second < maxDistance)
        {
            // Crosses the split plane, need to perform 2 queries
            // Calculate split point ray
            Vector3 splitPoint = tracingRay.getOrigin() 
                + tracingRay.getDirection() * result.second;
            Ray splitRay(splitPoint, tracingRay.getDirection());

            if (node->getSide(tracingRay.getOrigin()) == Plane::NEGATIVE_SIDE)
            {
                // Intersects from -ve side, so do back then front
                res = processNode(
                    node->getBack(), tracingRay, listener, result.second, traceDistance);
                if (!res) return res;
                
                res = processNode(
                    node->getFront(), splitRay, listener, 
                    maxDistance - result.second, 
                    traceDistance + result.second);
            }
            else
            {
                // Intersects from +ve side, so do front then back
                res = processNode(node->getFront(), tracingRay, listener, 
                    result.second, traceDistance);
                if (!res) return res;
                res = processNode(node->getBack(), splitRay, listener,
                    maxDistance - result.second, 
                    traceDistance + result.second);
            }
        }
        else
        {
            // Does not cross the splitting plane, just cascade down one side
            res = processNode(node->getNextNode(tracingRay.getOrigin()),
                tracingRay, listener, maxDistance, traceDistance);
        }

        return res;
    }
开发者ID:airgames,项目名称:vuforia-gamekit-integration,代码行数:51,代码来源:OgreBspSceneManager.cpp


示例4: streamFile

/**
 * streamFile:
 * @filename: the file name to parse
 *
 * Parse and print information about an XML file.
 */
static void
streamFile(const char *filename) {
    xmlTextReaderPtr reader;
    int ret;
 
#define VALIDATEDTD
#ifdef VALIDATEDTD
    /*
     * Pass some special parsing options to activate DTD attribute defaulting,
     * entities substitution and DTD validation
     */
    reader = xmlReaderForFile(filename, NULL,
                 XML_PARSE_DTDATTR |  /* default DTD attributes */
		 XML_PARSE_NOENT |    /* substitute entities */
		 XML_PARSE_DTDVALID); /* validate with the DTD */
#else
    reader = xmlReaderForFile(filename, NULL, 0);
#endif
    if (reader != NULL) {
        ret = xmlTextReaderRead(reader);
        while (ret == 1) {
            processNode(reader);
            ret = xmlTextReaderRead(reader);
        }
        xmlFreeTextReader(reader);
        if (ret != 0) {
            fprintf(stderr, "%s : failed to parse\n", filename);
        }
    } else {
        fprintf(stderr, "Unable to open %s\n", filename);
    }
}
开发者ID:bobwolff68,项目名称:neuron,代码行数:38,代码来源:test1.c


示例5: main

int main(int argc, char *argv[])
{
    xmlTextReaderPtr reader;
    int ret;

    //  Readerの作成
    reader = xmlNewTextReaderFilename("./sample.xml");
    if ( !reader ) {
        printf("Failed to open XML file.\n");
        return 1;
    }

    printf("-----------------------\n"); 
    
    //  次のノードに移動 
    ret = xmlTextReaderRead(reader);
    while (ret == 1) {
        //  現在のノードを処理
        processNode(reader);

        //  次のノードに移動
        ret = xmlTextReaderRead(reader);
    }
    
    //  Reader のすべてのリソースを開放
    xmlFreeTextReader(reader);

    //  xmlTextReaderRead の戻り値が -1 だった場合はパースエラー
    if (ret == -1) {
        printf("Parse error.\n");
        return 1;
    }

    return 0;
}
开发者ID:egawata,项目名称:hatena_blog,代码行数:35,代码来源:xmlread.c


示例6: switch

void Editor_Html2Usfm::processNode (xml_node node)
{
  switch (node.type ()) {
    case node_element:
    {
      openElementNode (node);
      for (xml_node child : node.children()) {
        processNode (child);
      }
      closeElementNode (node);
      break;
    }
    case node_pcdata:
    {
      // Add the text to the current USFM line.
      string text = node.text ().get ();
      currentLine += text;
      break;
    }
    default:
    {
      string nodename = node.name ();
      Database_Logs::log ("Unknown XML node " + nodename + " while saving editor text");
      break;
    }
  }
}
开发者ID:alerque,项目名称:bibledit,代码行数:27,代码来源:html2usfm.cpp


示例7: streamFileXML2

int streamFileXML2(char *filename, int sanitize, struct osmdata_t *osmdata) {
    xmlTextReaderPtr reader;
    int ret = 0;

    if (sanitize)
        reader = sanitizerOpen(filename);
    else
        reader = inputUTF8(filename);

    if (reader != NULL) {
        ret = xmlTextReaderRead(reader);
        while (ret == 1) {
	  processNode(reader, osmdata);
            ret = xmlTextReaderRead(reader);
        }

        if (ret != 0) {
            fprintf(stderr, "%s : failed to parse\n", filename);
            return ret;
        }

        xmlFreeTextReader(reader);
    } else {
        fprintf(stderr, "Unable to open %s\n", filename);
        return 1;
    }
    return 0;
}
开发者ID:alexasahis,项目名称:osm2pgsql,代码行数:28,代码来源:parse-xml2.c


示例8: while

void DotSceneLoader::processNodes(rapidxml::xml_node<>* XMLNode) {
	rapidxml::xml_node<>* pElement;

	// Process node (*)
	pElement = XMLNode->first_node("node");
	while (pElement) {
		processNode(pElement);
		pElement = pElement->next_sibling("node");
	}

	// Process position (?)
	pElement = XMLNode->first_node("position");
	if (pElement) {
		mAttachNode->setPosition(parseVector3(pElement));
		mAttachNode->setInitialState();
	}

	// Process rotation (?)
	pElement = XMLNode->first_node("rotation");
	if (pElement) {
		mAttachNode->setOrientation(parseQuaternion(pElement));
		mAttachNode->setInitialState();
	}

	// Process scale (?)
	pElement = XMLNode->first_node("scale");
	if (pElement) {
		mAttachNode->setScale(parseVector3(pElement));
		mAttachNode->setInitialState();
	}
}
开发者ID:lubosz,项目名称:Collage,代码行数:31,代码来源:DotSceneLoader.cpp


示例9: main

int main(int argc, char *argv[]) {
	LIBXML_TEST_VERSION

	// xmlTextReaderPtr reader = xmlReaderForFile("/run/media/svartalf/storage/wikipedia/ruwiki-20140706-pages-meta-history1.xml", NULL, 0);
	xmlTextReaderPtr reader = xmlReaderForFile("/tmp/test.xml", NULL, 0);

	FILE *output = fopen("/tmp/output.bin", "w");
	output_write_header(output);

	Revision *rev = revision_create();

	int result = xmlTextReaderRead(reader);
	while (result == 1) {
		processNode(reader, rev);
		result = xmlTextReaderRead(reader);

		if (revision_filled(rev)) {
			output_write_row(output, rev);
			revision_clear(rev);
		}

	}

	output_close(output);

	xmlFreeTextReader(reader);
	if (result != 0) {
		fprintf(stderr, "failed to parse: %d\n", result);
	}
	xmlCleanupParser();

	return 0;

}
开发者ID:svartalf,项目名称:wiki-anon-edits-converter,代码行数:34,代码来源:main.c


示例10: processNode

void processNode(FbxNode *node,GameObject *rootGo)
{
	PrintTabs();
	const char* nodeName = node->GetName();
	FbxDouble3 translation =  node->LclTranslation.Get();
	FbxDouble3 rotation = node->LclRotation.Get();
	FbxDouble3 scaling = node->LclScaling.Get();

	std::cout << "Node " << nodeName << " Postion " << translation[0] << " " << translation[1] << " " << translation[2] << " "
		<< " Rotation " << rotation[0] << " " << rotation[1] << " " << rotation[2] << " "
		<< " Scale " << scaling[0] << " " << scaling[1] << " " << scaling[2] << std::endl;

	level++;
	GameObject * go = new GameObject();
	go->setTransform(new Transform());
	rootGo->addChild(go);

	// Print the node's attributes.
	for (int i = 0; i < node->GetNodeAttributeCount(); i++){
		processAttribute(node->GetNodeAttributeByIndex(i), go);
	}

	// Recursively print the children.
	for (int j = 0; j < node->GetChildCount(); j++)
		processNode(node->GetChild(j), rootGo);
	level--;
	PrintTabs();
}
开发者ID:ctjohnston1,项目名称:GP2_E-MC-Coursework,代码行数:28,代码来源:FBXLoader.cpp


示例11: switch

void fbxLoader2::processNode(FbxNode* node)
{
	//FbxNodeAttribute::EType attributeType;
	if(node->GetNodeAttribute())
	{
		switch(node->GetNodeAttribute()->GetAttributeType())
		{
		case FbxNodeAttribute::eMesh:
			processMesh(node);
			break;

		case FbxNodeAttribute::eSkeleton:
			break;

		case FbxNodeAttribute::eLight:
			break;
			
		case FbxNodeAttribute::eCamera:
			break;
		}
	}

	for(int i = 0; i<node->GetChildCount(); i++)
	{
		processNode(node->GetChild(i));
	}
}
开发者ID:Jutsimitsu,项目名称:MastersThesis,代码行数:27,代码来源:fbxLoader2.cpp


示例12: while

void DotSceneLoader::processNodes(TiXmlElement* xmlNode) {
	TiXmlElement *element;

	// Process node (*)
	element = xmlNode->FirstChildElement("node");
	while(element) {
		processNode(element);
		element = element->NextSiblingElement("node");
	}

	// Process position (?)
	element = xmlNode->FirstChildElement("position");
	if(element) {
		rootNode->setPosition(parseVector3(element));
	}

	// Process rotation (?)
	element = xmlNode->FirstChildElement("rotation");
	if(element) {
		rootNode->setOrientation(parseQuaternion(element));
	}

	// Process scale (?)
	element = xmlNode->FirstChildElement("scale");
	if(element) {
		rootNode->setScale(parseVector3(element));
	}
}
开发者ID:marrony,项目名称:game-engine-old,代码行数:28,代码来源:DotSceneLoader.cpp


示例13: addError

	void ParticleScriptCompiler::compileAffector(const ScriptNodePtr &node)
	{
		if(node->children.empty() || node->children.front()->type != SNT_WORD)
			return;

		// Create the emitter based on the first child
		ParticleAffector *affector = 0;
		String type = node->children.front()->token;
		try{
			affector = mSystem->addAffector(type);
		}catch(...){
			addError(CE_OBJECTALLOCATIONERROR, node->children.front()->file, 
				node->children.front()->line, node->children.front()->column);
			return;
		}

		// Jump ahead now to the '{' as the emitter does not support other parameters in the header
		ScriptNodeList::iterator i = findNode(node->children.begin(), node->children.end(), SNT_LBRACE);
		if(i == node->children.end())
			return;

		ScriptNodeList::iterator j = (*i)->children.begin();
		while(j != (*i)->children.end())
		{
			if(!processNode(j, (*i)->children.end()))
			{
				String name = (*j)->token, 
					value = getParameterValue((*j)->children.begin(), (*j)->children.end());
				if(!affector->setParameter(name, value))
					addError(CE_INVALIDPROPERTY, (*j)->file, (*j)->line, (*j)->column);
				++j;
			}
		}
	}
开发者ID:Anti-Mage,项目名称:ogre,代码行数:34,代码来源:OgreParticleScriptCompiler.cpp


示例14: processAnimations

bool core::ModelLoader::loadModel(const char *fp, Model *m){
	Assimp::Importer importer;

	const aiScene *scene = importer.ReadFile(fp, aiProcess_Triangulate | aiProcess_OptimizeMeshes | aiProcess_JoinIdenticalVertices | aiProcess_FlipUVs);

	if(!scene)
		return false;

	m->rootPath = (std::string)fp;
	for(int x = m->rootPath.size() - 1; x >= 0; x--){
		if(m->rootPath[x] == '/' || m->rootPath[x] == '\\'){
			m->rootPath = m->rootPath.substr(0, x + 1);
			x = -1;
		}
	}

	processAnimations(scene, m);
	processNode(scene, scene->mRootNode, m);

	if(scene->HasAnimations())
		m->animations[m->currentAnim].buildBoneTree(scene, scene->mRootNode, &m->animations[m->currentAnim].root, m);

	m->modelTrans = glm::mat4(1.f);
	m->modelLoaded = true;

	return true;
};
开发者ID:Inzuki,项目名称:Game,代码行数:27,代码来源:Assimp.cpp


示例15: tryProcessNode

// If it's a leaf, update the lower bound.
// Otherwise, process it.
void tryProcessNode(Knapsack* ks, Heap* h, Node* n) {
  int i;
  pthread_rwlock_rdlock(&ks->_lblock);
  int lb = ks->_lowerBound;
  pthread_rwlock_unlock(&ks->_lblock);
  if (n->_depth >= (ks->_nbItems-1)) {
    if (n->_value > (double)lb) {
      pthread_rwlock_wrlock(&ks->_lblock);
      // Double checking the value of lowerbound; there's an edge case where
      // another thread could update it between these two locks
      if (n->_value > ks->_lowerBound) {
        printf("tighten LB to %d\n", n->_value);
        ks->_lowerBound = n->_value;
        pthread_rwlock_unlock(&ks->_lblock);
        for (i=0; i<n->_depth+1; i++) {
          ks->_bestX[i] = n->_x[i];
        }
        for (i=n->_depth+1; i<ks->_nbItems; i++) {
          ks->_bestX[i] = 0;
        }
      } else {
        pthread_rwlock_unlock(&ks->_lblock);
      }
    }
    destroyNode(n);
    pthread_mutex_lock(&ks->_counterMutex);
    (ks->_nodesProcessed)++;
    pthread_mutex_unlock(&ks->_counterMutex);
  } else {
    processNode(ks, h, n);
  }
}
开发者ID:jwbutler,项目名称:Knapsack,代码行数:34,代码来源:knapsack.c


示例16: ASSERT

bool LevelGeometryLoader::processNodes(TiXmlElement *XMLNode)
{
	ASSERT(XMLNode);

    TiXmlElement *pElement;

    XMLNode = XMLNode->FirstChildElement("nodes");
    if(!XMLNode){
    	debugWARNING("No entities found in the scene\n");
    	return false;
    }

    // Process node (*)
    pElement = XMLNode->FirstChildElement("node");
    while(pElement)
    {
    	Ogre::SceneNode *node = 0;
        if(!processNode(pElement, node)){
        	debugERROR("Error processing node\n");
        	ASSERT(false);
        	return false;
        }
        pElement = pElement->NextSiblingElement("node");
        ASSERT(node);
        ASSERT(node->getAttachedObject(0)); // we have something attached
        mEntities.push_back(node);
    }

    return true;
}
开发者ID:agudpp,项目名称:CordobaZombie,代码行数:30,代码来源:LevelGeometryLoader.cpp


示例17: handleFile

static void handleFile(const char *filename) {
    xmlTextReaderPtr reader;
    int ret;

    if (count) {
	elem = 0;
	attrs = 0;
    }

    reader = xmlNewTextReaderFilename(filename);
    if (reader != NULL) {
	if (valid)
	    xmlTextReaderSetParserProp(reader, XML_PARSER_VALIDATE, 1);

	/*
	 * Process all nodes in sequence
	 */
	ret = xmlTextReaderRead(reader);
	while (ret == 1) {
	    processNode(reader);
	    ret = xmlTextReaderRead(reader);
	}

	/*
	 * Done, cleanup and status
	 */
	xmlFreeTextReader(reader);
	if (ret != 0) {
	    printf("%s : failed to parse\n", filename);
	} else if (count)
	    printf("%s : %d elements, %d attributes\n", filename, elem, attrs);
    } else {
	fprintf(stderr, "Unable to open %s\n", filename);
    }
}
开发者ID:shines77,项目名称:libs3_example,代码行数:35,代码来源:testReader.c


示例18: streamFile

/**
 * streamFile:
 * @filename: the file name to parse
 *
 * Parse, validate and print information about an XML file.
 */
static void
streamFile(const char *filename) {
    xmlTextReaderPtr reader;
    int ret;


    /*
     * Pass some special parsing options to activate DTD attribute defaulting,
     * entities substitution and DTD validation
     */
    reader = xmlReaderForFile(filename, NULL,
                 XML_PARSE_DTDATTR |  /* default DTD attributes */
		 XML_PARSE_NOENT |    /* substitute entities */
		 XML_PARSE_DTDVALID); /* validate with the DTD */
    if (reader != NULL) {
        ret = xmlTextReaderRead(reader);
        while (ret == 1) {
            processNode(reader);
            ret = xmlTextReaderRead(reader);
        }
	/*
	 * Once the document has been fully parsed check the validation results
	 */
	if (xmlTextReaderIsValid(reader) != 1) {
	    fprintf(stderr, "Document %s does not validate\n", filename);
	}
        xmlFreeTextReader(reader);
        if (ret != 0) {
            fprintf(stderr, "%s : failed to parse\n", filename);
        }
    } else {
        fprintf(stderr, "Unable to open %s\n", filename);
    }
}
开发者ID:AlexanderDenkMA,项目名称:TypeChef-libXMLAnalysis,代码行数:40,代码来源:reader2.c


示例19: processNode

void Model::loadModel(std::string path)
{
	// initialize importer, transform model primitives to triangles and flip texCoords y axis
	Assimp::Importer importer;
	const aiScene* scene = importer.ReadFile(path, aiProcess_Triangulate | aiProcess_FlipUVs);

	if (!scene || scene->mFlags == AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode)
	{
		Utils::exitMessage("Assimp Error", importer.GetErrorString());
	}

	directory = path.substr(0, path.find_last_of('/'));

	processNode(scene->mRootNode, scene);

	//std::vector<Vertex> concVertices = meshes[5].vertices;
	//std::vector<GLuint> concIndices = meshes[5].indices;
	//std::vector<Texture> concTextures = meshes[5].textures;

	//concVertices.insert(concVertices.end(), meshes[6].vertices.begin(), meshes[6].vertices.end());
	//concIndices.insert(concIndices.end(), meshes[6].indices.begin(), meshes[6].indices.end());
	//concTextures.insert(concTextures.end(), meshes[6].textures.begin(), meshes[6].textures.end());

	//int offset = meshes[5].indices.size();
	//for (int i = offset; i < concIndices.size(); i++)
	//{
	//	concIndices[i] = concIndices[i] + offset;
	//}

	//Mesh(concVertices, concIndices, concTextures);
	////meshes[5] = meshes[6];
	//meshes.pop_back();
	//meshes.pop_back();
	//meshes.push_back(Mesh(concVertices, concIndices, concTextures));
}
开发者ID:tiagoddinis,项目名称:GParticles,代码行数:35,代码来源:Model.cpp


示例20: glGetUniformLocation

	// load model if not yet cached
	void Model::load(const std::string& path)
	{
		m_pMeshes = std::make_shared<std::vector<Mesh>>();
		m_ShaderID = ShaderLoader::Instance().getProgram("Default");
		m_MVPMatrixLocation = glGetUniformLocation(m_ShaderID, "mvpMatrix");
		m_TextureFrontSamplerLocation = glGetUniformLocation(m_ShaderID, "textureFrontSampler");
		m_TextureSideSamplerLocation = glGetUniformLocation(m_ShaderID, "textureSideSampler");			
		m_ChinVerticalPosLocation = glGetUniformLocation(m_ShaderID, "chinVerticalPos");
		m_EyeVerticalPosLocation = glGetUniformLocation(m_ShaderID, "eyeVerticalPos");
		m_LEyeTexVerticalPosLocation = glGetUniformLocation(m_ShaderID, "LEyeVerticalTexPos");
		m_REyeTexVerticalPosLocation = glGetUniformLocation(m_ShaderID, "REyeVerticalTexPos");
		m_ChinTexVerticalPosLocation = glGetUniformLocation(m_ShaderID, "ChinTexVerticalPos");

		// Create an instance of the importer class
		Assimp::Importer importer;
		// Read in the given file into a scene and set some (example) postprocessing
		const aiScene *scene = importer.ReadFile(path, aiProcess_Triangulate | aiProcess_GenNormals);// | aiProcess_FlipUVs);

		if (!scene || scene->mFlags == AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode)
		{
			std::string error = importer.GetErrorString();
			throw std::exception("Failed to load model. ASSIMP-ERROR");
		}
		// Start processing nodes
		processNode(scene->mRootNode, scene);
	}
开发者ID:tpinetz,项目名称:Visualisierung,代码行数:27,代码来源:Model.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ processPacket函数代码示例发布时间:2022-05-30
下一篇:
C++ processMessage函数代码示例发布时间: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