Helios++
Helios software for LiDAR simulations
ScenePart Class Reference

Class representing a scene part. More...

#include <ScenePart.h>

Collaboration diagram for ScenePart:

Public Member Functions

 ScenePart ()=default
 Default constructor for a scene part.
 
 ScenePart (ScenePart &sp)
 
std::vector< Vertex * > getAllVertices ()
 Obtain all vertices in the scene part. More...
 
void smoothVertexNormals ()
 Smooth normals for each vertex computing the mean for each triangle using it.
 
bool splitSubparts ()
 Split each subpart into a different scene part, with the first one corresponding to this scene part. More...
 

Public Attributes

std::vector< Primitive * > mPrimitives
 Vector of pointers to primitives used by this scene part.
 
std::string mId = ""
 Identifier for the scene part.
 
std::vector< size_t > subpartLimit
 Vector specifying the limit of a subpart as the index of first element of next subpart. More...
 
std::string onRayIntersectionMode = ""
 Specify the handling mode for ray intersections.
 
double onRayIntersectionArgument = 0.0
 Specify the extra value to be used for ray intersection handling computation, when needed (depends on mode).
 
bool randomShift = false
 Specify if apply random shift to the scene part (true) or not (false, by default)
 
std::shared_ptr< LadLutladlut = nullptr
 Look-up table for leaf angle distribution.
 
glm::dvec3 mOrigin = glm::dvec3(0, 0, 0)
 Specify the origin for the scene part.
 
Rotation mRotation = Rotation(glm::dvec3(1, 0, 0), 0)
 Specify the rotation for the scene part.
 
double mScale = 1
 Specify the scale for the scene part.
 
OGRSpatialReference * mCrs = nullptr
 
OGREnvelope * mEnv = nullptr
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 

Detailed Description

Class representing a scene part.

Member Function Documentation

◆ getAllVertices()

std::vector< Vertex * > ScenePart::getAllVertices ( )

Obtain all vertices in the scene part.

Returns
All vertices in the scene part

◆ splitSubparts()

bool ScenePart::splitSubparts ( )

Split each subpart into a different scene part, with the first one corresponding to this scene part.

See also
subpartLimit
Returns
True when split was successfully performed, false otherwise

Member Data Documentation

◆ subpartLimit

std::vector<size_t> ScenePart::subpartLimit

Vector specifying the limit of a subpart as the index of first element of next subpart.

This vector makes sense when a scene part is built from multiple objects, so each one must be placed on its own scene part.

The ith subpart is defined inside interval \([u[i-1], u[i])\), where \(u\) is the subpartLimit vector. For the first case, the interval is defined as \([0, u[i])\) Having \(|u| = 1\) means there is only one scene part


The documentation for this class was generated from the following files: