Functions
contrib/brl/bbas/imesh/algo/imesh_render.cxx File Reference
#include "imesh_render.h"
#include <vcl_limits.h>
#include <vcl_cassert.h>
#include <imesh/algo/imesh_project.h>
#include <imesh/imesh_operations.h>
#include <vil/vil_bilin_interp.h>

Go to the source code of this file.

Functions

void imesh_render_triangle_texture (const vgl_point_3d< double > &v1, const vgl_point_3d< double > &v2, const vgl_point_3d< double > &v3, const vgl_point_2d< double > &t1, const vgl_point_2d< double > &t2, const vgl_point_2d< double > &t3, const vil_image_view< vxl_byte > &texture, vil_image_view< vxl_byte > &image, vil_image_view< double > &depth_img)
 Render a textured triangle defined by its vertices.
void imesh_render_textured (const imesh_mesh &mesh, const vpgl_proj_camera< double > &camera, const vil_image_view< vxl_byte > &texture, vil_image_view< vxl_byte > &image, vil_image_view< double > &depth_img)
 Render the mesh using the camera and a texture image.

Detailed Description

Definition in file imesh_render.cxx.


Function Documentation

void imesh_render_textured ( const imesh_mesh mesh,
const vpgl_proj_camera< double > &  camera,
const vil_image_view< vxl_byte > &  texture,
vil_image_view< vxl_byte > &  image,
vil_image_view< double > &  depth_img 
)

Render the mesh using the camera and a texture image.

A depth map is also computed and used for occlusion. Texture mapping uses interpolates from the texture image with no additional lighting calculations.

Definition at line 77 of file imesh_render.cxx.

void imesh_render_triangle_texture ( const vgl_point_3d< double > &  v1,
const vgl_point_3d< double > &  v2,
const vgl_point_3d< double > &  v3,
const vgl_point_2d< double > &  t1,
const vgl_point_2d< double > &  t2,
const vgl_point_2d< double > &  t3,
const vil_image_view< vxl_byte > &  texture,
vil_image_view< vxl_byte > &  image,
vil_image_view< double > &  depth_img 
)

Render a textured triangle defined by its vertices.

v1,v2,v3 are coordinates in the projected image (plus depth) t1,t2,t3 are corresponding texture coordinates (in the unit square)

Definition at line 15 of file imesh_render.cxx.