コード例 #1
0
ファイル: VertexFormat.cpp プロジェクト: TheRyaz/c_reading
String VertexFormat::toString() const
{
	const int bufSize = 512;
	char buf[bufSize+1] = "XYZ";

	if ( hasRHW() )
		append( buf, bufSize, "RHW" );
	if ( hasNormal() )
		append( buf, bufSize, "NORMAL" );
	if ( hasDiffuse() )
		append( buf, bufSize, "DIFFUSE" );
	if ( hasSpecular() )
		append( buf, bufSize, "SPECULAR" );

	char msg[512];
	for ( int i = 0 ; i < textureCoordinates() ; ++i )
	{
		sprintf( msg, "TEXCOORDSIZE%i(%i)", getTextureCoordinateSize(i), i );
		append( buf, bufSize, msg );
	}

	if ( weights() > 0 )
	{
		sprintf( msg, "WEIGHTS=%i", weights() );
		append( buf, bufSize, msg );
	}

	return buf;
}
コード例 #2
0
const double* IfcGeom::Material::specular() const { if (hasSpecular()) return &((*style->Specular()).R()); else return black; }