14 #ifndef GEOMIPTERRAIN_H 15 #define GEOMIPTERRAIN_H 43 INLINE
bool set_heightfield(
const PNMImage &image);
45 INLINE
bool set_color_map(
const Filename &filename,
47 INLINE
bool set_color_map(
const PNMImage &image);
48 INLINE
bool set_color_map(
const Texture *image);
49 INLINE
bool set_color_map(
const std::string &path);
50 INLINE
bool has_color_map()
const;
51 INLINE
void clear_color_map();
52 void calc_ambient_occlusion(PN_stdfloat radius = 32, PN_stdfloat contrast = 2.0f, PN_stdfloat brightness = 0.75f);
53 double get_elevation(
double x,
double y);
54 LVector3 get_normal(
int x,
int y);
55 INLINE LVector3 get_normal(
unsigned short mx,
unsigned short my,
57 INLINE
void set_bruteforce(
bool bf);
58 INLINE
bool get_bruteforce();
62 enum AutoFlattenMode {
73 INLINE
void set_auto_flatten(
int mode);
79 INLINE
void set_focal_point(
const LPoint2d &fp);
80 INLINE
void set_focal_point(
const LPoint2f &fp);
81 INLINE
void set_focal_point(
const LPoint3d &fp);
82 INLINE
void set_focal_point(
const LPoint3f &fp);
83 INLINE
void set_focal_point(
double x,
double y);
84 INLINE
void set_focal_point(
NodePath fnp);
85 INLINE
NodePath get_focal_point()
const;
88 INLINE
void set_block_size(
unsigned short newbs);
89 INLINE
unsigned short get_block_size();
90 INLINE
unsigned short get_max_level();
91 INLINE
void set_min_level(
unsigned short minlevel);
92 INLINE
unsigned short get_min_level();
93 INLINE
bool is_dirty();
94 INLINE
void set_factor(PN_stdfloat factor);
95 INLINE
void set_near_far(
double input_near,
double input_far);
96 INLINE
void set_near(
double input_near);
97 INLINE
void set_far(
double input_far);
98 INLINE
const NodePath get_block_node_path(
unsigned short mx,
100 INLINE LVecBase2 get_block_from_pos(
double x,
double y);
101 INLINE
void set_border_stitching(
bool stitching);
102 INLINE
bool get_border_stitching();
103 INLINE
double get_far();
104 INLINE
double get_near();
105 INLINE
int get_flatten_mode();
113 PT(
GeomNode) generate_block(
unsigned short mx,
unsigned short my,
unsigned short level);
114 bool update_block(
unsigned short mx,
unsigned short my,
115 signed short level = -1,
bool forced =
false);
118 bool root_flattened();
120 INLINE
bool is_power_of_two(
unsigned int i);
121 INLINE
float f_part(
float i);
122 INLINE
double f_part(
double i);
123 INLINE
int sfav(
int n,
int powlevel,
int mypowlevel);
124 INLINE
double get_pixel_value(
int x,
int y);
125 INLINE
double get_pixel_value(
unsigned short mx,
unsigned short my,
int x,
int y);
126 INLINE
unsigned short lod_decide(
unsigned short mx,
unsigned short my);
127 unsigned short get_neighbor_level(
unsigned short mx,
unsigned short my,
short dmx,
short dmy);
131 bool _root_flattened;
142 unsigned short _block_size;
143 unsigned short _max_level;
146 bool _focal_is_temporary;
147 unsigned short _min_level;
160 TypedObject::get_class_type());
163 return get_class_type();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
GeoMipTerrain, meaning Panda3D GeoMipMapping, can convert a heightfield image into a 3D terrain,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the base class of a family of classes that represent particular image file types that PNMImag...
This is an abstract class that all classes which use TypeHandle, and also provide virtual functions t...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL vector.
The name of a file, such as a texture file or an Egg file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A node that holds Geom objects, renderable pieces of geometry.