2022-06-05 22:39:04 +00:00
|
|
|
|
|
|
|
#include "precompiled.h"
|
|
|
|
#pragma hdrstop
|
|
|
|
|
|
|
|
|
|
|
|
#include "Model_gltf.h"
|
|
|
|
#include "Model_local.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelStatic::ConvertGltfMeshToModelsurfaces( const gltfMesh* mesh )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
|
|
|
|
//for ( auto mesh : currentAsset->MeshList( ) ) {
|
|
|
|
// for ( auto prim : mesh->primitives ) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh* _mesh, gltfData* data )
|
|
|
|
{
|
2022-06-08 21:06:17 +00:00
|
|
|
//for( auto* gltfMesh : data->MeshList( ) )
|
2022-06-06 14:13:32 +00:00
|
|
|
{
|
2022-06-08 21:06:17 +00:00
|
|
|
for( auto prim : _mesh->primitives )
|
2022-06-06 14:13:32 +00:00
|
|
|
{
|
2022-06-08 21:06:17 +00:00
|
|
|
common->Printf( "primitive for %s\n", _mesh->name.c_str() );
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
gltfAccessor* accessor = data->AccessorList( )[prim->indices];
|
|
|
|
gltfBufferView* bv = data->BufferViewList( )[accessor->bufferView];
|
|
|
|
gltfData* data = bv->parent;
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
gltfBuffer* buff = data->BufferList( )[bv->buffer];
|
2022-06-05 22:39:04 +00:00
|
|
|
uint idxDataSize = sizeof( uint ) * accessor->count;
|
2022-06-06 14:13:32 +00:00
|
|
|
uint* indices = ( uint* ) Mem_ClearedAlloc( idxDataSize , TAG_IDLIB_GLTF );
|
2022-06-05 22:39:04 +00:00
|
|
|
|
|
|
|
idFile_Memory idxBin = idFile_Memory( "gltfChunkIndices",
|
2022-06-06 14:13:32 +00:00
|
|
|
( const char* )( ( data->GetData( bv->buffer ) + bv->byteOffset + accessor->byteOffset ) ), bv->byteLength );
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
for( int i = 0; i < accessor->count; i++ )
|
|
|
|
{
|
|
|
|
idxBin.Read( ( void* )( &indices[i] ), accessor->typeSize );
|
|
|
|
if( bv->byteStride )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
idxBin.Seek( bv->byteStride - accessor->typeSize, FS_SEEK_CUR );
|
2022-06-06 14:13:32 +00:00
|
|
|
}
|
2022-06-05 22:39:04 +00:00
|
|
|
}
|
2022-06-06 14:13:32 +00:00
|
|
|
|
|
|
|
for( int i = 0; i < accessor->count; i += 3 )
|
|
|
|
{
|
2022-06-08 21:06:17 +00:00
|
|
|
MapPolygon& polygon = polygons.Alloc();
|
2022-06-06 15:19:45 +00:00
|
|
|
polygon.SetMaterial( "textures/enpro/enwall16" );
|
2022-06-07 20:39:16 +00:00
|
|
|
polygon.AddIndex( indices[i + 0] );
|
2022-06-05 22:39:04 +00:00
|
|
|
polygon.AddIndex( indices[i + 1] );
|
|
|
|
polygon.AddIndex( indices[i + 2] );
|
|
|
|
}
|
|
|
|
|
|
|
|
Mem_Free( indices );
|
|
|
|
bool sizeSet = false;
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
for( auto& attrib : prim->attributes )
|
|
|
|
{
|
|
|
|
gltfAccessor* attrAcc = data->AccessorList( )[attrib->accessorIndex];
|
|
|
|
gltfBufferView* attrBv = data->BufferViewList( )[attrAcc->bufferView];
|
|
|
|
gltfData* attrData = attrBv->parent;
|
|
|
|
gltfBuffer* attrbuff = attrData->BufferList( )[attrBv->buffer];
|
2022-06-05 22:39:04 +00:00
|
|
|
|
|
|
|
idFile_Memory bin = idFile_Memory( "gltfChunkVertices",
|
2022-06-06 14:13:32 +00:00
|
|
|
( const char* )( ( attrData->GetData( attrBv->buffer ) + attrBv->byteOffset + attrAcc->byteOffset ) ), attrBv->byteLength );
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
if( !sizeSet )
|
2022-06-05 22:39:04 +00:00
|
|
|
{
|
|
|
|
verts.AssureSize( attrAcc->count );
|
|
|
|
sizeSet = true;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
switch( attrib->type )
|
2022-06-05 22:39:04 +00:00
|
|
|
{
|
2022-06-06 14:13:32 +00:00
|
|
|
case gltfMesh_Primitive_Attribute::Type::Position:
|
|
|
|
{
|
2022-06-08 21:06:17 +00:00
|
|
|
//for( int i = attrAcc->count - 1; i >= 0; i-- )
|
2022-06-07 20:39:16 +00:00
|
|
|
for( int i = 0; i < attrAcc->count; i++ )
|
2022-06-06 14:13:32 +00:00
|
|
|
{
|
|
|
|
idVec3 pos;
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bin.Read( ( void* )( &pos.x ), attrAcc->typeSize );
|
|
|
|
bin.Read( ( void* )( &pos.y ), attrAcc->typeSize );
|
|
|
|
bin.Read( ( void* )( &pos.z ), attrAcc->typeSize );
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-07 20:04:43 +00:00
|
|
|
#if 1
|
2022-06-07 20:39:16 +00:00
|
|
|
// RB: proper glTF2 convention, requires Y-up export option ticked on in Blender
|
2022-06-06 15:19:45 +00:00
|
|
|
verts[i].xyz.x = pos.z;
|
|
|
|
verts[i].xyz.y = pos.x;
|
|
|
|
verts[i].xyz.z = pos.y;
|
|
|
|
#else
|
|
|
|
verts[i].xyz.x = pos.x;
|
|
|
|
verts[i].xyz.y = pos.y;
|
|
|
|
verts[i].xyz.z = pos.z;
|
|
|
|
#endif
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
if( attrBv->byteStride )
|
|
|
|
{
|
|
|
|
bin.Seek( attrBv->byteStride - ( 3 * attrAcc->typeSize ), FS_SEEK_CUR );
|
|
|
|
}
|
|
|
|
|
|
|
|
idRandom rnd( i );
|
|
|
|
int r = rnd.RandomInt( 255 ), g = rnd.RandomInt( 255 ), b = rnd.RandomInt( 255 );
|
|
|
|
|
|
|
|
//vtxData[i].abgr = 0xff000000 + ( b << 16 ) + ( g << 8 ) + r;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case gltfMesh_Primitive_Attribute::Type::Normal:
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
idVec3 vec;
|
2022-06-06 14:13:32 +00:00
|
|
|
for( int i = 0; i < attrAcc->count; i++ )
|
|
|
|
{
|
|
|
|
idVec3 vec;
|
|
|
|
bin.Read( ( void* )( &vec.x ), attrAcc->typeSize );
|
|
|
|
bin.Read( ( void* )( &vec.y ), attrAcc->typeSize );
|
|
|
|
bin.Read( ( void* )( &vec.z ), attrAcc->typeSize );
|
|
|
|
if( attrBv->byteStride )
|
|
|
|
{
|
|
|
|
bin.Seek( attrBv->byteStride - ( attrib->elementSize * attrAcc->typeSize ), FS_SEEK_CUR );
|
|
|
|
}
|
|
|
|
verts[i].SetNormal( vec );
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
2022-06-05 22:39:04 +00:00
|
|
|
}
|
2022-06-06 14:13:32 +00:00
|
|
|
case gltfMesh_Primitive_Attribute::Type::TexCoord0:
|
|
|
|
{
|
|
|
|
idVec2 vec;
|
|
|
|
for( int i = 0; i < attrAcc->count; i++ )
|
|
|
|
{
|
|
|
|
bin.Read( ( void* )( &vec.x ), attrAcc->typeSize );
|
|
|
|
bin.Read( ( void* )( &vec.y ), attrAcc->typeSize );
|
|
|
|
if( attrBv->byteStride )
|
|
|
|
{
|
|
|
|
bin.Seek( attrBv->byteStride - ( attrib->elementSize * attrAcc->typeSize ), FS_SEEK_CUR );
|
|
|
|
}
|
2022-06-07 20:48:36 +00:00
|
|
|
|
|
|
|
//vec.y = 1.0f - vec.y;
|
2022-06-06 14:13:32 +00:00
|
|
|
verts[i].SetTexCoord( vec );
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
2022-06-05 22:39:04 +00:00
|
|
|
}
|
2022-06-06 14:13:32 +00:00
|
|
|
case gltfMesh_Primitive_Attribute::Type::Tangent:
|
|
|
|
{
|
|
|
|
idVec4 vec;
|
|
|
|
for( int i = 0; i < attrAcc->count; i++ )
|
|
|
|
{
|
|
|
|
bin.Read( ( void* )( &vec.x ), attrAcc->typeSize );
|
|
|
|
bin.Read( ( void* )( &vec.y ), attrAcc->typeSize );
|
|
|
|
bin.Read( ( void* )( &vec.z ), attrAcc->typeSize );
|
|
|
|
bin.Read( ( void* )( &vec.w ), attrAcc->typeSize );
|
|
|
|
if( attrBv->byteStride )
|
|
|
|
{
|
|
|
|
bin.Seek( attrBv->byteStride - ( attrib->elementSize * attrAcc->typeSize ), FS_SEEK_CUR );
|
|
|
|
}
|
|
|
|
verts[i].SetTangent( vec.ToVec3() );
|
|
|
|
verts[i].SetBiTangentSign( vec.w );
|
|
|
|
}
|
|
|
|
break;
|
2022-06-05 22:39:04 +00:00
|
|
|
}
|
2022-06-06 14:13:32 +00:00
|
|
|
//case gltfMesh_Primitive_Attribute::Type::Weight:
|
|
|
|
//{
|
|
|
|
// for ( int i = 0; i < attrAcc->count; i++ ) {
|
|
|
|
// bin.Read( ( void * ) ( &vtxData[i].weight.x ), attrAcc->typeSize );
|
|
|
|
// bin.Read( ( void * ) ( &vtxData[i].weight.y ), attrAcc->typeSize );
|
|
|
|
// bin.Read( ( void * ) ( &vtxData[i].weight.z ), attrAcc->typeSize );
|
|
|
|
// bin.Read( ( void * ) ( &vtxData[i].weight.w ), attrAcc->typeSize );
|
|
|
|
// if ( attrBv->byteStride )
|
|
|
|
// bin.Seek( attrBv->byteStride - ( attrib->elementSize * attrAcc->typeSize ), FS_SEEK_CUR );
|
|
|
|
// }
|
|
|
|
// break;
|
|
|
|
//}
|
|
|
|
//case gltfMesh_Primitive_Attribute::Type::Indices:
|
|
|
|
//{
|
|
|
|
// for ( int i = 0; i < attrAcc->count; i++ ) {
|
|
|
|
// bin.Read( ( void * ) ( &vtxData[i].boneIndex.x ), attrAcc->typeSize );
|
|
|
|
// bin.Read( ( void * ) ( &vtxData[i].boneIndex.y ), attrAcc->typeSize );
|
|
|
|
// bin.Read( ( void * ) ( &vtxData[i].boneIndex.z ), attrAcc->typeSize );
|
|
|
|
// bin.Read( ( void * ) ( &vtxData[i].boneIndex.w ), attrAcc->typeSize );
|
|
|
|
// if ( attrBv->byteStride )
|
|
|
|
// bin.Seek( attrBv->byteStride - ( attrib->elementSize * attrAcc->typeSize ), FS_SEEK_CUR );
|
|
|
|
// }
|
|
|
|
// break;
|
|
|
|
//}
|
2022-06-05 22:39:04 +00:00
|
|
|
}
|
2022-06-06 14:13:32 +00:00
|
|
|
|
2022-06-05 22:39:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SetContents();
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
int idMapEntity::GetEntities( gltfData* data, EntityListRef entities, int sceneID )
|
|
|
|
{
|
|
|
|
idMapEntity* worldspawn = new idMapEntity();
|
|
|
|
entities.Append( worldspawn );
|
|
|
|
|
2022-06-05 22:39:04 +00:00
|
|
|
int entityCount = 0;
|
2022-06-06 14:13:32 +00:00
|
|
|
for( auto& nodeID : data->SceneList()[sceneID]->nodes )
|
2022-06-05 22:39:04 +00:00
|
|
|
{
|
2022-06-06 14:13:32 +00:00
|
|
|
auto* node = data->NodeList()[nodeID];
|
|
|
|
|
|
|
|
idMapEntity* newEntity = NULL;
|
|
|
|
|
|
|
|
bool isWorldSpawn = idStr::Icmp( node->extras.strPairs.GetString( "classname" ), "worldspawn" ) == 0;
|
|
|
|
if( isWorldSpawn )
|
|
|
|
{
|
|
|
|
worldspawn->primitives.Resize( 1024, 256 );
|
|
|
|
worldspawn->epairs.Copy( node->extras.strPairs );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// account all meshes starting with worldspawn. or BSP in the name
|
|
|
|
if( idStr::Icmpn( node->name, "BSP", 3 ) == 0 || idStr::Icmpn( node->name, "worldspawn.", 11 ) == 0 )
|
|
|
|
{
|
|
|
|
MapPolygonMesh* meshPrim = new MapPolygonMesh();
|
|
|
|
//meshPrim->epairs.Copy( newEntity->epairs );
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
meshPrim->ConvertFromMeshGltf( data->MeshList()[node->mesh], data );
|
|
|
|
worldspawn->AddPrimitive( meshPrim );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
newEntity = new idMapEntity();
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
// set name and retrieve epairs from node extras
|
|
|
|
if( node->name.Length() )
|
|
|
|
{
|
|
|
|
newEntity->epairs.Set( "name", node->name );
|
|
|
|
}
|
|
|
|
newEntity->epairs.Copy( node->extras.strPairs );
|
|
|
|
|
2022-06-07 20:04:43 +00:00
|
|
|
#if 0
|
2022-06-06 14:13:32 +00:00
|
|
|
for( int i = 0; i < newEntity->epairs.GetNumKeyVals(); i++ )
|
|
|
|
{
|
|
|
|
const idKeyValue* kv = newEntity->epairs.GetKeyVal( i );
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
idLib::Printf( "entity[ %s ] key = '%s' value = '%s'\n", node->name.c_str(), kv->GetKey().c_str(), kv->GetValue().c_str() );
|
|
|
|
}
|
2022-06-07 20:04:43 +00:00
|
|
|
#endif
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
data->ResolveNodeMatrix( node );
|
2022-06-07 20:48:36 +00:00
|
|
|
|
|
|
|
idVec3 origin;
|
|
|
|
#if 1
|
|
|
|
// RB: proper glTF2 convention, requires Y-up export option ticked on in Blender
|
|
|
|
origin.x = node->translation.z;
|
|
|
|
origin.y = node->translation.x;
|
|
|
|
origin.z = node->translation.y;
|
|
|
|
#else
|
|
|
|
origin.x = node->translation.x;
|
|
|
|
origin.y = node->translation.y;
|
|
|
|
origin.z = node->translation.z;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
newEntity->epairs.Set( "origin", origin.ToString() );
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
common->Printf( " %s \n ", node->name.c_str( ) );
|
|
|
|
entities.Append( newEntity );
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
entityCount++;
|
2022-06-05 22:39:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
/*
|
|
|
|
if( entities.Num( ) > 0 && ( idStr::Icmp( entities[0]->epairs.GetString( "name" ), "worldspawn" ) != 0 ) )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
// move world spawn to first place
|
2022-06-06 14:13:32 +00:00
|
|
|
for( int i = 1; i < entities.Num( ); i++ )
|
|
|
|
{
|
|
|
|
if( idStr::Icmp( entities[i]->epairs.GetString( "name" ), "worldspawn" ) == 0 )
|
|
|
|
{
|
|
|
|
idMapEntity* tmp = entities[0];
|
2022-06-05 22:39:04 +00:00
|
|
|
entities[0] = entities[i];
|
|
|
|
entities[i] = tmp;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-06 14:13:32 +00:00
|
|
|
*/
|
2022-06-05 22:39:04 +00:00
|
|
|
|
|
|
|
return entityCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// [filename].[%i|%s].[gltf/glb]
|
2022-06-06 14:13:32 +00:00
|
|
|
bool gltfManager::ExtractMeshIdentifier( idStr& filename, int& meshId, idStr& meshName )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
|
|
|
|
idStr extension;
|
2022-06-06 14:13:32 +00:00
|
|
|
filename.ExtractFileExtension( extension );
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
idStr idPart = filename.Left( filename.Length() - extension.Length() - 1 );
|
2022-06-05 22:39:04 +00:00
|
|
|
idStr id;
|
2022-06-06 14:13:32 +00:00
|
|
|
idPart.ExtractFileExtension( id );
|
|
|
|
|
|
|
|
if( !id.Length() )
|
2022-06-05 22:39:04 +00:00
|
|
|
{
|
2022-06-06 14:13:32 +00:00
|
|
|
idLib::Warning( "no gltf mesh identifier" );
|
2022-06-05 22:39:04 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
filename = idPart.Left( idPart.Length() - id.Length() ) + extension;
|
2022-06-05 22:39:04 +00:00
|
|
|
|
|
|
|
idLexer lexer( LEXFL_ALLOWMULTICHARLITERALS | LEXFL_NOSTRINGESCAPECHARS );
|
|
|
|
lexer.LoadMemory( id.c_str( ), id.Size( ), "GltfmeshID", 0 );
|
|
|
|
|
|
|
|
idToken token;
|
2022-06-06 14:13:32 +00:00
|
|
|
if( lexer.ExpectAnyToken( &token ) )
|
2022-06-05 22:39:04 +00:00
|
|
|
{
|
2022-06-06 14:13:32 +00:00
|
|
|
if( lexer.EndOfFile() && ( token.type == TT_NUMBER ) && ( token.subtype & TT_INTEGER ) )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
meshId = token.GetIntValue();
|
2022-06-06 14:13:32 +00:00
|
|
|
}
|
|
|
|
else if( token.type == TT_NUMBER || token.type == TT_STRING )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
meshName = id;
|
2022-06-06 14:13:32 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
lexer.Warning( "malformed gltf mesh identifier" );
|
2022-06-05 22:39:04 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
2022-06-06 14:13:32 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
lexer.Warning( "malformed gltf mesh identifier" );
|
|
|
|
}
|
2022-06-05 22:39:04 +00:00
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::InitFromFile( const char* fileName )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelGLTF::LoadBinaryModel( idFile* file, const ID_TIME_T sourceTimeStamp )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::WriteBinaryModel( idFile* file, ID_TIME_T* _timeStamp /*= NULL */ ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelGLTF::SupportsBinaryModel( )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::ExportOBJ( idFile* objFile, idFile* mtlFile, ID_TIME_T* _timeStamp /*= NULL */ )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::PartialInitFromFile( const char* fileName )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::PurgeModel( )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::Reset( )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::LoadModel( )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelGLTF::IsLoaded( )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::SetLevelLoadReferenced( bool referenced )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelGLTF::IsLevelLoadReferenced( )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::TouchData( )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 15:36:18 +00:00
|
|
|
/*
|
|
|
|
void idRenderModelGLTF::CreateBuffers()
|
2022-06-06 14:13:32 +00:00
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
2022-06-06 15:36:18 +00:00
|
|
|
*/
|
2022-06-05 22:39:04 +00:00
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::InitEmpty( const char* name )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::AddSurface( modelSurface_t surface )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::FinishSurfaces( bool useMikktspace )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::FreeVertexCache( )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
const char* idRenderModelGLTF::Name( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::Print( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::List( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
int idRenderModelGLTF::Memory( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
ID_TIME_T idRenderModelGLTF::Timestamp( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return FILE_NOT_FOUND_TIMESTAMP;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
int idRenderModelGLTF::NumSurfaces( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
int idRenderModelGLTF::NumBaseSurfaces( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
const modelSurface_t* idRenderModelGLTF::Surface( int surfaceNum ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
srfTriangles_t* idRenderModelGLTF::AllocSurfaceTriangles( int numVerts, int numIndexes ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::FreeSurfaceTriangles( srfTriangles_t* tris ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelGLTF::IsStaticWorldModel( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
dynamicModel_t idRenderModelGLTF::IsDynamicModel( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return dynamicModel_t();
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelGLTF::IsDefaultModel( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelGLTF::IsReloadable( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
idRenderModel* idRenderModelGLTF::InstantiateDynamicModel( const struct renderEntity_s* ent, const viewDef_t* view, idRenderModel* cachedModel )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
int idRenderModelGLTF::NumJoints( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
const idMD5Joint* idRenderModelGLTF::GetJoints( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
jointHandle_t idRenderModelGLTF::GetJointHandle( const char* name ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return jointHandle_t();
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
const char* idRenderModelGLTF::GetJointName( jointHandle_t handle ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
const idJointQuat* idRenderModelGLTF::GetDefaultPose( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
int idRenderModelGLTF::NearestJoint( int surfaceNum, int a, int b, int c ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
idBounds idRenderModelGLTF::Bounds( const struct renderEntity_s* ent ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return idBounds();
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::ReadFromDemoFile( class idDemoFile* f )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
void idRenderModelGLTF::WriteToDemoFile( class idDemoFile* f )
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
float idRenderModelGLTF::DepthHack( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return -1.0f;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelGLTF::ModelHasDrawingSurfaces( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelGLTF::ModelHasInteractingSurfaces( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-06-06 14:13:32 +00:00
|
|
|
bool idRenderModelGLTF::ModelHasShadowCastingSurfaces( ) const
|
|
|
|
{
|
2022-06-05 22:39:04 +00:00
|
|
|
common->Warning( "The method or operation is not implemented." );
|
|
|
|
return false;
|
|
|
|
}
|