18TypeHandle FltLightSourceDefinition::_type_handle;
23FltLightSourceDefinition::
26 _ambient.set(0.0, 0.0, 0.0, 1.0);
27 _diffuse.set(1.0, 1.0, 1.0, 1.0);
28 _specular.set(0.0, 0.0, 0.0, 1.0);
29 _light_type = LT_infinite;
30 _exponential_dropoff = 1.0;
31 _cutoff_angle = 180.0;
34 _constant_coefficient = 0.0;
35 _linear_coefficient = 0.0;
36 _quadratic_coefficient = 1.0;
37 _modeling_light =
false;
45bool FltLightSourceDefinition::
47 if (!FltRecord::extract_record(reader)) {
51 nassertr(reader.
get_opcode() == FO_light_definition,
false);
91bool FltLightSourceDefinition::
93 if (!FltRecord::build_record(writer)) {
A class to retrieve the individual data elements previously stored in a Datagram.
void skip_bytes(size_t size)
Skips over the indicated number of bytes in the datagram.
int32_t get_be_int32()
Extracts a signed 32-bit big-endian integer.
PN_float32 get_be_float32()
Extracts a 32-bit big-endian single-precision floating-point number.
std::string get_fixed_string(size_t size)
Extracts a fixed-length string.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
void add_be_int32(int32_t value)
Adds a signed 32-bit big-endian integer to the datagram.
void add_be_float32(PN_float32 value)
Adds a 32-bit single-precision big-endian floating-point number to the datagram.
void add_fixed_string(const std::string &str, size_t size)
Adds a fixed-length string to the datagram.
void pad_bytes(size_t size)
Adds the indicated number of zero bytes to the datagram.
This class turns an istream into a sequence of FltRecords by reading a sequence of Datagrams and extr...
FltOpcode get_opcode() const
Returns the opcode associated with the current record.
DatagramIterator & get_iterator()
Returns an iterator suitable for extracting data from the current record.
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly.
void set_opcode(FltOpcode opcode)
Sets the opcode associated with the current record.
Datagram & update_datagram()
Returns a modifiable reference to the datagram associated with the current record.
The base class for all kinds of records in a MultiGen OpenFlight file.
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.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.