APEX Framework: nvidia::apex::ApexDesc Class Reference

NVIDIA APEX

nvidia::apex::ApexDesc Class Reference

Base class for all APEX Descriptor classes. More...

#include <ApexDesc.h>

Inheritance diagram for nvidia::apex::ApexDesc:
nvidia::apex::ApexSDKDesc nvidia::apex::DestructibleActorJointDesc nvidia::apex::DestructibleAssetCookingDesc nvidia::apex::DestructibleBehaviorGroupDesc nvidia::apex::DestructibleChunkDesc nvidia::apex::DestructibleGeometryDesc nvidia::apex::EmitterLodParamDesc nvidia::apex::RenderMeshActorDesc nvidia::apex::SceneDesc

List of all members.

Public Member Functions

PX_INLINE ApexDesc ()
 constructor sets to default.
PX_INLINE void setToDefault ()
 (re)sets the structure to the default.
PX_INLINE bool isValid () const
 Returns true if the descriptor is valid.

Public Attributes

void * userData
 for standard init of user data member

Detailed Description

Base class for all APEX Descriptor classes.

A descriptor class of type NxXDesc is typically passed to a createX() function. Descriptors have several advantages over simply passing a number of explicit parameters to create():

  • all parameters can have default values so the user only needs to know about the ones he needs to change
  • new parameters can be added without changing the user code, along with defaults
  • the user and the SDK can validate the parameter's correctness using isValid()
  • if creation fails, the user can look at the code of isValid() to see what exactly is not being accepted by the SDK
  • some object types can save out their state into descriptors again for serialization

Care should be taken that derived descriptor classes do not initialize their base class members multiple times, once in the constructor, and once in setToDefault()!


Member Function Documentation

PX_INLINE bool nvidia::apex::ApexDesc::isValid ( ) const [inline]

The documentation for this class was generated from the following file:

Generated on Fri Dec 15 2017 13:58:37

Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.