NvFlowShape


Data Structures

union  NvFlowShapeDesc
 Shared type for shape descriptions. More...
struct  NvFlowShapeDescBox
 Description of a box. More...
struct  NvFlowShapeDescCapsule
 Description of a capsule. More...
struct  NvFlowShapeDescPlane
 Description of a plane. More...
struct  NvFlowShapeDescSDF
 Description of a signed distance field shape. More...
struct  NvFlowShapeDescSphere
 Desription of a sphere. More...
struct  NvFlowShapeSDFData
 Required information for writing to a CPU mapped signed distance field. More...
struct  NvFlowShapeSDFDesc
 Description required to create a signed distance field object. More...

Enumerations

enum  NvFlowShapeType {
  eNvFlowShapeTypeSDF = 0, eNvFlowShapeTypeSphere = 1, eNvFlowShapeTypeBox = 2, eNvFlowShapeTypeCapsule = 3,
  eNvFlowShapeTypePlane = 4
}
 Types of shapes for emit/collide behavior. More...

Functions

NvFlowShapeSDF * NvFlowCreateShapeSDF (NvFlowContext *context, const NvFlowShapeSDFDesc *desc)
NvFlowShapeSDF * NvFlowCreateShapeSDFFromTexture3D (NvFlowContext *context, NvFlowTexture3D *texture)
void NvFlowReleaseShapeSDF (NvFlowShapeSDF *shape)
void NvFlowShapeSDFDescDefaults (NvFlowShapeSDFDesc *desc)
NvFlowShapeSDFData NvFlowShapeSDFMap (NvFlowShapeSDF *shape, NvFlowContext *context)
void NvFlowShapeSDFUnmap (NvFlowShapeSDF *shape, NvFlowContext *context)

Enumeration Type Documentation

Types of shapes for emit/collide behavior.

Enumerator:
eNvFlowShapeTypeSDF 
eNvFlowShapeTypeSphere 
eNvFlowShapeTypeBox 
eNvFlowShapeTypeCapsule 
eNvFlowShapeTypePlane 


Function Documentation

NvFlowShapeSDF* NvFlowCreateShapeSDF ( NvFlowContext *  context,
const NvFlowShapeSDFDesc desc 
)

Creates a signed distance field object with no initial data.

Parameters:
[in] context The context to use for creation.
[in] desc A description needed for memory allocation.
Returns:
The created signed distance field object.

NvFlowShapeSDF* NvFlowCreateShapeSDFFromTexture3D ( NvFlowContext *  context,
NvFlowTexture3D *  texture 
)

Creates a signed distance field object with data from a 3D texture.

Parameters:
[in] context The context to use for creation.
[in] texture The 3D texture containing the signed distance field to use.
Returns:
The created signed distance field object.

void NvFlowReleaseShapeSDF ( NvFlowShapeSDF *  shape  ) 

Releases a signed distance field object.

Parameters:
[in] shape The signed distance field to be released.

void NvFlowShapeSDFDescDefaults ( NvFlowShapeSDFDesc desc  ) 

Allows the application to request a default signed distance field object description from Flow.

Parameters:
[out] desc The description for Flow to fill out.

NvFlowShapeSDFData NvFlowShapeSDFMap ( NvFlowShapeSDF *  shape,
NvFlowContext *  context 
)

Maps a signed distance field object for CPU write access.

Parameters:
[in] shape The signed distance field object to map.
[in] context The context used to create the Flow signed distance field.
Returns:
Returns the information needed to properly write to the mapped signed distance field object.

void NvFlowShapeSDFUnmap ( NvFlowShapeSDF *  shape,
NvFlowContext *  context 
)

Unmaps a signed distance field object from CPU write access, uploads update field to GPU.

Parameters:
[in] shape The signed distance field object to unmap.
[in] context The context used to create the Flow signed distance field.