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


C++ ModelPtr::Cols方法代码示例

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


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

示例1: TwoPassZbuffer

void Optimizer::TwoPassZbuffer(const CameraParameter& rho, const IlluminationParameter& lamda, MeshPtr mesh, ModelPtr model, bool segment)
{
	int width = model->Rows();
	int height = model->Cols();

	mesh->UpdateVertexNormal();
	shared_ptr<Camera> camera = make_shared<PinholeCamera>(rho, width, height);
	shared_ptr<Camera> light = make_shared<PinholeCamera>(rho, lamda, width, height);
	shared_ptr<Illumination> illumination = make_shared<PhongIllumination>(lamda);

	HardwareRender render(camera, illumination);
	vector<float> depth_map(width*height);
	render.Rendering(mesh, lamda, depth_map);

	HardwareRender render2(light, illumination);
	vector<float> shadow_map(width*height);
	render2.Rendering(mesh, lamda, shadow_map);

	shared_ptr<DepthBuffer> object_depth = nullptr;
	shared_ptr<BoxRaster> raster = nullptr;
	SoftwareRender object_render(camera, illumination, object_depth, raster);
	if (segment)
	{
		object_render.TwoPassZbufferSegment(light, mesh, model, depth_map, shadow_map);
	}
	else
	{
		object_render.TwoPassZbuffer(light, mesh, model, depth_map, shadow_map);
	}
}
开发者ID:tpys,项目名称:face-reconstruction-from-one-frontal-image,代码行数:30,代码来源:optimizer.cpp

示例2: CpuRendering

void Optimizer::CpuRendering(const CameraParameter& rho,
	const IlluminationParameter& lamda,
	MeshPtr mesh,
	ModelPtr model)
{
	int width = model->Rows();
	int height = model->Cols();

	shared_ptr<Camera> camera = make_shared<PinholeCamera>(rho, width, height);
	shared_ptr<Illumination> illumination = make_shared<PhongIllumination>(lamda);
	shared_ptr<DepthBuffer> depth = make_shared<DepthBuffer>(width, height);
	shared_ptr<BoxRaster> raster = make_shared<BoxRaster>();
	SoftwareRender cpu_render(camera, illumination, depth, raster);
	cpu_render.Rending(mesh, model);

}
开发者ID:tpys,项目名称:face-reconstruction-from-one-frontal-image,代码行数:16,代码来源:optimizer.cpp

示例3: GpuRendering

void Optimizer::GpuRendering(const CameraParameter& rho,
	const IlluminationParameter& lamda,
	MeshPtr mesh,
	ModelPtr model)
{
	int width = model->Rows();
	int height = model->Cols();

	mesh->UpdateVertexNormal();
	shared_ptr<Camera> camera = make_shared<PinholeCamera>(rho, width, height);
	shared_ptr<Camera> light = make_shared<PinholeCamera>(rho, lamda, ShadowResolution, ShadowResolution);
	shared_ptr<Illumination> illumination = make_shared<PhongIllumination>(lamda);

	//HardwareRender gpu_render(camera, light,illumination);
	HardwareRender gpu_render(camera, illumination);
	gpu_render.RenderingWithBackground(mesh, model, lamda);
	//gpu_render.RenderingWithShadow(mesh, lamda);
}
开发者ID:tpys,项目名称:face-reconstruction-from-one-frontal-image,代码行数:18,代码来源:optimizer.cpp


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