/********************************************************************
created: 2009/02/16
created: 16:2:2009 20:25
filename: x:\ProjectRoot\svn\local\vtPhysX\SDK\Include\Core\Common\vtInterfaceEnumeration.h
file path: x:\ProjectRoot\svn\local\vtPhysX\SDK\Include\Core\Common
file base: vtInterfaceEnumeration
file ext: h
author: Günter Baumgart
purpose: Declaration of enumerations with bindings in the interface :
+ VSL
+ Custom Enumeration
Remarks The identifiers described here need to be consistent with types
registered for the interface. All types are used by this SDK
*********************************************************************/
#ifndef __VT_INTERFACE_ENUMERATION_H__
#define __VT_INTERFACE_ENUMERATION_H__
/** \addtogroup Callbacks
@{
*/
typedef enum pCallback
{
CB_OnDelete = (1<<0),
CB_OnCopy = (1<<1),
CB_OnPreProcess = (1<<2),
CB_OnPostProcess = (1<<3),
CB_OnContactNotify = (1<<4),
CB_OnContactModify = (1<<5),
CB_OnRayCastHit = (1<<6),
CB_OnWheelContactModify = (1<<7),
CB_OnTrigger = (1<<8),
CB_OnJointBreak = (1<<9),
CB_Max,
};
typedef enum pWheelContactModifyFlags
{
CWCM_ContactPoint = (1<<0),
CWCM_ContactNormal = (1<<1),
CWCM_ContactPosition = (1<<2),
CWCM_NormalForce = (1<<3),
CWCM_OtherMaterialIndex = (1<<4),
};
/** @} */
/** \addtogroup Collision
@{
*/
/**
\brief Contact pair flags.
@see NxUserContactReport.onContactNotify() NxActor::setContactReportThreshold
*/
typedef enum pContactPairFlags
{
CPF_IgnorePair = (1<<0), //!< disable contact generation for this pair
CPF_OnStartTouch = (1<<1), //!< pair callback will be called when the pair starts to be in contact
CPF_OnEndTouch = (1<<2), //!< pair callback will be called when the pair stops to be in contact
CPF_OnTouch = (1<<3), //!< pair callback will keep getting called while the pair is in contact
CPF_OnImpact = (1<<4), //!< [not yet implemented] pair callback will be called when it may be appropriate for the pair to play an impact sound
CPF_OnRoll = (1<<5), //!< [not yet implemented] pair callback will be called when the pair is in contact and rolling.
CPF_OnSlide = (1<<6), //!< [not yet implemented] pair callback will be called when the pair is in contact and sliding (and not rolling).
CPF_Forces = (1<<7), //!< the (summed total) friction force and normal force will be given in the nxcontactpair variable in the contact report.
CPF_OnStartTouchForceThreshold = (1<<8), //!< pair callback will be called when the contact force between two actors exceeds one of the actor-defined force thresholds
CPF_OnEndTouchForceThreshold = (1<<9), //!< pair callback will be called when the contact force between two actors falls below the actor-defined force thresholds
CPF_OnTouchForceThreshold = (1<<10), //!< pair callback will keep getting called while the contact force between two actors exceeds one of the actor-defined force thresholds
CPF_ContactModification = (1<<16), //!< generate a callback for all associated contact constraints, making it possible to edit the constraint. this flag is not included in CPFall for performance reasons. \see nxusercontactmodify
};
typedef enum pContactModifyMask
{
CMM_None = 0, //!< No changes made
CMM_MinImpulse = (1<<0), //!< Min impulse value changed
CMM_MaxImpulse = (1<<1), //!< Max impulse value changed
CMM_Error = (1<<2), //!< Error vector changed
CMM_Target = (1<<3), //!< Target vector changed
CMM_LocalPosition0 = (1<<4), //!< Local attachment position in shape 0 changed
CMM_LocalPosition1 = (1<<5), //!< Local attachment position in shape 1 changed
CMM_LocalOrientation0 = (1<<6), //!< Local orientation (normal, friction direction) in shape 0 changed
CMM_LocalOrientation1 = (1<<7), //!< Local orientation (normal, friction direction) in shape 1 changed
CMM_StaticFriction0 = (1<<8), //!< Static friction parameter 0 changed. (Note: 0 does not have anything to do with shape 0/1)
CMM_StaticFriction1 = (1<<9), //!< Static friction parameter 1 changed. (Note: 1 does not have anything to do with shape 0/1)
CMM_DynamicFriction0 = (1<<10), //!< Dynamic friction parameter 0 changed. (Note: 0 does not have anything to do with shape 0/1)
CMM_DynamicFriction1 = (1<<11), //!< Dynamic friction parameter 1 changed. (Note: 1 does not have anything to do with shape 0/1)
CMM_Restitution = (1<<12), //!< Restitution value changed.
CMM_Force32 = (1<<31) //!< Not a valid flag value, used by the enum to force the size to 32 bits.
};
/**
Specifies which informations should be generated(when used as hint flags for ray casting methods).
*/
enum pRaycastBit
{
RCH_Shape = (1<<0), //!< "shape" member of #NxRaycastHit is valid
RCH_Impact = (1<<1), //!< "worldImpact" member of #NxRaycastHit is valid
RCH_Normal = (1<<2), //!< "worldNormal" member of #NxRaycastHit is valid
RCH_FaceIndex = (1<<3), //!< "faceID" member of #NxRaycastHit is valid
RCH_Distance = (1<<4), //!< "distance" member of #NxRaycastHit is valid
RCH_UV = (1<<5), //!< "u" and "v" members of #NxRaycastHit are valid
RCH_FaceNormal = (1<<6), //!< Same as RCH_NORMAL but computes a non-smoothed normal
RCH_Material= (1<<7), //!< "material" member of #NxRaycastHit is valid
};
/**
\brief Collision filtering operations.
@see pGroupsMask
*/
enum pFilterOp
{
FO_And,
FO_Or,
FO_Xor,
FO_Nand,
FO_Nor,
FO_NXor,
FO_SwapAnd
};
/**
\brief Used to specify which types(static or dynamic) of shape to test against when used with raycasting and overlap test methods in pWorld.
*/
typedef enum pShapesType
{
/**
\brief Hits static shapes.
*/
ST_Static= 1,
/**
\brief Hits dynamic shapes.
*/
ST_Dynamic= 2,
/**
\brief Hits dynamic and static shapes.
*/
ST_All = ST_Dynamic|ST_Static,
};
/**
\brief Flags which affect the behavior of NxShapes.
@see pRigidBody.setTriggerFlags()
*/
typedef enum pTriggerFlags
{
/**
\brief Disables trigger callback.
*/
TF_Disable = (1<<3),
/**
\brief Trigger callback will be called when a shape enters the trigger volume.
*/
TF_OnEnter = (1<<0),
/**
\brief Trigger callback will be called after a shape leaves the trigger volume.
*/
TF_OnLeave = (1<<1),
/**
\brief Trigger callback will be called while a shape is intersecting the trigger volume.
*/
TF_OnStay = (1<<2)
};
/** @} */
typedef enum E_ENTITY_DATA_FLAGS
{
EDF_MATERIAL_PARAMETER,
EDF_SLEEPING_PARAMETER,
EDF_DAMPING_PARAMETER,
EDF_DEFORMABLE_PARAMETER,
EDF_OPTIMIZATION_PARAMETER,
};
typedef enum WORLD_DATA_FLAGS
{
WDF_HAS_SURFACE_PARAMETER = 0x0001,
WDF_HAS_SLEEPING_PARAMETER = 0x0002,
WDF_HAS_DAMPING_PARAMETER = 0x0004
};
typedef enum WORLD_UPDATE_MODE
{
WUM_UPDATE_FROM_ATTRIBUTE = 0x0001
};
typedef enum WORLD_UPDATE_FLAGS
{
WUF_WORLD_SETTINGS = 0x0001,
WUF_DAMPING_PARAMETER = 0x0002,
WUF_SLEEPING_PARAMETER = 0x0004,
WUF_SURFACE_SETTINGS = 0x0008,
WUF_ALL_PARAMETERS = 0x0010,
};
typedef enum BODY_UPDATE_FLAGS
{
BUF_PHY_PARAMETER = 0x0001,
BUF_DAMPING_PARAMETER = 0x0002,
BUF_SLEEPING_PARAMETER = 0x0004,
BUF_JOINT_PARAMETERS = 0x0008,
BUF_SURFACE_PARAMETERS = 0x0010,
BUF_ALL_PARAMETERS = 0x0020,
BUF_GEOMETRY = 0x0040,
BUF_PIVOT = 0x0080,
BUF_MASS = 0x0100,
BUF_ALL = 0x0200
};
/** \addtogroup Joints
@{
*/
//! Identifies each type of joint.
//! This enum is registered as a custom enumeration for the schematic interface as #pJointType.
typedef enum JType
{
JT_Any =-1,/*!
//! -during body registration.
//! -through invoking of #pRigidBody::addSubShape().This needs to have BF_SubShape enabled then!.
//! -as member of #pObjectDescr.
//! This enum is registered as a custom flags for the schematic : #pBFlags.
typedef enum BodyFlags{
BF_Moving=1,/*!< Makes the body movable. this can not be altered after creation */
BF_Gravity=2,/*!< Enables gravity. See #pRigidBody::enableGravity() or \ref PBSetPar */
BF_Collision=4,/*!< Enables collisions response. See #pRigidBody::enableCollision() or \ref PBSetPar */
BF_Kinematic=8,/*!< Act as kinematic object. See #pRigidBody::setKinematic() or \ref PBSetPar */
BF_SubShape=16,/*!
//! -during body registration.
//! -as member of #pObjectDescr.
//! This enum is registered as a custom flags for the schematic : #pBHullType.
typedef enum HullType {
HT_Sphere = 0,
/*!
*/
HT_Box = 1,
/*!
*/
HT_Capsule = 2,
/*!
Assuming bodies pivot is aligned to the world frame, the entities rotation is set to 0,0,0 (degree) temporary in order to determine the capsule parameters whereas :
capsule length = boxMeshSize.y - boxMeshSize.x and
capsule radius = boxMeshSize.x / 2
*/
HT_Plane = 3,
/*!
*/
HT_Mesh =4,
/*!
\note This mesh type will not create contact points with another trieangle meshs. Avoid this at any cost, otherwise Virtools will crash!
*/
HT_ConvexMesh =5,
/*!
\note This type will create contact points with all other types!
*/
HT_Heightfield=6,
/*!
*/
HT_Wheel=7,
/*!
*/
HT_Cloth=8,
/*!
*/
HT_ConvexCylinder=9,
/*!
*/
HT_Unknown,
/*!
*/
};
/** @} */
typedef enum E_LOG_ITEMS
{
E_LI_AGEIA,
E_LI_MANAGER,
E_VSL,
E_BB,
};
typedef enum E_PHYSIC_ERROR
{
E_PE_OK,
E_PE_AGEIA_ERROR,
E_PE_INVALID_PARAMETER,
E_PE_INVALID_OPERATION,
};
typedef enum E_MANAGER_FLAGS
{
E_MF_OK,
E_MF_PSDK_LOADED,
E_MF_PSDK_FAILED,
E_MF_DEFAULT_WORLD_CREATED,
E_MF_DEFAULT_CONFIG_LOADED,
E_MF_LOADING_DEFAULT_CONFIG_FAILED,
E_MF_FACTORY_CREATED,
};
typedef enum E_MANAGER_INIT_FLAGS
{
E_MFI_LOAD_CONFIG,
E_MFI_CREATE_FACTORY,
E_MFI_CREATE_DEFAULT_WORLD,
E_MFI_USE_XML_WORLD_SETTINGS
};
/** \addtogroup RigidBody
@{
*/
//! This enum is registered as a custom flags for the schematic : #pBForceMode.
//! Enumeration to force related calls.
//*! Is used for force related calls. Registered as custom enumeration #pBForceMode. */
enum ForceMode
{
FM_Force, /*!< parameter has unit of mass * distance/ time^2, i.e. a force*/
FM_Impulse, /*!< parameter has unit of mass * distance /time */
FM_VelocityChange, /*!< parameter has unit of distance / time, i.e. the effect is mass independent: a velocity change.*/
FM_SmoothImpulse, /*!< same as FM_Impulse but the effect is applied over all sub steps. Use this for motion controllers that repeatedly apply an impulse.*/
FM_SmoothVelocityChange, /*!< same as FM_VelocityChange but the effect is applied over all substeps. Use this for motion controllers that repeatedly apply an impulse.*/
FM_Acceleration /*!< parameter has unit of distance/ time^2, i.e. an acceleration. It gets treated just like a force except the mass is not divided out before integration.*/
};
//! This enum is registered as custom hidden enumeration for pCCDSettings-
enum CCDFlags
{
CCD_Shared, /*!< Is reusing a ccd skeleton*/
};
/** @} */
/** \addtogroup RigidBody
@{
*/
//! Flag that determines the combine mode. When two bodies come in contact with each other,
//! they each have materials with various coefficients, but we only need a single set of coefficients for the pair.
//! Physics doesn't have any inherent combinations because the coefficients are determined empirically on a case by case basis. However, simulating this with a pairwise lookup table is often impractical. For this reason the following combine
//! behaviors are available: CM_Average CM_Min CM_Multiply CM_Max
//! The effective combine mode for the pair is max(material0.combineMode, material1.combineMode).
enum CombineMode
{
CM_Average,/*!
\note The appropriate target positions/orientations should be set.
*/
D6DT_Velocity = 1 << 1,
/*!
\note The appropriate target velocities should beset.*/
};
/** @} */
/** \addtogroup D6
@{
*/
//! Enumeration is used to specify a particular degree of freedom.Registered as custom enumeration #pJD6Axis.
typedef enum D6MotionAxis
{
D6MA_Twist,/*!
- building block \ref PVWSet
- #pWheel::setShapeFlags
*/
/**
Flags to describe the wheels control facility. This can be done at any time with :
- building block \ref PVWSet
- #pWheel::setWheelFlags
*/
typedef enum VehicleFlags
{
VF_UseAdvance = (1 << 0),
};
typedef enum WheelShapeFlags
{
/**
\brief Determines whether the suspension axis or the ground contact normal is used for the suspension constraint.
*/
WSF_WheelAxisContactNormal = 1 << 0,
/**
\brief If set, the lateral slip velocity is used as the input to the tire function, rather than the slip angle.
*/
WSF_InputLatSlipVelocity = 1 << 1,
/**
\brief If set, the longitudinal slip velocity is used as the input to the tire function, rather than the slip ratio.
*/
WSF_InputLongSlipVelocity = 1 << 2,
/**
\brief If set, does not factor out the suspension travel and wheel radius from the spring force computation. This is the legacy behavior from the raycast capsule approach.
*/
WSF_UnscaledSpringBehavior = 1 << 3,
/**
\brief If set, the axle speed is not computed by the simulation but is rather expected to be provided by the user every simulation step via NxWheelShape::setAxleSpeed().
*/
WSF_AxleSpeedOverride = 1 << 4,
/**
\brief If set, the wheels shape will emulate the legacy raycast capsule based wheel.
See #pVWheelFunction
*/
WSF_EmulateLegacyWheel = 1 << 5,
/**
\brief If set, the shape will clamp the force in the friction constraints.
See #pVWheelFunction
*/
WSF_ClampedFriction = 1 << 6,
};
/**
Flags to describe the wheels control facility. This can be done at any time with :
- building block \ref PVWSet
- #pWheel::setWheelFlags
*/
typedef enum WheelFlags
{
/**
\brief If set, the wheels shape will emulate the legacy raycast capsule based wheel.
See #pVWheelFunction
*/
WF_SteerableInput = (1 << 0),
WF_SteerableAuto = (1 << 1),
WF_AffectedByHandbrake = (1 << 2),
WF_Accelerated = (1 << 3),
WF_VehicleControlled = (1 << 4),
WF_AffectedByDifferential = (1 << 5),
WF_IgnoreTireFunction = (1 << 6),
WF_AllWheelFlags = WF_SteerableInput
| WF_SteerableAuto
| WF_AffectedByHandbrake
| WF_Accelerated
| WF_VehicleControlled
| WF_AffectedByDifferential,
};
typedef enum E_VEHICLE_STATE_FLAGS
{
E_VSF_HAS_GEARS=(1<<0),
E_VSF_HAS_MOTOR=(1<<1),
E_VSF_HAS_GROUND=(1<<2),
E_VSF_IS_BRAKING=(1<<3),
E_VSF_IS_BREAKPEDAL=(1<<4),
E_VSF_BREAKPEDAL_CHANGED=(1<<5),
E_VSF_ACC_PEDAL=(1<<6),
E_VSF_RELEASING_BRAKE_PEDAL=(1<<7),
};
/** @} */
typedef enum pParticleRenderType
{
PRT_Point,
PRT_Sprite,
};
typedef enum E_OBJECT_CREATION_FLAGS
{
E_OCF_ROTATION,
E_OFC_POSITION,
E_OFC_DIMENSION,
E_OFC_PERISITENT,
};
typedef enum xManagerCallMask
{
XCM_PreProcess = 1 << 0 ,
XCM_PostProcess = 1 << 0
};
#endif // __VTINTERFACEENUMERATION_H__