HeightfieldTesselator

from panda3d.core import HeightfieldTesselator
class HeightfieldTesselator

Bases: Namable

Inheritance diagram

Inheritance diagram of HeightfieldTesselator

__init__(*args, **kwargs)
generate()

C++ Interface: generate(const HeightfieldTesselator self)

/**
  • Generates a tree of nodes that represents the heightfield. This can be

  • reparented into the scene.

*/

getElevation()

C++ Interface: get_elevation(const HeightfieldTesselator self, double x, double y)

/**
  • Fetches the elevation at (x,y), where the input coordinate is specified in

  • pixels. This ignores the current tesselation level and instead provides an

  • accurate number. Linear blending is used for non-integral coordinates.

*/

get_elevation()

C++ Interface: get_elevation(const HeightfieldTesselator self, double x, double y)

/**
  • Fetches the elevation at (x,y), where the input coordinate is specified in

  • pixels. This ignores the current tesselation level and instead provides an

  • accurate number. Linear blending is used for non-integral coordinates.

*/

heightfield()

C++ Interface: heightfield(const HeightfieldTesselator self)

/**
  • Returns a reference to the heightfield (a PNMImage) contained inside the

  • HeightfieldTesselator. You can use the reference to alter the heightfield.

*/

setFocalPoint()

C++ Interface: set_focal_point(const HeightfieldTesselator self, int x, int y)

/**
  • Sets the focal point. The tesselator generates high-resolution terrain

  • around the focal point, and progressively lower and lower resolution

  • terrain as you get farther away. The units are in pixels.

*/

setHeightfield()

C++ Interface: set_heightfield(const HeightfieldTesselator self, const Filename filename)

/**
  • Loads the specified greyscale image file into the heightfield.

*/

setHorizontalScale()

C++ Interface: set_horizontal_scale(const HeightfieldTesselator self, double h)

/**
  • Sets the horizontal scale. The default scale is 1.0, meaning that each

  • pixel in the heightfield is 1x1 panda units wide.

*/

setMaxTriangles()

C++ Interface: set_max_triangles(const HeightfieldTesselator self, int n)

/**
  • Sets the max triangles per geom.

*/

setPolyCount()

C++ Interface: set_poly_count(const HeightfieldTesselator self, int n)

/**
  • Sets the polygon-count target. The tesselator usually manages to come

  • within about 20% of the target, plus or minus.

*/

setVerticalScale()

C++ Interface: set_vertical_scale(const HeightfieldTesselator self, double v)

/**
  • Sets the vertical scale. The default scale is 255.0, meaning that each as

  • the gray value ranges from (0-1), the elevation ranges from (0-255) feet.

*/

setVisibilityRadius()

C++ Interface: set_visibility_radius(const HeightfieldTesselator self, int r)

/**
  • Sets the visibility radius. Polygons that are completely outside the

  • radius (relative to the focal point) are cropped away. The cropping is

  • imperfect (all approximations are conservative), so this should be used in

  • conjunction with a far clipping plane, fog, or some other visibility

  • limiting mechanism. The units are in pixels.

*/

set_focal_point()

C++ Interface: set_focal_point(const HeightfieldTesselator self, int x, int y)

/**
  • Sets the focal point. The tesselator generates high-resolution terrain

  • around the focal point, and progressively lower and lower resolution

  • terrain as you get farther away. The units are in pixels.

*/

set_heightfield()

C++ Interface: set_heightfield(const HeightfieldTesselator self, const Filename filename)

/**
  • Loads the specified greyscale image file into the heightfield.

*/

set_horizontal_scale()

C++ Interface: set_horizontal_scale(const HeightfieldTesselator self, double h)

/**
  • Sets the horizontal scale. The default scale is 1.0, meaning that each

  • pixel in the heightfield is 1x1 panda units wide.

*/

set_max_triangles()

C++ Interface: set_max_triangles(const HeightfieldTesselator self, int n)

/**
  • Sets the max triangles per geom.

*/

set_poly_count()

C++ Interface: set_poly_count(const HeightfieldTesselator self, int n)

/**
  • Sets the polygon-count target. The tesselator usually manages to come

  • within about 20% of the target, plus or minus.

*/

set_vertical_scale()

C++ Interface: set_vertical_scale(const HeightfieldTesselator self, double v)

/**
  • Sets the vertical scale. The default scale is 255.0, meaning that each as

  • the gray value ranges from (0-1), the elevation ranges from (0-255) feet.

*/

set_visibility_radius()

C++ Interface: set_visibility_radius(const HeightfieldTesselator self, int r)

/**
  • Sets the visibility radius. Polygons that are completely outside the

  • radius (relative to the focal point) are cropped away. The cropping is

  • imperfect (all approximations are conservative), so this should be used in

  • conjunction with a far clipping plane, fog, or some other visibility

  • limiting mechanism. The units are in pixels.

*/