14 #ifndef DAEMATERIALS_H 15 #define DAEMATERIALS_H 28 #include <FCDocument/FCDGeometryInstance.h> 29 #include <FCDocument/FCDMaterialInstance.h> 30 #include <FCDocument/FCDEffectStandard.h> 31 #include <FCDocument/FCDEffectParameterSampler.h> 32 #include <FCDocument/FCDExtra.h> 40 DaeMaterials(
const FCDGeometryInstance* geometry_instance);
46 const std::string
get_uvset_name(
const std::string semantic, FUDaeGeometryInput::Semantic input_semantic, int32 input_set);
48 static EggTexture::TextureType
convert_texture_type(
const FCDEffectParameterSampler::SamplerType orig_type);
49 static EggTexture::WrapMode
convert_wrap_mode(
const FUDaeTextureWrapMode::WrapMode orig_mode);
50 static EggTexture::FilterType
convert_filter_type(
const FUDaeTextureFilterFunction::FilterFunction orig_type);
57 EggGroup::BlendOperand _operand_a;
58 EggGroup::BlendOperand _operand_b;
64 FUDaeGeometryInput::Semantic _input_semantic;
65 std::string _semantic;
71 PT_EggMaterial _egg_material;
73 pvector<PT(DaeVertexInputBinding)> _uvsets;
74 PT(DaeBlendSettings) _blend;
77 void process_texture_bucket(
const std::string semantic,
const FCDEffectStandard* effect_common, FUDaeTextureChannel::Channel bucket, EggTexture::EnvType envtype = EggTexture::ET_unspecified, EggTexture::Format format = EggTexture::F_unspecified);
78 void process_extra(
const std::string semantic,
const FCDExtra* extra);
79 static PT(DaeBlendSettings) convert_blend(FCDEffectStandard::TransparencyMode mode,
const LColor &transparent,
double transparency);
81 pmap<
const std::string, PT(DaeMaterial)> _materials;
85 return get_class_type();
87 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
91 static void init_type() {
92 TypedReferenceCount::init_type();
94 TypedReferenceCount::get_class_type());
A base class for any of a number of kinds of geometry primitives: polygons, point lights,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL map.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
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...
void apply_to_primitive(const std::string semantic, const PT(EggPrimitive) to)
Applies the stuff to the given EggPrimitive.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for all things that want to be reference-counted.
const std::string get_uvset_name(const std::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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
void apply_to_group(const std::string semantic, const PT(EggGroup) to, bool invert_transparency=false)
Applies the colorblend stuff to the given EggGroup.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.