Panda3D
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
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

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
 
- Public Member Functions inherited from FltRecord
 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.
 
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.
 
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.
 
FltRecordget_ancillary (int n) const
 Returns the nth unsupported ancillary record of this record.
 
FltRecordget_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.
 
FltRecordget_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.
 
FltRecordget_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.
 
- Public Member Functions inherited from TypedReferenceCount
 TypedReferenceCount (const TypedReferenceCount &copy)
 
void operator= (const TypedReferenceCount &copy)
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)=default
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer.
 
const TypedObjectas_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.
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from MemoryBase
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)
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_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.
 
WeakReferenceListweak_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 Public Member Functions inherited from FltRecord
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedObject
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 Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 

Public Attributes

LColor _ambient
 
PN_stdfloat _constant_coefficient
 
PN_stdfloat _cutoff_angle
 
LColor _diffuse
 
PN_stdfloat _exponential_dropoff
 
int _light_index
 
std::string _light_name
 
LightType _light_type
 
PN_stdfloat _linear_coefficient
 
bool _modeling_light
 
PN_stdfloat _pitch
 
PN_stdfloat _quadratic_coefficient
 
LColor _specular
 
PN_stdfloat _yaw
 
- Public Attributes inherited from TypedObject
 get_type
 
- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count.
 

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 28 of file fltLightSourceDefinition.h.

Member Enumeration Documentation

◆ LightType

enum FltLightSourceDefinition::LightType

Definition at line 32 of file fltLightSourceDefinition.h.

Constructor & Destructor Documentation

◆ FltLightSourceDefinition()

FltLightSourceDefinition::FltLightSourceDefinition ( FltHeader * header)

Definition at line 23 of file fltLightSourceDefinition.cxx.

Member Function Documentation

◆ force_init_type()

virtual TypeHandle FltLightSourceDefinition::force_init_type ( )
inlinevirtual

Reimplemented from FltRecord.

Definition at line 65 of file fltLightSourceDefinition.h.

◆ get_class_type()

static TypeHandle FltLightSourceDefinition::get_class_type ( )
inlinestatic

Definition at line 66 of file fltLightSourceDefinition.h.

◆ get_type()

virtual TypeHandle FltLightSourceDefinition::get_type ( ) const
inlinevirtual

Reimplemented from FltRecord.

Definition at line 62 of file fltLightSourceDefinition.h.

◆ init_type()

static void FltLightSourceDefinition::init_type ( )
inlinestatic

Definition at line 69 of file fltLightSourceDefinition.h.

Friends And Related Symbol Documentation

◆ FltHeader

friend class FltHeader
friend

Definition at line 78 of file fltLightSourceDefinition.h.

Member Data Documentation

◆ _ambient

LColor FltLightSourceDefinition::_ambient

Definition at line 40 of file fltLightSourceDefinition.h.

◆ _constant_coefficient

PN_stdfloat FltLightSourceDefinition::_constant_coefficient

Definition at line 52 of file fltLightSourceDefinition.h.

◆ _cutoff_angle

PN_stdfloat FltLightSourceDefinition::_cutoff_angle

Definition at line 45 of file fltLightSourceDefinition.h.

◆ _diffuse

LColor FltLightSourceDefinition::_diffuse

Definition at line 41 of file fltLightSourceDefinition.h.

◆ _exponential_dropoff

PN_stdfloat FltLightSourceDefinition::_exponential_dropoff

Definition at line 44 of file fltLightSourceDefinition.h.

◆ _light_index

int FltLightSourceDefinition::_light_index

Definition at line 38 of file fltLightSourceDefinition.h.

◆ _light_name

std::string FltLightSourceDefinition::_light_name

Definition at line 39 of file fltLightSourceDefinition.h.

◆ _light_type

LightType FltLightSourceDefinition::_light_type

Definition at line 43 of file fltLightSourceDefinition.h.

◆ _linear_coefficient

PN_stdfloat FltLightSourceDefinition::_linear_coefficient

Definition at line 53 of file fltLightSourceDefinition.h.

◆ _modeling_light

bool FltLightSourceDefinition::_modeling_light

Definition at line 55 of file fltLightSourceDefinition.h.

◆ _pitch

PN_stdfloat FltLightSourceDefinition::_pitch

Definition at line 50 of file fltLightSourceDefinition.h.

◆ _quadratic_coefficient

PN_stdfloat FltLightSourceDefinition::_quadratic_coefficient

Definition at line 54 of file fltLightSourceDefinition.h.

◆ _specular

LColor FltLightSourceDefinition::_specular

Definition at line 42 of file fltLightSourceDefinition.h.

◆ _yaw

PN_stdfloat FltLightSourceDefinition::_yaw

Definition at line 49 of file fltLightSourceDefinition.h.


The documentation for this class was generated from the following files: