AGXDynamics
2.35.0.2
AutoSleep.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2022. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
#ifndef AGX_AUTOSLEEP_H
18
#define AGX_AUTOSLEEP_H
19
20
#include <
agx/agxPhysics_export.h
>
21
#include <
agx/Referenced.h
>
22
#include <
agx/SleepThreshold.h
>
23
#include <
agxCollide/Space.h
>
24
#include <
agxCollide/agxcollide_vector_types.h
>
25
#include <
agxData/Buffer.h
>
26
27
namespace
agx
28
{
29
30
class
DynamicsSystem;
31
40
class
AGXPHYSICS_EXPORT
AutoSleep
:
public
agx::Referenced
41
{
42
public
:
43
44
46
AutoSleep
(
agx::DynamicsSystem
*system );
47
51
bool
getEnable()
const
;
52
56
bool
isEnabled()
const
;
57
64
void
setEnable(
bool
enable );
65
69
AutoSleepThreshold
*
getThreshold
() {
return
m_threshold; }
70
74
const
AutoSleepThreshold
*
getThreshold
()
const
{
return
m_threshold; }
75
76
protected
:
77
virtual
~
AutoSleep
();
78
friend
class
DynamicsSystem
;
79
81
void
updateSleepState(
const
agxCollide::SeparationPairVector
& separations,
82
const
agxCollide::GeometryContactPtrVector
& contacts );
83
84
86
void
updateSleepState();
87
RigidBodyPtrVector
& getBodyConnections(
RigidBody
*body);
88
89
bool
m_enabled
;
90
DynamicsSystem
*
m_system
;
91
agx::ref_ptr<AutoSleepThreshold>
m_threshold
;
92
RigidBodyPtrVector
m_bodyConnections
;
93
};
94
95
typedef
agx::ref_ptr<AutoSleep>
AutoSleepRef
;
96
}
97
98
#endif
/* _AGX_AutoSleep_H_ */
agxPhysics_export.h
agxcollide_vector_types.h
Referenced.h
SleepThreshold.h
agx::Vector< agx::Physics::GeometryPairPtr, agxData::BufferProxyAllocator >
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:54
agx::AutoSleep::m_system
DynamicsSystem * m_system
Definition:
AutoSleep.h:90
agx::VectorPOD< GeometryContact * >
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
Space.h
agx::AutoSleep::getThreshold
const AutoSleepThreshold * getThreshold() const
Definition:
AutoSleep.h:74
agx::ref_ptr< AutoSleepThreshold >
Buffer.h
agx::AutoSleep::m_threshold
agx::ref_ptr< AutoSleepThreshold > m_threshold
Definition:
AutoSleep.h:91
agx::AutoSleepThreshold
Definition:
SleepThreshold.h:108
agx::AutoSleepRef
agx::ref_ptr< AutoSleep > AutoSleepRef
Definition:
AutoSleep.h:95
agx::Referenced
Base class providing referencing counted objects.
Definition:
Referenced.h:113
agx::AutoSleep::getThreshold
AutoSleepThreshold * getThreshold()
Definition:
AutoSleep.h:69
agx::AutoSleep::m_enabled
bool m_enabled
Definition:
AutoSleep.h:89
agx::DynamicsSystem
The complete physical system with bodies, interactions, data layout, time stepper,...
Definition:
DynamicsSystem.h:65
agx::AutoSleep::m_bodyConnections
RigidBodyPtrVector m_bodyConnections
Definition:
AutoSleep.h:92
agx::AutoSleep
Class that will investigate bodies to see if they are resting, that is if linear/angular velocity and...
Definition:
AutoSleep.h:40
include
agx
AutoSleep.h
Generated on Mon Jan 30 2023 15:44:10 for AGXDynamics by
1.8.17