NvModelVK Class Reference
Drawable geometric model using VK vertex buffers. More...
#include <NvModelVK.h>
Public Member Functions | |
void | Draw (VkCommandBuffer &cmd) |
Draw to an open command buffer. | |
uint32_t | getIndexCount () |
Get the index count (for advanced rendering). | |
NvModel * | getModel () |
Get the low-level geometry data. | |
void | computeCenter () |
Updates the center point of the model. | |
nv::vec3f | GetMinExt () const |
nv::vec3f | GetMaxExt () const |
VkPipelineVertexInputStateCreateInfo & | getVIInfo () |
Get the Vertex input state for creating a rendering pipeline object for this model. | |
VkPipelineInputAssemblyStateCreateInfo & | getIAInfo () |
Get the Input Assembly state for creating a rendering pipeline object for this model. | |
VkIndexType | getIndexType () const |
useful when doing custom rendering | |
const NvVkBuffer & | VBO () const |
const NvVkBuffer & | IBO () const |
Static Public Member Functions | |
static NvModelVK * | CreateFromObj (NvVkContext &vk, uint8_t *data, float scale, bool computeNormals=false, bool computeTangents=false) |
Create a renderable model from OBJ data. | |
static NvModelVK * | CreateFromPreprocessed (NvVkContext &vk, uint8_t *data) |
Create a renderable model from a preprocessed "NVM" file, which is much faster and more efficient to load than OBJ. | |
Public Attributes | |
nv::vec3f | m_center |
The computed center of the bounding box of the app. |
Detailed Description
Drawable geometric model using VK vertex buffers.Supports loading from OBJ file data. Contains positions as well as optional normals, UVs, and tangent vectors
Member Function Documentation
static NvModelVK* NvModelVK::CreateFromObj | ( | NvVkContext & | vk, | |
uint8_t * | data, | |||
float | scale, | |||
bool | computeNormals = false , |
|||
bool | computeTangents = false | |||
) | [static] |
Create a renderable model from OBJ data.
- Parameters:
-
[in] vk Vulkan device/queue to render to [in] data pointer to OBJ file data [in] scale the target radius to which we want the model scaled, or <0 if no scaling should be done [in] computeNormals indicate whether per-vertex normals should be estimated and added [in] computeTangents indicate whether per-vertex tangent vectors should be estimated and added
- Returns:
- a pointer to the new model
static NvModelVK* NvModelVK::CreateFromPreprocessed | ( | NvVkContext & | vk, | |
uint8_t * | data | |||
) | [static] |
Create a renderable model from a preprocessed "NVM" file, which is much faster and more efficient to load than OBJ.
- Parameters:
-
[in] vk Vulkan device/queue to render to [in] data pointer to NVM file data
- Returns:
- a pointer to the new model
void NvModelVK::Draw | ( | VkCommandBuffer & | cmd | ) |
Draw to an open command buffer.
- Parameters:
-
[in] the command buffer to draw into
VkPipelineInputAssemblyStateCreateInfo& NvModelVK::getIAInfo | ( | ) | [inline] |
Get the Input Assembly state for creating a rendering pipeline object for this model.
- Returns:
- the IAStateInfo for this model
uint32_t NvModelVK::getIndexCount | ( | ) | [inline] |
Get the index count (for advanced rendering).
- Returns:
- the index count
NvModel* NvModelVK::getModel | ( | ) |
Get the low-level geometry data.
Returns the underlying geometry model data instance
- Returns:
- a pointer to the NvModel instance that holds the client-memory data
VkPipelineVertexInputStateCreateInfo& NvModelVK::getVIInfo | ( | ) | [inline] |
Get the Vertex input state for creating a rendering pipeline object for this model.
- Returns:
- the VIStateInfo for this model
The documentation for this class was generated from the following file: