struct SEntityPhysicalizeParams { int type; int nSlot; float density; float mass; int nFlagsAND; int nFlagsOR; int nLod; IPhysicalEntity * pAttachToEntity; int nAttachToPart; float fStiffnessScale; bool bCopyJointVelocities; struct pe_params_particle * pParticle; struct pe_params_buoyancy * pBuoyancy; struct pe_player_dimensions * pPlayerDimensions; struct pe_player_dynamics * pPlayerDynamics; struct pe_params_car * pCar; struct AreaDefinition { enum EAreaType { AREA_SPHERE, AREA_BOX, AREA_GEOMETRY, AREA_SHAPE, AREA_CYLINDER, AREA_SPLINE }; EAreaType areaType; float fRadius; Vec3 boxmin, boxmax; Vec3 * pPoints; int nNumPoints; float zmin, zmax; Vec3 center; Vec3 axis; struct pe_params_area * pGravityParams; }; AreaDefinition * pAreaDef; const char * szPropsOverride; };
IEntityProxy.h
Parameters passed to IEntity::Physicalize function.
IEntityProxy.h
This parameters are only used when type == PE_AREA
enum EAreaType { AREA_SPHERE, AREA_BOX, AREA_GEOMETRY, AREA_SHAPE, AREA_CYLINDER, AREA_SPLINE };
IEntityProxy.h
Members |
Description |
AREA_SPHERE |
Physical area will be sphere. |
AREA_BOX |
Physical area will be box. |
AREA_GEOMETRY |
Physical area will use geometry from the specified slot. |
AREA_SHAPE |
Physical area will points to specify 2D shape. |
AREA_CYLINDER |
Physical area will be a cylinder |
AREA_SPLINE |
Physical area will be a spline-tube |
EAreaType areaType;
Vec3 axis;
Vec3 boxmax;
Vec3 boxmin;
Vec3 center;
Min/Max of points.
float fRadius;
Must be set when using AREA_SPHERE or AREA_CYLINDER area type or an AREA_SPLINE.
int nNumPoints;
Number of points in pPoints array.
struct pe_params_area * pGravityParams;
pGravityParams must be a valid pointer to the area gravity params structure.
Vec3 * pPoints;
Must be set when using AREA_SHAPE area type or an AREA_SPLINE.
float zmax;
float zmin;
AreaDefinition();
bool bCopyJointVelocities;
Copy joints velocities when converting a character to ragdoll.
float density;
Only one either density or mass must be set, parameter set to 0 is ignored.
float fStiffnessScale;
Used for character physicalization (Scale of force in character joint's springs).
float mass;
int nAttachToPart;
Part ID in entity to attach to (Only for Soft physical entity).
int nFlagsAND;
Optional physical flags.
int nFlagsOR;
int nLod;
When physicalizing geometry can specify to use physics from different LOD. Used for characters that have ragdoll physics in Lod1
int nSlot;
Index of object slot. -1 if all slots should be used.
AreaDefinition * pAreaDef;
When physicalizing with type == PE_AREA this must be a valid pointer to the AreaDefinition structure.
IPhysicalEntity * pAttachToEntity;
Physical entity to attach this physics object (Only for Soft physical entity).
struct pe_params_buoyancy * pBuoyancy;
struct pe_params_car * pCar;
struct pe_params_particle * pParticle;
struct pe_player_dimensions * pPlayerDimensions;
struct pe_player_dynamics * pPlayerDynamics;
const char * szPropsOverride;
an optional string with text properties overrides for CGF nodes
int type;
Always must be filled.
SEntityPhysicalizeParams();