Panda3D
|
This class is seperated from the converter file because otherwise it would get too big and needlessly complicated. More...
#include "daeMaterials.h"
Public Member Functions | |
DaeMaterials (const FCDGeometryInstance *geometry_instance) | |
void | add_material_instance (const FCDMaterialInstance *instance) |
Adds a material instance. More... | |
void | apply_to_group (const string semantic, const PT(EggGroup) to, bool invert_transparency=false) |
Applies the colorblend stuff to the given EggGroup. More... | |
void | apply_to_primitive (const string semantic, const PT(EggPrimitive) to) |
Applies the stuff to the given EggPrimitive. More... | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
const string | get_uvset_name (const string semantic, FUDaeGeometryInput::Semantic input_semantic, int32 input_set) |
Returns the semantic of the uvset with the specified input set, or an empty string if the given material has no input set. More... | |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©) | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_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... | |
void | operator= (const TypedObject ©) |
![]() | |
int | get_ref_count () const |
Returns the current reference count. More... | |
WeakReferenceList * | get_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 EggTexture::FilterType | convert_filter_type (const FUDaeTextureFilterFunction::FilterFunction orig_type) |
Converts an FCollada filter function to the EggTexture wrap type equivalent. More... | |
static EggTexture::TextureType | convert_texture_type (const FCDEffectParameterSampler::SamplerType orig_type) |
Converts an FCollada sampler type to the EggTexture texture type equivalent. More... | |
static EggTexture::WrapMode | convert_wrap_mode (const FUDaeTextureWrapMode::WrapMode orig_mode) |
Converts an FCollada wrap mode to the EggTexture wrap mode equivalent. More... | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
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 TypeHandle | get_class_type () |
static void | init_type () |
This class is seperated from the converter file because otherwise it would get too big and needlessly complicated.
Definition at line 41 of file daeMaterials.h.
void DaeMaterials::add_material_instance | ( | const FCDMaterialInstance * | instance | ) |
Adds a material instance.
Normally automatically done by constructor.
Definition at line 53 of file daeMaterials.cxx.
References apply_to_primitive(), convert_filter_type(), convert_texture_type(), convert_wrap_mode(), Filename::from_os_specific(), Filename::get_dirname(), Filename::make_canonical(), Filename::make_relative_to(), and Filename::to_os_generic().
void DaeMaterials::apply_to_group | ( | const string | semantic, |
const PT(EggGroup) | to, | ||
bool | invert_transparency = false |
||
) |
Applies the colorblend stuff to the given EggGroup.
Definition at line 242 of file daeMaterials.cxx.
References get_uvset_name().
Referenced by apply_to_primitive(), and DAEToEggConverter::get_input_units().
void DaeMaterials::apply_to_primitive | ( | const string | semantic, |
const PT(EggPrimitive) | to | ||
) |
Applies the stuff to the given EggPrimitive.
Definition at line 225 of file daeMaterials.cxx.
References EggPrimitive::add_texture(), apply_to_group(), EggPrimitive::set_bface_flag(), and EggPrimitive::set_material().
Referenced by add_material_instance(), and DAEToEggConverter::get_input_units().
|
static |
Converts an FCollada filter function to the EggTexture wrap type equivalent.
Definition at line 357 of file daeMaterials.cxx.
References LVecBase4f::zero().
Referenced by add_material_instance(), and convert_wrap_mode().
|
static |
Converts an FCollada sampler type to the EggTexture texture type equivalent.
Definition at line 306 of file daeMaterials.cxx.
References convert_wrap_mode().
Referenced by add_material_instance(), and get_uvset_name().
|
static |
Converts an FCollada wrap mode to the EggTexture wrap mode equivalent.
Definition at line 329 of file daeMaterials.cxx.
References convert_filter_type().
Referenced by add_material_instance(), and convert_texture_type().
const string DaeMaterials::get_uvset_name | ( | const string | semantic, |
FUDaeGeometryInput::Semantic | input_semantic, | ||
int32 | input_set | ||
) |
Returns the semantic of the uvset with the specified input set, or an empty string if the given material has no input set.
Definition at line 272 of file daeMaterials.cxx.
References convert_texture_type().
Referenced by apply_to_group(), and DAEToEggConverter::get_input_units().