SEntityPhysicalizeParams

C++
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;
};
File

IEntityProxy.h

Description

Parameters passed to IEntity::Physicalize function.

SEntityPhysicalizeParams::AreaDefinition Structure
C++
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;
};
File

IEntityProxy.h

Description

This parameters are only used when type == PE_AREA

SEntityPhysicalizeParams::AreaDefinition::EAreaType Enumeration
C++
enum EAreaType {
  AREA_SPHERE,
  AREA_BOX,
  AREA_GEOMETRY,
  AREA_SHAPE,
  AREA_CYLINDER,
  AREA_SPLINE
};
File

IEntityProxy.h

Members
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
SEntityPhysicalizeParams::AreaDefinition::areaType Data Member
C++
EAreaType areaType;
SEntityPhysicalizeParams::AreaDefinition::axis Data Member
C++
Vec3 axis;
SEntityPhysicalizeParams::AreaDefinition::boxmax Data Member
C++
Vec3 boxmax;
SEntityPhysicalizeParams::AreaDefinition::boxmin Data Member
C++
Vec3 boxmin;
SEntityPhysicalizeParams::AreaDefinition::center Data Member
C++
Vec3 center;
Description

Min/Max of points.

SEntityPhysicalizeParams::AreaDefinition::fRadius Data Member
C++
float fRadius;
Description

Must be set when using AREA_SPHERE or AREA_CYLINDER area type or an AREA_SPLINE.

SEntityPhysicalizeParams::AreaDefinition::nNumPoints Data Member
C++
int nNumPoints;
Description

Number of points in pPoints array.

SEntityPhysicalizeParams::AreaDefinition::pGravityParams Data Member
C++
struct pe_params_area * pGravityParams;
Description

pGravityParams must be a valid pointer to the area gravity params structure.

SEntityPhysicalizeParams::AreaDefinition::pPoints Data Member
C++
Vec3 * pPoints;
Description

Must be set when using AREA_SHAPE area type or an AREA_SPLINE.

SEntityPhysicalizeParams::AreaDefinition::zmax Data Member
C++
float zmax;
SEntityPhysicalizeParams::AreaDefinition::zmin Data Member
C++
float zmin;
SEntityPhysicalizeParams::AreaDefinition::AreaDefinition Constructor
C++
AreaDefinition();
SEntityPhysicalizeParams::bCopyJointVelocities Data Member
C++
bool bCopyJointVelocities;
Description

Copy joints velocities when converting a character to ragdoll.

SEntityPhysicalizeParams::density Data Member
C++
float density;
Description

Only one either density or mass must be set, parameter set to 0 is ignored.

SEntityPhysicalizeParams::fStiffnessScale Data Member
C++
float fStiffnessScale;
Description

Used for character physicalization (Scale of force in character joint's springs).

SEntityPhysicalizeParams::mass Data Member
C++
float mass;
SEntityPhysicalizeParams::nAttachToPart Data Member
C++
int nAttachToPart;
Description

Part ID in entity to attach to (Only for Soft physical entity).

SEntityPhysicalizeParams::nFlagsAND Data Member
C++
int nFlagsAND;
Description

Optional physical flags.

SEntityPhysicalizeParams::nFlagsOR Data Member
C++
int nFlagsOR;
SEntityPhysicalizeParams::nLod Data Member
C++
int nLod;
Description

When physicalizing geometry can specify to use physics from different LOD. Used for characters that have ragdoll physics in Lod1

SEntityPhysicalizeParams::nSlot Data Member
C++
int nSlot;
Description

Index of object slot. -1 if all slots should be used.

SEntityPhysicalizeParams::pAreaDef Data Member
C++
AreaDefinition * pAreaDef;
Description

When physicalizing with type == PE_AREA this must be a valid pointer to the AreaDefinition structure.

SEntityPhysicalizeParams::pAttachToEntity Data Member
C++
IPhysicalEntity * pAttachToEntity;
Description

Physical entity to attach this physics object (Only for Soft physical entity).

SEntityPhysicalizeParams::pBuoyancy Data Member
C++
struct pe_params_buoyancy * pBuoyancy;
SEntityPhysicalizeParams::pCar Data Member
C++
struct pe_params_car * pCar;
SEntityPhysicalizeParams::pParticle Data Member
C++
struct pe_params_particle * pParticle;
SEntityPhysicalizeParams::pPlayerDimensions Data Member
C++
struct pe_player_dimensions * pPlayerDimensions;
SEntityPhysicalizeParams::pPlayerDynamics Data Member
C++
struct pe_player_dynamics * pPlayerDynamics;
SEntityPhysicalizeParams::szPropsOverride Data Member
C++
const char * szPropsOverride;
Description

an optional string with text properties overrides for CGF nodes

SEntityPhysicalizeParams::type Data Member
C++
int type;
Description

Always must be filled.

SEntityPhysicalizeParams::SEntityPhysicalizeParams Constructor
C++
SEntityPhysicalizeParams();