本文整理汇总了C++中ModelPtr::Rows方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelPtr::Rows方法的具体用法?C++ ModelPtr::Rows怎么用?C++ ModelPtr::Rows使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelPtr
的用法示例。
在下文中一共展示了ModelPtr::Rows方法的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);
}
}
示例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);
}
示例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);
}