Panda3D
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
SpriteAnim Class Reference

Helper class used by SpriteParticleRenderer to keep track of its textures and their respective UVs and source types. More...

#include "spriteParticleRenderer.h"

Inheritance diagram for SpriteAnim:
ReferenceCount MemoryBase

Public Types

enum  SourceType { ST_texture , ST_from_node }
 

Public Member Functions

 SpriteAnim (const TextureCollection &t, const pvector< LTexCoord > &lls, const pvector< LTexCoord > &urs)
 
 SpriteAnim (Texture *t, LTexCoord ll, LTexCoord ur)
 
Textureget_frame (const int n) const
 
LTexCoord get_ll (const int n) const
 
std::string get_model_source () const
 
std::string get_node_source () const
 
int get_num_frames () const
 
SourceType get_source_type () const
 
std::string get_tex_source () const
 
LTexCoord get_ur (const int n) const
 
void set_ll (const int n, LTexCoord c)
 
void set_source_info (const std::string &model, const std::string &node)
 
void set_source_info (const std::string &tex)
 
void set_ur (const int n, LTexCoord c)
 
- 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.
 
- 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)
 

Additional Inherited Members

- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count.
 

Detailed Description

Helper class used by SpriteParticleRenderer to keep track of its textures and their respective UVs and source types.

Definition at line 71 of file spriteParticleRenderer.h.

Member Enumeration Documentation

◆ SourceType

enum SpriteAnim::SourceType

Definition at line 73 of file spriteParticleRenderer.h.

Constructor & Destructor Documentation

◆ SpriteAnim() [1/2]

SpriteAnim::SpriteAnim ( Texture * t,
LTexCoord ll,
LTexCoord ur )
inline

Definition at line 110 of file spriteParticleRenderer.h.

◆ SpriteAnim() [2/2]

SpriteAnim::SpriteAnim ( const TextureCollection & t,
const pvector< LTexCoord > & lls,
const pvector< LTexCoord > & urs )
inline

Definition at line 116 of file spriteParticleRenderer.h.

Member Function Documentation

◆ get_frame()

Texture * SpriteAnim::get_frame ( const int n) const
inline

Definition at line 132 of file spriteParticleRenderer.h.

◆ get_ll()

LTexCoord SpriteAnim::get_ll ( const int n) const
inline

Definition at line 136 of file spriteParticleRenderer.h.

◆ get_model_source()

std::string SpriteAnim::get_model_source ( ) const
inline

Definition at line 97 of file spriteParticleRenderer.h.

◆ get_node_source()

std::string SpriteAnim::get_node_source ( ) const
inline

Definition at line 101 of file spriteParticleRenderer.h.

◆ get_num_frames()

int SpriteAnim::get_num_frames ( ) const
inline

Definition at line 105 of file spriteParticleRenderer.h.

◆ get_source_type()

SourceType SpriteAnim::get_source_type ( ) const
inline

Definition at line 89 of file spriteParticleRenderer.h.

◆ get_tex_source()

std::string SpriteAnim::get_tex_source ( ) const
inline

Definition at line 93 of file spriteParticleRenderer.h.

◆ get_ur()

LTexCoord SpriteAnim::get_ur ( const int n) const
inline

Definition at line 140 of file spriteParticleRenderer.h.

◆ set_ll()

void SpriteAnim::set_ll ( const int n,
LTexCoord c )
inline

Definition at line 124 of file spriteParticleRenderer.h.

◆ set_source_info() [1/2]

void SpriteAnim::set_source_info ( const std::string & model,
const std::string & node )
inline

Definition at line 83 of file spriteParticleRenderer.h.

◆ set_source_info() [2/2]

void SpriteAnim::set_source_info ( const std::string & tex)
inline

Definition at line 78 of file spriteParticleRenderer.h.

◆ set_ur()

void SpriteAnim::set_ur ( const int n,
LTexCoord c )
inline

Definition at line 128 of file spriteParticleRenderer.h.


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