Newton Dynamics
4.00
ndJointDryRollingFriction.h
1
/* Copyright (c) <2003-2022> <Newton Game Dynamics>
2
*
3
* This software is provided 'as-is', without any express or implied
4
* warranty. In no event will the authors be held liable for any damages
5
* arising from the use of this software.
6
*
7
* Permission is granted to anyone to use this software for any purpose,
8
* including commercial applications, and to alter it and redistribute it
9
* freely
10
*/
11
12
13
#ifndef __ND_JOINT_DRY_ROLLING_FRICTION_H_
14
#define __ND_JOINT_DRY_ROLLING_FRICTION_H_
15
16
#include "ndNewtonStdafx.h"
17
#include "ndJointBilateralConstraint.h"
18
19
// this joint is usefully to simulate the rolling friction of a rolling ball over
20
// a flat surface.
21
// normally this is not important for non spherical objects, but for games like
22
// poll, pinball, bolling, golf or any other where the movement of balls is the main objective
23
// the rolling friction is a real big problem.
24
class
ndJointDryRollingFriction
:
public
ndJointBilateralConstraint
25
{
26
public
:
27
D_CLASS_REFLECTION(
ndJointDryRollingFriction
);
28
D_NEWTON_API
ndJointDryRollingFriction
(
const
ndLoadSaveBase::ndLoadDescriptor
& desc);
29
D_NEWTON_API
ndJointDryRollingFriction
(
ndBodyKinematic
*
const
body0,
ndBodyKinematic
*
const
body1, ndFloat32 coefficient);
30
D_NEWTON_API
virtual
~
ndJointDryRollingFriction
();
31
32
protected
:
33
D_NEWTON_API
void
JacobianDerivative(
ndConstraintDescritor
& desc);
34
D_NEWTON_API
void
Save(
const
ndLoadSaveBase::ndSaveDescriptor
& desc)
const
;
35
36
ndFloat32 m_coefficient;
37
ndFloat32 m_contactTrail;
38
};
39
40
#endif
41
ndConstraintDescritor
Definition:
ndConstraint.h:179
ndJointBilateralConstraint
Definition:
ndJointBilateralConstraint.h:53
ndBodyKinematic
Definition:
ndBodyKinematic.h:40
ndJointDryRollingFriction
Definition:
ndJointDryRollingFriction.h:25
ndLoadSaveBase::ndLoadDescriptor
Definition:
ndSaveLoadSytem.h:59
ndLoadSaveBase::ndSaveDescriptor
Definition:
ndSaveLoadSytem.h:93
newton-dynamics
newton-4.00
sdk
dNewton
dJoints
ndJointDryRollingFriction.h
Generated by
1.8.20