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

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

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

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

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

示例1: Select_ScaleTexture

void Select_ScaleTexture(int x, int y){	brush_t		*b;	face_t		*f;	if(selected_brushes.next == &selected_brushes && selected_face == NULL)	{		return;	}  for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)	{		for (f=b->brush_faces ; f ; f=f->next)		{			f->texdef.scale[0] += x;			f->texdef.scale[1] += y;		}		Brush_Build(b);    if (b->patchBrush)      Patch_ScaleTexture(b->nPatchID, x, y);	}	if (selected_face)	{		selected_face->texdef.scale[0] += x;		selected_face->texdef.scale[1] += y;		Brush_Build(selected_face_brush);	}	Sys_UpdateWindows (W_CAMERA);}
开发者ID:Hasimir,项目名称:jedi-outcast-1,代码行数:31,


示例2: Select_FitTexture

void Select_FitTexture( int nHeight, int nWidth ){	brush_s*        b;		int nFaceCount = g_ptrSelectedFaces.GetSize();		if ( selected_brushes.next == &selected_brushes && nFaceCount == 0 )		return;			for ( b = selected_brushes.next ; b != &selected_brushes ; b = b->next )	{		Brush_FitTexture( b, nHeight, nWidth );		Brush_Build( b );	}		if ( nFaceCount > 0 )	{		for ( int i = 0; i < nFaceCount; i++ )		{			face_s* selFace = reinterpret_cast<face_s*>( g_ptrSelectedFaces.GetAt( i ) );			brush_s* selBrush = reinterpret_cast<brush_s*>( g_ptrSelectedFaceBrushes.GetAt( i ) );			Face_FitTexture( selFace, nHeight, nWidth );			Brush_Build( selBrush );		}	}		Sys_UpdateWindows( W_CAMERA );}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:28,


示例3: Select_RotateTexture

void Select_RotateTexture(int amt){	brush_t		*b;	face_t		*f;	if(selected_brushes.next == &selected_brushes && selected_face == NULL)		return;  for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)	{		for (f=b->brush_faces ; f ; f=f->next)		{			f->texdef.rotate += amt;      f->texdef.rotate = static_cast<int>(f->texdef.rotate) % 360;		}		Brush_Build(b);    if (b->patchBrush)      Patch_RotateTexture(b->nPatchID, amt);	}	  if (selected_face)	{		selected_face->texdef.rotate += amt;    selected_face->texdef.rotate = static_cast<int>(selected_face->texdef.rotate) % 360;		Brush_Build(selected_face_brush);	}	Sys_UpdateWindows (W_CAMERA);}
开发者ID:Hasimir,项目名称:jedi-outcast-1,代码行数:29,


示例4: Select_ShiftTexture

void Select_ShiftTexture( int x, int y ){	brush_s*        b;	face_s*     f;		int nFaceCount = g_ptrSelectedFaces.GetSize();		if ( selected_brushes.next == &selected_brushes && nFaceCount == 0 )		return;			for ( b = selected_brushes.next ; b != &selected_brushes ; b = b->next )	{		for ( f = b->brush_faces ; f ; f = f->next )		{			if ( g_qeglobals.m_bBrushPrimitMode )			{				// use face normal to compute a true translation				Select_ShiftTexture_BrushPrimit( f, x, y );			}			else			{				f->texdef.shift[0] += x;				f->texdef.shift[1] += y;			}		}		Brush_Build( b );		if ( b->patchBrush )		{			//Patch_ShiftTexture(b->nPatchID, x, y);			Patch_ShiftTexture( b->pPatch, x, y );		}	}		if ( nFaceCount > 0 )	{		for ( int i = 0; i < nFaceCount; i++ )		{			face_s* selFace = reinterpret_cast<face_s*>( g_ptrSelectedFaces.GetAt( i ) );			brush_s* selBrush = reinterpret_cast<brush_s*>( g_ptrSelectedFaceBrushes.GetAt( i ) );			if ( g_qeglobals.m_bBrushPrimitMode )			{							// use face normal to compute a true translation				// Select_ShiftTexture_BrushPrimit( selected_face, x, y );				// use camera view to compute texture shift				g_pParentWnd->GetCamera()->ShiftTexture_BrushPrimit( selFace, x, y );			}			else			{				selFace->texdef.shift[0] += x;				selFace->texdef.shift[1] += y;			}			Brush_Build( selBrush );		}	}		Sys_UpdateWindows( W_CAMERA );}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:58,


示例5: RotateTextures

void RotateTextures(int nAxis, float fDeg, vec3_t vOrigin){	for (brush_t* b=selected_brushes.next ; b != &selected_brushes ; b=b->next)	{    for (face_t* f=b->brush_faces ; f ; f=f->next)		{      RotateFaceTexture(f, nAxis, fDeg);      Brush_Build(b, false);    }    Brush_Build(b, false);	}}
开发者ID:Hasimir,项目名称:jedi-outcast-1,代码行数:12,


示例6: Select_Ungroup

/*	Turn the currently selected entity back into normal brushes*/void  Select_Ungroup (void){	entity_t	*e;	brush_t		*b;	e = selected_brushes.next->owner;	if (!e || e == world_entity || e->eclass->fixedsize)	{		Sys_Status ("Not a grouped entity.", 0);		return;	}	for (b=e->brushes.onext ; b != &e->brushes ; b=e->brushes.onext)	{		Brush_RemoveFromList (b);		Brush_AddToList (b, &active_brushes);		Entity_UnlinkBrush (b);		Entity_LinkBrush (world_entity, b);		Brush_Build( b );		b->owner = world_entity;	}	Entity_Free (e);	Sys_UpdateWindows (W_ALL);}
开发者ID:Acidburn0zzz,项目名称:KatanaEngine,代码行数:28,


示例7: SI_FaceList_FitTexture

void SI_FaceList_FitTexture(texdef_to_face_t* si_texdef_face_list, int nHeight, int nWidth){    texdef_to_face_t* temp_texdef_face_list;    brushprimit_texdef_t bp;    if (!si_texdef_face_list)        return;    for (temp_texdef_face_list = si_texdef_face_list; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next)    {        Face_FitTexture(temp_texdef_face_list->face, nHeight, nWidth);        Brush_Build(temp_texdef_face_list->brush,true,true,false,false);        // Write changes to our working Texdef list        if(g_qeglobals.m_bBrushPrimitMode)        {            ConvertTexMatWithQTexture(&temp_texdef_face_list->face->brushprimit_texdef, QERApp_Shader_ForName( temp_texdef_face_list->face->texdef.GetName() )->getTexture(), &bp, NULL);            TexMatToFakeTexCoords(bp.coords, temp_texdef_face_list->face->texdef.shift, &temp_texdef_face_list->face->texdef.rotate, temp_texdef_face_list->face->texdef.scale);        }        temp_texdef_face_list->texdef = temp_texdef_face_list->face->texdef;    }    Sys_UpdateWindows (W_CAMERA);}
开发者ID:AEonZR,项目名称:GtkRadiant,代码行数:25,


示例8: Select_AplyMatrix

void Select_AplyMatrix (void){	brush_t	*b;	face_t	*f;	int		i, j;	vec3_t	temp;	for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)	{		for (f=b->brush_faces ; f ; f=f->next)		{			for (i=0 ; i<3 ; i++)			{				Math_VectorSubtract(f->planepts[i],select_origin, temp);				for (j=0 ; j<3 ; j++)					f->planepts[i][j] = Math_DotProduct(temp,select_matrix[j])						+ select_origin[j];			}			if (select_fliporder)			{				Math_VectorCopy(f->planepts[0],temp);				Math_VectorCopy(f->planepts[2],f->planepts[0]);				Math_VectorCopy(temp,f->planepts[2]);			}		}		Brush_Build( b );	}	Sys_UpdateWindows (W_ALL);}
开发者ID:Acidburn0zzz,项目名称:KatanaEngine,代码行数:30,


示例9: FindReplaceTextures

void FindReplaceTextures( const char* pFind, const char* pReplace, bool bSelected, bool bForce ){	brush_s* pList = ( bSelected ) ? &selected_brushes : &active_brushes;	if ( !bSelected )	{		Select_Deselect();	}		for ( brush_s* pBrush = pList->next ; pBrush != pList; pBrush = pBrush->next )	{		if ( pBrush->patchBrush )		{			Patch_FindReplaceTexture( pBrush, pFind, pReplace, bForce );		}				for ( face_s* pFace = pBrush->brush_faces; pFace; pFace = pFace->next )		{			if ( bForce || strcmpi( pFace->texdef.name, pFind ) == 0 )			{				pFace->d_texture = Texture_ForName( pReplace );				//strcpy(pFace->texdef.name, pReplace);				pFace->texdef.SetName( pReplace );			}		}		Brush_Build( pBrush );	}	Sys_UpdateWindows( W_CAMERA );}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:28,


示例10: brush

/*============Select_SetTextureTimo : bFitScale to compute scale on the plane and counteract plane / axial plane snappingTimo :  brush primitive texturing        the brushprimit_texdef given must be understood as a qtexture_t width=2 height=2 ( HiRes )Timo :  texture plugin, added an IPluginTexdef* parameter        must be casted to an IPluginTexdef!        if not NULL, get ->Copy() of it into each face or brush ( and remember to hook )        if NULL, means we have no information, ask for a default============*/void WINAPI Select_SetTexture( texdef_t* texdef, brushprimit_texdef_s* brushprimit_texdef, bool bFitScale, void* pPlugTexdef ){	brush_s*    b;	int nCount = g_ptrSelectedFaces.GetSize();	if ( nCount > 0 )	{		Undo_Start( "set face textures" );		ASSERT( g_ptrSelectedFaces.GetSize() == g_ptrSelectedFaceBrushes.GetSize() );		for ( int i = 0; i < nCount; i++ )		{			face_s* selFace = reinterpret_cast<face_s*>( g_ptrSelectedFaces.GetAt( i ) );			brush_s* selBrush = reinterpret_cast<brush_s*>( g_ptrSelectedFaceBrushes.GetAt( i ) );			Undo_AddBrush( selBrush );			SetFaceTexdef( selBrush, selFace, texdef, brushprimit_texdef, bFitScale, static_cast<IPluginTexdef*>( pPlugTexdef ) );			Brush_Build( selBrush, bFitScale );			Undo_EndBrush( selBrush );		}		Undo_End();	}	else if ( selected_brushes.next != &selected_brushes )	{		Undo_Start( "set brush textures" );		for ( b = selected_brushes.next ; b != &selected_brushes ; b = b->next )			if ( !b->owner->eclass->fixedsize )			{				Undo_AddBrush( b );				Brush_SetTexture( b, texdef, brushprimit_texdef, bFitScale, static_cast<IPluginTexdef*>( pPlugTexdef ) );				Undo_EndBrush( b );			}		Undo_End();	}	Sys_UpdateWindows( W_ALL );}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:45,


示例11: Select_AplyMatrix

void Select_AplyMatrix (bool bSnap){	brush_t	*b;	face_t	*f;	int		i, j;	vec3_t	temp;	for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)	{    for (f=b->brush_faces ; f ; f=f->next)	  {		  for (i=0 ; i<3 ; i++)			{			  VectorSubtract (f->planepts[i], select_origin, temp);				for (j=0 ; j<3 ; j++)				  f->planepts[i][j] = DotProduct(temp, select_matrix[j]) + select_origin[j];			}			if (select_fliporder)			{			  VectorCopy (f->planepts[0], temp);				VectorCopy (f->planepts[2], f->planepts[0]);				VectorCopy (temp, f->planepts[2]);			}    }		Brush_Build(b, bSnap);    if (b->patchBrush)    {      Patch_ApplyMatrix(b->nPatchID, select_origin, select_matrix);    }	}}
开发者ID:Hasimir,项目名称:jedi-outcast-1,代码行数:31,


示例12: AddRegionBrushes

/* =======================================================================================================================    AddRegionBrushes a regioned map will have temp walls put up at the region boundary ======================================================================================================================= */void AddRegionBrushes(void){	idVec3		mins, maxs;	int			i;	texdef_t	td;	if (!region_active) {		return;	}	memset(&td, 0, sizeof(td));	td = g_qeglobals.d_texturewin.texdef;	// strcpy (td.name, "REGION");	td.SetName("textures/REGION");	const int REGION_WIDTH = 1024;	mins[0] = region_mins[0] - REGION_WIDTH;	maxs[0] = region_mins[0] + 1;	mins[1] = region_mins[1] - REGION_WIDTH;	maxs[1] = region_maxs[1] + REGION_WIDTH;	mins[2] = MIN_WORLD_COORD;	maxs[2] = MAX_WORLD_COORD;	region_sides[0] = Brush_Create(mins, maxs, &td);	mins[0] = region_maxs[0] - 1;	maxs[0] = region_maxs[0] + REGION_WIDTH;	region_sides[1] = Brush_Create(mins, maxs, &td);	mins[0] = region_mins[0] - REGION_WIDTH;	maxs[0] = region_maxs[0] + REGION_WIDTH;	mins[1] = region_mins[1] - REGION_WIDTH;	maxs[1] = region_mins[1] + 1;	region_sides[2] = Brush_Create(mins, maxs, &td);	mins[1] = region_maxs[1] - 1;	maxs[1] = region_maxs[1] + REGION_WIDTH;	region_sides[3] = Brush_Create(mins, maxs, &td);	mins = region_mins;	maxs = region_maxs;	maxs[2] = mins[2] + REGION_WIDTH;	region_sides[4] = Brush_Create(mins, maxs, &td);	mins = region_mins;	maxs = region_maxs;	mins[2] = maxs[2] - REGION_WIDTH;	region_sides[5] = Brush_Create(mins, maxs, &td);	for (i = 0; i < 6; i++) {		Brush_AddToList(region_sides[i], &selected_brushes);		Entity_LinkBrush(world_entity, region_sides[i]);		Brush_Build(region_sides[i]);	}}
开发者ID:AreaScout,项目名称:dante-doom3-odroid,代码行数:63,


示例13: Brush_SetTexture

void Brush_SetTexture(brush_t *b,texdef_t *texdef){	face_t	*f;	for (f=b->brush_faces ; f ; f=f->next)		f->texdef = *texdef;	Brush_Build(b);}
开发者ID:Acidburn0zzz,项目名称:KatanaEngine,代码行数:9,


示例14: QERApp_BuildBrush2

//Timo : another version with bConvert flag//++timo since 1.7 is not compatible with earlier plugin versions, remove this one and update QERApp_BuildBrushvoid WINAPI QERApp_BuildBrush2 (LPVOID pv, int bConvert){	AFX_MANAGE_STATE(AfxGetStaticModuleState());	brush_t *pBrush = g_pParentWnd->GetPlugInMgr().FindBrushHandle(pv);	if (pBrush != NULL)	{		Brush_Build( pBrush, true, true, bConvert );		Sys_UpdateWindows(W_ALL);	}}
开发者ID:AHPlankton,项目名称:Quake-III-Arena,代码行数:12,


示例15: QERApp_CreateBrush

// creates a dummy brush in the active brushes list// FIXME : is this one really USED ?void WINAPI QERApp_CreateBrush(vec3_t vMin, vec3_t vMax){	AFX_MANAGE_STATE(AfxGetStaticModuleState());		brush_t* pBrush = Brush_Create(vMin, vMax, &g_qeglobals.d_texturewin.texdef);	Entity_LinkBrush (world_entity, pBrush);	Brush_Build(pBrush);	Brush_AddToList (pBrush, &active_brushes);	Select_Brush(pBrush);	Sys_UpdateWindows(W_ALL);}
开发者ID:AHPlankton,项目名称:Quake-III-Arena,代码行数:13,


示例16: Brush_Move

void Brush_Move (brush_t *b, vec3_t move){	int		i;	face_t	*f;	for (f=b->brush_faces ; f ; f=f->next)		for (i=0 ; i<3 ; i++)			Math_VectorAdd(f->planepts[i],move,f->planepts[i]);	Brush_Build(b);}
开发者ID:Acidburn0zzz,项目名称:KatanaEngine,代码行数:11,


示例17: Select_FitTexture

void Select_FitTexture(int nHeight, int nWidth){	brush_t		*b;	if(selected_brushes.next == &selected_brushes && selected_face == NULL)		return;  for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)	{    Brush_FitTexture(b, nHeight, nWidth);		Brush_Build(b);	}	if (selected_face)	{    Face_FitTexture(selected_face, nHeight, nWidth);		Brush_Build(selected_face_brush);	}	Sys_UpdateWindows (W_CAMERA);}
开发者ID:Hasimir,项目名称:jedi-outcast-1,代码行数:21,


示例18: stricmp

/* =======================================================================================================================    AddProp ======================================================================================================================= */void CEntityDlg::AddProp() {	if( editEntity == NULL ) {		return;	}	CString Key, Value;	editKey.GetWindowText( Key );	editVal.GetWindowText( Value );	bool isName = ( stricmp( Key, "name" ) == 0 );	bool isModel = static_cast<bool>( ( stricmp( Key, "model" ) == 0 && Value.GetLength() > 0 ) );	bool isOrigin = ( idStr::Icmp( Key, "origin" ) == 0 );	if( multipleEntities ) {		brush_t *b;		for( b = selected_brushes.next; b != &selected_brushes; b = b->next ) {			if( isName ) {				Entity_SetName( b->owner, Value );			} else {				if( !( ( isModel || isOrigin ) && ( b->owner->eclass->nShowFlags & ECLASS_WORLDSPAWN ) ) ) {					SetKeyValue( b->owner, Key, Value );				}			}		}	} else {		if( isName ) {			Entity_SetName( editEntity, Value );		} else {			if( !( ( isModel || isOrigin ) && ( editEntity->eclass->nShowFlags & ECLASS_WORLDSPAWN ) ) ) {				SetKeyValue( editEntity, Key, Value );			}		}		if( isModel && !( editEntity->eclass->nShowFlags & ECLASS_WORLDSPAWN ) ) {			idBounds	bo;			idVec3	mins, maxs;			selected_brushes.next->modelHandle = renderModelManager->FindModel( Value );			if( dynamic_cast<idRenderModelPrt *>( selected_brushes.next->modelHandle ) || dynamic_cast<idRenderModelLiquid *>( selected_brushes.next->modelHandle ) ) {				bo.Zero();				bo.ExpandSelf( 12.0f );			} else {				bo = selected_brushes.next->modelHandle->Bounds( NULL );			}			VectorCopy( bo[0], mins );			VectorCopy( bo[1], maxs );			VectorAdd( mins, editEntity->origin, mins );			VectorAdd( maxs, editEntity->origin, maxs );			Brush_RebuildBrush( selected_brushes.next, mins, maxs, false );			Brush_Build( selected_brushes.next , false, false , false, true );		}	}	// refresh the prop listbox	SetKeyValPairs();	Sys_UpdateWindows( W_ALL );}
开发者ID:SL987654,项目名称:The-Darkmod-Experimental,代码行数:56,


示例19: Select_ApplyMatrix

void Select_ApplyMatrix( bool bSnap, bool bRotation, int nAxis, float fDeg ){	brush_s*    b;	face_s* f;	int     i, j;	edVec3_c    temp;		for ( b = selected_brushes.next ; b != &selected_brushes ; b = b->next )	{		for ( f = b->brush_faces ; f ; f = f->next )		{			for ( i = 0 ; i < 3 ; i++ )			{				temp = f->planepts[i] - select_origin;				for ( j = 0 ; j < 3 ; j++ )					f->planepts[i][j] = temp.dotProduct( select_matrix[j] ) + select_origin[j];			}			if ( select_fliporder )			{				// swap the points				temp = f->planepts[0];				f->planepts[0] = f->planepts[2];				f->planepts[2] = temp;			}		}				//if(b->owner->eclass->fixedsize)		//{		//  if (bRotation && b->owner->md3Class)		//  {		//      b->owner->vRotation[nAxis] += fDeg;		//  }		//}				Brush_Build( b, bSnap );				if ( b->patchBrush )		{			//Patch_ApplyMatrix(b->nPatchID, select_origin, select_matrix);			Patch_ApplyMatrix( b->pPatch, select_origin, select_matrix, bSnap );		}				//if (b->terrainBrush)		//{		//  Terrain_ApplyMatrix(b->pTerrain, select_origin, select_matrix, bSnap);		//}			}}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:49,


示例20: Select_ApplyMatrix

void Select_ApplyMatrix (bool bSnap, bool bRotation, int nAxis, float fDeg){	brush_t	*b;	face_t	*f;	int		i, j;	vec3_t	temp;	for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)	{		for (f=b->brush_faces ; f ; f=f->next)		{			for (i=0 ; i<3 ; i++)			{				VectorSubtract (f->planepts[i], select_origin, temp);				for (j=0 ; j<3 ; j++)					f->planepts[i][j] = DotProduct(temp, select_matrix[j]) + select_origin[j];			}			if (select_fliporder)			{				VectorCopy (f->planepts[0], temp);				VectorCopy (f->planepts[2], f->planepts[0]);				VectorCopy (temp, f->planepts[2]);			}		}		if(b->owner->eclass->fixedsize)		{			if (bRotation && b->owner->md3Class)			{				b->owner->vRotation[nAxis] += fDeg;			}		}		Brush_Build(b, bSnap);		if (b->patchBrush)		{			//Patch_ApplyMatrix(b->nPatchID, select_origin, select_matrix);			Patch_ApplyMatrix(b->pPatch, select_origin, select_matrix, bSnap);		}		if (b->terrainBrush)		{			Terrain_ApplyMatrix(b->pTerrain, select_origin, select_matrix, bSnap);		}	}}
开发者ID:chenbk85,项目名称:3dlearn,代码行数:48,


示例21: RotateTextures

void RotateTextures( int nAxis, float fDeg, vec3_t vOrigin ){	for ( brush_s* b = selected_brushes.next ; b != &selected_brushes ; b = b->next )	{		for ( face_s* f = b->brush_faces ; f ; f = f->next )		{			if ( g_qeglobals.m_bBrushPrimitMode )				RotateFaceTexture_BrushPrimit( f, nAxis, fDeg, vOrigin );			else				RotateFaceTexture( f, nAxis, fDeg );			//++timo removed that call .. works fine .. ???????			//          Brush_Build(b, false);		}		Brush_Build( b, false );	}}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:16,


示例22: Map_BuildBrushData

/* ======================================================================================================================= ======================================================================================================================= */void Map_BuildBrushData( void ) {	brush_t *b, *next;	if( active_brushes.next == NULL ) {		return;	}	Sys_BeginWait();	// this could take a while	int n = 0;	for( b = active_brushes.next; b != NULL && b != &active_brushes; b = next ) {		next = b->next;		Brush_Build( b, true, false, false );		if( !b->brush_faces || ( g_PrefsDlg.m_bCleanTiny && CheckForTinyBrush( b, n++, g_PrefsDlg.m_fTinySize ) ) ) {			Brush_Free( b );			common->Printf( "Removed degenerate brush/n" );		}	}	Sys_EndWait();}
开发者ID:SL987654,项目名称:The-Darkmod-Experimental,代码行数:21,


示例23: Select_Scale

void Select_Scale(float x, float y, float z){	Select_GetMid (select_origin);	for (brush_t* b=selected_brushes.next ; b != &selected_brushes ; b=b->next)	{		for (face_t* f=b->brush_faces ; f ; f=f->next)		{			for (int i=0 ; i<3 ; i++)			{				f->planepts[i][0] -= select_origin[0];				f->planepts[i][1] -= select_origin[1];				f->planepts[i][2] -= select_origin[2];				f->planepts[i][0] *= x;				//f->planepts[i][0] = floor(f->planepts[i][0] / g_qeglobals.d_gridsize + 0.5) * g_qeglobals.d_gridsize;				f->planepts[i][1] *= y;				//f->planepts[i][1] = floor(f->planepts[i][1] / g_qeglobals.d_gridsize + 0.5) * g_qeglobals.d_gridsize;				f->planepts[i][2] *= z;				//f->planepts[i][2] = floor(f->planepts[i][2] / g_qeglobals.d_gridsize + 0.5) * g_qeglobals.d_gridsize;				f->planepts[i][0] += select_origin[0];				f->planepts[i][1] += select_origin[1];				f->planepts[i][2] += select_origin[2];			}		}		Brush_Build(b, false);		if (b->patchBrush)		{			vec3_t v;			v[0] = x;			v[1] = y;			v[2] = z;			//Patch_Scale(b->nPatchID, select_origin, v);			Patch_Scale(b->pPatch, select_origin, v);		}		if (b->terrainBrush)		{			vec3_t v;			v[0] = x;			v[1] = y;			v[2] = z;			Terrain_Scale(b->pTerrain, select_origin, v);		}	}}
开发者ID:chenbk85,项目名称:3dlearn,代码行数:46,


示例24: Select_SetTexture

void Select_SetTexture (texdef_t *texdef){	brush_t	*b;	if (selected_face)	{		selected_face->texdef = *texdef;		Brush_Build(selected_face_brush);	}	else	{		for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)			if (!b->owner->eclass->fixedsize)				Brush_SetTexture (b, texdef);	}	Sys_UpdateWindows (W_ALL);}
开发者ID:Acidburn0zzz,项目名称:KatanaEngine,代码行数:17,


示例25: Select_SetTexture

/*============Select_SetTexturebool bFitScale = compute scale on the plane and counteract plane->axial snapping============*/void Select_SetTexture (texdef_t *texdef, bool bFitScale/*=false*/, bool bNoSystemTextureOverwrite/*=false*/){	brush_t	*b;	if (selected_face)	{		SetFaceTexdef (selected_face_brush, selected_face, texdef, bFitScale, bNoSystemTextureOverwrite);		Brush_Build(selected_face_brush, bFitScale);	}	else	{		for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)			if (!b->owner->eclass->fixedsize)				Brush_SetTexture (b, texdef, bFitScale, bNoSystemTextureOverwrite);	}	Sys_UpdateWindows (W_ALL);}
开发者ID:Hasimir,项目名称:jedi-outcast-1,代码行数:23,


示例26: Entity_LinkBrush

void CPlugInManager::CommitBrushHandleToMap(void * vp){  g_bScreenUpdates = false;   for (int i = 0; i < m_BrushHandles.GetSize(); i++)  {    brush_t *pb = reinterpret_cast<brush_t*>(m_BrushHandles.GetAt(i));    if (pb == reinterpret_cast<brush_t*>(vp))    {      m_BrushHandles.RemoveAt(i);	  Entity_LinkBrush (world_entity, pb);      Brush_Build(pb);	  Brush_AddToList (pb, &active_brushes);      Select_Brush(pb);    }  }  g_bScreenUpdates = true;   Sys_UpdateWindows(W_ALL);}
开发者ID:AHPlankton,项目名称:Quake-III-Arena,代码行数:18,


示例27: NewBrushDrag

/*==============NewBrushDrag==============*/void NewBrushDrag (int x, int y){	vec3_t	mins, maxs, junk;	int		i;	float	temp;	brush_t	*n;	if (!DragDelta (x,y, junk))		return;	// delete the current selection	if (selected_brushes.next != &selected_brushes)		Brush_Free (selected_brushes.next);	XY_ToGridPoint (pressx, pressy, mins);	mins[2] = g_qeglobals.d_gridsize * ((int)(g_qeglobals.d_new_brush_bottom_z/g_qeglobals.d_gridsize));	XY_ToGridPoint (x, y, maxs);	maxs[2] = g_qeglobals.d_gridsize * ((int)(g_qeglobals.d_new_brush_top_z/g_qeglobals.d_gridsize));	if (maxs[2] <= mins[2])		maxs[2] = mins[2] + g_qeglobals.d_gridsize;	for (i=0 ; i<3 ; i++)	{		if (mins[i] == maxs[i])			return;	// don't create a degenerate brush		if (mins[i] > maxs[i])		{			temp = mins[i];			mins[i] = maxs[i];			maxs[i] = temp;		}	}	n = Brush_Create (mins, maxs, &g_qeglobals.d_texturewin.texdef);	if (!n)		return;	Brush_AddToList (n, &selected_brushes);	Entity_LinkBrush (world_entity, n);	Brush_Build( n );//	Sys_UpdateWindows (W_ALL);	Sys_UpdateWindows (W_XY| W_CAMERA);}
开发者ID:amitahire,项目名称:development,代码行数:49,


示例28: Terrain_CalcNormals

brush_t *AddBrushForTerrain( terrainMesh_t *pm, bool bLinkToWorld ) {	int		j;	vec3_t	vMin;	vec3_t	vMax;	brush_t	*b;	face_t	*f;	// calculate the face normals	Terrain_CalcNormals( pm );   	// find the farthest points in x,y,z	Terrain_CalcBounds( pm, vMin, vMax );	for( j = 0; j < 3; j++ ) {		if ( vMin[ j ] == vMax[ j ] ) {			vMin[ j ] -= 4;			vMax[ j ] += 4;		}	}	b = Brush_Create( vMin, vMax, &pm->heightmap->tri.texdef );	for( f = b->brush_faces; f != NULL; f = f->next ) {		// copy the texdef to the brush faces texdef		f->texdef = pm->heightmap->tri.texdef;	}	// FIXME: this entire type of linkage needs to be fixed	b->pTerrain		= pm;	b->terrainBrush = true;	pm->pSymbiot    = b;	pm->bSelected   = false;	pm->bDirty      = true;	pm->nListID		= -1;	if ( bLinkToWorld ) {		Brush_AddToList( b, &active_brushes );		Entity_LinkBrush( world_entity, b );		Brush_Build( b, true );	}  	return b;}
开发者ID:AeonGames,项目名称:AeonQuakeEngine,代码行数:43,


示例29: Brush_Build

void CLightDlg::SaveLightInfo(const idDict *differences){	if (com_editorActive) {		// used from Radiant		for (brush_t *b = selected_brushes.next; b && b != &selected_brushes; b = b->next) {			if ((b->owner->eclass->nShowFlags & ECLASS_LIGHT) && !b->entityModel) {				if (differences) {					lightInfo.ToDictFromDifferences(&b->owner->epairs, differences);				} else {					lightInfo.ToDict(&b->owner->epairs);				}				Brush_Build(b);			}		}	} else {		// used in-game		idList<idEntity *> list;		list.SetNum(128);		int count = gameEdit->GetSelectedEntities(list.Ptr(), list.Num());		list.SetNum(count);		for (int i = 0; i < count; i++) {			if (differences) {				gameEdit->EntityChangeSpawnArgs(list[i], differences);				gameEdit->EntityUpdateChangeableSpawnArgs(list[i], NULL);			} else {				idDict newArgs;				lightInfo.ToDict(&newArgs);				gameEdit->EntityChangeSpawnArgs(list[i], &newArgs);				gameEdit->EntityUpdateChangeableSpawnArgs(list[i], NULL);			}			gameEdit->EntityUpdateVisuals(list[i]);		}	}}
开发者ID:AreaScout,项目名称:dante-doom3-odroid,代码行数:42,



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


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