示例#1
0
文件: type.c 项目: jackspirou/orson
int arity(refObject type)
{ int count = 0;
  refObject pars = cadr(degen(type));
  while (pars != nil)
  { count += 1;
    pars = cddr(pars); }
  return count; }
示例#2
0
void TriangleMesh::Set(const Polyhedron &polyhedron)
{
	std::vector<Triangle> tris = polyhedron.Triangulate();
	if (!tris.empty())
	{
		int alignment = (simdCapability == SIMD_AVX) ? 8 : ((simdCapability == SIMD_SSE41 || simdCapability == SIMD_SSE2) ? 4 : 1);
		float3 degen(-FLOAT_INF, -FLOAT_INF, -FLOAT_INF);
		Triangle degent(degen, degen, degen);
		while(tris.size() % alignment != 0)
			tris.push_back(degent);
		Set(&tris[0], tris.size());
	}
}