mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
MF_back etc
This commit is contained in:
parent
2a3ad0d4e5
commit
ead8b03712
@ -532,7 +532,7 @@ xform(const LMatrix4 &transform) {
|
|||||||
// projecting it through the indicated lens, converting
|
// projecting it through the indicated lens, converting
|
||||||
// each point to a (u, v, 0) texture coordinate. The
|
// each point to a (u, v, 0) texture coordinate. The
|
||||||
// resulting file can be generated to a mesh (with
|
// resulting file can be generated to a mesh (with
|
||||||
// set_vis_inverse(true) and generate_vis_mesh(true))
|
// set_vis_inverse(true) and generate_vis_mesh())
|
||||||
// that will apply the lens distortion to an arbitrary
|
// that will apply the lens distortion to an arbitrary
|
||||||
// texture image.
|
// texture image.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -719,14 +719,17 @@ generate_vis_points() const {
|
|||||||
// pfm grid.
|
// pfm grid.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
NodePath PfmFile::
|
NodePath PfmFile::
|
||||||
generate_vis_mesh(bool double_sided) const {
|
generate_vis_mesh(MeshFace face) const {
|
||||||
nassertr(is_valid(), NodePath());
|
nassertr(is_valid(), NodePath());
|
||||||
|
nassertr(face != 0, NodePath());
|
||||||
|
|
||||||
PT(GeomNode) gnode = new GeomNode("");
|
PT(GeomNode) gnode = new GeomNode("");
|
||||||
|
|
||||||
make_vis_mesh_geom(gnode, false);
|
if (face & MF_front) {
|
||||||
|
make_vis_mesh_geom(gnode, false);
|
||||||
|
}
|
||||||
|
|
||||||
if (double_sided) {
|
if (face & MF_back) {
|
||||||
make_vis_mesh_geom(gnode, true);
|
make_vis_mesh_geom(gnode, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,13 @@ PUBLISHED:
|
|||||||
INLINE bool get_vis_2d() const;
|
INLINE bool get_vis_2d() const;
|
||||||
|
|
||||||
NodePath generate_vis_points() const;
|
NodePath generate_vis_points() const;
|
||||||
NodePath generate_vis_mesh(bool double_sided) const;
|
|
||||||
|
enum MeshFace {
|
||||||
|
MF_front = 0x01,
|
||||||
|
MF_back = 0x02,
|
||||||
|
MF_both = 0x03,
|
||||||
|
};
|
||||||
|
NodePath generate_vis_mesh(MeshFace face = MF_front) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void make_vis_mesh_geom(GeomNode *gnode, bool inverted) const;
|
void make_vis_mesh_geom(GeomNode *gnode, bool inverted) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user