A set of materials for a MD3Model.
More...
Inherits G3D::ReferenceCountedObject.
|
template<class T , class ... ArgTypes> |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
| Like std::make_shared, but works for protected constructors. More...
|
|
A set of materials for a MD3Model.
◆ PartSkin
Maps triList names to materials.
If a material is specified as nullptr (which corresponds to Quake's common/nodraw), that means "do not draw this triList".
◆ create() [1/4]
static shared_ptr<Skin> G3D::MD3Model::Skin::create |
( |
| ) |
|
|
inlinestatic |
◆ create() [2/4]
static shared_ptr<Skin> G3D::MD3Model::Skin::create |
( |
const String & |
commonPath, |
|
|
const String & |
lowerSkin, |
|
|
const String & |
upperSkin, |
|
|
const String & |
headSkin |
|
) |
| |
|
static |
◆ create() [3/4]
static shared_ptr<Skin> G3D::MD3Model::Skin::create |
( |
const String & |
commonPath, |
|
|
const String & |
commonSuffix |
|
) |
| |
|
static |
Loads commonPath + "lower_" + commonSuffix + ".skin", etc.
for other parts
◆ create() [4/4]
static shared_ptr<Skin> G3D::MD3Model::Skin::create |
( |
const Any & |
a | ) |
|
|
static |
Format is either:
- MD3Model::Skin( <list of part skins> )
Each part skin is either a .skin file relative to the md3 directory or an Any table mapping a tri list name to a material. It may have an optional name; it is optional but convenient to make this the name of the part. For example:
MD3Model::Skin(
"lower_dragon.skin",
"upper_dragon.skin",
head {
h_cap = NONE,
h_head = UniversalMaterial::Specification {
diffuse = "Happy.tga"
},
h_Visor = NONE,
h_Helmet = UniversalMaterial::Specification {
diffuse = "Knight2A1.tga"
}
}
)
◆ createShared()
template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared |
( |
ArgTypes &&... |
args | ) |
|
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
◆ partSkin
Table for each part.
Indices are PartTypes.