Path Tracer
Classes | Functions
Object3DGroup.h File Reference

Defines the Object3DGroup class and some functions around it. More...

#include <vector>
#include "InterfaceCreation.h"
Include dependency graph for Object3DGroup.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Object3DGroup
 Group of objects. More...
 

Functions

std::ostream & operator<< (std::ostream &stream, const Object3DGroup &group)
 Ostream operator. More...
 
std::vector< Object3D * > split (const std::vector< Object3DGroup > &groups)
 Takes the std::vector of each object group and merge them. More...
 
void to_json (json &j, const Object3DGroup &group)
 Conversion to json. More...
 
void from_json (const json &j, Object3DGroup &group)
 Conversion from json. More...
 

Detailed Description

Defines the Object3DGroup class and some functions around it.

Function Documentation

◆ from_json()

void from_json ( const json j,
Object3DGroup group 
)

Conversion from json.

Used for the .get<Object3DGroup>() function.

Parameters
jJson input.
groupThe ouput object group.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  stream,
const Object3DGroup group 
)

Ostream operator.

Parameters
streamThe ostream before.
groupThe group that will be added to the stream.
Returns
The stream with the group added.

◆ split()

std::vector<Object3D*> split ( const std::vector< Object3DGroup > &  groups)

Takes the std::vector of each object group and merge them.

Parameters
groupsThe object group that will be merges.
Returns
All the objects of the object groups.
Warning
The pointers are not deeply copied.

◆ to_json()

void to_json ( json j,
const Object3DGroup group 
)

Conversion to json.

Parameters
jJson output.
groupThe object group that will be converted.