AGX Dynamics
2.37.2.0
AutoSleep.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2024. 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_ */
agx::AutoSleep::m_threshold
agx::ref_ptr< AutoSleepThreshold > m_threshold
Definition:
AutoSleep.h:91
agx::AutoSleep::getThreshold
const AutoSleepThreshold * getThreshold() const
Definition:
AutoSleep.h:74
agxcollide_vector_types.h
Space.h
agx::AutoSleep::getThreshold
AutoSleepThreshold * getThreshold()
Definition:
AutoSleep.h:69
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx::AutoSleep::m_bodyConnections
RigidBodyPtrVector m_bodyConnections
Definition:
AutoSleep.h:92
agxPhysics_export.h
agx::AutoSleep::m_enabled
bool m_enabled
Definition:
AutoSleep.h:89
agx::Referenced
Base class providing referencing counted objects.
Definition:
Referenced.h:119
agx::Vector< agx::Physics::GeometryPairPtr, agxData::BufferProxyAllocator >
agx::VectorPOD
Vector containing 'raw' data.
Definition:
Vector.h:245
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
Referenced.h
agx::ref_ptr< AutoSleepThreshold >
agx::AutoSleepRef
agx::ref_ptr< AutoSleep > AutoSleepRef
Definition:
AutoSleep.h:95
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:54
agx::AutoSleepThreshold
Definition:
SleepThreshold.h:108
agx::DynamicsSystem
The complete physical system with bodies, interactions, data layout, time stepper, and solver.
Definition:
DynamicsSystem.h:65
agx::AutoSleep
Class that will investigate bodies to see if they are resting, that is if linear/angular velocity and...
Definition:
AutoSleep.h:40
Buffer.h
agx::AutoSleep::m_system
DynamicsSystem * m_system
Definition:
AutoSleep.h:90
SleepThreshold.h
include
agx
AutoSleep.h
Generated on Sun Jan 28 2024 11:19:11 for AGX Dynamics by
1.8.13