42 virtual void load_data()=0;
44 INLINE
bool is_valid()
const;
46 INLINE
const Filename &get_normal_map()
const;
47 INLINE
const Filename &get_splat_map()
const;
49 INLINE
int get_num_splat_layers()
const;
50 INLINE
const Filename &get_splat_layer(
int n)
const;
51 INLINE PN_stdfloat get_splat_layer_tiling(
int n)
const;
52 INLINE LColor get_splat_layer_color(
int n)
const;
56 INLINE PN_stdfloat get_min_height()
const;
57 INLINE PN_stdfloat get_max_height()
const;
59 virtual PN_stdfloat get_height(PN_stdfloat x, PN_stdfloat y)
const=0;
60 virtual PN_stdfloat get_smooth_height(PN_stdfloat x, PN_stdfloat y, PN_stdfloat radius)
const;
61 virtual PN_stdfloat get_slope(PN_stdfloat x, PN_stdfloat y)
const;
63 bool placement_is_acceptable(PN_stdfloat x, PN_stdfloat y,
64 PN_stdfloat height_min, PN_stdfloat height_max,
65 PN_stdfloat slope_min, PN_stdfloat slope_max);
68 PN_stdfloat start_x, PN_stdfloat start_y,
69 PN_stdfloat size_xy,
int num_xy)
const;
71 virtual void output(std::ostream &out)
const;
72 virtual void write(std::ostream &out,
int indent_level = 0)
const;
75 const SpeedTree::SVertexAttribDesc *get_st_vertex_format()
const;
81 static bool convert_vertex_format(
VertexAttribs &st_vertex_attribs,
83 static bool convert_vertex_column(SpeedTree::SVertexAttribDesc &st_attrib,
91 UnalignedLVecBase4 _color;
105 PN_stdfloat _min_height;
106 PN_stdfloat _max_height;
112 static void init_type() {
113 TypedReferenceCount::init_type();
115 TypedReferenceCount::get_class_type());
118 return get_class_type();
120 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
126 INLINE std::ostream &operator << (std::ostream &out,
const STTerrain &terrain) {
The name of a file, such as a texture file or an Egg file.
This defines how a single column is interleaved within a vertex array stored within a Geom.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A base class for all things which can have a name.
void output(std::ostream &out) const
Outputs the Namable.
This is the abstract base class that defines the interface needed to describe a terrain for rendering...
TypeHandle is the identifier used to differentiate C++ class types.
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.