28#ifndef PX_HAIRSYSTEM_DESC_H
29#define PX_HAIRSYSTEM_DESC_H
34#include "foundation/PxFlags.h"
35#include "common/PxCoreUtilityTypes.h"
37#if PX_ENABLE_FEATURES_UNDER_CONSTRUCTION
44 struct PxHairSystemDescFlag
51 eDEVICE_MEMORY = (1<<0)
59 typedef PxFlags<PxHairSystemDescFlag::Enum, PxU16> PxHairSystemDescFlags;
60 PX_FLAGS_OPERATORS(PxHairSystemDescFlag::Enum, PxU16)
70 class PxHairSystemDesc
101 PxBoundedData numVerticesPerStrand;
112 PxBoundedData vertices;
121 PxBoundedData velocities;
128 PxHairSystemDescFlags flags;
147 PX_INLINE PxHairSystemDesc::PxHairSystemDesc()
150 segmentLength = 0.1f;
151 segmentRadius = 0.01f;
154 PX_INLINE void PxHairSystemDesc::setToDefault()
156 *
this = PxHairSystemDesc();
159 PX_INLINE bool PxHairSystemDesc::isValid()
const
161 if (segmentLength < 0.0f || segmentRadius < 0.0f)
164 if (2.0f * segmentRadius >= segmentLength)
170 if (numVerticesPerStrand.count != numStrands)
173 PxU32 totalNumVertices = 0;
174 for (PxU32 i = 0; i < numVerticesPerStrand.count; i++)
176 const PxU32 numVertices = numVerticesPerStrand.at<PxU32>(i);
177 totalNumVertices += numVertices;
184 if (vertices.count != totalNumVertices && vertices.count != numStrands)
187 if (velocities.count != totalNumVertices && velocities.count != 0)
#define PX_INLINE
Definition PxPreprocessor.h:320
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39