vrshoot

diff libs/assimp/HalfLifeFileData.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/assimp/HalfLifeFileData.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,150 @@
     1.4 +/*
     1.5 +Open Asset Import Library (assimp)
     1.6 +----------------------------------------------------------------------
     1.7 +
     1.8 +Copyright (c) 2006-2012, assimp team
     1.9 +All rights reserved.
    1.10 +
    1.11 +Redistribution and use of this software in source and binary forms, 
    1.12 +with or without modification, are permitted provided that the 
    1.13 +following conditions are met:
    1.14 +
    1.15 +* Redistributions of source code must retain the above
    1.16 +  copyright notice, this list of conditions and the
    1.17 +  following disclaimer.
    1.18 +
    1.19 +* Redistributions in binary form must reproduce the above
    1.20 +  copyright notice, this list of conditions and the
    1.21 +  following disclaimer in the documentation and/or other
    1.22 +  materials provided with the distribution.
    1.23 +
    1.24 +* Neither the name of the assimp team, nor the names of its
    1.25 +  contributors may be used to endorse or promote products
    1.26 +  derived from this software without specific prior
    1.27 +  written permission of the assimp team.
    1.28 +
    1.29 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    1.30 +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    1.31 +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    1.32 +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
    1.33 +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.34 +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
    1.35 +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    1.36 +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
    1.37 +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    1.38 +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
    1.39 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    1.40 +
    1.41 +----------------------------------------------------------------------
    1.42 +*/
    1.43 +
    1.44 +
    1.45 +//
    1.46 +//! @file Definition of in-memory structures for the HL2 MDL file format
    1.47 +//  and for the HalfLife text format (SMD)
    1.48 +//
    1.49 +// The specification has been taken from various sources on the internet.
    1.50 +
    1.51 +
    1.52 +#ifndef AI_MDLFILEHELPER2_H_INC
    1.53 +#define AI_MDLFILEHELPER2_H_INC
    1.54 +
    1.55 +#include "assimp/Compiler/pushpack1.h"
    1.56 +
    1.57 +#include "MDLFileData.h"
    1.58 +
    1.59 +namespace Assimp	{
    1.60 +namespace MDL	{
    1.61 +
    1.62 +// magic bytes used in Half Life 2 MDL models
    1.63 +#define AI_MDL_MAGIC_NUMBER_BE_HL2a	AI_MAKE_MAGIC("IDST")
    1.64 +#define AI_MDL_MAGIC_NUMBER_LE_HL2a	AI_MAKE_MAGIC("TSDI")
    1.65 +#define AI_MDL_MAGIC_NUMBER_BE_HL2b	AI_MAKE_MAGIC("IDSQ")
    1.66 +#define AI_MDL_MAGIC_NUMBER_LE_HL2b	AI_MAKE_MAGIC("QSDI")
    1.67 +
    1.68 +// ---------------------------------------------------------------------------
    1.69 +/** \struct Header_HL2
    1.70 + *  \brief Data structure for the HL2 main header
    1.71 + */
    1.72 +// ---------------------------------------------------------------------------
    1.73 +struct Header_HL2 
    1.74 +{
    1.75 +	//! magic number: "IDST"/"IDSQ"
    1.76 +	char	ident[4];		
    1.77 +
    1.78 +	//! Version number
    1.79 +	int32_t	version;
    1.80 +
    1.81 +	//! Original file name in pak ?
    1.82 +	char		name[64];
    1.83 +
    1.84 +	//! Length of file name/length of file?
    1.85 +	int32_t		length;
    1.86 +
    1.87 +	//! For viewer, ignored
    1.88 +	aiVector3D		eyeposition;	
    1.89 +	aiVector3D		min;			
    1.90 +	aiVector3D		max;			
    1.91 +
    1.92 +	//! AABB of the model
    1.93 +	aiVector3D		bbmin;			
    1.94 +	aiVector3D		bbmax;		
    1.95 +
    1.96 +	// File flags
    1.97 +	int32_t			flags;
    1.98 +
    1.99 +	//! NUmber of bones contained in the file
   1.100 +	int32_t			numbones;			
   1.101 +	int32_t			boneindex;
   1.102 +
   1.103 +	//! Number of bone controllers for bone animation
   1.104 +	int32_t			numbonecontrollers;		
   1.105 +	int32_t			bonecontrollerindex;
   1.106 +
   1.107 +	//! More bounding boxes ...
   1.108 +	int32_t			numhitboxes;			
   1.109 +	int32_t			hitboxindex;			
   1.110 +	
   1.111 +	//! Animation sequences in the file
   1.112 +	int32_t			numseq;				
   1.113 +	int32_t			seqindex;
   1.114 +
   1.115 +	//! Loaded sequences. Ignored
   1.116 +	int32_t			numseqgroups;		
   1.117 +	int32_t			seqgroupindex;
   1.118 +
   1.119 +	//! Raw texture data
   1.120 +	int32_t			numtextures;		
   1.121 +	int32_t			textureindex;
   1.122 +	int32_t			texturedataindex;
   1.123 +
   1.124 +	//! Number of skins (=textures?)
   1.125 +	int32_t			numskinref;			
   1.126 +	int32_t			numskinfamilies;
   1.127 +	int32_t			skinindex;
   1.128 +
   1.129 +	//! Number of parts
   1.130 +	int32_t			numbodyparts;		
   1.131 +	int32_t			bodypartindex;
   1.132 +
   1.133 +	//! attachable points for gameplay and physics
   1.134 +	int32_t			numattachments;		
   1.135 +	int32_t			attachmentindex;
   1.136 +
   1.137 +	//! Table of sound effects associated with the model
   1.138 +	int32_t			soundtable;
   1.139 +	int32_t			soundindex;
   1.140 +	int32_t			soundgroups;
   1.141 +	int32_t			soundgroupindex;
   1.142 +
   1.143 +	//! Number of animation transitions
   1.144 +	int32_t			numtransitions;		
   1.145 +	int32_t			transitionindex;
   1.146 +} PACK_STRUCT;
   1.147 +
   1.148 +#include "assimp/Compiler/poppack1.h"
   1.149 +
   1.150 +}
   1.151 +} // end namespaces
   1.152 +
   1.153 +#endif // ! AI_MDLFILEHELPER2_H_INC