Public Member Functions | Protected Member Functions | Friends
NxParameterized::Interface Class Reference

Represents the interface to the NxParameterized object. More...

#include <NxParameterized.h>

List of all members.

Public Member Functions

virtual void destroy ()=0
 Destroys the NxParameterized object and all nested dynamic objects contained within.
virtual void initDefaults (void)=0
 Initializes all parameters to their default value.
virtual void initRandom (void)=0
 Initializes all parameters with random values.
virtual const char * className (void) const =0
 Get the class name.
virtual void setClassName (const char *name)=0
 Sets the class name.
virtual const char * name (void) const =0
 Get the name of the NxParameterized object This method is used for named references. The name will typically specify an asset to be loaded.
virtual void setName (const char *name)=0
 Set the name of the NxParameterized object This method is used for named references. The name will typically specify an asset to be loaded.
virtual physx::PxU32 version (void) const =0
 Get the class version.
virtual physx::PxU16 getMajorVersion (void) const =0
 Get the major part of class version.
virtual physx::PxU16 getMinorVersion (void) const =0
 Get the minor part of class version.
virtual const physx::PxU32 * checksum (physx::PxU32 &bits) const =0
 Get the class checksum.
virtual physx::PxI32 numParameters (void)=0
 Get the number of parameters contained in the NxParameterized object.
virtual const DefinitionparameterDefinition (physx::PxI32 index)=0
 Get the definition of i-th parameter.
virtual const DefinitionrootParameterDefinition (void)=0
 Get definition of root structure.
virtual const DefinitionrootParameterDefinition (void) const =0
 Get definition of root structure.
virtual ErrorType getParameterHandle (const char *longName, Handle &handle) const =0
 Set the Handle to point to the parameter specified by longName Given a long name like "mystruct.somearray[10].foo", it will return a handle to that specific parameter. The handle can then be used to set/get values, as long as it's a handle to a leaf node.
virtual ErrorType getParameterHandle (const char *longName, Handle &handle)=0
 Set the Handle to point to the parameter specified by longName Given a long name like "mystruct.somearray[10].foo", it will return a handle to that specific parameter. The handle can then be used to set/get values, as long as it's a handle to a leaf node.
virtual void setSerializationCallback (SerializationCallback *cb, void *userData=NULL)=0
 An application may set a callback function that is called immediately before serialization.
virtual ErrorType callPreSerializeCallback () const =0
 Called prior by Serializer to serialization.
virtual bool equals (const ::NxParameterized::Interface &obj, Handle *handlesOfInequality=NULL, physx::PxU32 numHandlesOfInequality=0, bool doCompareNotSerialized=true) const =0
 Compares two NxParameterized objects.
virtual bool areParamsOK (Handle *invalidHandles=NULL, physx::PxU32 numInvalidHandles=0)=0
 Checks if object satisfies schema constraints.
virtual ErrorType copy (const ::NxParameterized::Interface &src)=0
 Copies an NxParameterized object.
virtual ErrorType clone (Interface *&nullDestObject) const =0
 Clones an NxParameterized object.
virtual bool checkAlignments () const =0
 Check that alignments of internal elements match the schema.

Protected Member Functions

virtual ErrorType initParamRef (const Handle &handle, const char *chosenRefStr=0, bool doDestroyOld=false)=0
 Initialize a Reference parameter.
virtual ErrorType getParamBool (const Handle &handle, bool &val) const =0
 Get param.
virtual ErrorType setParamBool (const Handle &handle, bool val)=0
 Set param.
virtual ErrorType getParamBoolArray (const Handle &handle, bool *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamBoolArray (const Handle &handle, const bool *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamString (const Handle &handle, const char *&val) const =0
 Get param.
virtual ErrorType setParamString (const Handle &handle, const char *val)=0
 Set param.
virtual ErrorType getParamStringArray (const Handle &handle, char **array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamStringArray (const Handle &handle, const char **array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamEnum (const Handle &handle, const char *&val) const =0
 Get param.
virtual ErrorType setParamEnum (const Handle &handle, const char *val)=0
 Set param.
virtual ErrorType getParamEnumArray (const Handle &handle, char **array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamEnumArray (const Handle &handle, const char **array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamRef (const Handle &handle,::NxParameterized::Interface *&val) const =0
 Get param.
virtual ErrorType getParamRefArray (const Handle &handle,::NxParameterized::Interface **array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamRef (const Handle &handle,::NxParameterized::Interface *val, bool doDestroyOld=false)=0
virtual ErrorType setParamRefArray (const Handle &handle,::NxParameterized::Interface **array, physx::PxI32 n, physx::PxI32 offset=0, bool doDestroyOld=false)=0
virtual ErrorType getParamI8 (const Handle &handle, physx::PxI8 &val) const =0
 Get param.
virtual ErrorType setParamI8 (const Handle &handle, physx::PxI8 val)=0
 Set param.
virtual ErrorType getParamI8Array (const Handle &handle, physx::PxI8 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamI8Array (const Handle &handle, const physx::PxI8 *val, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamI16 (const Handle &handle, physx::PxI16 &val) const =0
 Get param.
virtual ErrorType setParamI16 (const Handle &handle, physx::PxI16 val)=0
 Set param.
virtual ErrorType getParamI16Array (const Handle &handle, physx::PxI16 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamI16Array (const Handle &handle, const physx::PxI16 *val, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamI32 (const Handle &handle, physx::PxI32 &val) const =0
 Get param.
virtual ErrorType setParamI32 (const Handle &handle, physx::PxI32 val)=0
 Set param.
virtual ErrorType getParamI32Array (const Handle &handle, physx::PxI32 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamI32Array (const Handle &handle, const physx::PxI32 *val, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamI64 (const Handle &handle, physx::PxI64 &val) const =0
 Get param.
virtual ErrorType setParamI64 (const Handle &handle, physx::PxI64 val)=0
 Set param.
virtual ErrorType getParamI64Array (const Handle &handle, physx::PxI64 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamI64Array (const Handle &handle, const physx::PxI64 *val, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamU8 (const Handle &handle, physx::PxU8 &val) const =0
 Get param.
virtual ErrorType setParamU8 (const Handle &handle, physx::PxU8 val)=0
 Set param.
virtual ErrorType getParamU8Array (const Handle &handle, physx::PxU8 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamU8Array (const Handle &handle, const physx::PxU8 *val, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamU16 (const Handle &handle, physx::PxU16 &val) const =0
 Get param.
virtual ErrorType setParamU16 (const Handle &handle, physx::PxU16 val)=0
 Set param.
virtual ErrorType getParamU16Array (const Handle &handle, physx::PxU16 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamU16Array (const Handle &handle, const physx::PxU16 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamU32 (const Handle &handle, physx::PxU32 &val) const =0
 Get param.
virtual ErrorType setParamU32 (const Handle &handle, physx::PxU32 val)=0
 Set param.
virtual ErrorType getParamU32Array (const Handle &handle, physx::PxU32 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamU32Array (const Handle &handle, const physx::PxU32 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamU64 (const Handle &handle, physx::PxU64 &val) const =0
 Get param.
virtual ErrorType setParamU64 (const Handle &handle, physx::PxU64 val)=0
 Set param.
virtual ErrorType getParamU64Array (const Handle &handle, physx::PxU64 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamU64Array (const Handle &handle, const physx::PxU64 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamF32 (const Handle &handle, physx::PxF32 &val) const =0
 Get param.
virtual ErrorType setParamF32 (const Handle &handle, physx::PxF32 val)=0
 Set param.
virtual ErrorType getParamF32Array (const Handle &handle, physx::PxF32 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamF32Array (const Handle &handle, const physx::PxF32 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType getParamF64 (const Handle &handle, physx::PxF64 &val) const =0
 Get param.
virtual ErrorType setParamF64 (const Handle &handle, physx::PxF64 val)=0
 Set param.
virtual ErrorType getParamF64Array (const Handle &handle, physx::PxF64 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamF64Array (const Handle &handle, const physx::PxF64 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType setParamVec2 (const Handle &handle, const physx::PxVec2 &val)=0
 Set param.
virtual ErrorType getParamVec2 (const Handle &handle, physx::PxVec2 &val) const =0
 Get param.
virtual ErrorType getParamVec2Array (const Handle &handle, physx::PxVec2 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamVec2Array (const Handle &handle, const physx::PxVec2 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType setParamVec3 (const Handle &handle, const physx::PxVec3 &val)=0
 Set param.
virtual ErrorType getParamVec3 (const Handle &handle, physx::PxVec3 &val) const =0
 Get param.
virtual ErrorType getParamVec3Array (const Handle &handle, physx::PxVec3 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamVec3Array (const Handle &handle, const physx::PxVec3 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType setParamVec4 (const Handle &handle, const physx::PxVec4 &val)=0
 Set param.
virtual ErrorType getParamVec4 (const Handle &handle, physx::PxVec4 &val) const =0
 Get param.
virtual ErrorType getParamVec4Array (const Handle &handle, physx::PxVec4 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamVec4Array (const Handle &handle, const physx::PxVec4 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType setParamQuat (const Handle &handle, const physx::PxQuat &val)=0
 Set param.
virtual ErrorType getParamQuat (const Handle &handle, physx::PxQuat &val) const =0
 Get param.
virtual ErrorType getParamQuatArray (const Handle &handle, physx::PxQuat *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamQuatArray (const Handle &handle, const physx::PxQuat *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType setParamMat33 (const Handle &handle, const physx::PxMat33 &val)=0
 Set param.
virtual ErrorType getParamMat33 (const Handle &handle, physx::PxMat33 &val) const =0
 Get param.
virtual ErrorType getParamMat33Array (const Handle &handle, physx::PxMat33 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamMat33Array (const Handle &handle, const physx::PxMat33 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType setParamMat44 (const Handle &handle, const physx::PxMat44 &val)=0
 Set param.
virtual ErrorType getParamMat44 (const Handle &handle, physx::PxMat44 &val) const =0
 Get param.
virtual ErrorType getParamMat44Array (const Handle &handle, physx::PxMat44 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamMat44Array (const Handle &handle, const physx::PxMat44 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType setParamBounds3 (const Handle &handle, const physx::PxBounds3 &val)=0
 Set param.
virtual ErrorType getParamBounds3 (const Handle &handle, physx::PxBounds3 &val) const =0
 Get param.
virtual ErrorType getParamBounds3Array (const Handle &handle, physx::PxBounds3 *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamTransform (const Handle &handle, const physx::PxTransform &val)=0
 Set param.
virtual ErrorType getParamTransform (const Handle &handle, physx::PxTransform &val) const =0
 Get param.
virtual ErrorType getParamTransformArray (const Handle &handle, physx::PxTransform *array, physx::PxI32 n, physx::PxI32 offset=0) const =0
 Get param.
virtual ErrorType setParamTransformArray (const Handle &handle, const physx::PxTransform *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType setParamBounds3Array (const Handle &handle, const physx::PxBounds3 *array, physx::PxI32 n, physx::PxI32 offset=0)=0
 Set param.
virtual ErrorType valueToStr (const Handle &handle, char *buf, physx::PxU32 bufSize, const char *&ret)=0
 Store value of parameter into a string.
virtual ErrorType strToValue (Handle &handle, const char *str, const char **endptr)=0
 Read value of parameter from string.
virtual ErrorType resizeArray (const Handle &array_handle, physx::PxI32 new_size)=0
 Resize array parameter.
virtual ErrorType getArraySize (const Handle &array_handle, physx::PxI32 &size, physx::PxI32 dimension=0) const =0
 Get size of array parameter.
virtual ErrorType swapArrayElements (const Handle &array_handle, physx::PxU32 firstElement, physx::PxU32 secondElement)=0
 Swap two elements of an array.

Friends

class Handle

Detailed Description

Represents the interface to the NxParameterized object.


Member Function Documentation

virtual bool NxParameterized::Interface::areParamsOK ( Handle invalidHandles = NULL,
physx::PxU32  numInvalidHandles = 0 
) [pure virtual]

Checks if object satisfies schema constraints.

Parameters:
[out]invalidHandlesIf the return value is False, these handles will contain the path to invalid data
[in]numInvalidHandlesThe number of handles that can be written to.
Returns:
true if all values satisfy constraints
virtual bool NxParameterized::Interface::checkAlignments ( ) const [pure virtual]

Check that alignments of internal elements match the schema.

Warning:
Only for internal use
virtual const physx::PxU32* NxParameterized::Interface::checksum ( physx::PxU32 &  bits) const [pure virtual]

Get the class checksum.

Parameters:
bitscontains the number of bits contained in the checksum
Returns:
A pointer to a constant array of physx::PxU32 values representing the checksum
virtual ErrorType NxParameterized::Interface::clone ( Interface *&  nullDestObject) const [pure virtual]

Clones an NxParameterized object.

Parameters:
[out]nullDestObjectcloned object; note this is a *reference* to a pointer; the destination cloned object will be created and stored in this pointer; should be NULL on entry!
virtual ErrorType NxParameterized::Interface::copy ( const ::NxParameterized::Interface src) [pure virtual]

Copies an NxParameterized object.

Parameters:
[in]srcthe src NxParameterized object will be copied to this object. It must be of the same type (class name).
virtual bool NxParameterized::Interface::equals ( const ::NxParameterized::Interface obj,
Handle handlesOfInequality = NULL,
physx::PxU32  numHandlesOfInequality = 0,
bool  doCompareNotSerialized = true 
) const [pure virtual]

Compares two NxParameterized objects.

Parameters:
[in]objThe other NxParameterized::Interface object (this == obj)
[out]handlesOfInequalityIf the return value is False, these handles will contain the path to where definition or data is not identical
[in]numHandlesOfInequalityThe number of handles that can be written to.
[in]doCompareNotSerializedIf false differences of parameters with DONOTSERIALIZE-hint are ignored.
Returns:
true if parameter definition tree is equal as well as parameter values
virtual ErrorType NxParameterized::Interface::getArraySize ( const Handle array_handle,
physx::PxI32 &  size,
physx::PxI32  dimension = 0 
) const [protected, pure virtual]

Get size of array parameter.

See also:
Handle::getArraySize
virtual ErrorType NxParameterized::Interface::getParameterHandle ( const char *  longName,
Handle handle 
) const [pure virtual]

Set the Handle to point to the parameter specified by longName Given a long name like "mystruct.somearray[10].foo", it will return a handle to that specific parameter. The handle can then be used to set/get values, as long as it's a handle to a leaf node.

Note:
this method will not work if an included reference's child is included in the longName
virtual ErrorType NxParameterized::Interface::getParameterHandle ( const char *  longName,
Handle handle 
) [pure virtual]

Set the Handle to point to the parameter specified by longName Given a long name like "mystruct.somearray[10].foo", it will return a handle to that specific parameter. The handle can then be used to set/get values, as long as it's a handle to a leaf node.

Note:
this method will not work if an included reference's child is included in the longName
virtual ErrorType NxParameterized::Interface::initParamRef ( const Handle handle,
const char *  chosenRefStr = 0,
bool  doDestroyOld = false 
) [protected, pure virtual]

Initialize a Reference parameter.

Note:
By default previous value of parameter isn't destroyed (bool doDestroyOld = false)
virtual ErrorType NxParameterized::Interface::resizeArray ( const Handle array_handle,
physx::PxI32  new_size 
) [protected, pure virtual]

Resize array parameter.

See also:
Handle::resizeArray
virtual void NxParameterized::Interface::setClassName ( const char *  name) [pure virtual]

Sets the class name.

This method is used for named references. The input name should be one of the possible variants.

See also:
Definition::numRefVariants(), Definition::refVariantVal()
virtual ErrorType NxParameterized::Interface::setParamRef ( const Handle handle,
::NxParameterized::Interface val,
bool  doDestroyOld = false 
) [protected, pure virtual]
Note:
By default previous value of parameter is not destroyed (bool doDestroyOld = false)
virtual ErrorType NxParameterized::Interface::setParamRefArray ( const Handle handle,
::NxParameterized::Interface **  array,
physx::PxI32  n,
physx::PxI32  offset = 0,
bool  doDestroyOld = false 
) [protected, pure virtual]
Note:
By default previous values of parameter are not destroyed (bool doDestroyOld = false)
virtual ErrorType NxParameterized::Interface::strToValue ( Handle handle,
const char *  str,
const char **  endptr 
) [protected, pure virtual]

Read value of parameter from string.

See also:
Handle::strToValue
virtual ErrorType NxParameterized::Interface::swapArrayElements ( const Handle array_handle,
physx::PxU32  firstElement,
physx::PxU32  secondElement 
) [protected, pure virtual]

Swap two elements of an array.

See also:
Handle::swapArrayElements
virtual ErrorType NxParameterized::Interface::valueToStr ( const Handle handle,
char *  buf,
physx::PxU32  bufSize,
const char *&  ret 
) [protected, pure virtual]

Store value of parameter into a string.

See also:
Handle::valueToStr

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

Generated on Mon Apr 28 2014 08:01:36

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