CellModules
MecaCell::Scene3D Struct Reference

Class allowing to load a 3D scene from an obj file. It contains one or several Obj3D as well as various helper method. More...

#include <obj3D.hpp>

Public Types

using triangle_t = Obj3D::triangle_t
 
using UV = Obj3D::UV
 

Public Member Functions

std::vector< std::string > isInside (const Vector3D &v) const
 usefull to test if a point v is inside an object of the scene More...
 
void updateFromTransformation ()
 
void scale (const Vec &s)
 
void translate (const Vec &t)
 
void rotate (const Rotation< Vec > &r)
 
 Scene3D ()
 
 Scene3D (const string &filename)
 
void load (const string &filepath)
 Loads an obj (wavefront) file. More...
 

Public Attributes

Matrix4x4 transformation
 
std::unordered_map< std::string, Obj3DoriginalObjects
 
std::unordered_map< std::string, Obj3DtransformedObjects
 

Detailed Description

Class allowing to load a 3D scene from an obj file. It contains one or several Obj3D as well as various helper method.

Definition at line 34 of file obj3D.hpp.

Member Typedef Documentation

◆ triangle_t

Definition at line 35 of file obj3D.hpp.

◆ UV

Definition at line 36 of file obj3D.hpp.

Constructor & Destructor Documentation

◆ Scene3D() [1/2]

MecaCell::Scene3D::Scene3D ( )
inline

Definition at line 124 of file obj3D.hpp.

◆ Scene3D() [2/2]

MecaCell::Scene3D::Scene3D ( const string &  filename)
inline

Definition at line 125 of file obj3D.hpp.

Member Function Documentation

◆ isInside()

std::vector< std::string > MecaCell::Scene3D::isInside ( const Vector3D v) const
inline

usefull to test if a point v is inside an object of the scene

Parameters
vthe considered point
Returns
a vector of container objects names, ordered by distance (closest englobing first)

Definition at line 50 of file obj3D.hpp.

◆ load()

void MecaCell::Scene3D::load ( const string &  filepath)
inline

Loads an obj (wavefront) file.

Parameters
filepaththe path to the obj file

Definition at line 131 of file obj3D.hpp.

◆ rotate()

void MecaCell::Scene3D::rotate ( const Rotation< Vec > &  r)
inline

Definition at line 119 of file obj3D.hpp.

◆ scale()

void MecaCell::Scene3D::scale ( const Vec s)
inline

Definition at line 109 of file obj3D.hpp.

◆ translate()

void MecaCell::Scene3D::translate ( const Vec t)
inline

Definition at line 114 of file obj3D.hpp.

◆ updateFromTransformation()

void MecaCell::Scene3D::updateFromTransformation ( )
inline

Definition at line 98 of file obj3D.hpp.

Member Data Documentation

◆ originalObjects

std::unordered_map<std::string, Obj3D> MecaCell::Scene3D::originalObjects

Definition at line 39 of file obj3D.hpp.

◆ transformation

Matrix4x4 MecaCell::Scene3D::transformation

Definition at line 38 of file obj3D.hpp.

◆ transformedObjects

std::unordered_map<std::string, Obj3D> MecaCell::Scene3D::transformedObjects

Definition at line 40 of file obj3D.hpp.


The documentation for this struct was generated from the following file: