A geometry that is created from a vertices object. More...
#include <vertices_geometry.h>
Public Types | |
| enum | VertexMode { VertexMode::kTriangles, VertexMode::kTriangleStrip, VertexMode::kTriangleFan } |
Public Member Functions | |
| VerticesGeometry (std::vector< Point > vertices, std::vector< uint16_t > indices, std::vector< Point > texture_coordinates, std::vector< Color > colors, Rect bounds, VerticesGeometry::VertexMode vertex_mode) | |
| ~VerticesGeometry () | |
| GeometryResult | GetPositionColorBuffer (const ContentContext &renderer, const Entity &entity, RenderPass &pass) |
| GeometryResult | GetPositionUVBuffer (Rect texture_coverage, Matrix effect_transform, const ContentContext &renderer, const Entity &entity, RenderPass &pass) override |
| GeometryResult | GetPositionBuffer (const ContentContext &renderer, const Entity &entity, RenderPass &pass) override |
| std::optional< Rect > | GetCoverage (const Matrix &transform) const override |
| GeometryVertexType | GetVertexType () const override |
| bool | HasVertexColors () const |
| bool | HasTextureCoordinates () const |
| std::optional< Rect > | GetTextureCoordinateCoverge () const |
Public Member Functions inherited from impeller::Geometry | |
| Geometry () | |
| virtual | ~Geometry () |
| virtual bool | CoversArea (const Matrix &transform, const Rect &rect) const |
Determines if this geometry, transformed by the given transform, will completely cover all surface area of the given rect. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from impeller::Geometry | |
| static std::unique_ptr< Geometry > | MakeFillPath (const Path &path, std::optional< Rect > inner_rect=std::nullopt) |
| static std::unique_ptr< Geometry > | MakeStrokePath (const Path &path, Scalar stroke_width=0.0, Scalar miter_limit=4.0, Cap stroke_cap=Cap::kButt, Join stroke_join=Join::kMiter) |
| static std::unique_ptr< Geometry > | MakeCover () |
| static std::unique_ptr< Geometry > | MakeRect (Rect rect) |
| static std::unique_ptr< Geometry > | MakePointField (std::vector< Point > points, Scalar radius, bool round) |
A geometry that is created from a vertices object.
Definition at line 12 of file vertices_geometry.h.
|
strong |
| Enumerator | |
|---|---|
| kTriangles | |
| kTriangleStrip | |
| kTriangleFan | |
Definition at line 14 of file vertices_geometry.h.
| impeller::VerticesGeometry::VerticesGeometry | ( | std::vector< Point > | vertices, |
| std::vector< uint16_t > | indices, | ||
| std::vector< Point > | texture_coordinates, | ||
| std::vector< Color > | colors, | ||
| Rect | bounds, | ||
| VerticesGeometry::VertexMode | vertex_mode | ||
| ) |
Definition at line 55 of file vertices_geometry.cc.
|
default |
|
overridevirtual |
Implements impeller::Geometry.
Definition at line 304 of file vertices_geometry.cc.
References impeller::TRect< T >::TransformBounds().
|
overridevirtual |
Implements impeller::Geometry.
Definition at line 113 of file vertices_geometry.cc.
References impeller::ContentContext::GetContext(), impeller::RenderPass::GetRenderTargetSize(), impeller::Entity::GetTransformation(), impeller::k16bit, impeller::kHostVisible, impeller::kNone, impeller::Matrix::MakeOrthographic(), impeller::DeviceBufferDescriptor::size, and impeller::GeometryResult::type.
| GeometryResult impeller::VerticesGeometry::GetPositionColorBuffer | ( | const ContentContext & | renderer, |
| const Entity & | entity, | ||
| RenderPass & | pass | ||
| ) |
Definition at line 161 of file vertices_geometry.cc.
References impeller::ContentContext::GetContext(), impeller::RenderPass::GetRenderTargetSize(), impeller::Entity::GetTransformation(), impeller::k16bit, impeller::kHostVisible, impeller::kNone, impeller::Matrix::MakeOrthographic(), impeller::DeviceBufferDescriptor::size, and impeller::GeometryResult::type.
|
overridevirtual |
Reimplemented from impeller::Geometry.
Definition at line 220 of file vertices_geometry.cc.
References impeller::ContentContext::GetContext(), impeller::RenderPass::GetRenderTargetSize(), impeller::Entity::GetTransformation(), HasTextureCoordinates(), impeller::k16bit, impeller::kEhCloseEnough, impeller::kHostVisible, impeller::kNone, impeller::Matrix::MakeOrthographic(), impeller::TRect< T >::origin, impeller::DeviceBufferDescriptor::size, impeller::TRect< T >::size, and impeller::GeometryResult::type.
| std::optional< Rect > impeller::VerticesGeometry::GetTextureCoordinateCoverge | ( | ) | const |
Definition at line 100 of file vertices_geometry.cc.
References HasTextureCoordinates(), and impeller::TRect< Scalar >::MakePointBounds().
|
overridevirtual |
Implements impeller::Geometry.
Definition at line 293 of file vertices_geometry.cc.
References HasTextureCoordinates(), HasVertexColors(), impeller::kColor, impeller::kPosition, and impeller::kUV.
| bool impeller::VerticesGeometry::HasTextureCoordinates | ( | ) | const |
Definition at line 96 of file vertices_geometry.cc.
Referenced by GetPositionUVBuffer(), GetTextureCoordinateCoverge(), and GetVertexType().
| bool impeller::VerticesGeometry::HasVertexColors | ( | ) | const |
Definition at line 92 of file vertices_geometry.cc.
Referenced by GetVertexType().