first commit
This commit is contained in:
61
include/engine/physic/physic_wheel.h
Normal file
61
include/engine/physic/physic_wheel.h
Normal file
@ -0,0 +1,61 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#ifndef __NPHYSICWHEEL__
|
||||
#define __NPHYSICWHEEL__
|
||||
|
||||
|
||||
#include "math/matrix4.h"
|
||||
#include "memory/nshared_ptr.h"
|
||||
#include "container/nlist.h"
|
||||
|
||||
|
||||
namespace GS {
|
||||
namespace NML { class Tag; }
|
||||
namespace S3D {
|
||||
|
||||
/*!
|
||||
@short Abstract physic wheel for the physic vehicle model.
|
||||
@author Emmanuel Julien (ejulien@gsworks.fr)
|
||||
*/
|
||||
struct PhysicWheel
|
||||
{
|
||||
/*!
|
||||
@name Wheel section.
|
||||
@{
|
||||
*/
|
||||
float friction, radius;
|
||||
/*!
|
||||
@}
|
||||
@name Suspension section.
|
||||
@{
|
||||
*/
|
||||
Matrix4 ref_matrix; ///< Suspension origin in vehicle body space.
|
||||
|
||||
float rest_length,
|
||||
max_compression,
|
||||
stiffness,
|
||||
damping;
|
||||
/// @}
|
||||
|
||||
/*!
|
||||
@name Serialization.
|
||||
@{
|
||||
*/
|
||||
bool FromMetaTag(NML::Tag &tag);
|
||||
NML::Tag *AsMetaTag() const;
|
||||
/// @}
|
||||
|
||||
PhysicWheel();
|
||||
};
|
||||
|
||||
typedef List <PhysicWheel *> PhysicWheelList;
|
||||
|
||||
} // S3D
|
||||
} // GS
|
||||
|
||||
|
||||
#endif // __NPHYSICWHEEL__
|
||||
Reference in New Issue
Block a user