12 #include <mrpt/img/TColor.h>
13 #include <mrpt/opengl/CSetOfObjects.h>
14 #include <mrpt/opengl/CSetOfTexturedTriangles.h>
15 #include <mrpt/opengl/CTexturedPlane.h>
16 #include <mvsim/WorldElements/WorldElementBase.h>
45 Type type = Type::DOOR;
53 bool overlaps(
float pos_start,
float pos_end)
const;
57 virtual void internalGuiUpdate(
58 const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& viz,
59 const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& physical,
bool childrenOnly)
override;
66 const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& viz,
67 const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& physical);
71 const mrpt::math::TPoint2Df& p0,
const mrpt::math::TPoint2Df& p1,
72 const mrpt::math::TPoint2Df& normal_offset,
bool is_front_face,
73 const mrpt::img::CImage* texture =
nullptr);
77 const mrpt::math::TPoint2Df& p0,
const mrpt::math::TPoint2Df& p1,
78 const mrpt::math::TPoint2Df& w_inner,
const mrpt::math::TPoint2Df& w_outer,
79 const mrpt::img::CImage* texture =
nullptr);
83 const mrpt::math::TPoint2Df& p0,
const mrpt::math::TPoint2Df& p1,
84 const mrpt::math::TPoint2Df& dir,
const mrpt::math::TPoint2Df& w_inner,
85 const mrpt::math::TPoint2Df& w_outer,
float wall_length,
86 const mrpt::img::CImage* texture =
nullptr);
88 float x0_ = -10, x1_ = -10, y0_ = -10, y1_ = 10;
89 mrpt::img::TColor color_ = {0xa0, 0xa0, 0xa0, 0xff};
90 bool enableShadows_ =
true;
97 double textureSizeX_ = 1.0;
98 double textureSizeY_ = 1.0;
100 float z_ = .0f, height_ = 3.0f;
101 std::string cull_faces_ =
"NONE";
103 mrpt::opengl::CTexturedPlane::Ptr gl_plane_;
104 mrpt::opengl::CSetOfTexturedTriangles::Ptr gl_plane_text_;
105 mrpt::opengl::CSetOfObjects::Ptr glGroup_;
Definition: VerticalPlane.h:26
b2Body * b2dBody_
Definition: VerticalPlane.h:108
void createVisualRepresentation(const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical)
void simul_post_timestep(const TSimulContext &context) override
void renderWallFace(const mrpt::math::TPoint2Df &p0, const mrpt::math::TPoint2Df &p1, const mrpt::math::TPoint2Df &normal_offset, bool is_front_face, const mrpt::img::CImage *texture=nullptr)
std::vector< b2Fixture * > fixtures_
Definition: VerticalPlane.h:112
void renderWallEdges(const mrpt::math::TPoint2Df &p0, const mrpt::math::TPoint2Df &p1, const mrpt::math::TPoint2Df &w_inner, const mrpt::math::TPoint2Df &w_outer, const mrpt::img::CImage *texture=nullptr)
std::string textureFileName_
Definition: VerticalPlane.h:96
void createPhysicsBodies()
double restitution_
Default: 0.01.
Definition: VerticalPlane.h:109
void simul_pre_timestep(const TSimulContext &context) override
std::vector< Opening > openings_
Definition: VerticalPlane.h:115
void renderOpeningReveals(const mrpt::math::TPoint2Df &p0, const mrpt::math::TPoint2Df &p1, const mrpt::math::TPoint2Df &dir, const mrpt::math::TPoint2Df &w_inner, const mrpt::math::TPoint2Df &w_outer, float wall_length, const mrpt::img::CImage *texture=nullptr)
float thickness_
Definition: VerticalPlane.h:93
Definition: WorldElementBase.h:28
Definition: basic_types.h:58
Definition: VerticalPlane.h:38
float position
Position along wall length [0,1] (0=start, 1=end)
Definition: VerticalPlane.h:46
float width
Width of opening in meters.
Definition: VerticalPlane.h:47
bool overlaps(float pos_start, float pos_end) const
float z_max
Top height of opening (meters)
Definition: VerticalPlane.h:49
std::string name
Optional name for the opening.
Definition: VerticalPlane.h:50
float z_min
Bottom height of opening (meters)
Definition: VerticalPlane.h:48