|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Represents a mesh formed by a index and vertex buffer, plus an effect. Bounding box and bounding sphere are also stored for frustum culling. More...
#include <ModelMeshPart.hpp>


Public Member Functions | |
| ModelMeshPart (IntPtr handle) | |
| unsafe | ModelMeshPart (IGraphicsDevice device, IntPtr pVertexData, ulong numVerts, ulong structSize, uint *indices, ulong numIndices) |
| ModelMeshPart (IVertexBuffer vbuff, IIndexBuffer ibuff, Effect effect) | |
| ModelMeshPart (Graphics::IVertexBuffer *vert, Graphics::IIndexBuffer *index) | |
| Constructs a model mesh part with specified GPU vertex and index buffers. | |
| ModelMeshPart (IGraphicsDevice *Device, void *vertices, size_t numVerts, size_t structSize, std::span< unsigned > indices) | |
| Constructs a model mesh part with specified CPU vertex buffers. | |
| ModelMeshPart (ModelMeshPart &&meshPart) noexcept=default | |
| ModelMeshPart (ModelMeshPart &meshPart)=delete | |
| ModelMeshPart & | operator= (ModelMeshPart &)=delete |
| ModelMeshPart & | operator= (ModelMeshPart &&meshPart) noexcept=default |
| template<VertexDecl V> | |
| ModelMeshPart (IGraphicsDevice *Device, std::span< V > vertices, std::span< unsigned > indices) | |
| Constructs a model mesh part with specified vertex format. | |
| Math::Matrix4x4 | MVP () const noexcept |
| Gets the combined Model-View-Projection matrix for this mesh part. | |
| Math::BoundingBox | GetBoundingBox () const noexcept |
| Gets the bounding box of the mesh part. This is used for frustum culling and collision detection. | |
| Math::BoundingSphere | GetBoundingSphere () const noexcept |
| Gets the bounding sphere of the mesh part. This is used for frustum culling and collision detection. | |
| Graphics::IVertexBuffer * | GetVertexBuffer () const noexcept |
| Gets the underlying vertex buffer of this mesh part. | |
| Graphics::IIndexBuffer * | GetIndexBuffer () const noexcept |
| Gets the underlying index buffer of this mesh part. | |
| std::pair< Graphics::IVertexBuffer *, Graphics::IIndexBuffer * > | CreateStagingBuffers () |
| Creates staging vertex and index buffers available for CPU reading if they don't exist. If they already exist, returns the already created buffers. | |
| ~ModelMeshPart ()=default | |
| Public Member Functions inherited from Engine3DRadSpace.NatPtrWrapper | |
| virtual void | Dispose () |
Public Attributes | |
| std::unique_ptr< IIndexBuffer > | IndexBuffer |
| std::unique_ptr< IVertexBuffer > | VertexBuffer |
| Math::Matrix4x4 | ImportOffset = Math::Matrix4x4() |
| Import offset set by the model importer. | |
| Math::Matrix4x4 | World = Math::Matrix4x4() |
| World/Model transform matrix. | |
| Math::Matrix4x4 | View = Math::Matrix4x4() |
| Assigned view matrix. Usually obtained from the selected camera. | |
| Math::Matrix4x4 | Projection = Math::Matrix4x4() |
| Assigned projection matrix. Usually obtained from the selected camera. | |
| Rendering::MaterialDescriptor | Material |
| Describes the material properties of this mesh part. | |
| std::vector< std::unique_ptr< ITexture2D > > | Textures |
| All textures used by this mesh part. The order of the textures should match the order expected by the effect/shader. | |
| std::vector< std::unique_ptr< ISamplerState > > | TextureSamplers |
| All sampler states used by the textures. | |
Properties | |
| BoundingBox | BoundingBox [get] |
| BoundingSphere | BoundingSphere [get] |
| IVertexBuffer | VertexBuffer [get] |
| IIndexBuffer | IndexBuffer [get] |
| unsafe Matrix4x4 | Transform [get, set] |
| MaterialDescriptor | Material [get, set] |
| Properties inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | Handle [get] |
Friends | |
| class | Model3D |
Additional Inherited Members | |
| Protected Member Functions inherited from Engine3DRadSpace.NatPtrWrapper | |
| NatPtrWrapper (IntPtr handle, Action< IntPtr > fnDestroy) | |
| NatPtrWrapper (Action< IntPtr > fnDestroy) | |
| void | Reset (IntPtr newObj) |
| void | Dispose (bool disposing) |
| Protected Attributes inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | _handle |
| bool | _disposed |
Represents a mesh formed by a index and vertex buffer, plus an effect. Bounding box and bounding sphere are also stored for frustum culling.
|
inline |
|
inline |
|
inline |
| ModelMeshPart::ModelMeshPart | ( | Graphics::IVertexBuffer * | vert, |
| Graphics::IIndexBuffer * | index ) |
Constructs a model mesh part with specified GPU vertex and index buffers.
| vert | The GPU vertex buffer. |
| index | The GPU index buffer. |
| ModelMeshPart::ModelMeshPart | ( | IGraphicsDevice * | Device, |
| void * | vertices, | ||
| size_t | numVerts, | ||
| size_t | structSize, | ||
| std::span< unsigned > | indices ) |
Constructs a model mesh part with specified CPU vertex buffers.
| Device | The graphics device. |
| vertices | The vertex data. |
| numVerts | The number of vertices. |
| structSize | The size of each vertex structure. |
| indices |
|
defaultnoexcept |
|
delete |
|
inline |
Constructs a model mesh part with specified vertex format.
| V | The vertex declaration type. |
| Device | The graphics device. |
| vertices | The vertex data. |
| indices | The index data. |
|
default |
| std::pair< IVertexBuffer *, IIndexBuffer * > ModelMeshPart::CreateStagingBuffers | ( | ) |
Creates staging vertex and index buffers available for CPU reading if they don't exist. If they already exist, returns the already created buffers.
|
noexcept |
Gets the bounding box of the mesh part. This is used for frustum culling and collision detection.
|
noexcept |
Gets the bounding sphere of the mesh part. This is used for frustum culling and collision detection.
|
noexcept |
Gets the underlying index buffer of this mesh part.
|
noexcept |
Gets the underlying vertex buffer of this mesh part.
|
noexcept |
Gets the combined Model-View-Projection matrix for this mesh part.
|
defaultnoexcept |
|
delete |
|
friend |
| Math::Matrix4x4 Engine3DRadSpace.Graphics.ModelMeshPart.ImportOffset = Math::Matrix4x4() |
Import offset set by the model importer.
| std::unique_ptr<IIndexBuffer> Engine3DRadSpace.Graphics.ModelMeshPart.IndexBuffer |
Describes the material properties of this mesh part.
| Math::Matrix4x4 Engine3DRadSpace.Graphics.ModelMeshPart.Projection = Math::Matrix4x4() |
Assigned projection matrix. Usually obtained from the selected camera.
| std::vector<std::unique_ptr<ITexture2D> > Engine3DRadSpace.Graphics.ModelMeshPart.Textures |
All textures used by this mesh part. The order of the textures should match the order expected by the effect/shader.
| std::vector<std::unique_ptr<ISamplerState> > Engine3DRadSpace.Graphics.ModelMeshPart.TextureSamplers |
All sampler states used by the textures.
| std::unique_ptr<IVertexBuffer> Engine3DRadSpace.Graphics.ModelMeshPart.VertexBuffer |
| Math::Matrix4x4 Engine3DRadSpace.Graphics.ModelMeshPart.View = Math::Matrix4x4() |
Assigned view matrix. Usually obtained from the selected camera.
| Math::Matrix4x4 Engine3DRadSpace.Graphics.ModelMeshPart.World = Math::Matrix4x4() |
World/Model transform matrix.
|
get |
|
get |
|
get |
|
getset |
|
getset |
|
get |