Leviathan  0.8.0.0
Leviathan game engine
Leviathan::PhysMaterialDataPair Struct Reference

Defines properties between two materials. More...

#include <PhysicalMaterial.h>

Public Member Functions

DLLEXPORT PhysMaterialDataPair ()
 
DLLEXPORT PhysMaterialDataPair (PhysMaterialDataPair &&other)
 
DLLEXPORT PhysMaterialDataPairoperator= (PhysMaterialDataPair &&other)
 
DLLEXPORT PhysMaterialDataPairSetCollidable (bool collidable)
 Sets the material pair to collide or not with each other. More...
 
DLLEXPORT PhysMaterialDataPairSetCallbacks (const PhysicsMaterialAABBCallback aabb, const PhysicsMaterialContactCallback contact, PhysicsMaterialManifoldCallback manifold=nullptr)
 Sets the callback functions that are called when the material interacts. More...
 

Public Attributes

bool Collidable
 
PhysicsMaterialAABBCallback AABBCallback
 
PhysicsMaterialContactCallback ContactCallback
 
PhysicsMaterialManifoldCallback ManifoldCallback
 

Detailed Description

Defines properties between two materials.

Definition at line 41 of file PhysicalMaterial.h.

Constructor & Destructor Documentation

◆ PhysMaterialDataPair() [1/2]

DLLEXPORT Leviathan::PhysMaterialDataPair::PhysMaterialDataPair ( )
inline

Definition at line 42 of file PhysicalMaterial.h.

42  :
43  Collidable(true), AABBCallback(nullptr), ContactCallback(nullptr)
44  {}
PhysicsMaterialContactCallback ContactCallback
PhysicsMaterialAABBCallback AABBCallback

◆ PhysMaterialDataPair() [2/2]

DLLEXPORT Leviathan::PhysMaterialDataPair::PhysMaterialDataPair ( PhysMaterialDataPair &&  other)
inline

Definition at line 46 of file PhysicalMaterial.h.

46  :
47  Collidable(other.Collidable), AABBCallback(std::move(other.AABBCallback)),
48  ContactCallback(std::move(other.ContactCallback))
49  {}
PhysicsMaterialContactCallback ContactCallback
PhysicsMaterialAABBCallback AABBCallback

Member Function Documentation

◆ operator=()

DLLEXPORT PhysMaterialDataPair& Leviathan::PhysMaterialDataPair::operator= ( PhysMaterialDataPair &&  other)
inline

Definition at line 51 of file PhysicalMaterial.h.

52  {
53  Collidable = other.Collidable;
54  AABBCallback = std::move(other.AABBCallback);
55  ContactCallback = std::move(other.ContactCallback);
56  return *this;
57  }
PhysicsMaterialContactCallback ContactCallback
PhysicsMaterialAABBCallback AABBCallback

◆ SetCallbacks()

DLLEXPORT PhysMaterialDataPair& Leviathan::PhysMaterialDataPair::SetCallbacks ( const PhysicsMaterialAABBCallback  aabb,
const PhysicsMaterialContactCallback  contact,
PhysicsMaterialManifoldCallback  manifold = nullptr 
)
inline

Sets the callback functions that are called when the material interacts.

Definition at line 100 of file PhysicalMaterial.h.

103  {
104  AABBCallback = aabb;
105  ContactCallback = contact;
106  ManifoldCallback = manifold;
107  return *this;
108  }
PhysicsMaterialContactCallback ContactCallback
PhysicsMaterialManifoldCallback ManifoldCallback
PhysicsMaterialAABBCallback AABBCallback

◆ SetCollidable()

DLLEXPORT PhysMaterialDataPair& Leviathan::PhysMaterialDataPair::SetCollidable ( bool  collidable)
inline

Sets the material pair to collide or not with each other.

Warning
setting this to false prevents collision callbacks from being called
Note
Collision masks are more effective. This basically does collision rejecting automatically like PhysicsMaterialAABBCallback would
Todo:
Remove this

Definition at line 64 of file PhysicalMaterial.h.

65  {
66  Collidable = collidable;
67  return *this;
68  }

Member Data Documentation

◆ AABBCallback

PhysicsMaterialAABBCallback Leviathan::PhysMaterialDataPair::AABBCallback

Definition at line 118 of file PhysicalMaterial.h.

◆ Collidable

bool Leviathan::PhysMaterialDataPair::Collidable

Definition at line 111 of file PhysicalMaterial.h.

◆ ContactCallback

PhysicsMaterialContactCallback Leviathan::PhysMaterialDataPair::ContactCallback

Definition at line 119 of file PhysicalMaterial.h.

◆ ManifoldCallback

PhysicsMaterialManifoldCallback Leviathan::PhysMaterialDataPair::ManifoldCallback

Definition at line 120 of file PhysicalMaterial.h.


The documentation for this struct was generated from the following file: