Khaotic Engine Reborn
|
Public Member Functions | |
physics (const physics &) | |
XMVECTOR | GetGravity () const |
void | SetGravity (XMVECTOR gravity) |
void | ApplyGravity (object *, float) |
void | AddForce (object *, XMVECTOR) |
bool | IsColliding (object *, object *) |
bool | CubesOverlap (object *, object *) |
bool | SpheresOverlap (object *, object *) |
bool | SphereCubeOverlap (object *, object *) |
![]() | |
object (application_class &app) | |
object (const object &)=delete | |
object & | operator= (const object &)=delete |
bool | Initialize (ID3D11Device *device, ID3D11DeviceContext *deviceContext, char *modelFilename, TextureContainer &texturesContainer) |
void | SetScaleMatrix (XMMATRIX scaleMatrix) |
void | SetRotateMatrix (XMMATRIX rotateMatrix) |
void | SetTranslateMatrix (XMMATRIX translateMatrix) |
void | SetSRMatrix (XMMATRIX srMatrix) |
void | SetWorldMatrix (XMMATRIX worldMatrix) |
void | SetPosition (XMVECTOR position) |
void | SetRotation (XMVECTOR rotation) |
void | SetScale (XMVECTOR scale) |
XMMATRIX | GetScaleMatrix () const |
XMMATRIX | GetRotateMatrix () const |
XMMATRIX | GetTranslateMatrix () const |
XMMATRIX | GetSRMatrix () const |
XMMATRIX | GetWorldMatrix () const |
XMVECTOR | GetPosition () |
XMVECTOR | GetRotation () |
XMVECTOR | GetScale () |
void | SetVelocity (XMVECTOR) |
void | AddVelocity (float deltaTime) |
XMVECTOR | GetVelocity () const |
void | SetAcceleration (XMVECTOR) |
XMVECTOR | GetAcceleration () const |
void | SetMass (float) |
float | GetMass () const |
void | SetGrounded (bool) |
bool | IsGrounded () const |
bool | IsPhysicsEnabled () const |
void | SetPhysicsEnabled (bool state) |
void | SetVisible (bool state) |
bool | IsVisible () const |
void | UpdateWorldMatrix () |
void | UpdateSRMatrix () |
void | UpdateScaleMatrix () |
void | UpdateRotateMatrix () |
void | UpdateTranslateMatrix () |
void | UpdatePosition (float deltaTime) |
void | Update () |
std::string | GetName () |
void | SetName (std::string name) |
int | SetId (int id) |
int | GetId () const |
void | SetType (ObjectType type) |
ObjectType | GetType () const |
ShaderType | GetActiveShader () const |
void | SetActiveShader (ShaderType activeShader) |
float | GetBoundingRadius () const |
void | SetBoundingRadius (float radius) |
void | SetModelPath (std::wstring &path) |
std::wstring & | GetModelPath () |
ShaderType | StringToShaderType (const std::string &shaderType) |
std::string | ShaderTypeToString (ShaderType shaderType) |
ObjectType | StringToObjectType (const std::string &objectType) |
std::string | ObjectTypeToString (ObjectType objectType) |
void | LaunchObject () |
bool | LoadTexturesFromPath (std::vector< std::wstring > &texturePaths, TextureContainer &texturesContainer, d_3d_class *m_Direct3D) |
bool | SetupInstancing (ID3D11Device *device, const std::vector< XMMATRIX > &instanceTransforms) |
void | EnableInstancing (bool enabled) |
void | SetInstanceCount (int count) |
bool | IsInstancingEnabled () const |
int | GetInstanceCount () const |
ID3D11Buffer * | GetInstanceBuffer () const |
void | SetAlpha (float alpha) |
float | GetAlpha () const |
void | SetInitialStretch (float initialStretch) |
float | GetInitialStretch () const |
void | SetSpringConstant (float springConstant) |
float | GetSpringConstant () const |
bool | IsGravityEnabled () const |
void | SetGravityEnabled (bool state) |
std::shared_ptr< model_class > | get_model () const |
void | SetModel (std::shared_ptr< model_class > model) |
Additional Inherited Members | |
![]() | |
bool | m_demoSpinning = false |
XMVECTOR | m_previousPosition |
XMVECTOR | m_velocity |
int | m_id |
bool | m_gravityEnabled = true |
physics::physics | ( | ) |
Definition at line 4 of file physics.cpp.
|
explicit |
Definition at line 9 of file physics.cpp.
physics::~physics | ( | ) |
Definition at line 14 of file physics.cpp.
void physics::AddForce | ( | object * | object, |
XMVECTOR | force ) |
Definition at line 63 of file physics.cpp.
void physics::ApplyGravity | ( | object * | object, |
float | dragValue ) |
Definition at line 31 of file physics.cpp.
Definition at line 119 of file physics.cpp.
XMVECTOR physics::GetGravity | ( | ) | const |
Definition at line 19 of file physics.cpp.
Definition at line 80 of file physics.cpp.
void physics::SetGravity | ( | XMVECTOR | gravity | ) |
Definition at line 25 of file physics.cpp.
Definition at line 157 of file physics.cpp.
Definition at line 137 of file physics.cpp.