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

Class that deals with COLLADA data sources. More...

#include "colladaInput.h"

Inheritance diagram for ColladaInput:
ReferenceCount MemoryBase

Public Member Functions

unsigned int get_offset () const
 Returns the offset associated with this input. More...
 
bool is_vertex_source () const
 Returns true if this has a <vertices> element as source. More...
 
int make_vertex_columns (GeomVertexArrayFormat *fmt) const
 Takes a semantic and source URI, and adds a new column to the format. More...
 
void write_data (GeomVertexData *vdata, int start_row, domP &p, unsigned int stride) const
 Writes data to the indicated GeomVertexData using the given indices. More...
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 Returns the current reference count. More...
 
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 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...
 
void weak_ref (WeakPointerToVoid *ptv)
 Adds the indicated PointerToVoid as a weak reference to this object. More...
 
void weak_unref (WeakPointerToVoid *ptv)
 Removes the indicated PointerToVoid as a weak reference to this object. More...
 

Static Public Member Functions

static ColladaInputfrom_dom (domInputLocalOffset &input)
 Returns the ColladaInput object that represents the provided DOM input element. More...
 
static ColladaInputfrom_dom (domInputLocal &input)
 Returns the ColladaInput object that represents the provided DOM input element. More...
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 

Detailed Description

Class that deals with COLLADA data sources.

Definition at line 45 of file colladaInput.h.

Member Function Documentation

◆ from_dom() [1/2]

ColladaInput * ColladaInput::from_dom ( domInputLocalOffset &  input)
static

Returns the ColladaInput object that represents the provided DOM input element.

Definition at line 112 of file colladaInput.cxx.

References is_vertex_source().

◆ from_dom() [2/2]

ColladaInput * ColladaInput::from_dom ( domInputLocal &  input)
static

Returns the ColladaInput object that represents the provided DOM input element.

Definition at line 147 of file colladaInput.cxx.

References is_vertex_source(), and make_vertex_columns().

◆ get_offset()

unsigned int ColladaInput::get_offset ( ) const
inline

Returns the offset associated with this input.

Definition at line 31 of file colladaInput.I.

Referenced by is_vertex_source().

◆ is_vertex_source()

bool ColladaInput::is_vertex_source ( ) const
inline

Returns true if this has a <vertices> element as source.

Definition at line 22 of file colladaInput.I.

References get_offset().

Referenced by from_dom().

◆ make_vertex_columns()

int ColladaInput::make_vertex_columns ( GeomVertexArrayFormat *  format) const

Takes a semantic and source URI, and adds a new column to the format.

If this is a vertex source, adds all of the inputs from the corresponding <vertices> element. Returns the number of columns added to the format.

Definition at line 174 of file colladaInput.cxx.

References write_data().

Referenced by from_dom().

◆ write_data()

void ColladaInput::write_data ( GeomVertexData vdata,
int  start_row,
domP &  p,
unsigned int  stride 
) const

Writes data to the indicated GeomVertexData using the given indices.

Definition at line 243 of file colladaInput.cxx.

References GeomVertexWriter::add_data4f(), GeomVertexData::get_num_rows(), GeomVertexWriter::set_row_unsafe(), and GeomVertexData::unclean_set_num_rows().

Referenced by make_vertex_columns().


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