Panda3D
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends

FltLightSourceDefinition Class Reference

Represents a single entry in the light source palette. More...

#include "fltLightSourceDefinition.h"

Inheritance diagram for FltLightSourceDefinition:
FltRecord TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Types

enum  LightType { LT_infinite = 0, LT_local = 1, LT_spot = 2 }

Public Member Functions

 FltLightSourceDefinition (FltHeader *header)
virtual TypeHandle force_init_type ()
virtual TypeHandle get_type () const

Static Public Member Functions

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.

Public Attributes

Colorf _ambient
float _constant_coefficient
float _cutoff_angle
Colorf _diffuse
float _exponential_dropoff
int _light_index
string _light_name
LightType _light_type
float _linear_coefficient
bool _modeling_light
float _pitch
float _quadratic_coefficient
Colorf _specular
float _yaw

Protected Member Functions

virtual bool build_record (FltRecordWriter &writer) const
 Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.
virtual bool extract_record (FltRecordReader &reader)
 Fills in the information in this record based on the information given in the indicated datagram, whose opcode has already been read.

Friends

class FltHeader

Detailed Description

Represents a single entry in the light source palette.

This completely defines the color, etc. of a single light source, which may be referenced later by a FltLightSource bead in the hierarchy.

Definition at line 31 of file fltLightSourceDefinition.h.


Member Function Documentation

bool FltLightSourceDefinition::build_record ( FltRecordWriter writer) const [protected, virtual]

Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.

Returns true on success, false if there is some error.

Reimplemented from FltRecord.

Definition at line 101 of file fltLightSourceDefinition.cxx.

References Datagram::add_be_float32(), Datagram::add_be_int32(), Datagram::add_fixed_string(), FltRecord::build_record(), Datagram::pad_bytes(), FltRecordWriter::set_opcode(), and FltRecordWriter::update_datagram().

bool FltLightSourceDefinition::extract_record ( FltRecordReader reader) [protected, virtual]

Fills in the information in this record based on the information given in the indicated datagram, whose opcode has already been read.

Returns true on success, false if the datagram is invalid.

Reimplemented from FltRecord.

Definition at line 52 of file fltLightSourceDefinition.cxx.

References FltRecord::check_remaining_size(), FltRecord::extract_record(), FltRecordReader::get_iterator(), and FltRecordReader::get_opcode().

static void FltLightSourceDefinition::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from FltRecord.

Definition at line 72 of file fltLightSourceDefinition.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations