Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.SkeletalMesh


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
/**
 * Contains the shared data that is used by all SkeletalMeshComponents (instances).
 * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
 */
class SkeletalMesh extends Object
	native
	noexport
	hidecategories(Object);

var		const native			BoxSphereBounds			Bounds;

/** List of materials applied to this mesh. */
var()	const native			array<MaterialInterface>	Materials;
/** Origin in original coordinate system */
var()	const native			vector					Origin;
/** Amount to rotate when importing (mostly for yawing) */
var()	const native			rotator					RotOrigin;

var		const native			array<int>				RefSkeleton;	// FMeshBone
var		const native			int						SkeletalDepth;
var		const native			map{FName,INT}			NameIndexMap;

var		const native private	IndirectArray_Mirror	LODModels;		// FStaticLODModel
var		const native			array<matrix>			RefBasesInvMatrix;

struct native BoneMirrorInfo
{
	/** The bone to mirror. */
	var()	int		SourceIndex;
	/** Axis the bone is mirrored across. */
	var()	EAxis	BoneFlipAxis;
};

/** List of bones that should be mirrored. */
var()	editfixedsize	array<BoneMirrorInfo>	SkelMirrorTable;
var()	EAxis									SkelMirrorAxis;
var()	EAxis									SkelMirrorFlipAxis;

var		array<SkeletalMeshSocket>		Sockets;

/** Struct containing information for a particular LOD level, such as materials and info for when to use it. */
struct native SkeletalMeshLODInfo
{
	/**	Indicates when to use this LOD. A smaller number means use this LOD when further away. */
	var()	float						DisplayFactor;
	/**	Used to avoid 'flickering' when on LOD boundary. Only taken into account when moving from complex->simple. */
	var()	float						LODHysteresis;
	/** Mapping table from this LOD's materials to the SkeletalMesh materials array. */
	var()	editfixedsize array<INT>	LODMaterialMap;
	/** Per-section control over whether to enable shadow casting. */
	var()	editfixedsize array<bool>	bEnableShadowCasting;
};

/** Struct containing information for each LOD level, such as materials to use, whether to cast shadows, and when use the LOD. */
var()	editfixedsize array<SkeletalMeshLODInfo>	LODInfo;

/** For each bone specified here, all triangles rigidly weighted to that bone are entered into a kDOP, allowing per-poly collision checks. */
var()	array<name>	PerPolyCollisionBones;

/** For each of these bones, find the parent that is in PerPolyCollisionBones and add its polys to that bone. */
var()	array<name>	AddToParentPerPolyCollisionBone;

/** 
 *	KDOP tree's used for storing rigid triangle information for a subset of bones. 
 *	Length of this array matches PerPolyCollisionBones
 */
var		private const native array<int> PerPolyBoneKDOPs;

/** If true, include triangles that are soft weighted to bones. */
var()	bool		bPerPolyUseSoftWeighting;

/** If true, use PhysicsAsset for line collision checks. If false, use per-poly bone collision (if present). */
var()	bool		bUseSimpleLineCollision;

/** If true, use PhysicsAsset for extent (swept box) collision checks. If false, use per-poly bone collision (if present). */
var()	bool		bUseSimpleBoxCollision;

/** All meshes default to GPU skinning. Set to True to enable CPU skinning */
var()	const bool	bForceCPUSkinning;

/** If true, use 32 bit UVs. If false, use 16 bit UVs to save memory */
var()	const bool	bUseFullPrecisionUVs;

/** The FaceFX asset the skeletal mesh uses for FaceFX operations. */
var() FaceFXAsset FaceFXAsset;

/** Asset used for previewing bounds in AnimSetViewer. Makes setting up LOD distance factors more reliable. */
var()	editoronly PhysicsAsset		BoundsPreviewAsset;

/** 
 * Bone Name to start drawing bones from. 
 * See SkeletalMeshComponent.bDisplayBones. 
 */
var() Name StartDisplayBoneName;

/** LOD bias to use for PC. */
var() int LODBiasPC;
/** LOD bias to use for PS3. */
var() int LODBiasPS3;
/** LOD bias to use for Xbox 360. */
var() int LODBiasXbox360;

/** Cache of ClothMesh objects at different scales. */
var	const native transient array<pointer>	ClothMesh;

/** Scale of each of the ClothMesh objects in cache. This array is same size as ClothMesh. */
var const native transient array<float>		ClothMeshScale;

/** 
 *	Mapping between each vertex in the simulation mesh and the graphics mesh. 
 *	This is ordered so that 'free' vertices are first, and then after NumFreeClothVerts they are 'fixed' to the skinned mesh.
 */
var const array<int>		ClothToGraphicsVertMap;

/**
 * Mapping from index of rendered mesh to index of simulated mesh.
 * This mapping applies before ClothToGraphicsVertMap which can then operate normally
 * The reason for this mapping is to weld several vertices with the same position but different texture coordinates into one
 * simulated vertex which makes it possible to run closed meshes for cloth.
 */
var const array<int>		ClothWeldingMap;

/**
 * This is the highest value stored in ClothWeldingMap
 */
var const int				ClothWeldingDomain;

/**
 * This will hold the indices to the reduced number of cloth vertices used for cooking the NxClothMesh.
 */
var const array<int>		ClothWeldedIndices;

/**
 * Forces the Welding Code to be turned off even if the mesh has doubled vertices
 */
var(Cloth)	const bool		bForceNoWelding;

/** Point in the simulation cloth vertex array where the free verts finish and we start having 'fixed' verts. */
var const int				NumFreeClothVerts;

/** Index buffer for simulation cloth. */
var const array<int>		ClothIndexBuffer;

/** Vertices with any weight to these bones are considered 'cloth'. */
var(Cloth)	const array<name>		ClothBones;


/** Enable constraints that attempt to minimize curvature or folding of the cloth. */
var(Cloth)	const bool				bEnableClothBendConstraints;

/** Enable damping forces on the cloth. */
var(Cloth)	const bool				bEnableClothDamping;

/** Enable center of mass damping of cloth internal velocities.  */
var(Cloth)	const bool				bUseClothCOMDamping;

/** Controls strength of springs that attempts to keep particles in the cloth together. */
var(Cloth)	const float				ClothStretchStiffness;

/** 
 *	Controls strength of springs that stop the cloth from bending. 
 *	bEnableClothBendConstraints must be true to take affect. 
 */
var(Cloth)	const float				ClothBendStiffness;

/** 
 *	This is multiplied by the size of triangles sharing a point to calculate the points mass.
 *	This cannot be modified after the cloth has been created.
 */
var(Cloth)	const float				ClothDensity;

/** How thick the cloth is considered when doing collision detection. */
var(Cloth)	const float				ClothThickness;

/** 
 *	Controls how much damping force is applied to cloth particles.
 *	bEnableClothDamping must be true to take affect.
 */
var(Cloth)	const float				ClothDamping;

/** Increasing the number of solver iterations improves how accurately the cloth is simulated, but will also slow down simulation. */
var(Cloth)	const int				ClothIterations;

/** Controls movement of cloth when in contact with other bodies. */
var(Cloth)	const float				ClothFriction;

/** 
 * Controls the size of the grid cells a cloth is divided into when performing broadphase collision. 
 * The cell size is relative to the AABB of the cloth.
 */
var(Cloth)	const float				ClothRelativeGridSpacing;

/** Adjusts the internal "air" pressure of the cloth. Only has affect when bEnableClothPressure. */
var(Cloth)	const float				ClothPressure;

/** Response coefficient for cloth/rb collision */
var(Cloth)	const float				ClothCollisionResponseCoefficient;

/** How much an attachment to a rigid body influences the cloth */
var(Cloth)	const float				ClothAttachmentResponseCoefficient;

/** How much extension an attachment can undergo before it tears/breaks */
var(Cloth)	const float				ClothAttachmentTearFactor;

/**
 * Maximum linear velocity at which cloth can go to sleep.
 * If negative, the global default will be used.
 */
var(Cloth)	const float				ClothSleepLinearVelocity;



/** Enable orthogonal bending resistance to minimize curvature or folding of the cloth. 
 *  This technique uses angular springs instead of distance springs as used in 
 *  'bEnableClothBendConstraints'. This mode is slower but independent of stretching resistance.
 */
var(Cloth)	const bool				bEnableClothOrthoBendConstraints;

/** Enables cloth self collision. */
var(Cloth)	const bool				bEnableClothSelfCollision;

/** Enables pressure support. Simulates inflated objects like balloons. */
var(Cloth)	const bool				bEnableClothPressure;

/** Enables two way collision with rigid-bodies. */
var(Cloth)	const bool				bEnableClothTwoWayCollision;

/** Cloth bone type, used when attaching to the physics asset. */
enum ClothBoneType
{
	CLOTHBONE_Fixed,						//0
	CLOTHBONE_BreakableAttachment,			//1
	/* EXPERIMENTAL: CLOTHBONE_TearLine */
};

/** Used to specify a set of special cloth bones which are attached to the physics asset */
struct native ClothSpecialBoneInfo
{
	/** The bone name to attach to a cloth vertex */
	var() name BoneName;
	
	/** The type of attachment */
	var() ClothBoneType BoneType;
	
	/** Array used to cache cloth indices which will be attached to this bone, created in BuildClothMapping(),
	 * Note: These are welded indices.
	 */
	var const array<int> AttachedVertexIndices;
};

/** 
 * Vertices with any weight to these bones are considered cloth with special behavoir, currently
 * they are attached to the physics asset with fixed or breakable attachments.
 */
var(Cloth)	const array<ClothSpecialBoneInfo>		ClothSpecialBones; 

/** 
 * Enable cloth line/extent/point checks. 
 * Note: line checks are performed with a raycast against the cloth, but point and swept extent checks are performed against the cloth AABB 
 */
var(Cloth)	const bool				bEnableClothLineChecks;

/**
 *  Whether cloth simulation should be wrapped inside a Rigid Body and only be used upon impact
 */
var(Cloth)  const bool		bClothMetal;

/** Threshold for when deformation is allowed */
var(Cloth)	const float				ClothMetalImpulseThreshold;
/** Amount by which colliding objects are brought closer to the cloth */
var(Cloth)	const float				ClothMetalPenetrationDepth;
/** Maximum deviation of cloth particles from initial position */
var(Cloth)	const float				ClothMetalMaxDeformationDistance;

/** 
 *  Used to enable cloth tearing. Note, extra vertices/indices must be reserved using ClothTearReserve 
 *  Also cloth tearing is not available when welding is enabled.
 */
var(Cloth)	const bool				bEnableClothTearing;

/** Stretch factor beyond which a cloth edge/vertex will tear. Should be greater than 1. */
var(Cloth)	const float				ClothTearFactor;

/** Number of vertices/indices to set aside to accomodate new triangles created as a result of tearing */
var(Cloth)	const int				ClothTearReserve;

/** Map which maps from a set of 3 triangle indices packet in a 64bit to the location in the index buffer,
 *  Used to update indices for torn triangles.
 *  Note: This structure is lazy initialized when a torn cloth mesh is created. (But could be precomputed
 *  in BuildClothMapping() if serialization is handled correctly).
 */
var			const native Map_Mirror ClothTornTriMap {TMap<QWORD,INT>};

var const native transient int ReleaseResourcesFence;

/** GUID for this SkeletalMeshm, used when linking meshes to AnimSets. */
var const GUID SkelMeshGUID;

defaultproperties
{
   SkelMirrorAxis=AXIS_X
   SkelMirrorFlipAxis=AXIS_Z
   bUseSimpleLineCollision=True
   bUseSimpleBoxCollision=True
   ClothStretchStiffness=1.000000
   ClothBendStiffness=1.000000
   ClothDensity=1.000000
   ClothThickness=0.500000
   ClothDamping=0.500000
   ClothIterations=5
   ClothFriction=0.500000
   ClothRelativeGridSpacing=1.000000
   ClothPressure=1.000000
   ClothCollisionResponseCoefficient=0.200000
   ClothAttachmentResponseCoefficient=0.200000
   ClothAttachmentTearFactor=1.500000
   ClothSleepLinearVelocity=-1.000000
   ClothMetalImpulseThreshold=10.000000
   ClothTearFactor=3.500000
   ClothTearReserve=128
   Name="Default__SkeletalMesh"
   ObjectArchetype=Object'Core.Default__Object'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:17:56.000 - Creation time: sk 18-3-2018 10:01:14.285 - Created with UnCodeX