CollisionHeightfield

from panda3d.core import CollisionHeightfield
class CollisionHeightfield

Bases: CollisionSolid

/* * CollisionHeightfield efficiently deals with collisions on uneven * terrain given a heightfield image. A quad tree is implemented to * significantly reduce the amount of triangles tested. Each quad * tree node represents a sub-rectangle of the heightfield image * and thus a box in 3D space. * */

Inheritance diagram

Inheritance diagram of CollisionHeightfield

__init__(*args, **kwargs)
getClassType()

C++ Interface: get_class_type()

getHeight()

C++ Interface: get_height(CollisionHeightfield self, int x, int y)

/**

*/

getHeightfield()

C++ Interface: get_heightfield(const CollisionHeightfield self)

/**

*/

getMaxHeight()

C++ Interface: get_max_height(const CollisionHeightfield self)

/**

*/

getNumSubdivisions()

C++ Interface: get_num_subdivisions(const CollisionHeightfield self)

/**

*/

get_class_type()

C++ Interface: get_class_type()

get_height()

C++ Interface: get_height(CollisionHeightfield self, int x, int y)

/**

*/

get_heightfield()

C++ Interface: get_heightfield(const CollisionHeightfield self)

/**

*/

get_max_height()

C++ Interface: get_max_height(const CollisionHeightfield self)

/**

*/

get_num_subdivisions()

C++ Interface: get_num_subdivisions(const CollisionHeightfield self)

/**

*/

setHeightfield()

C++ Interface: set_heightfield(const CollisionHeightfield self, PNMImage heightfield)

/**

*/

setMaxHeight()

C++ Interface: set_max_height(const CollisionHeightfield self, float max_height)

/**

*/

setNumSubdivisions()

C++ Interface: set_num_subdivisions(const CollisionHeightfield self, int num_subdivisions)

/**
  • Sets the number of quadtree subdivisions and modifies

  • the quadtree accordingly. This should be called when a

  • user wants to modify the number of quadtree subdivisions

  • or from a constructor to initialize the quadtree.

  • If the number of subdivisions is too high, it will

  • automatically be decremented.

*/

set_heightfield()

C++ Interface: set_heightfield(const CollisionHeightfield self, PNMImage heightfield)

/**

*/

set_max_height()

C++ Interface: set_max_height(const CollisionHeightfield self, float max_height)

/**

*/

set_num_subdivisions()

C++ Interface: set_num_subdivisions(const CollisionHeightfield self, int num_subdivisions)

/**
  • Sets the number of quadtree subdivisions and modifies

  • the quadtree accordingly. This should be called when a

  • user wants to modify the number of quadtree subdivisions

  • or from a constructor to initialize the quadtree.

  • If the number of subdivisions is too high, it will

  • automatically be decremented.

*/