Panda3D
Public Member Functions | Static Public Member Functions | List of all members
FltBead Class Reference

A base class for any of a broad family of flt records that represent particular beads in the hierarchy. More...

#include "fltBead.h"

Inheritance diagram for FltBead:
FltRecord TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase FltBeadID FltExternalReference FltInstanceDefinition FltInstanceRef FltMeshPrimitive FltCurve FltGeometry FltGroup FltHeader FltLOD FltObject FltFace FltMesh

Public Member Functions

 FltBead (FltHeader *header)
 
void add_transform_step (FltTransformRecord *record)
 Applies the indicated transform step to the net transformation applied to the bead. More...
 
void clear_transform ()
 Removes any transform matrix and all transform steps on this bead. More...
 
virtual TypeHandle force_init_type ()
 
int get_num_transform_steps () const
 Returns the number of individual steps that define the net transform on this bead as returned by set_transform(). More...
 
int get_replicate_count () const
 Returns the replicate count of this bead. More...
 
const LMatrix4d & get_transform () const
 Returns the single-precision 4x4 matrix that represents the transform applied to this bead, or the identity matrix if the bead has not been transformed. More...
 
FltTransformRecordget_transform_step (int n)
 Returns the nth individual step that defines the net transform on this bead. More...
 
const FltTransformRecordget_transform_step (int n) const
 Returns the nth individual step that defines the net transform on this bead. More...
 
virtual TypeHandle get_type () const
 
bool has_transform () const
 Returns true if the bead has been transformed, false otherwise. More...
 
void set_replicate_count (int count)
 Changes the replicate count of this bead. More...
 
void set_transform (const LMatrix4d &mat)
 Replaces the transform matrix on this bead. More...
 
- 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. More...
 
void add_child (FltRecord *child)
 Adds a new child to the end of the list of children for this record. More...
 
void add_extension (FltRecord *extension)
 Adds a new extension to the end of the list of extensions for this record. More...
 
void add_subface (FltRecord *subface)
 Adds a new subface to the end of the list of subfaces for this record. More...
 
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. More...
 
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. More...
 
void clear_ancillary ()
 Removes all unsupported ancillary records from this record. More...
 
void clear_children ()
 Removes all children from this record. More...
 
void clear_comment ()
 Removes the comment for this record. More...
 
void clear_extensions ()
 Removes all extensions from this record. More...
 
void clear_subfaces ()
 Removes all subfaces from this record. More...
 
FltRecordget_ancillary (int n) const
 Returns the nth unsupported ancillary record of this record. More...
 
FltRecordget_child (int n) const
 Returns the nth child of this record. More...
 
const std::string & get_comment () const
 Retrieves the comment for this record, or empty string if the record has no comment. More...
 
FltRecordget_extension (int n) const
 Returns the nth extension of this record. More...
 
int get_num_ancillary () const
 Returns the number of unsupported ancillary records of this record. More...
 
int get_num_children () const
 Returns the number of child records of this record. More...
 
int get_num_extensions () const
 Returns the number of extension attribute records for this object. More...
 
int get_num_subfaces () const
 Returns the number of subface records of this record. More...
 
FltRecordget_subface (int n) const
 Returns the nth subface of this record. More...
 
bool has_comment () const
 Returns true if this record has a nonempty comment, false otherwise. More...
 
virtual void output (std::ostream &out) const
 Writes a quick one-line description of the record, but not its children. More...
 
void set_comment (const std::string &comment)
 Changes the comment for this record. More...
 
virtual void write (std::ostream &out, int indent_level=0) const
 Writes a multiple-line description of the record and all of its children. More...
 
- 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. More...
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
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. More...
 
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly. More...
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type. More...
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object. More...
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More...
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More...
 
void ref () const
 Explicitly increments the reference count. More...
 
bool ref_if_nonzero () const
 Atomically increases the reference count of this object if it is not zero. More...
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
virtual bool unref () const
 Explicitly decrements the reference count. More...
 
WeakReferenceListweak_ref ()
 Adds the indicated PointerToVoid as a weak reference to this object. More...
 
void weak_unref ()
 Removes the indicated PointerToVoid as a weak reference to this object. More...
 

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. More...
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 

Additional Inherited Members

- Public Attributes inherited from TypedObject
 get_type
 
- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count. More...
 

Detailed Description

A base class for any of a broad family of flt records that represent particular beads in the hierarchy.

These are things like group beads and object beads, as opposed to things like push and pop or comment records.

Definition at line 29 of file fltBead.h.

Member Function Documentation

◆ add_transform_step()

void FltBead::add_transform_step ( FltTransformRecord record)

Applies the indicated transform step to the net transformation applied to the bead.

Definition at line 123 of file fltBead.cxx.

◆ clear_transform()

void FltBead::clear_transform ( )

Removes any transform matrix and all transform steps on this bead.

Definition at line 79 of file fltBead.cxx.

◆ get_num_transform_steps()

int FltBead::get_num_transform_steps ( ) const

Returns the number of individual steps that define the net transform on this bead as returned by set_transform().

Each step is a single transformation; the concatenation of all transformations will produce the matrix represented by set_transform().

Definition at line 92 of file fltBead.cxx.

Referenced by FltToEggLevelState::set_transform().

◆ get_replicate_count()

int FltBead::get_replicate_count ( ) const

Returns the replicate count of this bead.

If this is nonzero, it means that the bead is implicitly copied this number of additional times (for replicate_count + 1 total copies), applying the transform on this bead for each copy. In this case, the transform does *not* apply to the initial copy of the bead.

Definition at line 141 of file fltBead.cxx.

◆ get_transform()

const LMatrix4d & FltBead::get_transform ( ) const

Returns the single-precision 4x4 matrix that represents the transform applied to this bead, or the identity matrix if the bead has not been transformed.

Definition at line 58 of file fltBead.cxx.

Referenced by FltToEggLevelState::get_synthetic_group().

◆ get_transform_step() [1/2]

FltTransformRecord * FltBead::get_transform_step ( int  n)

Returns the nth individual step that defines the net transform on this bead.

See get_num_transform_steps().

Definition at line 101 of file fltBead.cxx.

◆ get_transform_step() [2/2]

const FltTransformRecord * FltBead::get_transform_step ( int  n) const

Returns the nth individual step that defines the net transform on this bead.

See get_num_transform_steps().

Definition at line 112 of file fltBead.cxx.

◆ has_transform()

bool FltBead::has_transform ( ) const

Returns true if the bead has been transformed, false otherwise.

If this returns true, get_transform() will return the single-precision net transformation, and get_num_transform_steps() will return nonzero.

Definition at line 48 of file fltBead.cxx.

Referenced by FltToEggLevelState::set_transform().

◆ set_replicate_count()

void FltBead::set_replicate_count ( int  count)

Changes the replicate count of this bead.

If you are setting the replicate count to some nonzero number, you must also set a transform on the bead. See set_replicate_count().

Definition at line 151 of file fltBead.cxx.

◆ set_transform()

void FltBead::set_transform ( const LMatrix4d &  mat)

Replaces the transform matrix on this bead.

This implicitly removes all of the transform steps added previously, and replaces them with a single 4x4 general matrix transform step.

Definition at line 68 of file fltBead.cxx.


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