Describes a shape which is rendered through the ShapeRenderer singleton.
Shape rendering may be relatively inefficient and should only be used for debug visualizations. Please note that vertex and index data will be copied into a memory stream, so that it is safe to release or alter the original data once the shape object has been created. You have to be aware of the performance and memory-footprint implications though. Shape objects can be copied, but they will share the internal vertex/index data copy.
- Copyright
- (C) 2008 Radon Labs GmbH (C) 2013-2020 Individual contributors, see AUTHORS file
|
| RenderShape () |
| default constructor
|
|
| RenderShape (Type shapeType, RenderFlag depthFlag, const Math::mat4 &modelTransform, const Math::vec4 &color) |
| shortcut constructor for simple shapes
|
|
bool | IsValid () const |
| return true if object has been setup
|
|
void | SetupSimpleShape (Type shapeType, RenderFlag depthFlag, const Math::vec4 &color, const Math::mat4 &modelTransform=Math::mat4::identity, float lineThickness=1.0f) |
| setup simple shape
|
|
void | SetupPrimitives (const RenderShape::RenderShapeVertex *vertices, SizeT numVertices, PrimitiveTopology::Code topology, RenderFlag depthFlag, const Math::mat4 transform=Math::mat4::identity, float lineThickness=1.0f) |
| Setup primitives draw.
|
|
void | SetupPrimitives (const Util::Array< RenderShape::RenderShapeVertex > vertices, PrimitiveTopology::Code topology, RenderFlag depthFlag, const Math::mat4 transform=Math::mat4::identity, float lineThickness=1.0f) |
| Setup primitives draw.
|
|
void | SetupIndexPrimitives (const RenderShape::RenderShapeVertex *vertices, SizeT numVertices, const void *indices, SizeT numIndices, IndexType::Code indexType, PrimitiveTopology::Code topology, RenderFlag depthFlag, const Math::mat4 transform=Math::mat4::identity, float lineThickness=1.0f) |
| Setup indexed primitives draw.
|
|
void | SetupIndexPrimitives (const Util::Array< RenderShape::RenderShapeVertex > vertices, const Util::Array< uint16 > indices, PrimitiveTopology::Code topology, RenderFlag depthFlag, const Math::mat4 transform=Math::mat4::identity, float lineThickness=1.0f) |
| Setup indexed primitives draw.
|
|
void | SetupIndexPrimitives (const Util::Array< RenderShape::RenderShapeVertex > vertices, const Util::Array< uint32 > indices, PrimitiveTopology::Code topology, RenderFlag depthFlag, const Math::mat4 transform=Math::mat4::identity, float lineThickness=1.0f) |
| Setup indexed primitives draw.
|
|
void | SetupMesh (const MeshId mesh, const IndexT groupIndex, const Math::vec4 &color, RenderFlag depthFlag, const Math::mat4 &modelTransform=Math::mat4::identity, float lineThickness=1.0f) |
| setup mesh
|
|
Type | GetShapeType () const |
| get shape type
|
|
RenderFlag | GetDepthFlag () const |
| get depth flag
|
|
const Math::mat4 & | GetModelTransform () const |
| get model transform
|
|
PrimitiveTopology::Code | GetTopology () const |
| get primitive topology
|
|
SizeT | GetNumVertices () const |
| get number of vertices
|
|
SizeT | GetNumIndices () const |
| get number of indices
|
|
const void * | GetVertexData () const |
| get pointer to vertex data (returns 0 if none exist)
|
|
const void * | GetIndexData () const |
| get index data (returns 0 if none exists)
|
|
IndexType::Code | GetIndexType () const |
| get the index type (16 or 32 bit)
|
|
const Math::vec4 & | GetColor () const |
| get shape color
|
|
const VertexLayoutId | GetVertexLayout () const |
| get vertex layout, returns NULL if none exist
|
|
const MeshId | GetMesh () const |
| get mesh
|
|
const IndexT & | GetPrimitiveGroupIndex () const |
| get primitive group
|
|
const float | GetLineThickness () const |
| Get line thickness.
|
|