15 #include "texturePosition.h"
18 #include "datagramIterator.h"
19 #include "bamReader.h"
20 #include "bamWriter.h"
36 _min_uv.set(0.0, 0.0);
37 _max_uv.set(0.0, 0.0);
38 _wrap_u = EggTexture::WM_unspecified;
39 _wrap_v = EggTexture::WM_unspecified;
49 _margin(copy._margin),
52 _x_size(copy._x_size),
53 _y_size(copy._y_size),
54 _min_uv(copy._min_uv),
55 _max_uv(copy._max_uv),
56 _wrap_u(copy._wrap_u),
66 void TexturePosition::
68 _margin = copy._margin;
71 _x_size = copy._x_size;
72 _y_size = copy._y_size;
73 _min_uv = copy._min_uv;
74 _max_uv = copy._max_uv;
75 _wrap_u = copy._wrap_u;
76 _wrap_v = copy._wrap_v;
88 register_factory(get_class_type(), make_TexturePosition);
128 parse_params(params, scan, manager);
129 me->
fillin(scan, manager);
152 _wrap_u = (EggTexture::WrapMode)scan.
get_int32();
153 _wrap_v = (EggTexture::WrapMode)scan.
get_int32();
void fillin(DatagramIterator &scan, BamReader *manager)
Reads the binary data from the given datagram iterator, which was written by a previous call to write...
void add_float64(PN_float64 value)
Adds a 64-bit floating-point number to the datagram.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
virtual void write_datagram(BamWriter *writer, Datagram &datagram)
Fills the indicated datagram up with a binary representation of the current object, in preparation for writing to a Bam file.
This represents a particular position of a texture within a PaletteImage.
Base class for objects that can be written to and read from Bam files.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
PN_int32 get_int32()
Extracts a signed 32-bit integer.
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
static void register_with_read_factory()
Registers the current object as something that can be read from a Bam file.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
PN_float64 get_float64()
Extracts a 64-bit floating-point number.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
void add_int32(PN_int32 value)
Adds a signed 32-bit integer to the datagram.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...