Panda3D
|
Represents a single texture in the texture palette. More...
#include "fltTexture.h"
Classes | |
struct | GeospecificControlPoint |
struct | LODScale |
struct | SubtextureDef |
Public Types | |
enum | EarthModel { EM_wgs84 = 0 , EM_wgs72 = 1 , EM_bessel = 2 , EM_clarke_1866 = 3 , EM_nad27 = 4 } |
enum | EnvironmentType { ET_modulate = 0 , ET_blend = 1 , ET_decal = 2 , ET_color = 3 } |
enum | ExternalFormat { EF_default = 0 , EF_pack_8 = 1 , EF_pack_16 = 2 } |
enum | FileFormat { FF_none = -1 , FF_att_8_pattern = 0 , FF_att_8_template = 1 , FF_sgi_i = 2 , FF_sgi_ia = 3 , FF_sgi_rgb = 4 , FF_sgi_rgba = 5 } |
typedef pvector< GeospecificControlPoint > | GeospecificControlPoints |
enum | Hemisphere { H_southern = 0 , H_northern = 1 } |
enum | ImageOrigin { IO_lower_left = 0 , IO_upper_left = 1 } |
enum | InternalFormat { IF_default = 0 , IF_i_12a_4 = 1 , IF_ia_8 = 2 , IF_rgb_5 = 3 , IF_rgba_4 = 4 , IF_ia_12 = 5 , IF_rgba_8 = 6 , IF_rgba_12 = 7 , IF_i_16 = 8 , IF_rgb_12 = 9 } |
enum | Magnification { MG_point = 0 , MG_bilinear = 1 , MG_bicubic = 3 , MG_sharpen = 4 , MG_add_detail = 5 , MG_modulate_detail = 6 , MG_bilinear_gequal = 7 , MG_bilinear_lequal = 8 , MG_bicubic_gequal = 9 , MG_bicubic_lequal = 10 } |
enum | Minification { MN_point = 0 , MN_bilinear = 1 , MN_OB_mipmap = 2 , MN_mipmap_point = 3 , MN_mipmap_linear = 4 , MN_mipmap_bilinear = 5 , MN_mipmap_trilinear = 6 , MN_bicubic = 8 , MN_bilinear_gequal = 9 , MN_bilinear_lequal = 10 , MN_bicubic_gequal = 11 , MN_bicubic_lequal = 12 } |
enum | PointsUnits { PU_degrees = 0 , PU_meters = 1 , PU_pixels = 2 } |
enum | ProjectionType { PT_flat_earth = 0 , PT_lambert = 3 , PT_utm = 4 , PT_undefined = 7 } |
enum | RepeatType { RT_repeat = 0 , RT_clamp = 1 } |
typedef pvector< SubtextureDef > | SubtextureDefs |
Public Member Functions | |
FltTexture (FltHeader *header) | |
virtual void | apply_converted_filenames () |
Walks the hierarchy at this record and below and copies the _converted_filename record into the _orig_filename record, so the flt file will be written out with the converted filename instead of what was originally read in. | |
virtual TypeHandle | force_init_type () |
Filename | get_attr_filename () const |
Returns the name of the texture's associated .attr file. | |
Filename | get_texture_filename () const |
Returns the name of the texture image file. | |
virtual TypeHandle | get_type () const |
FltError | read_attr_data () |
Opens up the texture's .attr file and reads its data into the extra FltTexture fields. | |
void | set_texture_filename (const Filename &filename) |
Changes the name of the texture image file. | |
FltError | write_attr_data () const |
Writes the texture's .attr file. | |
FltError | write_attr_data (Filename attr_filename) const |
Writes the texture's .attr file to the named file. | |
![]() | |
FltRecord (FltHeader *header) | |
void | add_ancillary (FltRecord *ancillary) |
Adds a new unsupported ancillary record to the end of the list of ancillary records for this record. | |
void | add_child (FltRecord *child) |
Adds a new child to the end of the list of children for this record. | |
void | add_extension (FltRecord *extension) |
Adds a new extension to the end of the list of extensions for this record. | |
void | add_subface (FltRecord *subface) |
Adds a new subface to the end of the list of subfaces for this record. | |
void | check_remaining_size (const DatagramIterator &di, const std::string &name=std::string()) const |
Checks that the iterator has no bytes left, as it should at the end of a successfully read record. | |
void | clear_ancillary () |
Removes all unsupported ancillary records from this record. | |
void | clear_children () |
Removes all children from this record. | |
void | clear_comment () |
Removes the comment for this record. | |
void | clear_extensions () |
Removes all extensions from this record. | |
void | clear_subfaces () |
Removes all subfaces from this record. | |
FltRecord * | get_ancillary (int n) const |
Returns the nth unsupported ancillary record of this record. | |
FltRecord * | get_child (int n) const |
Returns the nth child of this record. | |
const std::string & | get_comment () const |
Retrieves the comment for this record, or empty string if the record has no comment. | |
FltRecord * | get_extension (int n) const |
Returns the nth extension of this record. | |
int | get_num_ancillary () const |
Returns the number of unsupported ancillary records of this record. | |
int | get_num_children () const |
Returns the number of child records of this record. | |
int | get_num_extensions () const |
Returns the number of extension attribute records for this object. | |
int | get_num_subfaces () const |
Returns the number of subface records of this record. | |
FltRecord * | get_subface (int n) const |
Returns the nth subface of this record. | |
bool | has_comment () const |
Returns true if this record has a nonempty comment, false otherwise. | |
virtual void | output (std::ostream &out) const |
Writes a quick one-line description of the record, but not its children. | |
void | set_comment (const std::string &comment) |
Changes the comment for this record. | |
virtual void | write (std::ostream &out, int indent_level=0) const |
Writes a multiple-line description of the record and all of its children. | |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©)=default | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
TypedObject & | operator= (const TypedObject ©)=default |
![]() | |
void | operator delete (void *, void *) |
void | operator delete (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
![]() | |
int | get_ref_count () const |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. | |
void | ref () const |
Explicitly increments the reference count. | |
bool | ref_if_nonzero () const |
Atomically increases the reference count of this object if it is not zero. | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
virtual bool | unref () const |
Explicitly decrements the reference count. | |
bool | unref_if_one () const |
Atomically decreases the reference count of this object if it is one. | |
WeakReferenceList * | weak_ref () |
Adds the indicated PointerToVoid as a weak reference to this object. | |
void | weak_unref () |
Removes the indicated PointerToVoid as a weak reference to this object. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Friends | |
class | FltHeader |
Represents a single texture in the texture palette.
Definition at line 27 of file fltTexture.h.
Definition at line 157 of file fltTexture.h.
Definition at line 166 of file fltTexture.h.
enum FltTexture::EarthModel |
Definition at line 123 of file fltTexture.h.
enum FltTexture::EnvironmentType |
Definition at line 90 of file fltTexture.h.
enum FltTexture::ExternalFormat |
Definition at line 110 of file fltTexture.h.
enum FltTexture::FileFormat |
Definition at line 47 of file fltTexture.h.
enum FltTexture::Hemisphere |
Definition at line 142 of file fltTexture.h.
enum FltTexture::ImageOrigin |
Definition at line 131 of file fltTexture.h.
enum FltTexture::InternalFormat |
Definition at line 97 of file fltTexture.h.
enum FltTexture::Magnification |
Definition at line 72 of file fltTexture.h.
enum FltTexture::Minification |
Definition at line 57 of file fltTexture.h.
enum FltTexture::PointsUnits |
Definition at line 136 of file fltTexture.h.
enum FltTexture::ProjectionType |
Definition at line 116 of file fltTexture.h.
enum FltTexture::RepeatType |
Definition at line 85 of file fltTexture.h.
FltTexture::FltTexture | ( | FltHeader * | header | ) |
Definition at line 26 of file fltTexture.cxx.
|
virtual |
Walks the hierarchy at this record and below and copies the _converted_filename record into the _orig_filename record, so the flt file will be written out with the converted filename instead of what was originally read in.
Reimplemented from FltRecord.
Definition at line 91 of file fltTexture.cxx.
References FltRecord::apply_converted_filenames(), and Filename::to_os_generic().
Referenced by FltHeader::apply_converted_filenames().
|
inlinevirtual |
Reimplemented from FltRecord.
Definition at line 236 of file fltTexture.h.
Filename FltTexture::get_attr_filename | ( | ) | const |
Returns the name of the texture's associated .attr file.
This contains some additional MultiGen information about the texture parameters. This is, of course, just the name of the texture with .attr appended.
Normally, it won't be necessary to access this file directly; you can call read_attr_data() or write_attr_data() to get at the data stored in this file. (And read_attr_data() is called automatically when the Flt file is read in.)
Definition at line 124 of file fltTexture.cxx.
References get_texture_filename().
Referenced by read_attr_data(), and write_attr_data().
|
inlinestatic |
Definition at line 237 of file fltTexture.h.
Filename FltTexture::get_texture_filename | ( | ) | const |
Returns the name of the texture image file.
Definition at line 100 of file fltTexture.cxx.
Referenced by get_attr_filename().
|
inlinevirtual |
Reimplemented from FltRecord.
Definition at line 233 of file fltTexture.h.
|
inlinestatic |
Definition at line 240 of file fltTexture.h.
FltError FltTexture::read_attr_data | ( | ) |
Opens up the texture's .attr file and reads its data into the extra FltTexture fields.
This is normally performed automatically when the Flt file is read from disk.
Definition at line 135 of file fltTexture.cxx.
References get_attr_filename(), and Filename::open_read().
void FltTexture::set_texture_filename | ( | const Filename & | filename | ) |
Changes the name of the texture image file.
Definition at line 108 of file fltTexture.cxx.
References Filename::to_os_generic().
FltError FltTexture::write_attr_data | ( | ) | const |
Writes the texture's .attr file.
This may or may not be performed automatically, according to the setting of FltHeader::set_auto_attr_update().
Definition at line 170 of file fltTexture.cxx.
References get_attr_filename(), and write_attr_data().
Referenced by write_attr_data().
FltError FltTexture::write_attr_data | ( | Filename | attr_filename | ) | const |
Writes the texture's .attr file to the named file.
Definition at line 178 of file fltTexture.cxx.
References Datagram::get_data(), Datagram::get_length(), Filename::open_write(), and Filename::set_binary().
|
friend |
Definition at line 249 of file fltTexture.h.
PN_stdfloat FltTexture::_clamp |
Definition at line 196 of file fltTexture.h.
std::string FltTexture::_comment |
Definition at line 219 of file fltTexture.h.
Filename FltTexture::_converted_filename |
Definition at line 34 of file fltTexture.h.
int FltTexture::_detail_j |
Definition at line 203 of file fltTexture.h.
int FltTexture::_detail_k |
Definition at line 204 of file fltTexture.h.
int FltTexture::_detail_m |
Definition at line 205 of file fltTexture.h.
int FltTexture::_detail_n |
Definition at line 206 of file fltTexture.h.
int FltTexture::_detail_scramble |
Definition at line 207 of file fltTexture.h.
EarthModel FltTexture::_earth_model |
Definition at line 214 of file fltTexture.h.
EnvironmentType FltTexture::_env_type |
Definition at line 183 of file fltTexture.h.
ExternalFormat FltTexture::_external_format |
Definition at line 191 of file fltTexture.h.
FileFormat FltTexture::_file_format |
Definition at line 174 of file fltTexture.h.
int FltTexture::_file_version |
Definition at line 220 of file fltTexture.h.
double FltTexture::_float_real_world_size_u |
Definition at line 186 of file fltTexture.h.
double FltTexture::_float_real_world_size_v |
Definition at line 187 of file fltTexture.h.
GeospecificControlPoints FltTexture::_geospecific_control_points |
Definition at line 221 of file fltTexture.h.
Hemisphere FltTexture::_geospecific_hemisphere |
Definition at line 218 of file fltTexture.h.
PointsUnits FltTexture::_geospecific_points_units |
Definition at line 217 of file fltTexture.h.
ImageOrigin FltTexture::_image_origin |
Definition at line 216 of file fltTexture.h.
int FltTexture::_imported_origin_code |
Definition at line 188 of file fltTexture.h.
bool FltTexture::_intensity_is_alpha |
Definition at line 184 of file fltTexture.h.
InternalFormat FltTexture::_internal_format |
Definition at line 190 of file fltTexture.h.
int FltTexture::_kernel_version |
Definition at line 189 of file fltTexture.h.
double FltTexture::_lambert_conic_central_meridian |
Definition at line 199 of file fltTexture.h.
double FltTexture::_lambert_conic_lower_latitude |
Definition at line 201 of file fltTexture.h.
double FltTexture::_lambert_conic_upper_latitude |
Definition at line 200 of file fltTexture.h.
LODScale FltTexture::_lod_scale[8] |
Definition at line 195 of file fltTexture.h.
Magnification FltTexture::_mag_filter |
Definition at line 176 of file fltTexture.h.
Magnification FltTexture::_mag_filter_alpha |
Definition at line 197 of file fltTexture.h.
Magnification FltTexture::_mag_filter_color |
Definition at line 198 of file fltTexture.h.
Minification FltTexture::_min_filter |
Definition at line 175 of file fltTexture.h.
PN_stdfloat FltTexture::_mipmap_kernel[8] |
Definition at line 193 of file fltTexture.h.
int FltTexture::_modify_flag |
Definition at line 180 of file fltTexture.h.
int FltTexture::_num_texels_u |
Definition at line 168 of file fltTexture.h.
int FltTexture::_num_texels_v |
Definition at line 169 of file fltTexture.h.
std::string FltTexture::_orig_filename |
Definition at line 33 of file fltTexture.h.
int FltTexture::_pattern_index |
Definition at line 35 of file fltTexture.h.
ProjectionType FltTexture::_projection |
Definition at line 213 of file fltTexture.h.
int FltTexture::_real_world_size_u |
Definition at line 170 of file fltTexture.h.
int FltTexture::_real_world_size_v |
Definition at line 171 of file fltTexture.h.
RepeatType FltTexture::_repeat |
Definition at line 177 of file fltTexture.h.
RepeatType FltTexture::_repeat_u |
Definition at line 178 of file fltTexture.h.
RepeatType FltTexture::_repeat_v |
Definition at line 179 of file fltTexture.h.
SubtextureDefs FltTexture::_subtexture_defs |
Definition at line 222 of file fltTexture.h.
PN_stdfloat FltTexture::_tile_lower_left_u |
Definition at line 209 of file fltTexture.h.
PN_stdfloat FltTexture::_tile_lower_left_v |
Definition at line 210 of file fltTexture.h.
PN_stdfloat FltTexture::_tile_upper_right_u |
Definition at line 211 of file fltTexture.h.
PN_stdfloat FltTexture::_tile_upper_right_v |
Definition at line 212 of file fltTexture.h.
int FltTexture::_up_vector_x |
Definition at line 172 of file fltTexture.h.
int FltTexture::_up_vector_y |
Definition at line 173 of file fltTexture.h.
bool FltTexture::_use_detail |
Definition at line 202 of file fltTexture.h.
bool FltTexture::_use_lod_scale |
Definition at line 194 of file fltTexture.h.
bool FltTexture::_use_mipmap_kernel |
Definition at line 192 of file fltTexture.h.
bool FltTexture::_use_tile |
Definition at line 208 of file fltTexture.h.
int FltTexture::_utm_zone |
Definition at line 215 of file fltTexture.h.
int FltTexture::_x_location |
Definition at line 36 of file fltTexture.h.
int FltTexture::_x_pivot_point |
Definition at line 181 of file fltTexture.h.
int FltTexture::_y_location |
Definition at line 37 of file fltTexture.h.
int FltTexture::_y_pivot_point |
Definition at line 182 of file fltTexture.h.