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

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

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

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

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

示例1: EvalWaveFormClamped

static float EvalWaveFormClamped( const waveForm_t *wf ){	float glow  = EvalWaveForm( wf );	if ( glow < 0 )	{		return 0;	}	if ( glow > 1 )	{		return 1;	}	return glow;}
开发者ID:ensiform,项目名称:q3pp,代码行数:16,


示例2: RB_CalcStretchTexCoords

/*** RB_CalcStretchTexCoords*/void RB_CalcStretchTexCoords( const waveForm_t *wf, float *st ) {	float p;	texModInfo_t tmi;	p = 1.0f / EvalWaveForm( wf );	tmi.matrix[0][0] = p;	tmi.matrix[1][0] = 0;	tmi.translate[0] = 0.5f - 0.5f * p;	tmi.matrix[0][1] = 0;	tmi.matrix[1][1] = p;	tmi.translate[1] = 0.5f - 0.5f * p;	RB_CalcTransformTexCoords( &tmi, st );}
开发者ID:chegestar,项目名称:omni-bot,代码行数:19,


示例3: RB_CalcStretchTexMatrix

voidRB_CalcStretchTexMatrix(const Waveform *wf, float *matrix){	float p;	texModInfo_t tmi;	p = 1.0f / EvalWaveForm(wf);	tmi.matrix[0][0] = p;	tmi.matrix[1][0] = 0;	tmi.translate[0] = 0.5f - 0.5f * p;	tmi.matrix[0][1] = 0;	tmi.matrix[1][1] = p;	tmi.translate[1] = 0.5f - 0.5f * p;	RB_CalcTransformTexMatrix(&tmi, matrix);}
开发者ID:icanhas,项目名称:yantar,代码行数:18,


示例4: RB_CalcDeformVertexes

/*========================RB_CalcDeformVertexes========================*/void RB_CalcDeformVertexes( deformStage_t *ds ){	int i;	vec3_t	offset;	float	scale;	float	*xyz = ( float * ) tess.xyz;	float	*normal = ( float * ) tess.normal;	float	*table;	if ( ds->deformationWave.frequency == 0 )	{		scale = EvalWaveForm( &ds->deformationWave );		for ( i = 0; i < tess.numVertexes; i++, xyz += 4, normal += 4 )		{			VectorScale( normal, scale, offset );						xyz[0] += offset[0];			xyz[1] += offset[1];			xyz[2] += offset[2];		}	}	else	{		table = TableForFunc( ds->deformationWave.func );		for ( i = 0; i < tess.numVertexes; i++, xyz += 4, normal += 4 )		{			float off = ( xyz[0] + xyz[1] + xyz[2] ) * ds->deformationSpread;			scale = WAVEVALUE( table, ds->deformationWave.base, 				ds->deformationWave.amplitude,				ds->deformationWave.phase + off,				ds->deformationWave.frequency );			VectorScale( normal, scale, offset );						xyz[0] += offset[0];			xyz[1] += offset[1];			xyz[2] += offset[2];		}	}}
开发者ID:vitalsigngame,项目名称:ioq3,代码行数:49,


示例5: RB_CalcDeformVertexes

/*========================RB_CalcDeformVertexes========================*/void RB_CalcDeformVertexes( deformStage_t *ds ){	int i;	vec3_t	offset;	float	scale;	float	*xyz = ( float * ) tess.xyz;	uint32_t	*normal = tess.normal;	float	*table;	if ( ds->deformationWave.frequency == 0 )	{		scale = EvalWaveForm( &ds->deformationWave );		for ( i = 0; i < tess.numVertexes; i++, xyz += 4, normal++ )		{			R_VboUnpackNormal(offset, *normal);						xyz[0] += offset[0] * scale;			xyz[1] += offset[1] * scale;			xyz[2] += offset[2] * scale;		}	}	else	{		table = TableForFunc( ds->deformationWave.func );		for ( i = 0; i < tess.numVertexes; i++, xyz += 4, normal++ )		{			float off = ( xyz[0] + xyz[1] + xyz[2] ) * ds->deformationSpread;			scale = WAVEVALUE( table, ds->deformationWave.base, 				ds->deformationWave.amplitude,				ds->deformationWave.phase + off,				ds->deformationWave.frequency );			R_VboUnpackNormal(offset, *normal);			xyz[0] += offset[0] * scale;			xyz[1] += offset[1] * scale;			xyz[2] += offset[2] * scale;		}	}}
开发者ID:Pan7,项目名称:ioq3df,代码行数:49,


示例6: RB_CalcDeformVertexes

void RB_CalcDeformVertexes( deformStage_t *ds ){	int i;	vector3	offset;	float	scale;	vector3	*xyz = &tess.xyz[0], *normal = &tess.normal[0];	float	*table;	if ( ds->deformationWave.frequency == 0 )	{		scale = EvalWaveForm( &ds->deformationWave );		for ( i = 0; i < tess.numVertexes; i++, xyz++, normal++ )		{			VectorScale( normal, scale, &offset );						xyz->x += offset.x;			xyz->y += offset.y;			xyz->z += offset.z;		}	}	else	{		table = TableForFunc( ds->deformationWave.func );		for ( i = 0; i < tess.numVertexes; i++, xyz++, normal++ )		{			float off = ( xyz->x + xyz->y + xyz->z ) * ds->deformationSpread;			scale = WAVEVALUE( table, ds->deformationWave.base, 				ds->deformationWave.amplitude,				ds->deformationWave.phase + off,				ds->deformationWave.frequency );			VectorScale( normal, scale, &offset );						xyz->x += offset.x;			xyz->y += offset.y;			xyz->z += offset.z;		}	}}
开发者ID:AstralSerpent,项目名称:QtZ,代码行数:42,


示例7: RB_CalcDeformVertexes

/*========================RB_CalcDeformVertexes========================*/void RB_CalcDeformVertexes( deformStage_t *ds ){	int    i;	vec3_t offset;	float  scale;	float  *xyz = ( float * ) tess.xyz;	float  *normal = ( float * ) tess.normal;	float  *table;	// Ridah	if ( ds->deformationWave.frequency < 0 )	{		qboolean inverse = qfalse;		vec3_t   worldUp;		//static vec3_t up = {0,0,1};		if ( VectorCompare( backEnd.currentEntity->e.fireRiseDir, vec3_origin ) )		{			VectorSet( backEnd.currentEntity->e.fireRiseDir, 0, 0, 1 );		}		// get the world up vector in local coordinates		if ( backEnd.currentEntity->e.hModel )		{			// world surfaces don't have an axis			VectorRotate( backEnd.currentEntity->e.fireRiseDir, backEnd.currentEntity->e.axis, worldUp );		}		else		{			VectorCopy( backEnd.currentEntity->e.fireRiseDir, worldUp );		}		// don't go so far if sideways, since they must be moving		VectorScale( worldUp, 0.4 + 0.6 * Q_fabs( backEnd.currentEntity->e.fireRiseDir[ 2 ] ), worldUp );		ds->deformationWave.frequency *= -1;		if ( ds->deformationWave.frequency > 999 )		{			// hack for negative Z deformation (ack)			inverse = qtrue;			ds->deformationWave.frequency -= 999;		}		table = TableForFunc( ds->deformationWave.func );		for ( i = 0; i < tess.numVertexes; i++, xyz += 4, normal += 4 )		{			float off = ( xyz[ 0 ] + xyz[ 1 ] + xyz[ 2 ] ) * ds->deformationSpread;			float dot;			scale = WAVEVALUE( table, ds->deformationWave.base,			                   ds->deformationWave.amplitude, ds->deformationWave.phase + off, ds->deformationWave.frequency );			dot = DotProduct( worldUp, normal );			if ( dot * scale > 0 )			{				if ( inverse )				{					scale *= -1;				}				VectorMA( xyz, dot * scale, worldUp, xyz );			}		}		if ( inverse )		{			ds->deformationWave.frequency += 999;		}		ds->deformationWave.frequency *= -1;	}	// done.	else if ( ds->deformationWave.frequency == 0 )	{		scale = EvalWaveForm( &ds->deformationWave );		for ( i = 0; i < tess.numVertexes; i++, xyz += 4, normal += 4 )		{			VectorScale( normal, scale, offset );			xyz[ 0 ] += offset[ 0 ];			xyz[ 1 ] += offset[ 1 ];			xyz[ 2 ] += offset[ 2 ];		}	}	else	{		table = TableForFunc( ds->deformationWave.func );		for ( i = 0; i < tess.numVertexes; i++, xyz += 4, normal += 4 )//.........这里部分代码省略.........
开发者ID:Asvarox,项目名称:Unvanquished,代码行数:101,



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


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