INET Framework for OMNeT++/OMNEST
|
This class represents 3 dimensional prism with a polygon base face. More...
#include <Prism.h>
Public Types | |
typedef std::vector< Polygon > | Faces |
typedef std::vector< Coord > | Points |
Public Member Functions | |
Prism () | |
Prism (double height, const Polygon &base) | |
double | getHeight () const |
void | setHeight (double height) |
const Polygon & | getBase () const |
void | setBase (const Polygon &base) |
const Faces & | getFaces () const |
virtual Coord | computeBoundingBoxSize () const override |
Computes the 3 dimensional size of the shapes's bounding box. More... | |
virtual bool | computeIntersection (const LineSegment &lineSegment, Coord &intersection1, Coord &intersection2, Coord &normal1, Coord &normal2) const override |
Computes the intersection with the given line segment in the shape's coordinate system. More... | |
void | computeVisibleFaces (std::vector< std::vector< Coord > > &faces, const Rotation &rotation, const Rotation &viewRotation) const |
Public Member Functions inherited from inet::ShapeBase | |
ShapeBase () | |
virtual | ~ShapeBase () |
Protected Member Functions | |
void | genereateFaces () |
Coord | computeOutwardNormalVector (unsigned int faceId) const |
void | computeOutwardNormalVectors () |
bool | isVisibleFromPoint (unsigned int faceId, const Coord &point, const Rotation &rotation) const |
bool | isVisibleFromView (unsigned int faceId, const Rotation &viewRotation, const Rotation &rotation) const |
Protected Attributes | |
double | height |
Polygon | base |
std::vector< Polygon > | faces |
std::vector< Coord > | normalVectorsForFaces |
This class represents 3 dimensional prism with a polygon base face.
typedef std::vector<Polygon> inet::Prism::Faces |
typedef std::vector<Coord> inet::Prism::Points |
|
inline |
inet::Prism::Prism | ( | double | height, |
const Polygon & | base | ||
) |
|
overridevirtual |
Computes the 3 dimensional size of the shapes's bounding box.
Implements inet::ShapeBase.
|
overridevirtual |
Computes the intersection with the given line segment in the shape's coordinate system.
Implements inet::ShapeBase.
|
protected |
Referenced by computeOutwardNormalVectors().
|
protected |
Referenced by Prism(), setBase(), and setHeight().
void inet::Prism::computeVisibleFaces | ( | std::vector< std::vector< Coord > > & | faces, |
const Rotation & | rotation, | ||
const Rotation & | viewRotation | ||
) | const |
Referenced by inet::Cuboid::computeVisibleFaces(), and inet::visualizer::PhysicalEnvironmentCanvasVisualizer::refreshDisplay().
|
protected |
Referenced by Prism(), setBase(), and setHeight().
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
Referenced by computeVisibleFaces().
void inet::Prism::setBase | ( | const Polygon & | base | ) |
void inet::Prism::setHeight | ( | double | height | ) |
|
protected |
Referenced by computeBoundingBoxSize(), genereateFaces(), and setBase().
|
protected |
|
protected |
Referenced by computeBoundingBoxSize(), genereateFaces(), and setHeight().
|
protected |
Referenced by computeIntersection(), computeOutwardNormalVectors(), isVisibleFromPoint(), and isVisibleFromView().