29 #ifndef NVBLASTEXTSTRESSSOLVER_H 30 #define NVBLASTEXTSTRESSSOLVER_H 66 stressLinearFactor(0.25f),
67 stressAngularFactor(0.75f),
68 bondIterationsPerFrame(18000),
69 graphReductionLevel(3)
125 virtual void release() = 0;
138 virtual void setNodeInfo(uint32_t graphNodeIndex,
float mass,
float volume,
NvcVec3 localPosition,
bool isStatic) = 0;
147 virtual void setAllNodesInfoFromLL(
float density = 1.0f) = 0;
174 virtual bool notifyActorCreated(
const NvBlastActor& actor) = 0;
183 virtual void notifyActorDestroyed(
const NvBlastActor& actor) = 0;
232 virtual void update() = 0;
241 virtual uint32_t getOverstressedBondCount()
const = 0;
293 virtual void reset() = 0;
300 virtual float getStressErrorLinear()
const = 0;
307 virtual float getStressErrorAngular()
const = 0;
314 virtual uint32_t getFrameCount()
const = 0;
321 virtual uint32_t getBondCount()
const = 0;
330 STRESS_GRAPH_NODES_IMPULSES = 1,
331 STRESS_GRAPH_BONDS_IMPULSES = 2
340 : pos0(p0), color0(c), pos1(p1), color1(c) {}
369 virtual const DebugBuffer fillDebugRender(
const uint32_t* nodes, uint32_t nodeCount,
DebugRenderMode mode,
float scale = 1.0f) = 0;
388 return perFrame > 0 ? perFrame : 1;
400 return getIterationsPerFrame(getSettings(), getBondCount());
409 #endif // ifndef NVBLASTEXTSTRESSSOLVER_H uint32_t color1
Definition: NvBlastExtStressSolver.h:345
uint32_t graphReductionLevel
graph reduction level
Definition: NvBlastExtStressSolver.h:62
uint32_t bondIterationsPerFrame
number of bond iterations to perform per frame,
Definition: NvBlastExtStressSolver.h:61
parameter has unit of mass * distance /time
Definition: NvBlastExtStressSolver.h:83
NvcVec3 pos0
Definition: NvBlastExtStressSolver.h:342
Definition: NvBlastExtStressSolver.h:56
const DebugLine * lines
Definition: NvBlastExtStressSolver.h:353
uint32_t getIterationsPerFrame() const
Definition: NvBlastExtStressSolver.h:398
float stressAngularFactor
angular stress on bond multiplier
Definition: NvBlastExtStressSolver.h:60
Definition: NvBlastExtStressSolver.h:337
ExtStressSolverSettings()
Definition: NvBlastExtStressSolver.h:64
float hardness
hardness of bond's material
Definition: NvBlastExtStressSolver.h:58
static uint32_t getIterationsPerFrame(const ExtStressSolverSettings &settings, uint32_t bondCount)
Definition: NvBlastExtStressSolver.h:385
uint32_t lineCount
Definition: NvBlastExtStressSolver.h:354
uint32_t color0
Definition: NvBlastExtStressSolver.h:343
DebugRenderMode
Definition: NvBlastExtStressSolver.h:327
Definition: NvBlastExtStressSolver.h:104
NvcVec3 pos1
Definition: NvBlastExtStressSolver.h:344
DebugLine(const NvcVec3 &p0, const NvcVec3 &p1, const uint32_t &c)
Definition: NvBlastExtStressSolver.h:339
parameter has unit of distance / time, i.e. the effect is mass independent: a velocity change...
Definition: NvBlastExtStressSolver.h:84
Definition: NvBlastExtStressSolver.h:79
Enum
Definition: NvBlastExtStressSolver.h:81
Definition: NvBlastTypes.h:468
Definition: NvBlastExtAuthoring.h:34
Definition: NvCTypes.h:49
Definition: NvBlastExtStressSolver.h:351
Definition: NvBlastTypes.h:387
float stressLinearFactor
linear stress on bond multiplier
Definition: NvBlastExtStressSolver.h:59
Definition: NvBlastTypes.h:376