|
#include <Viewpoint.h>
Collaboration diagram for Viewpoint:
Public Methods | |
Viewpoint () | |
Constructor. | |
void | setExtrinsics (const ColVector3 up_vector, const Vertex center_of_projection, const Vertex lookat_point) |
Sets the extrinsic camera parameters, which are those specified by gluLookAt. | |
void | setIntrinsics (double vert_fov, double width_over_height, double near_plane, double far_plane) |
Sets the intrinsic camera parameters, which are those specified by gluPerspective. | |
void | loadFromFiles (const char *photo_filename, const char *silhouette_filename) |
Loads a color image, and optionally a silhouette image. | |
unsigned int | getWidth () const |
Gets the width of the picture, in pixels. | |
unsigned int | getHeight () const |
Gets the height of the picture, in pixels. | |
Vertex | getLookatPoint () const |
Gets the point that is being looked at in this image. This is usually an approximation, and indicates direction more than anything else. | |
Vertex | getCenterOfProjection () const |
Gets the center of projection, which is where the camera would be if it were a pinhole camera. | |
ColVector3 | getUpVector () const |
Gets a normalized vector that points up relative to the camera. | |
double | getDistanceToObject () const |
Returns the distance between the center of projection and the lookat point. | |
RgbByte | colorAt (unsigned int u, unsigned int v) const |
Gets the color at a given position in the image. | |
bool | pixelIsTransparent (unsigned int u, unsigned int v) const |
Gets whether the pixel at a given position is transparent. | |
bool | hasSilhouette () const |
Returns whether this viewpoint was loaded with an associated silhouette. | |
double * | getModelviewMatrix () const |
Get the modelview matrix that corresponds to this view, in OpenGL (column-major) format. | |
double * | getProjectionMatrix () const |
Get the projection matrix that corresponds to this view, in OpenGL (column-major) format. | |
Public Attributes | |
std::vector< unsigned int > | imageBuffer |
This array of integers serves as an item buffer. It is actually a flattened 2d array of per-pixel identifiers. | |
PortablePixMap | photo |
The color image that corresponds to this view. |
Definition at line 19 of file Viewpoint.h.