74 const PfmFile *undist_lut =
nullptr);
91 bool uses_aux_pfm()
const;
92 void r_fill_displacement(
PNMImage &result,
int xi,
int yi,
93 double nxi,
double nyi,
double u_scale,
double v_scale,
95 void r_fill_displacement(
PfmFile &result,
int xi,
int yi,
96 double nxi,
double nyi,
double u_scale,
double v_scale,
99 void make_vis_mesh_geom(
GeomNode *gnode,
bool inverted)
const;
106 bool transform_point(LPoint2f &point)
const;
107 bool transform_point(LPoint3f &point)
const;
108 bool transform_vector(LVector3f &vec)
const;
118 typedef pvector<VisColumn> VisColumns;
121 ColumnType source, ColumnType target,
124 const Lens *lens =
nullptr,
const PfmFile *undist_lut =
nullptr);
125 void build_auto_vis_columns(VisColumns &vis_columns,
bool for_points)
const;
126 CPT(
GeomVertexFormat) make_array_format(
const VisColumns &vis_columns)
const;
135 bool _keep_beyond_lens;
138 VisColumns _vis_columns;
140 friend class VisColumn;
A node that holds Geom objects, renderable pieces of geometry.
This object provides a high-level interface for quickly writing a sequence of numeric values from a v...
Encodes a string name in a hash table, mapping it to a pointer.
A base class for any number of different kinds of lenses, linear and otherwise.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
Defines a pfm file, a 2-d table of floating-point numbers, either 3-component or 1-component,...
bool get_vis_inverse() const
Returns the vis_inverse flag.
NodePath generate_vis_points() const
Creates a point cloud with the points of the pfm as 3-d coordinates in space, and texture coordinates...
void clear_aux_pfm()
Removes the auxiliary PfmFile from this PfmVizzer.
void clear_vis_columns()
Removes all of the previously-added vis columns in preparation for building a new list.
void clear_flat_texcoord_name()
Resets the flat_texcoord_name to empty, so that additional texture coordinates are not created.
bool get_keep_beyond_lens() const
Returns the keep_beyond_lens flag.
const PfmFile * get_aux_pfm() const
Returns the reference to the auxiliary PfmFile queried by this PfmVizzer.
NodePath generate_vis_mesh(MeshFace face=MF_front) const
Creates a triangle mesh with the points of the pfm as 3-d coordinates in space, and texture coordinat...
void set_aux_pfm(const PfmFile *pfm)
Assigns an auxiliary PfmFile to this PfmVizzer.
double calc_max_u_displacement() const
Computes the maximum amount of shift, in pixels either left or right, of any pixel in the distortion ...
void set_vis_blend(const PNMImage *vis_blend)
Specifies a blending map–a grayscale image–that will be applied to the vertex color during generate_v...
void extrude(const Lens *lens)
Converts each (u, v, depth) point of the Pfm file to an (x, y, z) point, by reversing project().
InternalName * get_flat_texcoord_name() const
Returns the flat_texcoord_name.
void set_vis_2d(bool vis_2d)
Sets the vis_2d flag.
void clear_vis_blend()
Removes the blending map set by a prior call to set_vis_blend().
PfmVizzer(PfmFile &pfm)
The PfmVizzer constructor receives a reference to a PfmFile which it will operate on.
void make_displacement(PNMImage &result, double max_u, double max_v, bool for_32bit) const
Assuming the underlying PfmFile is a 2-d distortion mesh, with the U and V in the first two component...
PfmFile & get_pfm()
Returns the reference to the PfmFile manipulated by this PfmVizzer.
double calc_max_v_displacement() const
Computes the maximum amount of shift, in pixels either up or down, of any pixel in the distortion map...
void project(const Lens *lens, const PfmFile *undist_lut=nullptr)
Adjusts each (x, y, z) point of the Pfm file by projecting it through the indicated lens,...
void set_keep_beyond_lens(bool keep_beyond_lens)
Sets the keep_beyond_lens flag.
void set_flat_texcoord_name(InternalName *flat_texcoord_name)
If the flat_texcoord_name is specified, it is the name of an additional vertex column that will be cr...
void set_vis_inverse(bool vis_inverse)
Sets the vis_inverse flag.
bool get_vis_2d() const
Returns the vis_2d flag.
const PNMImage * get_vis_blend() const
Returns the blending map set by the most recent call to set_vis_blend(), or NULL if there is no blend...
void add_vis_column(ColumnType source, ColumnType target, InternalName *name, const TransformState *transform=nullptr, const Lens *lens=nullptr, const PfmFile *undist_lut=nullptr)
Adds a new vis column specification to the list of vertex data columns that will be generated at the ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.