15 #ifndef DAEMATERIALS_H 16 #define DAEMATERIALS_H 18 #include "pandatoolbase.h" 19 #include "eggMaterial.h" 20 #include "eggTexture.h" 21 #include "eggPrimitive.h" 23 #include "pointerTo.h" 24 #include "pt_EggTexture.h" 25 #include "pt_EggMaterial.h" 27 #include "pre_fcollada_include.h" 29 #include "FCDocument/FCDGeometryInstance.h" 30 #include "FCDocument/FCDMaterialInstance.h" 31 #include "FCDocument/FCDEffectStandard.h" 32 #include "FCDocument/FCDEffectParameterSampler.h" 33 #include "FCDocument/FCDExtra.h" 43 DaeMaterials(
const FCDGeometryInstance* geometry_instance);
49 const string get_uvset_name(
const string semantic, FUDaeGeometryInput::Semantic input_semantic, int32 input_set);
51 static EggTexture::TextureType
convert_texture_type(
const FCDEffectParameterSampler::SamplerType orig_type);
52 static EggTexture::WrapMode
convert_wrap_mode(
const FUDaeTextureWrapMode::WrapMode orig_mode);
53 static EggTexture::FilterType
convert_filter_type(
const FUDaeTextureFilterFunction::FilterFunction orig_type);
60 EggGroup::BlendOperand _operand_a;
61 EggGroup::BlendOperand _operand_b;
67 FUDaeGeometryInput::Semantic _input_semantic;
74 PT_EggMaterial _egg_material;
77 PT(DaeBlendSettings) _blend;
80 void process_texture_bucket(
const string semantic,
const FCDEffectStandard* effect_common, FUDaeTextureChannel::Channel bucket, EggTexture::EnvType envtype = EggTexture::ET_unspecified, EggTexture::Format format = EggTexture::F_unspecified);
81 void process_extra(
const string semantic,
const FCDExtra* extra);
82 static PT(DaeBlendSettings) convert_blend(FCDEffectStandard::TransparencyMode mode,
const LColor &transparent,
double transparency);
88 return get_class_type();
90 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
94 static void init_type() {
95 TypedReferenceCount::init_type();
96 register_type(_type_handle,
"DaeMaterials",
97 TypedReferenceCount::get_class_type());
A base class for any of a number of kinds of geometry primitives: polygons, point lights...
This is our own Panda specialization on the default STL map.
static EggTexture::FilterType convert_filter_type(const FUDaeTextureFilterFunction::FilterFunction orig_type)
Converts an FCollada filter function to the EggTexture wrap type equivalent.
void add_material_instance(const FCDMaterialInstance *instance)
Adds a material instance.
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
This class is seperated from the converter file because otherwise it would get too big and needlessly...
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
static EggTexture::WrapMode convert_wrap_mode(const FUDaeTextureWrapMode::WrapMode orig_mode)
Converts an FCollada wrap mode to the EggTexture wrap mode equivalent.
static EggTexture::TextureType convert_texture_type(const FCDEffectParameterSampler::SamplerType orig_type)
Converts an FCollada sampler type to the EggTexture texture type equivalent.
void apply_to_group(const string semantic, const PT(EggGroup) to, bool invert_transparency=false)
Applies the colorblend stuff to the given EggGroup.
This is the base class for all three-component vectors and points.
A base class for all things that want to be reference-counted.
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 mater...
TypeHandle is the identifier used to differentiate C++ class types.
void apply_to_primitive(const string semantic, const PT(EggPrimitive) to)
Applies the stuff to the given EggPrimitive.