From d1c812f1162e5fdb13c215792725b2591d7428f5 Mon Sep 17 00:00:00 2001 From: Sheikh Dawood Abdul Ajees Date: Fri, 15 Sep 2017 15:41:57 -0500 Subject: PhysX 3.4.1, APEX 1.4.1 Release @22845541 --- .../files/PxContactModifyCallback_8h-source.html | 265 ++++++++++++--------- 1 file changed, 150 insertions(+), 115 deletions(-) (limited to 'PhysX_3.4/Documentation/PhysXAPI/files/PxContactModifyCallback_8h-source.html') diff --git a/PhysX_3.4/Documentation/PhysXAPI/files/PxContactModifyCallback_8h-source.html b/PhysX_3.4/Documentation/PhysXAPI/files/PxContactModifyCallback_8h-source.html index a39ea415..2e7de279 100644 --- a/PhysX_3.4/Documentation/PhysXAPI/files/PxContactModifyCallback_8h-source.html +++ b/PhysX_3.4/Documentation/PhysXAPI/files/PxContactModifyCallback_8h-source.html @@ -94,126 +94,161 @@ 00132 00138 PX_FORCE_INLINE PxU32 getInternalFaceIndex0(PxU32 i) { PX_UNUSED(i); return PXC_CONTACT_NO_FACE_INDEX; } 00139 -00145 PX_FORCE_INLINE PxU32 getInternalFaceIndex1(PxU32 i) { PX_UNUSED(i); return PXC_CONTACT_NO_FACE_INDEX; } -00146 -00152 PX_FORCE_INLINE PxReal getMaxImpulse(PxU32 i) const { return mContacts[i].maxImpulse; } -00153 -00161 PX_FORCE_INLINE void setMaxImpulse(PxU32 i, PxReal s) -00162 { -00163 PxContactPatch* patch = getPatch(); -00164 patch->internalFlags |= PxContactPatch::eHAS_MAX_IMPULSE; -00165 mContacts[i].maxImpulse = s; -00166 } -00167 -00173 PX_FORCE_INLINE void ignore(PxU32 i) { mContacts[i].maxImpulse = 0.f; } -00174 -00178 PX_FORCE_INLINE PxU32 size() const { return mCount; } -00179 -00186 PX_FORCE_INLINE PxReal getInvMassScale0() const -00187 { -00188 PxContactPatch* patch = getPatch(); -00189 return patch->mMassModification.mInvMassScale0; -00190 } -00191 -00198 PX_FORCE_INLINE PxReal getInvMassScale1() const -00199 { -00200 PxContactPatch* patch = getPatch(); -00201 return patch->mMassModification.mInvMassScale1; -00202 } +00145 PX_FORCE_INLINE PxU32 getInternalFaceIndex1(PxU32 i) +00146 { +00147 PxContactPatch* patch = getPatch(); +00148 if (patch->internalFlags & PxContactPatch::eHAS_FACE_INDICES) +00149 { +00150 return reinterpret_cast<PxU32*>(mContacts + mCount)[mCount + i]; +00151 } +00152 return PXC_CONTACT_NO_FACE_INDEX; +00153 } +00154 +00160 PX_FORCE_INLINE PxReal getMaxImpulse(PxU32 i) const { return mContacts[i].maxImpulse; } +00161 +00169 PX_FORCE_INLINE void setMaxImpulse(PxU32 i, PxReal s) +00170 { +00171 PxContactPatch* patch = getPatch(); +00172 patch->internalFlags |= PxContactPatch::eHAS_MAX_IMPULSE; +00173 mContacts[i].maxImpulse = s; +00174 } +00175 +00181 PX_FORCE_INLINE PxReal getRestitution(PxU32 i) const { return mContacts[i].restitution; } +00182 +00190 PX_FORCE_INLINE void setRestitution(PxU32 i, PxReal r) +00191 { +00192 PxContactPatch* patch = getPatch(); +00193 patch->internalFlags |= PxContactPatch::eREGENERATE_PATCHES; +00194 mContacts[i].restitution = r; +00195 } +00196 +00202 PX_FORCE_INLINE PxReal getStaticFriction(PxU32 i) const { return mContacts[i].staticFriction; } 00203 -00210 PX_FORCE_INLINE PxReal getInvInertiaScale0() const -00211 { -00212 PxContactPatch* patch = getPatch(); -00213 return patch->mMassModification.mInvInertiaScale0; +00209 PX_FORCE_INLINE void setStaticFriction(PxU32 i, PxReal f) +00210 { +00211 PxContactPatch* patch = getPatch(); +00212 patch->internalFlags |= PxContactPatch::eREGENERATE_PATCHES; +00213 mContacts[i].staticFriction = f; 00214 } 00215 -00222 PX_FORCE_INLINE PxReal getInvInertiaScale1() const -00223 { -00224 PxContactPatch* patch = getPatch(); -00225 return patch->mMassModification.mInvInertiaScale1; -00226 } -00227 -00234 PX_FORCE_INLINE void setInvMassScale0(const PxReal scale) -00235 { -00236 PxContactPatch* patch = getPatch(); -00237 patch->mMassModification.mInvMassScale0 = scale; -00238 patch->internalFlags |= PxContactPatch::eHAS_MODIFIED_MASS_RATIOS; -00239 } -00240 -00247 PX_FORCE_INLINE void setInvMassScale1(const PxReal scale) -00248 { -00249 PxContactPatch* patch = getPatch(); -00250 patch->mMassModification.mInvMassScale1 = scale; -00251 patch->internalFlags |= PxContactPatch::eHAS_MODIFIED_MASS_RATIOS; -00252 } -00253 -00260 PX_FORCE_INLINE void setInvInertiaScale0(const PxReal scale) -00261 { -00262 PxContactPatch* patch = getPatch(); -00263 patch->mMassModification.mInvInertiaScale0 = scale; -00264 patch->internalFlags |= PxContactPatch::eHAS_MODIFIED_MASS_RATIOS; -00265 } -00266 -00273 PX_FORCE_INLINE void setInvInertiaScale1(const PxReal scale) -00274 { -00275 PxContactPatch* patch = getPatch(); -00276 patch->mMassModification.mInvInertiaScale1 = scale; -00277 patch->internalFlags |= PxContactPatch::eHAS_MODIFIED_MASS_RATIOS; -00278 } -00279 -00280 protected: -00281 -00282 PX_FORCE_INLINE PxContactPatch* getPatch() const -00283 { -00284 const size_t headerOffset = sizeof(PxContactPatch)*mCount; -00285 return reinterpret_cast<PxContactPatch*>(reinterpret_cast<PxU8*>(mContacts) - headerOffset); -00286 } -00287 -00288 PxU32 mCount; -00289 PxModifiableContact* mContacts; -00290 }; -00291 -00292 -00293 -00300 class PxContactModifyPair -00301 { -00302 public: -00303 -00310 const PxRigidActor* actor[2]; -00317 const PxShape* shape[2]; -00318 -00327 PxTransform transform[2]; -00328 -00333 PxContactSet contacts; -00334 }; -00335 -00336 -00355 class PxContactModifyCallback -00356 { -00357 public: +00221 PX_FORCE_INLINE PxReal getDynamicFriction(PxU32 i) const { return mContacts[i].dynamicFriction; } +00222 +00228 PX_FORCE_INLINE void setDynamicFriction(PxU32 i, PxReal f) +00229 { +00230 PxContactPatch* patch = getPatch(); +00231 patch->internalFlags |= PxContactPatch::eREGENERATE_PATCHES; +00232 mContacts[i].dynamicFriction = f; +00233 } +00234 +00240 PX_FORCE_INLINE void ignore(PxU32 i) { mContacts[i].maxImpulse = 0.f; } +00241 +00245 PX_FORCE_INLINE PxU32 size() const { return mCount; } +00246 +00253 PX_FORCE_INLINE PxReal getInvMassScale0() const +00254 { +00255 PxContactPatch* patch = getPatch(); +00256 return patch->mMassModification.mInvMassScale0; +00257 } +00258 +00265 PX_FORCE_INLINE PxReal getInvMassScale1() const +00266 { +00267 PxContactPatch* patch = getPatch(); +00268 return patch->mMassModification.mInvMassScale1; +00269 } +00270 +00277 PX_FORCE_INLINE PxReal getInvInertiaScale0() const +00278 { +00279 PxContactPatch* patch = getPatch(); +00280 return patch->mMassModification.mInvInertiaScale0; +00281 } +00282 +00289 PX_FORCE_INLINE PxReal getInvInertiaScale1() const +00290 { +00291 PxContactPatch* patch = getPatch(); +00292 return patch->mMassModification.mInvInertiaScale1; +00293 } +00294 +00301 PX_FORCE_INLINE void setInvMassScale0(const PxReal scale) +00302 { +00303 PxContactPatch* patch = getPatch(); +00304 patch->mMassModification.mInvMassScale0 = scale; +00305 patch->internalFlags |= PxContactPatch::eHAS_MODIFIED_MASS_RATIOS; +00306 } +00307 +00314 PX_FORCE_INLINE void setInvMassScale1(const PxReal scale) +00315 { +00316 PxContactPatch* patch = getPatch(); +00317 patch->mMassModification.mInvMassScale1 = scale; +00318 patch->internalFlags |= PxContactPatch::eHAS_MODIFIED_MASS_RATIOS; +00319 } +00320 +00327 PX_FORCE_INLINE void setInvInertiaScale0(const PxReal scale) +00328 { +00329 PxContactPatch* patch = getPatch(); +00330 patch->mMassModification.mInvInertiaScale0 = scale; +00331 patch->internalFlags |= PxContactPatch::eHAS_MODIFIED_MASS_RATIOS; +00332 } +00333 +00340 PX_FORCE_INLINE void setInvInertiaScale1(const PxReal scale) +00341 { +00342 PxContactPatch* patch = getPatch(); +00343 patch->mMassModification.mInvInertiaScale1 = scale; +00344 patch->internalFlags |= PxContactPatch::eHAS_MODIFIED_MASS_RATIOS; +00345 } +00346 +00347 protected: +00348 +00349 PX_FORCE_INLINE PxContactPatch* getPatch() const +00350 { +00351 const size_t headerOffset = sizeof(PxContactPatch)*mCount; +00352 return reinterpret_cast<PxContactPatch*>(reinterpret_cast<PxU8*>(mContacts) - headerOffset); +00353 } +00354 +00355 PxU32 mCount; +00356 PxModifiableContact* mContacts; +00357 }; 00358 -00369 virtual void onContactModify(PxContactModifyPair* const pairs, PxU32 count) = 0; +00359 +00360 +00367 class PxContactModifyPair +00368 { +00369 public: 00370 -00371 protected: -00372 virtual ~PxContactModifyCallback(){} -00373 }; -00374 -00393 class PxCCDContactModifyCallback -00394 { -00395 public: -00396 -00407 virtual void onCCDContactModify(PxContactModifyPair* const pairs, PxU32 count) = 0; -00408 -00409 protected: -00410 virtual ~PxCCDContactModifyCallback(){} -00411 }; -00412 -00413 -00414 #if !PX_DOXYGEN -00415 } // namespace physx -00416 #endif -00417 -00419 #endif +00377 const PxRigidActor* actor[2]; +00384 const PxShape* shape[2]; +00385 +00394 PxTransform transform[2]; +00395 +00400 PxContactSet contacts; +00401 }; +00402 +00403 +00422 class PxContactModifyCallback +00423 { +00424 public: +00425 +00436 virtual void onContactModify(PxContactModifyPair* const pairs, PxU32 count) = 0; +00437 +00438 protected: +00439 virtual ~PxContactModifyCallback(){} +00440 }; +00441 +00460 class PxCCDContactModifyCallback +00461 { +00462 public: +00463 +00474 virtual void onCCDContactModify(PxContactModifyPair* const pairs, PxU32 count) = 0; +00475 +00476 protected: +00477 virtual ~PxCCDContactModifyCallback(){} +00478 }; +00479 +00480 +00481 #if !PX_DOXYGEN +00482 } // namespace physx +00483 #endif +00484 +00486 #endif

-- cgit v1.2.3