Class SceneLoader

Nested Relationships

Nested Types

Class Documentation

class Utilities::SceneLoader

Importer of SPlisHSPlasH scene files.

Public Functions

void readScene(const char *fileName, Scene &scene)
template<typename T>
inline bool readValue(const nlohmann::json &j, T &v)
template<typename T, int size>
inline bool readVector(const nlohmann::json &j, Eigen::Matrix<T, size, 1, Eigen::DontAlign> &vec)
template<typename T>
inline bool readValue(const std::string &section, const std::string &key, T &v)
inline bool hasValue(const std::string &section, const std::string &key)
template<typename T, int size>
inline bool readVector(const std::string &section, const std::string &key, Eigen::Matrix<T, size, 1, Eigen::DontAlign> &vec)
void readMaterialParameterObject(const std::string &key, GenParam::ParameterObject *paramObj)
void readParameterObject(const std::string &key, GenParam::ParameterObject *paramObj)
template<>
bool readValue(const nlohmann::json &j, bool &v)
template<>
bool readValue(const nlohmann::json &j, bool &v)

Protected Functions

void readParameterObject(nlohmann::json &config, GenParam::ParameterObject *paramObj)

Protected Attributes

nlohmann::json m_jsonData
struct AnimationFieldData

Struct to store an animation field object.

Public Members

std::string particleFieldName
std::string expression[3]
unsigned int shapeType
Vector3r x
Matrix3r rotation
Vector3r scale
Real startTime
Real endTime
struct BoundaryData

Struct to store a boundary object.

Public Members

std::string samplesFile
std::string meshFile
Vector3r translation
Matrix3r rotation
Vector3r scale
Real density
bool dynamic
bool isWall
Eigen::Matrix<float, 4, 1, Eigen::DontAlign> color
void *rigidBody
std::string mapFile
bool mapInvert
Real mapThickness
Eigen::Matrix<unsigned int, 3, 1, Eigen::DontAlign> mapResolution
unsigned int samplingMode
bool isAnimated
struct Box

Struct for an AABB.

Public Members

Vector3r m_minX
Vector3r m_maxX
struct EmitterData

Struct to store an emitter object.

Public Members

std::string id
unsigned int width
unsigned int height
Vector3r x
Real velocity
Matrix3r rotation
Real emitStartTime
Real emitEndTime
unsigned int type
struct FluidBlock

Struct to store a fluid block.

Public Members

std::string id
Box box
unsigned char mode
Vector3r initialVelocity
Vector3r initialAngularVelocity
struct FluidData

Struct to store a fluid object.

Public Members

std::string id
std::string samplesFile
Vector3r translation
Matrix3r rotation
Vector3r scale
Vector3r initialVelocity
Vector3r initialAngularVelocity
unsigned char mode
bool invert
std::array<unsigned int, 3> resolutionSDF
struct MaterialData

Struct to store particle coloring information.

Public Members

std::string id
std::string colorField
unsigned int colorMapType
Real minVal
Real maxVal
unsigned int maxEmitterParticles
bool emitterReuseParticles
Vector3r emitterBoxMin
Vector3r emitterBoxMax
struct Scene

Struct to store scene information.

Public Members

std::vector<BoundaryData*> boundaryModels
std::vector<FluidData*> fluidModels
std::vector<FluidBlock*> fluidBlocks
std::vector<EmitterData*> emitters
std::vector<AnimationFieldData*> animatedFields
std::vector<MaterialData*> materials
Real particleRadius
bool sim2D
Real timeStepSize
Vector3r camPosition
Vector3r camLookat