当前位置: 首页>>代码示例>>C++>>正文


C++ NamedProperties::set方法代码示例

本文整理汇总了C++中NamedProperties::set方法的典型用法代码示例。如果您正苦于以下问题:C++ NamedProperties::set方法的具体用法?C++ NamedProperties::set怎么用?C++ NamedProperties::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NamedProperties的用法示例。


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

示例1: renderText

	void Font::renderText( const std::string& text, const mat4f& transformation, float fontHeight, const Color4f& color, const vec2f& relPos, bool drawWithShadow, bool fixedWidth )
	{
		
		Mesh* sMesh = nullptr;
		if( drawWithShadow )
		{
			sMesh = generateVertices( text, vec3f( -1.0f, -1.0f, -0.001f ), fontHeight, vec3f( 1.0f, 0.0f, 0.0f ), 
					vec3f( 0.0f, 1.0f, 0.0f ), color::FADEDBLACK, relPos, fixedWidth );
		}

		Mesh* mesh = generateVertices( text, vec3f(), fontHeight, vec3f( 1.0f, 0.0f, 0.0f ), 
				vec3f( 0.0f, 1.0f, 0.0f ), color, relPos, fixedWidth );

		Material* material = Material::getMaterial( mesh->getMaterial( 0 ) );
		material->updateUniform( "uFontHeight", fontHeight );
		//matStackf modelStack;
		//modelStack.translate( pos );
		NamedProperties params;
		params.set( "modelMatrix", transformation );
		params.set( "sMesh", sMesh );
		if( sMesh )
			fireEvent( "renderMesh", params );
		params.set( "mesh", mesh );
		fireEvent( "renderMesh", params );
			
		SAFE_DELETE( sMesh );
		SAFE_DELETE( mesh );
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:28,代码来源:Font.cpp

示例2: setRotation

	//-------------------------------------------------------------------
	void Object::setRotation( const mat3f& rot, int frame )
	{
		Node::setRotation( rot, frame );
		NamedProperties params;
		params.set( "orientation", rot );
		params.set( "name", m_occlusionGeometryName );
		fireEvent( "setOrientationOfASGeometry", params );
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:9,代码来源:Object.cpp

示例3: setScale

	//-------------------------------------------------------------------
	void Object::setScale( const vec3f& scale, int frame )
	{
		Node::setScale( scale, frame );
		NamedProperties params;
		params.set( "scale", scale );
		params.set( "name", m_occlusionGeometryName );
		fireEvent( "setScaleOfASGeometry", params );
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:9,代码来源:Object.cpp

示例4: setPosition

	//-------------------------------------------------------------------
	void Object::setPosition( const vec3f& pos, int frame )
	{
		Node::setPosition( pos, frame );
		NamedProperties params;
		params.set( "pos", pos );
		params.set( "name", m_occlusionGeometryName );
		fireEvent( "setPosOfASGeometry", params );
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:9,代码来源:Object.cpp

示例5: render

	//-------------------------------------------------------------------
	void Object::render()
	{
		matStackf modelStack;
		modelStack.applyMatrix( getWorldTransformation() );
		NamedProperties params;
		params.set( "modelMatrix", modelStack.top() );
		params.set( "mesh", m_mesh );
		fireEvent( "renderMesh", params );
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:10,代码来源:Object.cpp

示例6: Render

	void Button::Render()
	{
		NamedProperties params;
		matStackf modelStack;
		modelStack.loadIdentity();
		modelStack.translate( m_boundingBox.getCenter() );
		params.set( "modelMatrix", modelStack.top() );
		params.set( "mesh", m_mesh );
		fireEvent( "renderMesh", params );
		//consolePrintf( "Button box: %s", m_boundingBox.toString().c_str() );
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:11,代码来源:Button.cpp

示例7: fireBullet

	//----------------------------------------------------------------------
	void Spaceship::fireBullet()
	{
		if( m_weaponTimer->isTimeUp() )
		{
			NamedProperties params;
			params.set( "pos", getPosition() );
			params.set( "rotation", m_rotation );
			params.set( "teamNumber", m_teamNumber );
			fireEvent( "SpawnBullet", params );
			m_weaponTimer->start();
		}
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:13,代码来源:Spaceship.cpp

示例8: generateVertices

	void Font::render3DText( const std::string& text, const vec3f& pos, float fontHeight, vec3f rasterDir, vec3f up, const Color4f& color, const vec2f& relPos, bool fixedWidth )
	{
		
		Mesh* mesh = generateVertices( text, pos, fontHeight, rasterDir, up, color, relPos, fixedWidth );

		matStackf modelStack;
		modelStack.translate( pos );
		NamedProperties params;
		params.set( "modelMatrix", modelStack.top() );
		params.set( "mesh", mesh );
		fireEvent( "renderMesh", params );

		SAFE_DELETE( mesh );
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:14,代码来源:Font.cpp

示例9: Render

	void MSMap::Render()
	{
		NamedProperties params;
		matStackf matStack;
		params.set( "mesh", m_platformMesh );

		for( int i = 0; i < m_platformRenderLocations.size(); ++i )
		{
			matStack.loadIdentity();
			m_platformRenderLocations[i].y = m_mapYPos;
			matStack.translate( m_platformRenderLocations[i] );
			params.set( "modelMatrix", matStack.top() );
			fireEvent( "renderMesh", params );
		}
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:15,代码来源:MSMap.cpp

示例10:

	Object::Object( const std::string& id, Mesh* mesh )
		:	Node( id )
		,	m_mesh( mesh )
	{
		if( mesh != nullptr )
		{
			Material* mat = Material::getMaterial( m_mesh->getMaterial() );
			m_occlusionGeometryName = id + "asGeom";
			NamedProperties params;
			params.set( "name", m_occlusionGeometryName );
			params.set( "mesh", m_mesh );
			params.set( "directOcclusion", mat->getDirectOcclusion() );
			params.set( "reverbOcclusion", mat->getReverbOcclusion() );
			fireEvent( "createASGeometry", params );
		}
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:16,代码来源:Object.cpp

示例11: RenderLayer

	void MSMap::RenderLayer( int layer )
	{
		NamedProperties params;
		matStackf matStack;
		matStack.loadIdentity();

		if( 0 <= layer && layer < m_currentObstaclesOnMap.size() )
		{
			for( int i = 0; i < m_currentObstaclesOnMap[layer].size(); ++i )
			{
				matStack.loadIdentity();
				matStack.translate( m_currentObstaclesOnMap[layer][i]->boundingBox.getCenter() );
				params.set( "modelMatrix", matStack.top() );
				params.set( "mesh", m_currentObstaclesOnMap[layer][i]->mesh );
				fireEvent( "renderMesh", params );
			}
		}
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:18,代码来源:MSMap.cpp

示例12: renderOrders

	//----------------------------------------------------------------
	void Entity::renderOrders()
	{
		vec2f currentPos = m_position;
		for( size_t i = 0; i <  m_orders.size(); ++i )
		{
			Mesh* line = MeshFactory::generateLine( currentPos, m_orders[i]->getTargetLocation() );
			NamedProperties params;
			params.set( "mesh", line );
			fireEvent( "renderMesh", params );
			
			currentPos = m_orders[i]->getTargetLocation();
			SAFE_DELETE( line );
		}
	}
开发者ID:hulcyp,项目名称:PortfolioProjects,代码行数:15,代码来源:Entity.cpp

示例13:

	SpaceGameActor::SpaceGameActor( const std::string& id, short teamNumber, int screenWidth, int screenHeight )
		:	Actor( id )
		,	SCREEN_WIDTH( screenWidth )
		,	SCREEN_HEIGHT( screenHeight )
		,	m_radius( 0.0f )
		,	IMPULSE_POWER( 100.0f )
		,	ROTATION_POWER( 5.0f )
		,	m_forwardImpulse( 0.0f )
		,	m_rotation( 0.0f )
		,	m_teamNumber( teamNumber )
		,	m_wasSpawnedLastFrame( true )
	{
		NamedProperties params;
		params.set( "SGA", this );
		fireEvent( "addSGAToCollisionMgr", params );
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:16,代码来源:SpaceGameActor.cpp

示例14:

	//----------------------------------------------------------------------
	Spaceship::~Spaceship()
	{
		NamedProperties params;
		params.set( "spaceship", this );
		fireEvent( "SpaceshipDied", params );
	}
开发者ID:hulcyp,项目名称:GuildhallProjects,代码行数:7,代码来源:Spaceship.cpp


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