NVIDIA(R) NvFoundation Reference: Deprecated List

  • Main Page
  • Related Pages
  • Modules
  • Classes
  • Files

Deprecated List

Member nvidia::NvMat33::createIdentity ()
Set to identity matrix. Deprecated. use NvMat33(NvIdentity)

Member nvidia::NvMat33::createZero ()
Set to zero matrix. Deprecated. use NvMat33(NvZero).

Member nvidia::NvMat44::createIdentity ()
Set to identity matrix. Deprecated. use NvMat44(NvIdentity).

Member nvidia::NvMat44::createZero ()
Set to zero matrix. Deprecated. use NvMat44(NvZero).

Member nvidia::NvQuat::createIdentity ()
use NvQuat(NvIdentity)

Member nvidia::NvTransform::createIdentity ()
Generated on Thu Jan 23 16:17:59 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: Module Index

  • Classes
  • Files

Modules

Here is a list of all modules:
  • Foundation


NVIDIA(R) NvFoundation Reference: Foundation

Foundation

Classes

struct | NvPackValidation

Defines

#define | NV_FOUNDATION_VERSION_MAJOR 1
#define | NV_FOUNDATION_VERSION_MINOR 1
#define | NV_FOUNDATION_VERSION_BUGFIX 0
#define | NV_FOUNDATION_VERSION ((NV_FOUNDATION_VERSION_MAJOR<<24) + (NV_FOUNDATION_VERSION_MINOR<<16) + (NV_FOUNDATION_VERSION_BUGFIX<<8) + 0)
#define | NV_C_EXPORT
#define | NV_CALL_CONV
#define | NV_PUSH_PACK_DEFAULT
#define | NV_POP_PACK
#define | NV_INLINE inline
#define | NV_FORCE_INLINE inline
#define | NV_NOINLINE
#define | NV_RESTRICT
#define | NV_NOALIAS
#define | NV_ALIGN(alignment, decl)
#define | NV_ALIGN_PREFIX(alignment)
#define | NV_ALIGN_SUFFIX(alignment)
#define | NV_DEPRECATED
#define | NV_COMPILE_TIME_ASSERT(exp) typedef char NvCompileTimeAssert_Dummy[(exp) ? 1 : -1]
#define | NV_OFFSET_OF(X, Y) offsetof(X, Y)
#define | NV_SIZE_OF(Class, Member) sizeof(((Class*)0)->Member)
#define | NDEBUG
#define | NV_CUDA_CALLABLE
#define | NV_DUMMY_SYMBOL
#define | NV_IS_SPU 0
#define | NV_IS_X64 0
#define | NV_IS_X64 0
#define | NV_IS_WINDOWS 0
#define | NV_IS_X86 0
#define | NV_IS_INTEL 0
#define | NV_IS_X360 0
#define | NV_IS_PS3 0
#define | NV_IS_PPU (NV_IS_PS3 && !NV_IS_SPU)
#define | NV_WEAK_SYMBOL
#define | NV_MAX_I8 127
#define | NV_MIN_I8 (-128)
#define | NV_MAX_U8 255U
#define | NV_MIN_U8 0
#define | NV_MAX_I16 32767
#define | NV_MIN_I16 (-32768)
#define | NV_MAX_U16 65535U
#define | NV_MIN_U16 0
#define | NV_MAX_I32 2147483647
#define | NV_MIN_I32 (-2147483647 - 1)
#define | NV_MAX_U32 4294967295U
#define | NV_MIN_U32 0
#define | NV_MAX_F32 3.4028234663852885981170418348452e+38F
#define | NV_MAX_F64 DBL_MAX
#define | NV_EPS_F32 FLT_EPSILON
#define | NV_EPS_F64 DBL_EPSILON
#define | NV_MAX_REAL NV_MAX_F32
#define | NV_EPS_REAL NV_EPS_F32
#define | NV_NORMALIZATION_EPSILON NvReal(1e-20f)

Typedefs

typedef float | NvReal

Enumerations

enum | NvEMPTY { NvEmpty }

Functions

template<class T >
NV_CUDA_CALLABLE NV_INLINE void | NV_UNUSED (T const &)
NV_COMPILE_TIME_ASSERT (NV_OFFSET_OF(NvPackValidation, a)==8)

Define Documentation

#define NV_ALIGN | ( | alignment,
 |  | decl | )

Alignment macros

NV_ALIGN_PREFIX and NV_ALIGN_SUFFIX can be used for type alignment instead of aligning individual variables as follows: NV_ALIGN_PREFIX(16) struct A { ... } NV_ALIGN_SUFFIX(16); This declaration style is parsed correctly by Visual Assist.

#define NV_C_EXPORT

List of preprocessor defines used to configure the SDK

  • NV_DEBUG: enable asserts (exactly one needs to be defined)
  • NV_CHECKED: enable run time checks, mostly unused or equiv. to NV_DEBUG
  • NV_SUPPORT_VISUAL_DEBUGGER: ...
  • AG_PERFMON: ... (Deprecated) Compiler define Platform define DLL export macros

#define NV_CALL_CONV

Calling convention

#define NV_COMPILE_TIME_ASSERT ( exp ) typedef char NvCompileTimeAssert_Dummy[(exp) ? 1 : -1]

General defines

#define NV_DEPRECATED

Deprecated macro

  • To deprecate a function: Place NV_DEPRECATED at the start of the function header (leftmost word).
  • To deprecate a 'typdef', a 'struct' or a 'class': Place NV_DEPRECATED directly after the keywords ('typdef', 'struct', 'class').

#define NV_FORCE_INLINE inline

Force inline macro

#define NV_FOUNDATION_VERSION ((NV_FOUNDATION_VERSION_MAJOR<<24) + (NV_FOUNDATION_VERSION_MINOR<<16) + (NV_FOUNDATION_VERSION_BUGFIX<<8) + 0)

The constant NV_FOUNDATION_VERSION is used to confirm the version of the foundation headers. This is to ensure that the application is using the same header version as the library was built with.

#define NV_INLINE inline

Inline macro

#define NV_NOINLINE

Noinline macro

#define NV_PUSH_PACK_DEFAULT

Pack macros - disabled on SPU because they are not supported

#define NV_RESTRICT

restrict macro

Enumeration Type Documentation

enum NvEMPTY

enum for empty constructor tag


NVIDIA(R) NvFoundation Reference: Class List

  • Class List
  • Class Hierarchy
  • Class Members

Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
nvidia::NvAllocatorCallback | Abstract base class for an application defined memory allocator that can be used by the Nv library
nvidia::NvBounds3 | Class representing 3D range or axis aligned bounding box
nvidia::NvErrorCallback | User defined interface class. Used by the library to emit debug information
nvidia::NvErrorCode | Error codes
nvidia::NvFlags< enumtype, storagetype > | Container for bitfield flag variables associated with a specific enum type
nvidia::NvInputData | Input data class for I/O which provides random read access
nvidia::NvInputStream | Input stream class for I/O
nvidia::NvMat33 | 3x3 matrix class
nvidia::NvMat44 | 4x4 matrix class
nvidia::NvOutputStream | Output stream class for I/O
nvidia::NvPlane | Representation of a plane
nvidia::NvQuat | This is a quaternion class. For more information on quaternion mathematics consult a mathematics source on complex numbers
nvidia::NvTransform | Class representing a rigid euclidean transform as a quaternion and a vector
nvidia::NvVec2 | 2 Element vector class
nvidia::NvVec3 | 3 Element vector class
nvidia::NvVec4 | 4 Element vector class


NVIDIA(R) NvFoundation Reference: nvidia::NvAllocatorCallback Class Reference

  • Class Hierarchy
  • Class Members
nvidia::NvAllocatorCallback

nvidia::NvAllocatorCallback Class Reference

Abstract base class for an application defined memory allocator that can be used by the Nv library. More...

#include <NvFoundationInterface.h>

List of all members.

Public Member Functions

virtual | ~NvAllocatorCallback ()
destructor
virtual void * | allocate (size_t size, const char *typeName, const char *filename, int line)=0
Allocates size bytes of memory, which must be 16-byte aligned.
virtual void | deallocate (void *ptr)=0
Frees memory previously allocated by allocate().

Detailed Description

Abstract base class for an application defined memory allocator that can be used by the Nv library.

Note:
The SDK state should not be modified from within any allocation/free function.
Threading: All methods of this class should be thread safe as it can be called from the user thread or the physics processing thread(s).

Member Function Documentation

virtual void* nvidia::NvAllocatorCallback::allocate | ( | size_t | size,
 |  | const char * | typeName,
 |  | const char * | filename,
 |  | int | line |
 | ) |  |  | [pure virtual]

Allocates size bytes of memory, which must be 16-byte aligned.

This method should never return NULL. If you run out of memory, then you should terminate the app or take some other appropriate action.

Threading: This function should be thread safe as it can be called in the context of the user thread and physics processing thread(s).

Parameters:
size | Number of bytes to allocate.
typeName | Name of the datatype that is being allocated
filename | The source file which allocated the memory
line | The source line which allocated the memory
Returns:
The allocated block of memory.

virtual void nvidia::NvAllocatorCallback::deallocate ( void * ptr ) [pure virtual]

Frees memory previously allocated by allocate().

Threading: This function should be thread safe as it can be called in the context of the user thread and physics processing thread(s).

Parameters:
ptr Memory to free.

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationInterface.h


NVIDIA(R) NvFoundation Reference: nvidia::NvBounds3 Class Reference

nvidia::NvBounds3

nvidia::NvBounds3 Class Reference

Class representing 3D range or axis aligned bounding box. More...

#include <NvFoundationMath.h>

List of all members.

Public Member Functions

NV_CUDA_CALLABLE NV_FORCE_INLINE | NvBounds3 ()
Default constructor, not performing any initialization for performance reason.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvBounds3 (const NvVec3 &minimum, const NvVec3 &maximum)
Construct from two bounding points.
NV_CUDA_CALLABLE
NV_FORCE_INLINE void 		setEmpty ()
Sets empty to true.
NV_CUDA_CALLABLE
NV_FORCE_INLINE void 		setMaximal ()
Sets the bounds to maximum size [-NV_MAX_BOUNDS_EXTENTS, NV_MAX_BOUNDS_EXTENTS].
NV_CUDA_CALLABLE
NV_FORCE_INLINE void 		include (const NvVec3 &v)
expands the volume to include v
NV_CUDA_CALLABLE
NV_FORCE_INLINE void 		include (const NvBounds3 &b)
expands the volume to include b.
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		isEmpty () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		intersects (const NvBounds3 &b) const
indicates whether the intersection of this and b is empty or not.
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		intersects1D (const NvBounds3 &a, uint32_t axis) const
computes the 1D-intersection between two AABBs, on a given axis.
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		contains (const NvVec3 &v) const
indicates if these bounds contain v.
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		isInside (const NvBounds3 &box) const
checks a box is inside another box.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		getCenter () const
returns the center of this axis aligned box.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		getCenter (uint32_t axis) const
get component of the box's center along a given axis
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		getExtents (uint32_t axis) const
get component of the box's extents along a given axis
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		getDimensions () const
returns the dimensions (width/height/depth) of this axis aligned box.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		getExtents () const
returns the extents, which are half of the width/height/depth.
NV_CUDA_CALLABLE
NV_FORCE_INLINE void 		scaleSafe (float scale)
scales the AABB.
NV_CUDA_CALLABLE
NV_FORCE_INLINE void 		scaleFast (float scale)
scales the AABB.
NV_CUDA_CALLABLE
NV_FORCE_INLINE void 		fattenSafe (NvReal distance)
NV_CUDA_CALLABLE
NV_FORCE_INLINE void 		fattenFast (NvReal distance)
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		isFinite () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		isValid () const

Static Public Member Functions

static NV_CUDA_CALLABLE
NV_FORCE_INLINE NvBounds3 		empty ()
Return empty bounds.
static NV_CUDA_CALLABLE
NV_FORCE_INLINE NvBounds3 		boundsOfPoints (const NvVec3 &v0, const NvVec3 &v1)
returns the AABB containing v0 and v1.
static NV_CUDA_CALLABLE
NV_FORCE_INLINE NvBounds3 		centerExtents (const NvVec3 &center, const NvVec3 &extent)
returns the AABB from center and extents vectors.
static NV_CUDA_CALLABLE
NV_INLINE NvBounds3 		basisExtent (const NvVec3 &center, const NvMat33 &basis, const NvVec3 &extent)
Construct from center, extent, and (not necessarily orthogonal) basis.
static NV_CUDA_CALLABLE
NV_INLINE NvBounds3 		poseExtent (const NvTransform &pose, const NvVec3 &extent)
Construct from pose and extent.
static NV_CUDA_CALLABLE
NV_INLINE NvBounds3 		transformSafe (const NvMat33 &matrix, const NvBounds3 &bounds)
gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
static NV_CUDA_CALLABLE
NV_INLINE NvBounds3 		transformFast (const NvMat33 &matrix, const NvBounds3 &bounds)
gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
static NV_CUDA_CALLABLE
NV_INLINE NvBounds3 		transformSafe (const NvTransform &transform, const NvBounds3 &bounds)
gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
static NV_CUDA_CALLABLE
NV_INLINE NvBounds3 		transformFast (const NvTransform &transform, const NvBounds3 &bounds)
gets the transformed bounds of the passed AABB (resulting in a bigger AABB).

Public Attributes

NvVec3 | minimum
NvVec3 | maximum

Detailed Description

Class representing 3D range or axis aligned bounding box.

Stored as minimum and maximum extent corners. Alternate representation would be center and dimensions. May be empty or nonempty. For nonempty bounds, minimum <= maximum has to hold for all axes. Empty bounds have to be represented as minimum = NV_MAX_BOUNDS_EXTENTS and maximum = -NV_MAX_BOUNDS_EXTENTS for all axes. All other representations are invalid and the behavior is undefined.

Constructor & Destructor Documentation

NV_CUDA_CALLABLE NV_FORCE_INLINE nvidia::NvBounds3::NvBounds3 ( ) [inline]

Default constructor, not performing any initialization for performance reason.

Remarks:
Use empty() function below to construct empty bounds.

Member Function Documentation

NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3 nvidia::NvBounds3::boundsOfPoints | ( | const NvVec3 & | v0,
 |  | const NvVec3 & | v1 |
 | ) |  |  | [static]

returns the AABB containing v0 and v1.

Parameters:
v0 | first point included in the AABB.
v1 | second point included in the AABB.

NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3 nvidia::NvBounds3::centerExtents | ( | const NvVec3 & | center,
 |  | const NvVec3 & | extent |
 | ) |  |  | [static]

returns the AABB from center and extents vectors.

Parameters:
center | Center vector
extent | Extents vector

NV_CUDA_CALLABLE NV_FORCE_INLINE bool nvidia::NvBounds3::contains ( const NvVec3 & v ) const

indicates if these bounds contain v.

Parameters:
v Point to test against bounds.

NV_CUDA_CALLABLE NV_FORCE_INLINE void nvidia::NvBounds3::fattenFast ( NvReal distance )

fattens the AABB in all 3 dimensions by the given distance.

Calling this method for empty bounds leads to undefined behavior. Use fattenSafe() instead.

NV_CUDA_CALLABLE NV_FORCE_INLINE void nvidia::NvBounds3::fattenSafe ( NvReal distance )

fattens the AABB in all 3 dimensions by the given distance.

This version is safe to call for empty bounds.

NV_CUDA_CALLABLE NV_FORCE_INLINE void nvidia::NvBounds3::include ( const NvBounds3 & b )

expands the volume to include b.

Parameters:
b Bounds to perform union with.

NV_CUDA_CALLABLE NV_FORCE_INLINE void nvidia::NvBounds3::include ( const NvVec3 & v )

expands the volume to include v

Parameters:
v Point to expand to.

NV_CUDA_CALLABLE NV_FORCE_INLINE bool nvidia::NvBounds3::intersects ( const NvBounds3 & b ) const

indicates whether the intersection of this and b is empty or not.

Parameters:
b Bounds to test for intersection.

NV_CUDA_CALLABLE NV_FORCE_INLINE bool nvidia::NvBounds3::intersects1D | ( | const NvBounds3 & | a,
 |  | uint32_t | axis |
 | ) |  |  | const

computes the 1D-intersection between two AABBs, on a given axis.

Parameters:
a | the other AABB
axis | the axis (0, 1, 2)

NV_CUDA_CALLABLE NV_FORCE_INLINE bool nvidia::NvBounds3::isFinite ( ) const

checks that the AABB values are not NaN

NV_CUDA_CALLABLE NV_FORCE_INLINE bool nvidia::NvBounds3::isInside ( const NvBounds3 & box ) const

checks a box is inside another box.

Parameters:
box the other AABB

NV_CUDA_CALLABLE NV_FORCE_INLINE bool nvidia::NvBounds3::isValid ( ) const

checks that the AABB values describe a valid configuration.

NV_CUDA_CALLABLE NV_FORCE_INLINE void nvidia::NvBounds3::scaleFast ( float scale )

scales the AABB.

Calling this method for empty bounds leads to undefined behavior. Use scaleSafe() instead.

Parameters:
scale Factor to scale AABB by.

NV_CUDA_CALLABLE NV_FORCE_INLINE void nvidia::NvBounds3::scaleSafe ( float scale )

scales the AABB.

This version is safe to call for empty bounds.

Parameters:
scale Factor to scale AABB by.

NV_CUDA_CALLABLE NV_INLINE NvBounds3 nvidia::NvBounds3::transformFast | ( | const NvTransform & | transform,
 |  | const NvBounds3 & | bounds |
 | ) |  |  | [static]

gets the transformed bounds of the passed AABB (resulting in a bigger AABB).

Calling this method for empty bounds leads to undefined behavior. Use transformSafe() instead.

Parameters:
[in] | transform | Transform to apply, can contain scaling as well
[in] | bounds | The bounds to transform.

NV_CUDA_CALLABLE NV_INLINE NvBounds3 nvidia::NvBounds3::transformFast | ( | const NvMat33 & | matrix,
 |  | const NvBounds3 & | bounds |
 | ) |  |  | [static]

gets the transformed bounds of the passed AABB (resulting in a bigger AABB).

Calling this method for empty bounds leads to undefined behavior. Use transformSafe() instead.

Parameters:
[in] | matrix | Transform to apply, can contain scaling as well
[in] | bounds | The bounds to transform.

NV_CUDA_CALLABLE NV_INLINE NvBounds3 nvidia::NvBounds3::transformSafe | ( | const NvTransform & | transform,
 |  | const NvBounds3 & | bounds |
 | ) |  |  | [static]

gets the transformed bounds of the passed AABB (resulting in a bigger AABB).

This version is safe to call for empty bounds.

Parameters:
[in] | transform | Transform to apply, can contain scaling as well
[in] | bounds | The bounds to transform.

NV_CUDA_CALLABLE NV_INLINE NvBounds3 nvidia::NvBounds3::transformSafe | ( | const NvMat33 & | matrix,
 |  | const NvBounds3 & | bounds |
 | ) |  |  | [static]

gets the transformed bounds of the passed AABB (resulting in a bigger AABB).

This version is safe to call for empty bounds.

Parameters:
[in] | matrix | Transform to apply, can contain scaling as well
[in] | bounds | The bounds to transform.

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h
Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: nvidia::NvErrorCallback Class Reference

nvidia::NvErrorCallback

nvidia::NvErrorCallback Class Reference

User defined interface class. Used by the library to emit debug information. More...

#include <NvFoundationInterface.h>

List of all members.

Public Member Functions

virtual void reportError (NvErrorCode::Enum code, const char *message, const char *file, int line)=0
Reports an error code.

Detailed Description

User defined interface class. Used by the library to emit debug information.

Note:
The SDK state should not be modified from within any error reporting functions.
Threading: The SDK sequences its calls to the output stream using a mutex, so the class need not be implemented in a thread-safe manner if the SDK is the only client.

Member Function Documentation

virtual void nvidia::NvErrorCallback::reportError | ( | NvErrorCode::Enum | code,
 |  | const char * | message,
 |  | const char * | file,
 |  | int | line |
 | ) |  |  | [pure virtual]

Reports an error code.

Parameters:
code | Error code, see NvErrorCode
message | Message to display.
file | File error occured in.
line | Line number error occured on.

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationInterface.h


NVIDIA(R) NvFoundation Reference: nvidia::NvErrorCode Struct Reference

nvidia::NvErrorCode

nvidia::NvErrorCode Struct Reference

Error codes. More...

#include <NvFoundationInterface.h>

List of all members.

Public Types

enum Enum {
eNO_ERROR = 0, eDEBUG_INFO = 1, eDEBUG_WARNING = 2, eINVALID_PARAMETER = 4,
eINVALID_OPERATION = 8, eOUT_OF_MEMORY = 16, eINTERNAL_ERROR = 32, eABORT = 64,
ePERF_WARNING = 128, eMASK_ALL = -1
}

Detailed Description

Error codes.

These error codes are passed to NvErrorCallback

See also:
NvErrorCallback

Member Enumeration Documentation

enum nvidia::NvErrorCode::Enum

Enumerator:
eDEBUG_INFO | An informational message.
eDEBUG_WARNING | a warning message for the user to help with debugging
eINVALID_PARAMETER | method called with invalid parameter(s)
eINVALID_OPERATION | method was called at a time when an operation is not possible
eOUT_OF_MEMORY | method failed to allocate some memory
eINTERNAL_ERROR | The library failed for some reason. Possibly you have passed invalid values like NaNs, which are not checked for.
eABORT | An unrecoverable error, execution should be halted and log output flushed.
ePERF_WARNING | The SDK has determined that an operation may result in poor performance.
eMASK_ALL | A bit mask for including all errors.

The documentation for this struct was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationInterface.h


NVIDIA(R) NvFoundation Reference: nvidia::NvFlags< enumtype, storagetype > Class Template Reference

nvidia::NvFlags

nvidia::NvFlags< enumtype, storagetype > Class Template Reference

Container for bitfield flag variables associated with a specific enum type. More...

#include <NvFoundationFlags.h>

List of all members.

Public Types

typedef storagetype | InternalType
typedef storagetype | InternalType

Public Member Functions

NV_INLINE | NvFlags (const NvEMPTY &)
NV_INLINE | NvFlags (enumtype e)
NV_INLINE | NvFlags (const NvFlags< enumtype, storagetype > &f)
NV_INLINE | NvFlags (storagetype b)
NV_INLINE bool | isSet (enumtype e) const
NV_INLINE NvFlags< enumtype,
storagetype > & 		set (enumtype e)
NV_INLINE bool | operator== (enumtype e) const
NV_INLINE bool | operator== (const NvFlags< enumtype, storagetype > &f) const
NV_INLINE bool | operator== (bool b) const
NV_INLINE bool | operator!= (enumtype e) const
NV_INLINE bool | operator!= (const NvFlags< enumtype, storagetype > &f) const
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator= (enumtype e)
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator|= (enumtype e)
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator|= (const NvFlags< enumtype, storagetype > &f)
NV_INLINE NvFlags< enumtype,
storagetype > 		operator| (enumtype e) const
NV_INLINE NvFlags< enumtype,
storagetype > 		operator| (const NvFlags< enumtype, storagetype > &f) const
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator&= (enumtype e)
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator&= (const NvFlags< enumtype, storagetype > &f)
NV_INLINE NvFlags< enumtype,
storagetype > 		operator& (enumtype e) const
NV_INLINE NvFlags< enumtype,
storagetype > 		operator& (const NvFlags< enumtype, storagetype > &f) const
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator^= (enumtype e)
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator^= (const NvFlags< enumtype, storagetype > &f)
NV_INLINE NvFlags< enumtype,
storagetype > 		operator^ (enumtype e) const
NV_INLINE NvFlags< enumtype,
storagetype > 		operator^ (const NvFlags< enumtype, storagetype > &f) const
NV_INLINE NvFlags< enumtype,
storagetype > 		operator~ (void) const
NV_INLINE | operator bool (void) const
NV_INLINE | operator uint8_t (void) const
NV_INLINE | operator uint16_t (void) const
NV_INLINE | operator uint32_t (void) const
NV_INLINE void | clear (enumtype e)
NV_INLINE | NvFlags (const NvEMPTY &)
NV_INLINE | NvFlags (enumtype e)
NV_INLINE | NvFlags (const NvFlags< enumtype, storagetype > &f)
NV_INLINE | NvFlags (storagetype b)
NV_INLINE bool | isSet (enumtype e) const
NV_INLINE NvFlags< enumtype,
storagetype > & 		set (enumtype e)
NV_INLINE bool | operator== (enumtype e) const
NV_INLINE bool | operator== (const NvFlags< enumtype, storagetype > &f) const
NV_INLINE bool | operator== (bool b) const
NV_INLINE bool | operator!= (enumtype e) const
NV_INLINE bool | operator!= (const NvFlags< enumtype, storagetype > &f) const
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator= (enumtype e)
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator|= (enumtype e)
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator|= (const NvFlags< enumtype, storagetype > &f)
NV_INLINE NvFlags< enumtype,
storagetype > 		operator| (enumtype e) const
NV_INLINE NvFlags< enumtype,
storagetype > 		operator| (const NvFlags< enumtype, storagetype > &f) const
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator&= (enumtype e)
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator&= (const NvFlags< enumtype, storagetype > &f)
NV_INLINE NvFlags< enumtype,
storagetype > 		operator& (enumtype e) const
NV_INLINE NvFlags< enumtype,
storagetype > 		operator& (const NvFlags< enumtype, storagetype > &f) const
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator^= (enumtype e)
NV_INLINE NvFlags< enumtype,
storagetype > & 		operator^= (const NvFlags< enumtype, storagetype > &f)
NV_INLINE NvFlags< enumtype,
storagetype > 		operator^ (enumtype e) const
NV_INLINE NvFlags< enumtype,
storagetype > 		operator^ (const NvFlags< enumtype, storagetype > &f) const
NV_INLINE NvFlags< enumtype,
storagetype > 		operator~ (void) const
NV_INLINE | operator bool (void) const
NV_INLINE | operator uint8_t (void) const
NV_INLINE | operator uint16_t (void) const
NV_INLINE | operator uint32_t (void) const
NV_INLINE void | clear (enumtype e)

Friends

NV_INLINE NvFlags< enumtype,
storagetype > 		operator& (enumtype a, NvFlags< enumtype, storagetype > &b)
NV_INLINE NvFlags< enumtype,
storagetype > 		operator& (enumtype a, NvFlags< enumtype, storagetype > &b)

Detailed Description

template<typename enumtype, typename storagetype = uint32_t>
class nvidia::NvFlags< enumtype, storagetype >

Container for bitfield flag variables associated with a specific enum type.

This allows for type safe manipulation for bitfields.

Example

enum that defines each bit... struct MyEnum { enum Enum { eMAN = 1, eBEAR = 2, ePIG = 4, }; };

implements some convenient global operators. NV_FLAGS_OPERATORS(MyEnum::Enum, uint8_t);

NvFlags<MyEnum::Enum, uint8_t> myFlags; myFlags |= MyEnum::eMAN; myFlags |= MyEnum::eBEAR | MyEnum::ePIG; if(myFlags & MyEnum::eBEAR) { doSomething(); }

The documentation for this class was generated from the following files:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationFlags.h
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h


NVIDIA(R) NvFoundation Reference: nvidia::NvInputData Class Reference

nvidia::NvInputData

nvidia::NvInputData Class Reference

Input data class for I/O which provides random read access. More...

#include <NvFoundationInterface.h>

Inheritance diagram for nvidia::NvInputData:

nvidia::NvInputStream

List of all members.

Public Member Functions

virtual uint32_t | getLength () const =0
return the length of the input data
virtual void | seek (uint32_t offset)=0
seek to the given offset from the start of the data.
virtual uint32_t | tell () const =0
return the current offset from the start of the data

Detailed Description

Input data class for I/O which provides random read access.

The user needs to supply a NvInputData implementation to a number of methods to allow the SDK to read data.

Member Function Documentation

virtual uint32_t nvidia::NvInputData::getLength ( ) const [pure virtual]

return the length of the input data

Returns:
size in bytes of the input data

virtual void nvidia::NvInputData::seek ( uint32_t offset ) [pure virtual]

seek to the given offset from the start of the data.

Parameters:
[in] offset the offset to seek to. If greater than the length of the data, this call is equivalent to seek(length);

virtual uint32_t nvidia::NvInputData::tell ( ) const [pure virtual]

return the current offset from the start of the data

Returns:
the offset to seek to.

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationInterface.h


NVIDIA(R) NvFoundation Reference: nvidia::NvInputStream Class Reference

nvidia::NvInputStream

nvidia::NvInputStream Class Reference

Input stream class for I/O. More...

#include <NvFoundationInterface.h>

Inheritance diagram for nvidia::NvInputStream:

nvidia::NvInputData

List of all members.

Public Member Functions

virtual uint32_t read (void *dest, uint32_t count)=0
read from the stream. The number of bytes written may be less than the number requested.

Detailed Description

Input stream class for I/O.

The user needs to supply a NvInputStream implementation to a number of methods to allow the SDK to read data.

Member Function Documentation

virtual uint32_t nvidia::NvInputStream::read | ( | void * | dest,
 |  | uint32_t | count |
 | ) |  |  | [pure virtual]

read from the stream. The number of bytes written may be less than the number requested.

Parameters:
[in] | dest | the destination address to which the data will be written
[in] | count | the number of bytes requested
Returns:
the number of bytes read from the stream.

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationInterface.h


NVIDIA(R) NvFoundation Reference: nvidia::NvMat33 Class Reference

nvidia::NvMat33

nvidia::NvMat33 Class Reference

3x3 matrix class More...

#include <NvFoundationMath.h>

List of all members.

Public Member Functions

NV_CUDA_CALLABLE NV_INLINE | NvMat33 ()
Default constructor.
NV_CUDA_CALLABLE NV_INLINE | NvMat33 (NvIDENTITY r)
identity constructor
NV_CUDA_CALLABLE NV_INLINE | NvMat33 (NvZERO r)
zero constructor
NV_CUDA_CALLABLE | NvMat33 (const NvVec3 &col0, const NvVec3 &col1, const NvVec3 &col2)
Construct from three base vectors.
NV_CUDA_CALLABLE NV_INLINE | NvMat33 (NvReal r)
constructor from a scalar, which generates a multiple of the identity matrix
NV_CUDA_CALLABLE NV_INLINE | NvMat33 (NvReal values[])
Construct from float[9].
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvMat33 (const NvQuat &q)
Construct from a quaternion.
NV_CUDA_CALLABLE NV_INLINE | NvMat33 (const NvMat33 &other)
Copy constructor.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvMat33 & 		operator= (const NvMat33 &other)
Assignment operator.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvMat33 		getTranspose () const
Get transposed matrix.
NV_CUDA_CALLABLE NV_INLINE NvMat33 | getInverse () const
Get the real inverse.
NV_CUDA_CALLABLE NV_INLINE NvReal | getDeterminant () const
Get determinant.
NV_CUDA_CALLABLE NV_INLINE NvMat33 | operator- () const
Unary minus.
NV_CUDA_CALLABLE NV_INLINE NvMat33 | operator+ (const NvMat33 &other) const
Add.
NV_CUDA_CALLABLE NV_INLINE NvMat33 | operator- (const NvMat33 &other) const
Subtract.
NV_CUDA_CALLABLE NV_INLINE NvMat33 | operator* (NvReal scalar) const
Scalar multiplication.
NV_CUDA_CALLABLE NV_INLINE NvVec3 | operator* (const NvVec3 &vec) const
Matrix vector multiplication (returns 'this->transform(vec)').
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvMat33 		operator* (const NvMat33 &other) const
Matrix multiplication.
NV_CUDA_CALLABLE NV_INLINE
NvMat33 & 		operator+= (const NvMat33 &other)
Equals-add.
NV_CUDA_CALLABLE NV_INLINE
NvMat33 & 		operator-= (const NvMat33 &other)
Equals-sub.
NV_CUDA_CALLABLE NV_INLINE
NvMat33 & 		operator*= (NvReal scalar)
Equals scalar multiplication.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		operator() (unsigned int row, unsigned int col) const
Element access, mathematical way!
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal & 		operator() (unsigned int row, unsigned int col)
Element access, mathematical way!
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		transform (const NvVec3 &other) const
Transform vector by matrix, equal to v' = M*v.
NV_CUDA_CALLABLE NV_INLINE NvVec3 | transformTranspose (const NvVec3 &other) const
Transform vector by matrix transpose, v' = M^t*v.
NV_CUDA_CALLABLE
NV_FORCE_INLINE const NvReal * 		front () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 & 		operator[] (int num)
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 & 		operator[] (unsigned int num)
NV_CUDA_CALLABLE
NV_FORCE_INLINE const NvVec3 & 		operator[] (int num) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE const NvVec3 & 		operator[] (unsigned int num) const

Static Public Member Functions

NV_DEPRECATED NV_CUDA_CALLABLE
static NV_INLINE NvMat33 		createIdentity ()
NV_DEPRECATED NV_CUDA_CALLABLE
static NV_INLINE NvMat33 		createZero ()
NV_CUDA_CALLABLE static
NV_INLINE NvMat33 		createDiagonal (const NvVec3 &d)
Construct from diagonal, off-diagonals are zero.

Public Attributes

NvVec3 | column0
NvVec3 | column1
NvVec3 | column2

Friends

NvMat33 | operator* (NvReal, const NvMat33 &)

Detailed Description

3x3 matrix class

Some clarifications, as there have been much confusion about matrix formats etc in the past.

Short:

  • Matrix have base vectors in columns (vectors are column matrices, 3x1 matrices).
  • Matrix is physically stored in column major format
  • Matrices are concaternated from left

Long: Given three base vectors a, b and c the matrix is stored as

|a.x b.x c.x| |a.y b.y c.y| |a.z b.z c.z|

Vectors are treated as columns, so the vector v is

|x| |y| |z|

And matrices are applied _before_ the vector (pre-multiplication) v' = M*v

|x'| |a.x b.x c.x| |x| |a.x*x + b.x*y + c.x*z| |y'| = |a.y b.y c.y| * |y| = |a.y*x + b.y*y + c.y*z| |z'| |a.z b.z c.z| |z| |a.z*x + b.z*y + c.z*z|

Physical storage and indexing: To be compatible with popular 3d rendering APIs (read D3d and OpenGL) the physical indexing is

|0 3 6| |1 4 7| |2 5 8|

index = column*3 + row

which in C++ translates to M[column][row]

The mathematical indexing is M_row,column and this is what is used for _-notation so _12 is 1st row, second column and operator(row, column)!

Member Function Documentation

NV_DEPRECATED NV_CUDA_CALLABLE static NV_INLINE NvMat33 nvidia::NvMat33::createIdentity ( ) [inline, static]

Deprecated:
Set to identity matrix. Deprecated. use NvMat33(NvIdentity)

NV_DEPRECATED NV_CUDA_CALLABLE static NV_INLINE NvMat33 nvidia::NvMat33::createZero ( ) [inline, static]

Deprecated:
Set to zero matrix. Deprecated. use NvMat33(NvZero).

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h
Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: nvidia::NvMat44 Class Reference

nvidia::NvMat44

nvidia::NvMat44 Class Reference

4x4 matrix class More...

#include <NvFoundationMath.h>

List of all members.

Public Member Functions

NV_CUDA_CALLABLE NV_INLINE | NvMat44 ()
Default constructor.
NV_CUDA_CALLABLE NV_INLINE | NvMat44 (NvIDENTITY r)
identity constructor
NV_CUDA_CALLABLE NV_INLINE | NvMat44 (NvZERO r)
zero constructor
NV_CUDA_CALLABLE | NvMat44 (const NvVec4 &col0, const NvVec4 &col1, const NvVec4 &col2, const NvVec4 &col3)
Construct from four 4-vectors.
NV_CUDA_CALLABLE NV_INLINE | NvMat44 (NvReal r)
constructor that generates a multiple of the identity matrix
NV_CUDA_CALLABLE | NvMat44 (const NvVec3 &column0, const NvVec3 &column1, const NvVec3 &column2, const NvVec3 &column3)
Construct from three base vectors and a translation.
NV_CUDA_CALLABLE NV_INLINE | NvMat44 (NvReal values[])
Construct from float[16].
NV_CUDA_CALLABLE NV_INLINE | NvMat44 (const NvQuat &q)
Construct from a quaternion.
NV_CUDA_CALLABLE NV_INLINE | NvMat44 (const NvVec4 &diagonal)
Construct from a diagonal vector.
NV_CUDA_CALLABLE | NvMat44 (const NvMat33 &orientation, const NvVec3 &position)
NV_CUDA_CALLABLE | NvMat44 (const NvTransform &t)
NV_CUDA_CALLABLE NV_INLINE | NvMat44 (const NvMat44 &other)
Copy constructor.
NV_CUDA_CALLABLE NV_INLINE
const NvMat44 & 		operator= (const NvMat44 &other)
Assignment operator.
NV_CUDA_CALLABLE NV_INLINE NvMat44 | getTranspose () const
Get transposed matrix.
NV_CUDA_CALLABLE NV_INLINE NvMat44 | operator- () const
Unary minus.
NV_CUDA_CALLABLE NV_INLINE NvMat44 | operator+ (const NvMat44 &other) const
Add.
NV_CUDA_CALLABLE NV_INLINE NvMat44 | operator- (const NvMat44 &other) const
Subtract.
NV_CUDA_CALLABLE NV_INLINE NvMat44 | operator* (NvReal scalar) const
Scalar multiplication.
NV_CUDA_CALLABLE NV_INLINE NvMat44 | operator* (const NvMat44 &other) const
Matrix multiplication.
NV_CUDA_CALLABLE NV_INLINE
NvMat44 & 		operator+= (const NvMat44 &other)
Equals-add.
NV_CUDA_CALLABLE NV_INLINE
NvMat44 & 		operator-= (const NvMat44 &other)
Equals-sub.
NV_CUDA_CALLABLE NV_INLINE
NvMat44 & 		operator*= (NvReal scalar)
Equals scalar multiplication.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		operator() (unsigned int row, unsigned int col) const
Element access, mathematical way!
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal & 		operator() (unsigned int row, unsigned int col)
Element access, mathematical way!
NV_CUDA_CALLABLE NV_INLINE NvVec4 | transform (const NvVec4 &other) const
Transform vector by matrix, equal to v' = M*v.
NV_CUDA_CALLABLE NV_INLINE NvVec3 | transform (const NvVec3 &other) const
Transform vector by matrix, equal to v' = M*v.
NV_CUDA_CALLABLE NV_INLINE
const NvVec4 		rotate (const NvVec4 &other) const
Rotate vector by matrix, equal to v' = M*v.
NV_CUDA_CALLABLE NV_INLINE
const NvVec3 		rotate (const NvVec3 &other) const
Rotate vector by matrix, equal to v' = M*v.
NV_CUDA_CALLABLE NV_INLINE NvVec3 | getBasis (int num) const
NV_CUDA_CALLABLE NV_INLINE NvVec3 | getPosition () const
NV_CUDA_CALLABLE NV_INLINE void | setPosition (const NvVec3 &position)
NV_CUDA_CALLABLE
NV_FORCE_INLINE const NvReal * 		front () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec4 & 		operator[] (int num)
NV_CUDA_CALLABLE
NV_FORCE_INLINE const NvVec4 & 		operator[] (int num) const
NV_CUDA_CALLABLE NV_INLINE void | scale (const NvVec4 &p)
NV_CUDA_CALLABLE NV_INLINE NvMat44 | inverseRT (void) const
NV_CUDA_CALLABLE NV_INLINE bool | isFinite () const

Static Public Member Functions

NV_DEPRECATED NV_CUDA_CALLABLE
static NV_INLINE NvMat44 		createIdentity ()
NV_DEPRECATED NV_CUDA_CALLABLE
static NV_INLINE NvMat44 		createZero ()

Public Attributes

NvVec4 | column0
NvVec4 | column1
NvVec4 | column2
NvVec4 | column3

Friends

NvMat44 | operator* (NvReal, const NvMat44 &)

Detailed Description

4x4 matrix class

This class is layout-compatible with D3D and OpenGL matrices. More notes on layout are given in the NvMat33

See also:
NvMat33 NvTransform

Member Function Documentation

NV_DEPRECATED NV_CUDA_CALLABLE static NV_INLINE NvMat44 nvidia::NvMat44::createIdentity ( ) [inline, static]

Deprecated:
Set to identity matrix. Deprecated. use NvMat44(NvIdentity).

NV_DEPRECATED NV_CUDA_CALLABLE static NV_INLINE NvMat44 nvidia::NvMat44::createZero ( ) [inline, static]

Deprecated:
Set to zero matrix. Deprecated. use NvMat44(NvZero).

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h
Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: nvidia::NvOutputStream Class Reference

nvidia::NvOutputStream

nvidia::NvOutputStream Class Reference

Output stream class for I/O. More...

#include <NvFoundationInterface.h>

List of all members.

Public Member Functions

virtual uint32_t write (const void *src, uint32_t count)=0
write to the stream. The number of bytes written may be less than the number sent.

Detailed Description

Output stream class for I/O.

The user needs to supply a NvOutputStream implementation to a number of methods to allow the SDK to write data.

Member Function Documentation

virtual uint32_t nvidia::NvOutputStream::write | ( | const void * | src,
 |  | uint32_t | count |
 | ) |  |  | [pure virtual]

write to the stream. The number of bytes written may be less than the number sent.

Parameters:
[in] | src | the destination address from which the data will be written
[in] | count | the number of bytes to be written
Returns:
the number of bytes written to the stream by this call.

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationInterface.h


NVIDIA(R) NvFoundation Reference: nvidia::NvPlane Class Reference

nvidia::NvPlane

nvidia::NvPlane Class Reference

Representation of a plane. More...

#include <NvFoundationMath.h>

List of all members.

Public Member Functions

NV_CUDA_CALLABLE NV_FORCE_INLINE | NvPlane ()
Constructor.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvPlane (NvReal nx, NvReal ny, NvReal nz, NvReal distance)
Constructor from a normal and a distance.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvPlane (const NvVec3 &normal, NvReal distance)
Constructor from a normal and a distance.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvPlane (const NvVec3 &point, const NvVec3 &normal)
Constructor from a point on the plane and a normal.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvPlane (const NvVec3 &p0, const NvVec3 &p1, const NvVec3 &p2)
Constructor from three points.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		distance (const NvVec3 &p) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		contains (const NvVec3 &p) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		project (const NvVec3 &p) const
projects p into the plane
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		pointInPlane () const
find an arbitrary point in the plane
NV_CUDA_CALLABLE
NV_FORCE_INLINE void 		normalize ()
equivalent plane with unit normal

Public Attributes

NvVec3 n
The normal to the plane.
NvReal | d
The distance from the origin.

Detailed Description

Representation of a plane.

Plane equation used: n.dot(v) + d = 0

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h
Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: nvidia::NvQuat Class Reference

nvidia::NvQuat

nvidia::NvQuat Class Reference

This is a quaternion class. For more information on quaternion mathematics consult a mathematics source on complex numbers. More...

#include <NvFoundationMath.h>

List of all members.

Public Member Functions

NV_CUDA_CALLABLE NV_FORCE_INLINE | NvQuat ()
Default constructor, does not do any initialization.
NV_CUDA_CALLABLE NV_INLINE | NvQuat (NvIDENTITY r)
identity constructor
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvQuat (NvReal r)
Constructor from a scalar: sets the real part w to the scalar value, and the imaginary parts (x,y,z) to zero.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvQuat (NvReal nx, NvReal ny, NvReal nz, NvReal nw)
Constructor. Take note of the order of the elements!
NV_CUDA_CALLABLE NV_INLINE | NvQuat (NvReal angleRadians, const NvVec3 &unitAxis)
Creates from angle-axis representation.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvQuat (const NvQuat &v)
Copy ctor.
NV_CUDA_CALLABLE NV_INLINE | NvQuat (const NvMat33 &m)
Creates from orientation matrix.
NV_CUDA_CALLABLE bool | isFinite () const
returns true if all elements are finite (not NAN or INF, etc.)
NV_CUDA_CALLABLE bool | isUnit () const
returns true if finite and magnitude is close to unit
NV_CUDA_CALLABLE bool | isSane () const
returns true if finite and magnitude is reasonably close to unit to allow for some accumulation of error vs isValid
NV_CUDA_CALLABLE NV_INLINE void | toRadiansAndUnitAxis (NvReal &angle, NvVec3 &axis) const
converts this quaternion to angle-axis representation
NV_CUDA_CALLABLE NV_INLINE NvReal | getAngle () const
Gets the angle between this quat and the identity quaternion.
NV_CUDA_CALLABLE NV_INLINE NvReal | getAngle (const NvQuat &q) const
Gets the angle between this quat and the argument.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		magnitudeSquared () const
This is the squared 4D vector length, should be 1 for unit quaternions.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		dot (const NvQuat &v) const
returns the scalar product of this and other.
NV_CUDA_CALLABLE NV_INLINE NvQuat | getNormalized () const
NV_CUDA_CALLABLE NV_INLINE float | magnitude () const
NV_CUDA_CALLABLE NV_INLINE NvReal | normalize ()
maps to the closest unit quaternion.
NV_CUDA_CALLABLE NV_INLINE NvQuat | getConjugate () const
NV_CUDA_CALLABLE NV_INLINE NvVec3 | getImaginaryPart () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		getBasisVector0 () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		getBasisVector1 () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		getBasisVector2 () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE const NvVec3 		rotate (const NvVec3 &v) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE const NvVec3 		rotateInv (const NvVec3 &v) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvQuat & 		operator= (const NvQuat &p)
Assignment operator.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvQuat & 		operator*= (const NvQuat &q)
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvQuat & 		operator+= (const NvQuat &q)
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvQuat & 		operator-= (const NvQuat &q)
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvQuat & 		operator*= (const NvReal s)
NV_CUDA_CALLABLE NV_INLINE NvQuat | operator* (const NvQuat &q) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvQuat 		operator+ (const NvQuat &q) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvQuat 		operator- () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvQuat 		operator- (const NvQuat &q) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvQuat 		operator* (NvReal r) const

Static Public Member Functions

static NV_DEPRECATED
NV_CUDA_CALLABLE NV_INLINE
NvQuat 		createIdentity ()

Public Attributes

NvReal | x
NvReal | y
NvReal | z
NvReal | w

Detailed Description

This is a quaternion class. For more information on quaternion mathematics consult a mathematics source on complex numbers.

Constructor & Destructor Documentation

NV_CUDA_CALLABLE NV_INLINE nvidia::NvQuat::NvQuat | ( | NvReal | angleRadians,
 |  | const NvVec3 & | unitAxis |
 | ) |  |  | [inline]

Creates from angle-axis representation.

Axis must be normalized!

Angle is in radians!

Unit: Radians

NV_CUDA_CALLABLE NV_INLINE nvidia::NvQuat::NvQuat ( const NvMat33 & m ) [explicit]

Creates from orientation matrix.

Parameters:
[in] m Rotation matrix to extract quaternion from.

Member Function Documentation

static NV_DEPRECATED NV_CUDA_CALLABLE NV_INLINE NvQuat nvidia::NvQuat::createIdentity ( ) [inline, static]

Deprecated:
use NvQuat(NvIdentity)

NV_CUDA_CALLABLE NV_INLINE NvReal nvidia::NvQuat::getAngle ( const NvQuat & q ) const [inline]

Gets the angle between this quat and the argument.

Unit: Radians

NV_CUDA_CALLABLE NV_INLINE NvReal nvidia::NvQuat::getAngle ( ) const [inline]

Gets the angle between this quat and the identity quaternion.

Unit: Radians

NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 nvidia::NvQuat::getBasisVector0 ( ) const [inline]

brief computes rotation of x-axis

NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 nvidia::NvQuat::getBasisVector1 ( ) const [inline]

brief computes rotation of y-axis

NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 nvidia::NvQuat::getBasisVector2 ( ) const [inline]

brief computes rotation of z-axis

NV_CUDA_CALLABLE NV_INLINE NvQuat nvidia::NvQuat::operator* ( const NvQuat & q ) const [inline]

quaternion multiplication

NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat nvidia::NvQuat::operator+ ( const NvQuat & q ) const [inline]

quaternion addition

NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat nvidia::NvQuat::operator- ( ) const [inline]

quaternion subtraction

NV_CUDA_CALLABLE NV_FORCE_INLINE const NvVec3 nvidia::NvQuat::rotate ( const NvVec3 & v ) const [inline]

rotates passed vec by this (assumed unitary)

NV_CUDA_CALLABLE NV_FORCE_INLINE const NvVec3 nvidia::NvQuat::rotateInv ( const NvVec3 & v ) const [inline]

inverse rotates passed vec by this (assumed unitary)

Member Data Documentation

NvReal nvidia::NvQuat::x

the quaternion elements

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h
Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: nvidia::NvTransform Class Reference

nvidia::NvTransform

nvidia::NvTransform Class Reference

class representing a rigid euclidean transform as a quaternion and a vector More...

#include <NvFoundationMath.h>

List of all members.

Public Member Functions

NV_CUDA_CALLABLE NV_FORCE_INLINE | NvTransform (const NvVec3 &position)
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvTransform (NvIDENTITY r)
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvTransform (const NvQuat &orientation)
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvTransform (NvReal x, NvReal y, NvReal z, NvQuat aQ=NvQuat(NvIdentity))
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvTransform (const NvVec3 &p0, const NvQuat &q0)
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvTransform (const NvMat44 &m)
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvTransform 		operator* (const NvTransform &x) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvTransform 		getInverse () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		transform (const NvVec3 &input) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		transformInv (const NvVec3 &input) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		rotate (const NvVec3 &input) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		rotateInv (const NvVec3 &input) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvTransform 		transform (const NvTransform &src) const
Transform transform to parent (returns compound transform: first src, then *this).
NV_CUDA_CALLABLE bool | isValid () const
returns true if finite and q is a unit quaternion
NV_CUDA_CALLABLE bool | isSane () const
returns true if finite and quat magnitude is reasonably close to unit to allow for some accumulation of error vs isValid
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		isFinite () const
returns true if all elems are finite (not NAN or INF, etc.)
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvTransform 		transformInv (const NvTransform &src) const
Transform transform from parent (returns compound transform: first src, then this->inverse).
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvPlane 		transform (const NvPlane &plane) const
transform plane
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvPlane 		inverseTransform (const NvPlane &plane) const
inverse-transform plane
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvTransform 		getNormalized () const
return a normalized transform (i.e. one in which the quaternion has unit magnitude)

Static Public Member Functions

static NV_DEPRECATED
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvTransform 		createIdentity ()
deprecated - use NvTransform(NvIdentity)

Public Attributes

NvQuat | q
NvVec3 | p

Detailed Description

class representing a rigid euclidean transform as a quaternion and a vector

Member Function Documentation

static NV_DEPRECATED NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform nvidia::NvTransform::createIdentity ( ) [inline, static]

deprecated - use NvTransform(NvIdentity)

Deprecated:

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h
Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: nvidia::NvVec2 Class Reference

nvidia::NvVec2

nvidia::NvVec2 Class Reference

2 Element vector class. More...

#include <NvFoundationMath.h>

List of all members.

Public Member Functions

NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec2 ()
default constructor leaves data uninitialized.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec2 (NvZERO r)
zero constructor.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec2 (NvReal a)
Assigns scalar parameter to all elements.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec2 (NvReal nx, NvReal ny)
Initializes from 2 scalar parameters.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec2 (const NvVec2 &v)
Copy ctor.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 & 		operator= (const NvVec2 &p)
Assignment operator.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal & 		operator[] (int index)
element access
NV_CUDA_CALLABLE
NV_FORCE_INLINE const NvReal & 		operator[] (int index) const
element access
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		operator== (const NvVec2 &v) const
returns true if the two vectors are exactly equal.
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		operator!= (const NvVec2 &v) const
returns true if the two vectors are not exactly equal.
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		isZero () const
tests for exact zero vector
NV_CUDA_CALLABLE NV_INLINE bool | isFinite () const
returns true if all 2 elems of the vector are finite (not NAN or INF, etc.)
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		isNormalized () const
is normalized - used by API parameter validation
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		magnitudeSquared () const
returns the squared magnitude
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		magnitude () const
returns the magnitude
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 		operator- () const
negation
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 		operator+ (const NvVec2 &v) const
vector addition
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 		operator- (const NvVec2 &v) const
vector difference
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 		operator* (NvReal f) const
scalar post-multiplication
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 		operator/ (NvReal f) const
scalar division
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 & 		operator+= (const NvVec2 &v)
vector addition
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 & 		operator-= (const NvVec2 &v)
vector difference
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 & 		operator*= (NvReal f)
scalar multiplication
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 & 		operator/= (NvReal f)
scalar division
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		dot (const NvVec2 &v) const
returns the scalar product of this and other.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 		getNormalized () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		normalize ()
normalizes the vector in place
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 		multiply (const NvVec2 &a) const
a[i] * b[i], for all i.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 		minimum (const NvVec2 &v) const
element-wise minimum
NV_CUDA_CALLABLE
NV_FORCE_INLINE float 		minElement () const
returns MIN(x, y);
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec2 		maximum (const NvVec2 &v) const
element-wise maximum
NV_CUDA_CALLABLE
NV_FORCE_INLINE float 		maxElement () const
returns MAX(x, y);

Public Attributes

NvReal | x
NvReal | y

Detailed Description

2 Element vector class.

This is a 2-dimensional vector class with public data members.

Constructor & Destructor Documentation

NV_CUDA_CALLABLE NV_FORCE_INLINE nvidia::NvVec2::NvVec2 ( NvReal a ) [inline, explicit]

Assigns scalar parameter to all elements.

Useful to initialize to zero or one.

Parameters:
[in] a Value to assign to elements.

NV_CUDA_CALLABLE NV_FORCE_INLINE nvidia::NvVec2::NvVec2 | ( | NvReal | nx,
 |  | NvReal | ny |
 | ) |  |  | [inline]

Initializes from 2 scalar parameters.

Parameters:
[in] | nx | Value to initialize X component.
[in] | ny | Value to initialize Y component.

Member Function Documentation

NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2 nvidia::NvVec2::getNormalized ( ) const [inline]

return a unit vector

NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal nvidia::NvVec2::magnitudeSquared ( ) const [inline]

returns the squared magnitude

Avoids calling NvSqrt()!

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h


NVIDIA(R) NvFoundation Reference: nvidia::NvVec3 Class Reference

nvidia::NvVec3

nvidia::NvVec3 Class Reference

3 Element vector class. More...

#include <NvFoundationMath.h>

List of all members.

Public Member Functions

NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec3 ()
default constructor leaves data uninitialized.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec3 (NvZERO r)
zero constructor.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec3 (NvReal a)
Assigns scalar parameter to all elements.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec3 (NvReal nx, NvReal ny, NvReal nz)
Initializes from 3 scalar parameters.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec3 (const NvVec3 &v)
Copy ctor.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 & 		operator= (const NvVec3 &p)
Assignment operator.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal & 		operator[] (int index)
element access
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal & 		operator[] (unsigned int index)
NV_CUDA_CALLABLE
NV_FORCE_INLINE const NvReal & 		operator[] (int index) const
element access
NV_CUDA_CALLABLE
NV_FORCE_INLINE const NvReal & 		operator[] (unsigned int index) const
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		operator== (const NvVec3 &v) const
returns true if the two vectors are exactly equal.
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		operator!= (const NvVec3 &v) const
returns true if the two vectors are not exactly equal.
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		isZero () const
tests for exact zero vector
NV_CUDA_CALLABLE NV_INLINE bool | isFinite () const
returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)
NV_CUDA_CALLABLE
NV_FORCE_INLINE bool 		isNormalized () const
is normalized - used by API parameter validation
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		magnitudeSquared () const
returns the squared magnitude
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		magnitude () const
returns the magnitude
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		operator- () const
negation
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		operator+ (const NvVec3 &v) const
vector addition
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		operator- (const NvVec3 &v) const
vector difference
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		operator* (NvReal f) const
scalar post-multiplication
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		operator/ (NvReal f) const
scalar division
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 & 		operator+= (const NvVec3 &v)
vector addition
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 & 		operator-= (const NvVec3 &v)
vector difference
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 & 		operator*= (NvReal f)
scalar multiplication
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 & 		operator/= (NvReal f)
scalar division
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		dot (const NvVec3 &v) const
returns the scalar product of this and other.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		cross (const NvVec3 &v) const
cross product
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		getNormalized () const
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		normalize ()
normalizes the vector in place
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		normalizeSafe ()
normalizes the vector in place. Does nothing if vector magnitude is under NV_NORMALIZATION_EPSILON. Returns vector magnitude if >= NV_NORMALIZATION_EPSILON and 0.0f otherwise.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvReal 		normalizeFast ()
normalizes the vector in place. Asserts if vector magnitude is under NV_NORMALIZATION_EPSILON. returns vector magnitude.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		multiply (const NvVec3 &a) const
a[i] * b[i], for all i.
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		minimum (const NvVec3 &v) const
element-wise minimum
NV_CUDA_CALLABLE
NV_FORCE_INLINE float 		minElement () const
returns MIN(x, y, z);
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		maximum (const NvVec3 &v) const
element-wise maximum
NV_CUDA_CALLABLE
NV_FORCE_INLINE float 		maxElement () const
returns MAX(x, y, z);
NV_CUDA_CALLABLE
NV_FORCE_INLINE NvVec3 		abs () const
returns absolute values of components;

Public Attributes

NvReal | x
NvReal | y
NvReal | z

Detailed Description

3 Element vector class.

This is a 3-dimensional vector class with public data members.

Constructor & Destructor Documentation

NV_CUDA_CALLABLE NV_FORCE_INLINE nvidia::NvVec3::NvVec3 ( NvReal a ) [inline, explicit]

Assigns scalar parameter to all elements.

Useful to initialize to zero or one.

Parameters:
[in] a Value to assign to elements.

NV_CUDA_CALLABLE NV_FORCE_INLINE nvidia::NvVec3::NvVec3 | ( | NvReal | nx,
 |  | NvReal | ny,
 |  | NvReal | nz |
 | ) |  |  | [inline]

Initializes from 3 scalar parameters.

Parameters:
[in] | nx | Value to initialize X component.
[in] | ny | Value to initialize Y component.
[in] | nz | Value to initialize Z component.

Member Function Documentation

NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 nvidia::NvVec3::getNormalized ( ) const [inline]

return a unit vector

NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal nvidia::NvVec3::magnitudeSquared ( ) const [inline]

returns the squared magnitude

Avoids calling NvSqrt()!

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h


NVIDIA(R) NvFoundation Reference: nvidia::NvVec4 Class Reference

nvidia::NvVec4

nvidia::NvVec4 Class Reference

4 Element vector class. More...

#include <NvFoundationMath.h>

List of all members.

Public Member Functions

NV_CUDA_CALLABLE NV_INLINE | NvVec4 ()
default constructor leaves data uninitialized.
NV_CUDA_CALLABLE NV_FORCE_INLINE | NvVec4 (NvZERO r)
zero constructor.
NV_CUDA_CALLABLE NV_INLINE | NvVec4 (NvReal a)
Assigns scalar parameter to all elements.
NV_CUDA_CALLABLE NV_INLINE | NvVec4 (NvReal nx, NvReal ny, NvReal nz, NvReal nw)
Initializes from 3 scalar parameters.
NV_CUDA_CALLABLE NV_INLINE | NvVec4 (const NvVec3 &v, NvReal nw)
Initializes from 3 scalar parameters.
NV_CUDA_CALLABLE NV_INLINE | NvVec4 (const NvReal v[])
Initializes from an array of scalar parameters.
NV_CUDA_CALLABLE NV_INLINE | NvVec4 (const NvVec4 &v)
Copy ctor.
NV_CUDA_CALLABLE NV_INLINE NvVec4 & | operator= (const NvVec4 &p)
Assignment operator.
NV_CUDA_CALLABLE NV_INLINE NvReal & | operator[] (int index)
element access
NV_CUDA_CALLABLE NV_INLINE NvReal & | operator[] (unsigned int index)
NV_CUDA_CALLABLE NV_INLINE
const NvReal & 		operator[] (int index) const
element access
NV_CUDA_CALLABLE NV_INLINE
const NvReal & 		operator[] (unsigned int index) const
NV_CUDA_CALLABLE NV_INLINE bool | operator== (const NvVec4 &v) const
returns true if the two vectors are exactly equal.
NV_CUDA_CALLABLE NV_INLINE bool | operator!= (const NvVec4 &v) const
returns true if the two vectors are not exactly equal.
NV_CUDA_CALLABLE NV_INLINE bool | isZero () const
tests for exact zero vector
NV_CUDA_CALLABLE NV_INLINE bool | isFinite () const
returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)
NV_CUDA_CALLABLE NV_INLINE bool | isNormalized () const
is normalized - used by API parameter validation
NV_CUDA_CALLABLE NV_INLINE NvReal | magnitudeSquared () const
returns the squared magnitude
NV_CUDA_CALLABLE NV_INLINE NvReal | magnitude () const
returns the magnitude
NV_CUDA_CALLABLE NV_INLINE NvVec4 | operator- () const
negation
NV_CUDA_CALLABLE NV_INLINE NvVec4 | operator+ (const NvVec4 &v) const
vector addition
NV_CUDA_CALLABLE NV_INLINE NvVec4 | operator- (const NvVec4 &v) const
vector difference
NV_CUDA_CALLABLE NV_INLINE NvVec4 | operator* (NvReal f) const
scalar post-multiplication
NV_CUDA_CALLABLE NV_INLINE NvVec4 | operator/ (NvReal f) const
scalar division
NV_CUDA_CALLABLE NV_INLINE NvVec4 & | operator+= (const NvVec4 &v)
vector addition
NV_CUDA_CALLABLE NV_INLINE NvVec4 & | operator-= (const NvVec4 &v)
vector difference
NV_CUDA_CALLABLE NV_INLINE NvVec4 & | operator*= (NvReal f)
scalar multiplication
NV_CUDA_CALLABLE NV_INLINE NvVec4 & | operator/= (NvReal f)
scalar division
NV_CUDA_CALLABLE NV_INLINE NvReal | dot (const NvVec4 &v) const
returns the scalar product of this and other.
NV_CUDA_CALLABLE NV_INLINE NvVec4 | getNormalized () const
NV_CUDA_CALLABLE NV_INLINE NvReal | normalize ()
normalizes the vector in place
NV_CUDA_CALLABLE NV_INLINE NvVec4 | multiply (const NvVec4 &a) const
a[i] * b[i], for all i.
NV_CUDA_CALLABLE NV_INLINE NvVec4 | minimum (const NvVec4 &v) const
element-wise minimum
NV_CUDA_CALLABLE NV_INLINE NvVec4 | maximum (const NvVec4 &v) const
element-wise maximum
NV_CUDA_CALLABLE NV_INLINE NvVec3 | getXYZ () const
NV_CUDA_CALLABLE NV_INLINE void | setZero ()
set vector elements to zero

Public Attributes

NvReal | x
NvReal | y
NvReal | z
NvReal | w

Detailed Description

4 Element vector class.

This is a 4-dimensional vector class with public data members.

Constructor & Destructor Documentation

NV_CUDA_CALLABLE NV_INLINE nvidia::NvVec4::NvVec4 ( NvReal a ) [inline, explicit]

Assigns scalar parameter to all elements.

Useful to initialize to zero or one.

Parameters:
[in] a Value to assign to elements.

NV_CUDA_CALLABLE NV_INLINE nvidia::NvVec4::NvVec4 | ( | NvReal | nx,
 |  | NvReal | ny,
 |  | NvReal | nz,
 |  | NvReal | nw |
 | ) |  |  | [inline]

Initializes from 3 scalar parameters.

Parameters:
[in] | nx | Value to initialize X component.
[in] | ny | Value to initialize Y component.
[in] | nz | Value to initialize Z component.
[in] | nw | Value to initialize W component.

NV_CUDA_CALLABLE NV_INLINE nvidia::NvVec4::NvVec4 | ( | const NvVec3 & | v,
 |  | NvReal | nw |
 | ) |  |  | [inline]

Initializes from 3 scalar parameters.

Parameters:
[in] | v | Value to initialize the X, Y, and Z components.
[in] | nw | Value to initialize W component.

NV_CUDA_CALLABLE NV_INLINE nvidia::NvVec4::NvVec4 ( const NvReal v[] ) [inline, explicit]

Initializes from an array of scalar parameters.

Parameters:
[in] v Value to initialize with.

Member Function Documentation

NV_CUDA_CALLABLE NV_INLINE NvVec4 nvidia::NvVec4::getNormalized ( ) const [inline]

return a unit vector

NV_CUDA_CALLABLE NV_INLINE NvReal nvidia::NvVec4::magnitudeSquared ( ) const [inline]

returns the squared magnitude

Avoids calling NvSqrt()!

The documentation for this class was generated from the following file:
  • D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h


NVIDIA(R) NvFoundation Reference: Hierarchical Index

Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
  • nvidia::NvAllocatorCallback
  • nvidia::NvBounds3
  • nvidia::NvErrorCallback
  • nvidia::NvErrorCode
  • nvidia::NvFlags< enumtype, storagetype >
  • nvidia::NvInputStream
    • nvidia::NvInputData
  • nvidia::NvMat33
  • nvidia::NvMat44
  • nvidia::NvOutputStream
  • nvidia::NvPlane
  • nvidia::NvQuat
  • nvidia::NvTransform
  • nvidia::NvVec2
  • nvidia::NvVec3
  • nvidia::NvVec4


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- a -

  • abs() : nvidia::NvVec3
  • allocate() : nvidia::NvAllocatorCallback


NVIDIA(R) NvFoundation Reference: File Index

  • File List

File List

Here is a list of all documented files with brief descriptions:
D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundation.h [code]
D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationFlags.h [code]
D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationInterface.h [code]
D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h [code]
Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundation.h Source File

  • File List

D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundation.h

00001 // This code contains NVIDIA Confidential Information and is disclosed to you
00002 // under a form of NVIDIA software license agreement provided separately to you.
00003 //
00004 // Notice
00005 // NVIDIA Corporation and its licensors retain all intellectual property and
00006 // proprietary rights in and to this software and related documentation and
00007 // any modifications thereto. Any use, reproduction, disclosure, or
00008 // distribution of this software and related documentation without an express
00009 // license agreement from NVIDIA Corporation is strictly prohibited.
00010 //
00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
00015 //
00016 // Information and code furnished is believed to be accurate and reliable.
00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
00018 // information or for any infringement of patents or other rights of third parties that may
00019 // result from its use. No license is granted by implication or otherwise under any patent
00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
00021 // This code supersedes and replaces all information previously supplied.
00022 // NVIDIA Corporation products are not authorized for use as critical
00023 // components in life support devices or systems without express written approval of
00024 // NVIDIA Corporation.
00025 //
00026 // Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
00027 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
00028 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
00029
00030
00031 #ifndef NV_FOUNDATION_H
00032 #define NV_FOUNDATION_H
00033
00034 #include <stddef.h>
00035 #include <string.h>
00036 #include <stdlib.h>
00037 #include <stdint.h>
00038
00039 #ifdef NV_VC
00040 #pragma warning(push)
00041 #pragma warning( disable : 4985 ) // 'symbol name': attributes not present on previous declaration
00042 #endif
00043 #include <math.h>
00044 #ifdef NV_VC
00045 #pragma warning(pop)
00046 #endif
00047
00048 #include <float.h>
00049 #include <assert.h>
00050
00051 #define NV_ASSERT(exp) (assert(exp))
00052 #define NV_ALWAYS_ASSERT() NV_ASSERT(0)
00053
00054 //***************************************
00055 // FILE: NvVersionNumber.h
00056 //***************************************
00057
00058 /*
00059 VersionNumbers:  The combination of these
00060 numbers uniquely identifies the API, and should
00061 be incremented when the SDK API changes.  This may
00062 include changes to file formats.
00063
00064 This header is included in the main SDK header files
00065 so that the entire SDK and everything that builds on it
00066 is completely rebuilt when this file changes.  Thus,
00067 this file is not to include a frequently changing
00068 build number.  See BuildNumber.h for that.
00069
00070 Each of these three values should stay below 255 because
00071 sometimes they are stored in a byte.
00072 */
00073
00078 #define NV_FOUNDATION_VERSION_MAJOR 1
00079 #define NV_FOUNDATION_VERSION_MINOR 1
00080 #define NV_FOUNDATION_VERSION_BUGFIX 0
00081
00086 #define NV_FOUNDATION_VERSION ((NV_FOUNDATION_VERSION_MAJOR<<24) + (NV_FOUNDATION_VERSION_MINOR<<16) + (NV_FOUNDATION_VERSION_BUGFIX<<8) + 0)
00087
00088 //***************************************
00089 // FILE: NvPreprocessor.h
00090 //***************************************
00091
00103 #ifdef _MSC_VER
00104 #       define NV_VC
00105 #   if _MSC_VER >= 1700
00106 #       define NV_VC11
00107 #   elif _MSC_VER >= 1600
00108 #       define NV_VC10
00109 #   elif _MSC_VER >= 1500
00110 #       define NV_VC9
00111 #       elif _MSC_VER >= 1400
00112 #               define NV_VC8
00113 #       elif _MSC_VER >= 1300
00114 #               define NV_VC7
00115 #       else
00116 #               define NV_VC6
00117 #       endif
00118 #elif defined(__ghs__)
00119 #   define NV_GHS
00120 #elif __GNUC__ || __SNC__
00121 #       define NV_GNUC
00122 #else
00123 #       error "Unknown compiler"
00124 #endif
00125
00129 #ifdef NV_VC
00130 #       ifdef XBOXONE
00131 #               define NV_XBOXONE
00132 #               define NV_X64
00133 #       elif defined(_M_IX86)
00134 #               define NV_X86
00135 #               define NV_WINDOWS
00136 #   elif defined(_M_X64)
00137 #       define NV_X64
00138 #       define NV_WINDOWS
00139 #       elif defined(_M_PPC)
00140 #               define NV_PPC
00141 #               define NV_X360
00142 #               define NV_VMX
00143 #   elif defined(_M_ARM)
00144 #               define NV_ARM
00145 #       define NV_ARM_NEON
00146 #       else
00147 #               error "Unknown platform"
00148 #       endif
00149 #   if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_PARTITION_APP
00150 #               define NV_WINMODERN
00151 #       endif
00152 #elif defined NV_GNUC
00153 #   ifdef __CELLOS_LV2__
00154 #       define NV_PS3
00155 #               define NV_VMX
00156 #   elif defined(__arm__)
00157 #               define NV_ARM
00158 #               if defined(__SNC__)
00159 #                       define NV_PSP2
00160 #               endif
00161 #               if defined(__ARM_NEON__)
00162 #                       define NV_ARM_NEON
00163 #               endif
00164 #   elif defined(__i386__)
00165 #       define NV_X86
00166 #               define NV_VMX
00167 #   elif defined(__x86_64__)
00168 #       ifdef __PS4__
00169 #         define NV_PS4
00170 #                 define NV_X64
00171 #       else
00172 #       define NV_X64
00173 #       endif
00174 #   elif defined(__ppc__)
00175 #       define NV_PPC
00176 #   elif defined(__ppc64__)
00177 #       define NV_PPC
00178 #       define NV_PPC64
00179 #   else
00180 #       error "Unknown platform"
00181 #   endif
00182 #       if defined(ANDROID)
00183 #       define NV_ANDROID
00184 #       define NV_UNIX
00185 #       elif defined(__linux__)
00186 #       define NV_LINUX
00187 #       define NV_UNIX
00188 #       elif defined(__APPLE__)
00189 #       define NV_APPLE
00190 #       define NV_UNIX
00191 #               if defined(__arm__)
00192 #                       define NV_APPLE_IOS
00193 #               else
00194 #                       define NV_OSX
00195 #               endif
00196 #       elif defined(__CYGWIN__)
00197 #       define NV_CYGWIN
00198 #       define NV_LINUX
00199 #       define NV_UNIX
00200 #       endif
00201 #elif defined NV_GHS
00202 #       define NV_WIIU
00203 #endif
00204
00205 #ifdef NV_VC
00206 #pragma warning( disable : 4514 ) // 'function' : unreferenced inline function has been removed
00207 #pragma warning( disable : 4710 ) // 'function' : function not inlined
00208 #pragma warning( disable : 4711 ) // function 'function' selected for inline expansion
00209 #ifdef NV_ARM_NEON
00210 #pragma warning( disable : 4746 ) // volatile access of '<expression>' is subject to /volatile:[iso|ms] setting
00211 #endif
00212 #endif //NV_VC
00213
00214
00218 #if !defined(NV_C_EXPORT)
00219 #       if defined(NV_WINDOWS) || defined(NV_WINMODERN)
00220 #               define NV_C_EXPORT extern "C"
00221 #       else
00222 #               define NV_C_EXPORT
00223 #       endif
00224 #endif
00225
00229 #ifndef NV_CALL_CONV
00230 #       if defined NV_WINDOWS
00231 #               define NV_CALL_CONV __cdecl
00232 #       else
00233 #               define NV_CALL_CONV
00234 #       endif
00235 #endif
00236
00240 #if defined(NV_VC)
00241 #       define NV_PUSH_PACK_DEFAULT     __pragma( pack(push, 8) )
00242 #       define NV_POP_PACK                      __pragma( pack(pop) )
00243 #elif (defined(NV_GNUC) && !defined(__SPU__)) || defined(NV_GHS)
00244 #       define NV_PUSH_PACK_DEFAULT     _Pragma("pack(push, 8)")
00245 #       define NV_POP_PACK                      _Pragma("pack(pop)")
00246 #else
00247 #       define NV_PUSH_PACK_DEFAULT
00248 #       define NV_POP_PACK
00249 #endif
00250
00254 #if defined(NV_WINDOWS) || defined(NV_X360) || defined(NV_WINMODERN) || defined(NV_XBOXONE)
00255 #       define NV_INLINE inline
00256 #       pragma inline_depth( 255 )
00257 #else
00258 #       define NV_INLINE inline
00259 #endif
00260
00264 #if defined(NV_VC)
00265         #define NV_FORCE_INLINE __forceinline
00266 #elif defined(NV_LINUX) // Workaround; Fedora Core 3 do not agree with force inline and NvcPool
00267         #define NV_FORCE_INLINE inline
00268 #elif defined(NV_GNUC) || defined(NV_GHS)
00269         #define NV_FORCE_INLINE inline __attribute__((always_inline))
00270 #else
00271         #define NV_FORCE_INLINE inline
00272 #endif
00273
00277 #if defined NV_WINDOWS || defined NV_XBOXONE
00278 #       define NV_NOINLINE __declspec(noinline)
00279 #elif defined(NV_GNUC) || defined(NV_GHS)
00280 #       define NV_NOINLINE __attribute__ ((noinline))
00281 #else
00282 #       define NV_NOINLINE
00283 #endif
00284
00285
00287 #if defined(__CUDACC__)
00288 #       define NV_RESTRICT __restrict__
00289 #elif (defined(NV_GNUC) || defined(NV_VC) || defined(NV_GHS)) && !defined(NV_PS4) // ps4 doesn't like restricted functions
00290 #       define NV_RESTRICT __restrict
00291 #else
00292 #       define NV_RESTRICT
00293 #endif
00294
00295 #if defined(NV_WINDOWS) || defined(NV_X360) || defined(NV_WINMODERN) || defined(NV_XBOXONE)
00296 #define NV_NOALIAS __declspec(noalias)
00297 #else
00298 #define NV_NOALIAS
00299 #endif
00300
00301
00313 #ifndef NV_ALIGN
00314         #if defined(NV_VC)
00315                 #define NV_ALIGN(alignment, decl) __declspec(align(alignment)) decl
00316                 #define NV_ALIGN_PREFIX(alignment) __declspec(align(alignment))
00317                 #define NV_ALIGN_SUFFIX(alignment)
00318         #elif defined(NV_GNUC) || defined(NV_GHS) || defined(NV_APPLE_IOS)
00319                 #define NV_ALIGN(alignment, decl) decl __attribute__ ((aligned(alignment)))
00320                 #define NV_ALIGN_PREFIX(alignment)
00321                 #define NV_ALIGN_SUFFIX(alignment) __attribute__ ((aligned(alignment)))
00322         #else
00323                 #define NV_ALIGN(alignment, decl)
00324                 #define NV_ALIGN_PREFIX(alignment)
00325                 #define NV_ALIGN_SUFFIX(alignment)
00326         #endif
00327 #endif
00328
00334 #if 0 // set to 1 to create warnings for deprecated functions
00335 #       define NV_DEPRECATED __declspec(deprecated)
00336 #else
00337 #       define NV_DEPRECATED
00338 #endif
00339
00340 // VC6 no '__FUNCTION__' workaround
00341 #if defined NV_VC6 && !defined __FUNCTION__
00342 #       define __FUNCTION__     "Undefined"
00343 #endif
00344
00349 // static assert
00350 #define NV_COMPILE_TIME_ASSERT(exp)     typedef char NvCompileTimeAssert_Dummy[(exp) ? 1 : -1]
00351
00352 #if defined(NV_GNUC)
00353 #define NV_OFFSET_OF(X, Y) __builtin_offsetof(X, Y)
00354 #else
00355 #define NV_OFFSET_OF(X, Y) offsetof(X, Y)
00356 #endif
00357
00358 #define NV_SIZE_OF(Class, Member)                       sizeof(((Class*)0)->Member)
00359
00360 // check that exactly one of NDEBUG and _DEBUG is defined
00361 #if !(defined NDEBUG ^ defined _DEBUG)
00362 #define NDEBUG
00363 #endif
00364
00365 // make sure NV_CHECKED is defined in all _DEBUG configurations as well
00366 #if !defined(NV_CHECKED) && defined _DEBUG
00367 #define NV_CHECKED
00368 #endif
00369
00370 #ifdef __CUDACC__
00371 #define NV_CUDA_CALLABLE __host__ __device__
00372 #else
00373 #define NV_CUDA_CALLABLE
00374 #endif
00375
00376 // avoid unreferenced parameter warning (why not just disable it?)
00377 // PT: or why not just omit the parameter's name from the declaration????
00378 template <class T> NV_CUDA_CALLABLE NV_INLINE void NV_UNUSED(T const&) {}
00379
00380         // Ensure that the application hasn't tweaked the pack value to less than 8, which would break
00381         // matching between the API headers and the binaries
00382         // This assert works on win32/win64/360/ps3, but may need further specialization on other platforms.
00383         // Some GCC compilers need the compiler flag -malign-double to be set.
00384         // Apparently the apple-clang-llvm compiler doesn't support malign-double.
00385
00386 struct NvPackValidation { char _; long long a; };
00387
00388 #if !defined(NV_APPLE)
00389 NV_COMPILE_TIME_ASSERT(NV_OFFSET_OF(NvPackValidation, a) == 8);
00390 #endif
00391
00392 // use in a cpp file to suppress LNK4221
00393 #if defined(NV_VC)
00394 #define NV_DUMMY_SYMBOL namespace { char NvDummySymbol; }
00395 #else
00396 #define NV_DUMMY_SYMBOL
00397 #endif
00398
00399 #ifdef __SPU__
00400 #define NV_IS_SPU 1
00401 #else
00402 #define NV_IS_SPU 0
00403 #endif
00404
00405 #ifdef NV_X64
00406 #define NV_IS_X64 1
00407 #else
00408 #define NV_IS_X64 0
00409 #endif
00410
00411 #ifdef NV_WINDOWS
00412 #define NV_IS_WINDOWS 1
00413 #else
00414 #define NV_IS_WINDOWS 0
00415 #endif
00416
00417 #ifdef NV_X86
00418 #define NV_IS_X86 1
00419 #else
00420 #define NV_IS_X86 0
00421 #endif
00422
00423 #ifdef NV_X64
00424 #define NV_IS_X64 1
00425 #else
00426 #define NV_IS_X64 0
00427 #endif
00428
00429 #if defined(NV_X86) || defined(NV_X64)
00430 #define NV_IS_INTEL 1
00431 #else
00432 #define NV_IS_INTEL 0
00433 #endif
00434
00435 #ifdef NV_X360
00436 #define NV_IS_X360 1
00437 #else
00438 #define NV_IS_X360 0
00439 #endif
00440
00441 #ifdef NV_PS3
00442 #define NV_IS_PS3 1
00443 #else
00444 #define NV_IS_PS3 0
00445 #endif
00446
00447 #define NV_IS_PPU (NV_IS_PS3 && !NV_IS_SPU) // PS3 PPU
00448
00449 #ifdef NV_GNUC
00450 #define NV_WEAK_SYMBOL __attribute__((weak)) // this is to support SIMD constant merging in template specialization
00451 #else
00452 #define NV_WEAK_SYMBOL
00453 #endif
00454
00455 // Type ranges
00456 #define NV_MAX_I8                       127                                     //maximum possible sbyte value, 0x7f
00457 #define NV_MIN_I8                       (-128)                          //minimum possible sbyte value, 0x80
00458 #define NV_MAX_U8                       255U                            //maximum possible ubyte value, 0xff
00459 #define NV_MIN_U8                       0                                       //minimum possible ubyte value, 0x00
00460 #define NV_MAX_I16                      32767                           //maximum possible sword value, 0x7fff
00461 #define NV_MIN_I16                      (-32768)                        //minimum possible sword value, 0x8000
00462 #define NV_MAX_U16                      65535U                          //maximum possible uword value, 0xffff
00463 #define NV_MIN_U16                      0                                       //minimum possible uword value, 0x0000
00464 #define NV_MAX_I32                      2147483647                      //maximum possible sdword value, 0x7fffffff
00465 #define NV_MIN_I32                      (-2147483647 - 1)       //minimum possible sdword value, 0x80000000
00466 #define NV_MAX_U32                      4294967295U                     //maximum possible udword value, 0xffffffff
00467 #define NV_MIN_U32                      0                                       //minimum possible udword value, 0x00000000
00468 #define NV_MAX_F32                      3.4028234663852885981170418348452e+38F
00469                                                                                                 //maximum possible float value
00470 #define NV_MAX_F64                      DBL_MAX                         //maximum possible double value
00471
00472 #define NV_EPS_F32                      FLT_EPSILON                     //maximum relative error of float rounding
00473 #define NV_EPS_F64                      DBL_EPSILON                     //maximum relative error of double rounding
00474
00475 #ifndef NV_FOUNDATION_USE_F64
00476
00477         typedef float                                           NvReal;
00478
00479         #define NV_MAX_REAL                                     NV_MAX_F32
00480         #define NV_EPS_REAL                                     NV_EPS_F32
00481         #define NV_NORMALIZATION_EPSILON        NvReal(1e-20f)
00482
00483 #else
00484
00485         typedef double                                          NvReal;
00486
00487         #define NV_MAX_REAL                                     NV_MAX_F64
00488         #define NV_EPS_REAL                                     NV_EPS_F64
00489         #define NV_NORMALIZATION_EPSILON        NvReal(1e-180)
00490
00491 #endif
00492
00494 enum NvEMPTY                    {       NvEmpty         };
00495
00496
00500 #endif // NV_FOUNDATION_H


NVIDIA(R) NvFoundation Reference: D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationFlags.h Source File

  • File List

D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationFlags.h

00001 // This code contains NVIDIA Confidential Information and is disclosed to you
00002 // under a form of NVIDIA software license agreement provided separately to you.
00003 //
00004 // Notice
00005 // NVIDIA Corporation and its licensors retain all intellectual property and
00006 // proprietary rights in and to this software and related documentation and
00007 // any modifications thereto. Any use, reproduction, disclosure, or
00008 // distribution of this software and related documentation without an express
00009 // license agreement from NVIDIA Corporation is strictly prohibited.
00010 //
00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
00015 //
00016 // Information and code furnished is believed to be accurate and reliable.
00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
00018 // information or for any infringement of patents or other rights of third parties that may
00019 // result from its use. No license is granted by implication or otherwise under any patent
00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
00021 // This code supersedes and replaces all information previously supplied.
00022 // NVIDIA Corporation products are not authorized for use as critical
00023 // components in life support devices or systems without express written approval of
00024 // NVIDIA Corporation.
00025 //
00026 // Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
00027 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
00028 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
00029
00030
00031 #ifndef NV_FOUNDATION_FLAGS_H
00032 #define NV_FOUNDATION_FLAGS_H
00033
00034 #include "NvFoundation.h"
00035
00036 #ifndef NV_DOXYGEN
00037 namespace nvidia
00038 {
00039 #endif
00040
00041
00042 // *********************************
00043 // FILE: NvFlags.h
00044 // *********************************
00045
00075         template<typename enumtype, typename storagetype=uint32_t>
00076         class NvFlags
00077         {
00078         public:
00079                 typedef storagetype InternalType;
00080
00081                 NV_INLINE       explicit        NvFlags(const NvEMPTY&) {}
00082                 NV_INLINE                               NvFlags(void);
00083                 NV_INLINE                               NvFlags(enumtype e);
00084                 NV_INLINE                               NvFlags(const NvFlags<enumtype,storagetype> &f);
00085                 NV_INLINE       explicit        NvFlags(storagetype b);
00086
00087                 NV_INLINE bool                                                   isSet     (enumtype e) const;
00088                 NV_INLINE NvFlags<enumtype,storagetype> &set       (enumtype e);
00089                 NV_INLINE bool                           operator==(enumtype e) const;
00090                 NV_INLINE bool                           operator==(const NvFlags<enumtype,storagetype> &f) const;
00091                 NV_INLINE bool                           operator==(bool b) const;
00092                 NV_INLINE bool                           operator!=(enumtype e) const;
00093                 NV_INLINE bool                           operator!=(const NvFlags<enumtype,storagetype> &f) const;
00094
00095                 NV_INLINE NvFlags<enumtype,storagetype> &operator =(enumtype e);
00096
00097                 NV_INLINE NvFlags<enumtype,storagetype> &operator|=(enumtype e);
00098                 NV_INLINE NvFlags<enumtype,storagetype> &operator|=(const NvFlags<enumtype,storagetype> &f);
00099                 NV_INLINE NvFlags<enumtype,storagetype>  operator| (enumtype e) const;
00100                 NV_INLINE NvFlags<enumtype,storagetype>  operator| (const NvFlags<enumtype,storagetype> &f) const;
00101
00102                 NV_INLINE NvFlags<enumtype,storagetype> &operator&=(enumtype e);
00103                 NV_INLINE NvFlags<enumtype,storagetype> &operator&=(const NvFlags<enumtype,storagetype> &f);
00104                 NV_INLINE NvFlags<enumtype,storagetype>  operator& (enumtype e) const;
00105                 NV_INLINE NvFlags<enumtype,storagetype>  operator& (const NvFlags<enumtype,storagetype> &f) const;
00106
00107                 NV_INLINE NvFlags<enumtype,storagetype> &operator^=(enumtype e);
00108                 NV_INLINE NvFlags<enumtype,storagetype> &operator^=(const NvFlags<enumtype,storagetype> &f);
00109                 NV_INLINE NvFlags<enumtype,storagetype>  operator^ (enumtype e) const;
00110                 NV_INLINE NvFlags<enumtype,storagetype>  operator^ (const NvFlags<enumtype,storagetype> &f) const;
00111
00112                 NV_INLINE NvFlags<enumtype,storagetype>  operator~ (void) const;
00113
00114                 NV_INLINE                                operator bool(void) const;
00115                 NV_INLINE                                                                operator uint8_t(void) const;
00116                 NV_INLINE                                operator uint16_t(void) const;
00117                 NV_INLINE                                operator uint32_t(void) const;
00118
00119                 NV_INLINE void                           clear(enumtype e);
00120
00121         public:
00122                 friend NV_INLINE NvFlags<enumtype,storagetype> operator&(enumtype a, NvFlags<enumtype,storagetype> &b)
00123                 {
00124                         NvFlags<enumtype,storagetype> out;
00125                         out.mBits = a & b.mBits;
00126                         return out;
00127                 }
00128
00129         private:
00130                 storagetype  mBits;
00131         };
00132
00133         #define NV_FLAGS_OPERATORS(enumtype, storagetype)                                                                                         \
00134                 NV_INLINE NvFlags<enumtype, storagetype> operator|(enumtype a, enumtype b) { NvFlags<enumtype, storagetype> r(a); r |= b; return r; } \
00135                 NV_INLINE NvFlags<enumtype, storagetype> operator&(enumtype a, enumtype b) { NvFlags<enumtype, storagetype> r(a); r &= b; return r; } \
00136                 NV_INLINE NvFlags<enumtype, storagetype> operator~(enumtype a)             { return ~NvFlags<enumtype, storagetype>(a);             }
00137
00138         #define NV_FLAGS_TYPEDEF(x, y)  typedef NvFlags<x::Enum, y> x##s;       \
00139         NV_FLAGS_OPERATORS(x::Enum, y);
00140
00141         template<typename enumtype, typename storagetype>
00142         NV_INLINE NvFlags<enumtype,storagetype>::NvFlags(void)
00143         {
00144                 mBits = 0;
00145         }
00146
00147         template<typename enumtype, typename storagetype>
00148         NV_INLINE NvFlags<enumtype,storagetype>::NvFlags(enumtype e)
00149         {
00150                 mBits = static_cast<storagetype>(e);
00151         }
00152
00153         template<typename enumtype, typename storagetype>
00154         NV_INLINE NvFlags<enumtype,storagetype>::NvFlags(const NvFlags<enumtype,storagetype> &f)
00155         {
00156                 mBits = f.mBits;
00157         }
00158
00159         template<typename enumtype, typename storagetype>
00160         NV_INLINE NvFlags<enumtype,storagetype>::NvFlags(storagetype b)
00161         {
00162                 mBits = b;
00163         }
00164
00165         template<typename enumtype, typename storagetype>
00166         NV_INLINE bool NvFlags<enumtype,storagetype>::isSet(enumtype e) const
00167         {
00168                 return (mBits & static_cast<storagetype>(e)) == static_cast<storagetype>(e);
00169         }
00170
00171         template<typename enumtype, typename storagetype>
00172         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::set(enumtype e)
00173         {
00174                 mBits = static_cast<storagetype>(e);
00175                 return *this;
00176         }
00177
00178         template<typename enumtype, typename storagetype>
00179         NV_INLINE bool NvFlags<enumtype,storagetype>::operator==(enumtype e) const
00180         {
00181                 return mBits == static_cast<storagetype>(e);
00182         }
00183
00184         template<typename enumtype, typename storagetype>
00185         NV_INLINE bool NvFlags<enumtype,storagetype>::operator==(const NvFlags<enumtype,storagetype>& f) const
00186         {
00187                 return mBits == f.mBits;
00188         }
00189
00190         template<typename enumtype, typename storagetype>
00191         NV_INLINE bool NvFlags<enumtype,storagetype>::operator==(bool b) const
00192         {
00193                 return ((bool)*this) == b;
00194         }
00195
00196         template<typename enumtype, typename storagetype>
00197         NV_INLINE bool NvFlags<enumtype,storagetype>::operator!=(enumtype e) const
00198         {
00199                 return mBits != static_cast<storagetype>(e);
00200         }
00201
00202         template<typename enumtype, typename storagetype>
00203         NV_INLINE bool NvFlags<enumtype,storagetype>::operator!=(const NvFlags<enumtype,storagetype> &f) const
00204         {
00205                 return mBits != f.mBits;
00206         }
00207
00208         template<typename enumtype, typename storagetype>
00209         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator =(enumtype e)
00210         {
00211                 mBits = static_cast<storagetype>(e);
00212                 return *this;
00213         }
00214
00215         template<typename enumtype, typename storagetype>
00216         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator|=(enumtype e)
00217         {
00218                 mBits |= static_cast<storagetype>(e);
00219                 return *this;
00220         }
00221
00222         template<typename enumtype, typename storagetype>
00223         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator|=(const NvFlags<enumtype,storagetype> &f)
00224         {
00225                 mBits |= f.mBits;
00226                 return *this;
00227         }
00228
00229         template<typename enumtype, typename storagetype>
00230         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator| (enumtype e) const
00231         {
00232                 NvFlags<enumtype,storagetype> out(*this);
00233                 out |= e;
00234                 return out;
00235         }
00236
00237         template<typename enumtype, typename storagetype>
00238         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator| (const NvFlags<enumtype,storagetype> &f) const
00239         {
00240                 NvFlags<enumtype,storagetype> out(*this);
00241                 out |= f;
00242                 return out;
00243         }
00244
00245         template<typename enumtype, typename storagetype>
00246         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator&=(enumtype e)
00247         {
00248                 mBits &= static_cast<storagetype>(e);
00249                 return *this;
00250         }
00251
00252         template<typename enumtype, typename storagetype>
00253         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator&=(const NvFlags<enumtype,storagetype> &f)
00254         {
00255                 mBits &= f.mBits;
00256                 return *this;
00257         }
00258
00259         template<typename enumtype, typename storagetype>
00260         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator&(enumtype e) const
00261         {
00262                 NvFlags<enumtype,storagetype> out = *this;
00263                 out.mBits &= static_cast<storagetype>(e);
00264                 return out;
00265         }
00266
00267         template<typename enumtype, typename storagetype>
00268         NV_INLINE NvFlags<enumtype,storagetype>  NvFlags<enumtype,storagetype>::operator& (const NvFlags<enumtype,storagetype> &f) const
00269         {
00270                 NvFlags<enumtype,storagetype> out = *this;
00271                 out.mBits &= f.mBits;
00272                 return out;
00273         }
00274
00275         template<typename enumtype, typename storagetype>
00276         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator^=(enumtype e)
00277         {
00278                 mBits ^= static_cast<storagetype>(e);
00279                 return *this;
00280         }
00281
00282         template<typename enumtype, typename storagetype>
00283         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator^=(const NvFlags<enumtype,storagetype> &f)
00284         {
00285                 mBits ^= f.mBits;
00286                 return *this;
00287         }
00288
00289         template<typename enumtype, typename storagetype>
00290         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator^ (enumtype e) const
00291         {
00292                 NvFlags<enumtype,storagetype> out = *this;
00293                 out.mBits ^= static_cast<storagetype>(e);
00294                 return out;
00295         }
00296
00297         template<typename enumtype, typename storagetype>
00298         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator^ (const NvFlags<enumtype,storagetype> &f) const
00299         {
00300                 NvFlags<enumtype,storagetype> out = *this;
00301                 out.mBits ^= f.mBits;
00302                 return out;
00303         }
00304
00305         template<typename enumtype, typename storagetype>
00306         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator~ (void) const
00307         {
00308                 NvFlags<enumtype,storagetype> out;
00309                 out.mBits = (storagetype)~mBits;
00310                 return out;
00311         }
00312
00313         template<typename enumtype, typename storagetype>
00314         NV_INLINE NvFlags<enumtype,storagetype>::operator bool(void) const
00315         {
00316                 return mBits ? true : false;
00317         }
00318
00319         template<typename enumtype, typename storagetype>
00320         NV_INLINE NvFlags<enumtype,storagetype>::operator uint8_t(void) const
00321         {
00322                 return static_cast<uint8_t>(mBits);
00323         }
00324
00325         template<typename enumtype, typename storagetype>
00326         NV_INLINE NvFlags<enumtype,storagetype>::operator uint16_t(void) const
00327         {
00328                 return static_cast<uint16_t>(mBits);
00329         }
00330
00331         template<typename enumtype, typename storagetype>
00332         NV_INLINE NvFlags<enumtype,storagetype>::operator uint32_t(void) const
00333         {
00334                 return static_cast<uint32_t>(mBits);
00335         }
00336
00337         template<typename enumtype, typename storagetype>
00338         NV_INLINE void NvFlags<enumtype,storagetype>::clear(enumtype e)
00339         {
00340                 mBits &= ~static_cast<storagetype>(e);
00341         }
00342
00343 #ifndef NV_DOXYGEN
00344 } // namespace nvidia
00345 #endif
00346
00350 #endif // NV_FOUNDATION_H


NVIDIA(R) NvFoundation Reference: D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationInterface.h Source File

  • File List

D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationInterface.h

00001 // This code contains NVIDIA Confidential Information and is disclosed to you
00002 // under a form of NVIDIA software license agreement provided separately to you.
00003 //
00004 // Notice
00005 // NVIDIA Corporation and its licensors retain all intellectual property and
00006 // proprietary rights in and to this software and related documentation and
00007 // any modifications thereto. Any use, reproduction, disclosure, or
00008 // distribution of this software and related documentation without an express
00009 // license agreement from NVIDIA Corporation is strictly prohibited.
00010 //
00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
00015 //
00016 // Information and code furnished is believed to be accurate and reliable.
00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
00018 // information or for any infringement of patents or other rights of third parties that may
00019 // result from its use. No license is granted by implication or otherwise under any patent
00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
00021 // This code supersedes and replaces all information previously supplied.
00022 // NVIDIA Corporation products are not authorized for use as critical
00023 // components in life support devices or systems without express written approval of
00024 // NVIDIA Corporation.
00025 //
00026 // Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
00027 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
00028 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
00029
00030
00031 #ifndef NV_FOUNDATION_INTERFACE_H
00032 #define NV_FOUNDATION_INTERFACE_H
00033
00034 #include "NvFoundation.h"
00035
00036 #ifndef NV_DOXYGEN
00037 namespace nvidia
00038 {
00039 #endif
00040
00041
00042 //***************************************
00043 // FILE: NvErrors.h
00044 //***************************************
00045
00054 struct NvErrorCode
00055 {
00056         enum Enum
00057         {
00058                 eNO_ERROR                               = 0,
00059
00061                 eDEBUG_INFO                             = 1,
00062
00064                 eDEBUG_WARNING                  = 2,
00065
00067                 eINVALID_PARAMETER              = 4,
00068
00070                 eINVALID_OPERATION              = 8,
00071
00073                 eOUT_OF_MEMORY                  = 16,
00074
00078                 eINTERNAL_ERROR                 = 32,
00079
00081                 eABORT                                  = 64,
00082
00084                 ePERF_WARNING                   = 128,
00085
00087                 eMASK_ALL                               = -1
00088         };
00089 };
00090
00091
00092
00093 //***************************************
00094 // FILE: NvAllocatorCallback.h
00095 //***************************************
00096
00106 class NvAllocatorCallback
00107 {
00108 public:
00109
00113         virtual ~NvAllocatorCallback() {}
00114
00130         virtual void* allocate(size_t size, const char* typeName, const char* filename, int line) = 0;
00131
00140         virtual void deallocate(void* ptr) = 0;
00141 };
00142
00143 //********************************************
00144 // FILE: NvErrorCallback.h
00145 //********************************************
00146
00147
00156 class NvErrorCallback
00157 {
00158 public:
00159
00160         virtual ~NvErrorCallback() {}
00161
00169         virtual void reportError(NvErrorCode::Enum code, const char* message, const char* file, int line) = 0;
00170
00171 };
00172
00173 // *******************************************
00174 // FILE: NvIO.h
00175 // *******************************************
00176
00185 class NvInputStream
00186 {
00187 public:
00188
00198         virtual uint32_t read(void* dest, uint32_t count) = 0;
00199
00200         virtual ~NvInputStream() {}
00201 };
00202
00203
00210 class NvInputData : public NvInputStream
00211 {
00212 public:
00213
00220         virtual uint32_t        getLength() const                       = 0;
00221
00222
00229         virtual void    seek(uint32_t offset)           = 0;
00230
00237         virtual uint32_t        tell() const                    = 0;
00238
00239         virtual ~NvInputData() {}
00240 };
00241
00248 class NvOutputStream
00249 {
00250 public:
00260         virtual uint32_t write(const void* src, uint32_t count) = 0;
00261
00262         virtual ~NvOutputStream() {}
00263
00264 };
00265
00266
00267
00268 #ifndef NV_DOXYGEN
00269 } // namespace nvidia
00270 #endif
00271
00275 #endif // NV_FOUNDATION_H


NVIDIA(R) NvFoundation Reference: D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h Source File

  • File List

D:/p4/sw/devrel/GameWorks/Shared/NvFoundation/1.0/trunk/Include/NvFoundationMath.h

00001 // This code contains NVIDIA Confidential Information and is disclosed to you
00002 // under a form of NVIDIA software license agreement provided separately to you.
00003 //
00004 // Notice
00005 // NVIDIA Corporation and its licensors retain all intellectual property and
00006 // proprietary rights in and to this software and related documentation and
00007 // any modifications thereto. Any use, reproduction, disclosure, or
00008 // distribution of this software and related documentation without an express
00009 // license agreement from NVIDIA Corporation is strictly prohibited.
00010 //
00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
00015 //
00016 // Information and code furnished is believed to be accurate and reliable.
00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
00018 // information or for any infringement of patents or other rights of third parties that may
00019 // result from its use. No license is granted by implication or otherwise under any patent
00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
00021 // This code supersedes and replaces all information previously supplied.
00022 // NVIDIA Corporation products are not authorized for use as critical
00023 // components in life support devices or systems without express written approval of
00024 // NVIDIA Corporation.
00025 //
00026 // Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
00027 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
00028 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
00029
00030
00031 #ifndef NV_FOUNDATION_MATH_H
00032 #define NV_FOUNDATION_MATH_H
00033
00034 #include "NvFoundation.h"
00035
00036 #ifndef NV_DOXYGEN
00037 namespace nvidia
00038 {
00039 #endif
00040
00041
00042 //***************************************
00043 // FILE: Nv.h
00044 //***************************************
00045
00046 class NvVec2;
00047 class NvVec3;
00048 class NvVec4;
00049 class NvMat33;
00050 class NvMat44;
00051 class NvQuat;
00052 class NvTransform;
00053 class NvBounds3;
00054
00055 class NvAllocatorCallback;
00056 class NvErrorCallback;
00057
00058 class NvFoundation;
00059
00060 //***************************************
00061 // FILE: NvMath.h
00062 //***************************************
00063
00065         enum NvZERO                     {       NvZero          };
00066
00068         enum NvIDENTITY         {       NvIdentity      };
00069
00070
00071         // constants
00072         static const NvReal NvPi                        =       NvReal(3.141592653589793);
00073         static const NvReal NvHalfPi            =       NvReal(1.57079632679489661923);
00074         static const NvReal NvTwoPi                     =       NvReal(6.28318530717958647692);
00075         static const NvReal NvInvPi                     =       NvReal(0.31830988618379067154);
00076         static const NvReal NvInvTwoPi          =   NvReal(0.15915494309189533577);
00077         static const NvReal NvPiDivTwo          =   NvReal(1.57079632679489661923);
00078         static const NvReal NvPiDivFour         =   NvReal(0.78539816339744830962);
00079
00083         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvFsel(float a, float b, float c)        {       return (a >= 0.0f) ? b : c;     }
00084
00088         template<class T>
00089         NV_CUDA_CALLABLE NV_FORCE_INLINE T NvMax(T a, T b)                                                      { return a<b ? b : a;   }
00090
00094         template<class T>
00095         NV_CUDA_CALLABLE NV_FORCE_INLINE T NvMin(T a, T b)                                                      { return a<b ? a : b;   }
00096
00097         /*
00098         Many of these are just implemented as NV_CUDA_CALLABLE NV_FORCE_INLINE calls to the C lib right now,
00099         but later we could replace some of them with some approximations or more
00100         clever stuff.
00101         */
00102
00106         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvAbs(float a)                                           { return fabsf(a);      }
00107
00108         NV_CUDA_CALLABLE NV_FORCE_INLINE bool NvEquals(float a, float b,float eps)      { return (NvAbs(a - b) < eps);  }
00109
00113         NV_CUDA_CALLABLE NV_FORCE_INLINE double NvAbs(double a)                                         { return ::fabs(a);     }
00114
00118         NV_CUDA_CALLABLE NV_FORCE_INLINE int32_t NvAbs(int32_t a)                                               { return ::abs(a);      }
00119
00123         template<class T>
00124         NV_CUDA_CALLABLE NV_FORCE_INLINE T NvClamp(T v, T lo, T hi)                                     { NV_ASSERT(lo<=hi); return NvMin(hi, NvMax(lo, v)); }
00125
00127         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvSqrt(float a)                                          { return sqrtf(a);              }
00128
00130         NV_CUDA_CALLABLE NV_FORCE_INLINE double NvSqrt(double a)                                                { return ::sqrt(a);     }
00131
00133         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvRecipSqrt(float a)                                     { return 1.0f / ::sqrtf(a);     }
00134
00136         NV_CUDA_CALLABLE NV_FORCE_INLINE double NvRecipSqrt(double a)                                   { return 1/::sqrt(a);   }
00137
00139
00141         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvSin(float a)                                           { return ::sinf(a);                             }
00142
00144         NV_CUDA_CALLABLE NV_FORCE_INLINE double NvSin(double a)                                         { return ::sin(a);                                                      }
00145
00147         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvCos(float a)                                           { return ::cosf(a);                             }
00148
00150         NV_CUDA_CALLABLE NV_FORCE_INLINE double NvCos(double a)                                         { return ::cos(a);                                                      }
00151
00156         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvTan(float a)                                           { return ::tan(a);                                                      }
00157
00162         NV_CUDA_CALLABLE NV_FORCE_INLINE double NvTan(double a)                                         { return ::tan(a);                                                      }
00163
00169         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvAsin(float f)                                          { return ::asin(NvClamp(f,-1.0f,1.0f)); }
00170
00176         NV_CUDA_CALLABLE NV_FORCE_INLINE double NvAsin(double f)                                                { return ::asin(NvClamp(f,-1.0,1.0));           }
00177
00183         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvAcos(float f)                                          { return ::acos(NvClamp(f,-1.0f,1.0f));                 }
00184
00190         NV_CUDA_CALLABLE NV_FORCE_INLINE double NvAcos(double f)                                                { return ::acos(NvClamp(f,-1.0,1.0));                           }
00191
00197         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvAtan(float a)                                          { return ::atan(a);     }
00198
00204         NV_CUDA_CALLABLE NV_FORCE_INLINE double NvAtan(double a)                                                { return ::atan(a);     }
00205
00211         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvAtan2(float x, float y)                        { return ::atan2(x,y);  }
00212
00218         NV_CUDA_CALLABLE NV_FORCE_INLINE double NvAtan2(double x, double y)                     { return ::atan2(x,y);  }
00219
00221         NV_CUDA_CALLABLE NV_FORCE_INLINE bool NvIsFinite(float a)
00222         {
00223 #ifdef _MSC_VER
00224                 return (0 == ((_FPCLASS_SNAN | _FPCLASS_QNAN | _FPCLASS_NINF | _FPCLASS_PINF) & _fpclass(a) ));
00225 #else
00226                 return isfinite(a);
00227 #endif
00228         }
00229
00231         NV_CUDA_CALLABLE NV_FORCE_INLINE bool NvIsFinite(double a)
00232         {
00233 #ifdef _MSC_VER
00234                 return (0 == ((_FPCLASS_SNAN | _FPCLASS_QNAN | _FPCLASS_NINF | _FPCLASS_PINF) & _fpclass(a) ));
00235 #else
00236                 return isfinite(a);
00237 #endif
00238         }
00239
00240         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvFloor(float a) { return ::floorf(a);                                   }
00241
00242         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvExp(float a)                                           { return ::expf(a);     }
00243
00244         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvCeil(float a)                                          { return ::ceilf(a);    }
00245
00246         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvSign(float a)                                          { return (a >= 0.0f) ? 1.0f : -1.0f; }
00247
00248         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvPow(float x,float y)                           { return ::powf(x,y); };
00249
00250         NV_CUDA_CALLABLE NV_FORCE_INLINE float NvLog(float x)                                           { return ::log(x); };
00251
00252 // **********************************************
00253 // FILE: NvVec2.h
00254 // **********************************************
00255
00261 class NvVec2
00262 {
00263 public:
00264
00268         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2() {}
00269
00270
00274         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2(NvZERO r): x(0.0f), y(0.0f)
00275         {
00276                 NV_UNUSED(r);
00277         }
00278
00286         explicit NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2(NvReal a): x(a), y(a) {}
00287
00294         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2(NvReal nx, NvReal ny): x(nx), y(ny){}
00295
00299         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2(const NvVec2& v): x(v.x), y(v.y) {}
00300
00301         //Operators
00302
00306         NV_CUDA_CALLABLE NV_FORCE_INLINE        NvVec2& operator=(const NvVec2& p)                      { x = p.x; y = p.y;     return *this;           }
00307
00311         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal& operator[](int index)
00312         {
00313                 NV_ASSERT(index>=0 && index<=1);
00314
00315                 return reinterpret_cast<NvReal*>(this)[index];
00316         }
00317
00321         NV_CUDA_CALLABLE NV_FORCE_INLINE const NvReal& operator[](int index) const
00322         {
00323                 NV_ASSERT(index>=0 && index<=1);
00324
00325                 return reinterpret_cast<const NvReal*>(this)[index];
00326         }
00327
00331         NV_CUDA_CALLABLE NV_FORCE_INLINE bool operator==(const NvVec2&v) const  { return x == v.x && y == v.y; }
00332
00336         NV_CUDA_CALLABLE NV_FORCE_INLINE bool operator!=(const NvVec2&v) const  { return x != v.x || y != v.y; }
00337
00341         NV_CUDA_CALLABLE NV_FORCE_INLINE bool isZero()  const                                   { return x==0.0f && y==0.0f;                    }
00342
00346         NV_CUDA_CALLABLE NV_INLINE bool isFinite() const
00347         {
00348                 return NvIsFinite(x) && NvIsFinite(y);
00349         }
00350
00354         NV_CUDA_CALLABLE NV_FORCE_INLINE bool isNormalized() const
00355         {
00356                 const float unitTolerance = 1e-4f;
00357                 return isFinite() && NvAbs(magnitude()-1)<unitTolerance;
00358         }
00359
00365         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal magnitudeSquared() const                {       return x * x + y * y;                                   }
00366
00370         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal magnitude() const                               {       return NvSqrt(magnitudeSquared());              }
00371
00375         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2 operator -() const
00376         {
00377                 return NvVec2(-x, -y);
00378         }
00379
00383         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2 operator +(const NvVec2& v) const               {       return NvVec2(x + v.x, y + v.y);        }
00384
00388         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2 operator -(const NvVec2& v) const               {       return NvVec2(x - v.x, y - v.y);        }
00389
00393         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2 operator *(NvReal f) const                              {       return NvVec2(x * f, y * f);                    }
00394
00398         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2 operator /(NvReal f) const
00399         {
00400                 f = 1.0f / f;   // PT: inconsistent notation with operator /=
00401                 return NvVec2(x * f, y * f);
00402         }
00403
00407         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2& operator +=(const NvVec2& v)
00408         {
00409                 x += v.x;
00410                 y += v.y;
00411                 return *this;
00412         }
00413
00417         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2& operator -=(const NvVec2& v)
00418         {
00419                 x -= v.x;
00420                 y -= v.y;
00421                 return *this;
00422         }
00423
00427         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2& operator *=(NvReal f)
00428         {
00429                 x *= f;
00430                 y *= f;
00431                 return *this;
00432         }
00436         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2& operator /=(NvReal f)
00437         {
00438                 f = 1.0f/f;     // PT: inconsistent notation with operator /
00439                 x *= f;
00440                 y *= f;
00441                 return *this;
00442         }
00443
00447         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal dot(const NvVec2& v) const
00448         {
00449                 return x * v.x + y * v.y;
00450         }
00451
00454         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2 getNormalized() const
00455         {
00456                 const NvReal m = magnitudeSquared();
00457                 return m>0.0f ? *this * NvRecipSqrt(m) : NvVec2(0,0);
00458         }
00459
00463         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal normalize()
00464         {
00465                 const NvReal m = magnitude();
00466                 if (m>0.0f)
00467                         *this /= m;
00468                 return m;
00469         }
00470
00474         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2 multiply(const NvVec2& a) const
00475         {
00476                 return NvVec2(x*a.x, y*a.y);
00477         }
00478
00482         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2 minimum(const NvVec2& v) const
00483         {
00484                 return NvVec2(NvMin(x, v.x), NvMin(y,v.y));
00485         }
00486
00490         NV_CUDA_CALLABLE NV_FORCE_INLINE float minElement()     const
00491         {
00492                 return NvMin(x, y);
00493         }
00494
00498         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec2 maximum(const NvVec2& v) const
00499         {
00500                 return NvVec2(NvMax(x, v.x), NvMax(y,v.y));
00501         }
00502
00506         NV_CUDA_CALLABLE NV_FORCE_INLINE float maxElement()     const
00507         {
00508                 return NvMax(x, y);
00509         }
00510
00511         NvReal x,y;
00512 };
00513
00514 NV_CUDA_CALLABLE static NV_FORCE_INLINE NvVec2 operator *(NvReal f, const NvVec2& v)
00515 {
00516         return NvVec2(f * v.x, f * v.y);
00517 }
00518
00519 // **************************************
00520 // FILE: NvVec3.h
00521 // **************************************
00522
00528 class NvVec3
00529 {
00530 public:
00531
00535         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3() {}
00536
00540         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3(NvZERO r): x(0.0f), y(0.0f), z(0.0f)
00541         {
00542                 NV_UNUSED(r);
00543         }
00544
00545
00553         explicit NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3(NvReal a): x(a), y(a), z(a) {}
00554
00562         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3(NvReal nx, NvReal ny, NvReal nz): x(nx), y(ny), z(nz) {}
00563
00567         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3(const NvVec3& v): x(v.x), y(v.y), z(v.z) {}
00568
00569         //Operators
00570
00574         NV_CUDA_CALLABLE NV_FORCE_INLINE        NvVec3& operator=(const NvVec3& p)                      { x = p.x; y = p.y; z = p.z;    return *this;           }
00575
00579         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal& operator[](int index)
00580         {
00581                 NV_ASSERT(index>=0 && index<=2);
00582
00583                 return reinterpret_cast<NvReal*>(this)[index];
00584         }
00585
00586         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal& operator[](unsigned int index)
00587         {
00588                 NV_ASSERT(index<=2);
00589
00590                 return reinterpret_cast<NvReal*>(this)[index];
00591         }
00592
00596         NV_CUDA_CALLABLE NV_FORCE_INLINE const NvReal& operator[](int index) const
00597         {
00598                 NV_ASSERT(index>=0 && index<=2);
00599
00600                 return reinterpret_cast<const NvReal*>(this)[index];
00601         }
00602
00603         NV_CUDA_CALLABLE NV_FORCE_INLINE const NvReal& operator[](unsigned int index) const
00604         {
00605                 NV_ASSERT(index<=2);
00606
00607                 return reinterpret_cast<const NvReal*>(this)[index];
00608         }
00612         NV_CUDA_CALLABLE NV_FORCE_INLINE bool operator==(const NvVec3&v) const  { return x == v.x && y == v.y && z == v.z; }
00613
00617         NV_CUDA_CALLABLE NV_FORCE_INLINE bool operator!=(const NvVec3&v) const  { return x != v.x || y != v.y || z != v.z; }
00618
00622         NV_CUDA_CALLABLE NV_FORCE_INLINE bool isZero()  const                                   { return x==0.0f && y==0.0f && z == 0.0f;                       }
00623
00627         NV_CUDA_CALLABLE NV_INLINE bool isFinite() const
00628         {
00629                 return NvIsFinite(x) && NvIsFinite(y) && NvIsFinite(z);
00630         }
00631
00635         NV_CUDA_CALLABLE NV_FORCE_INLINE bool isNormalized() const
00636         {
00637                 const float unitTolerance = 1e-4f;
00638                 return isFinite() && NvAbs(magnitude()-1)<unitTolerance;
00639         }
00640
00646         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal magnitudeSquared() const                {       return x * x + y * y + z * z;                                   }
00647
00651         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal magnitude() const                               {       return NvSqrt(magnitudeSquared());              }
00652
00656         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 operator -() const
00657         {
00658                 return NvVec3(-x, -y, -z);
00659         }
00660
00664         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 operator +(const NvVec3& v) const               {       return NvVec3(x + v.x, y + v.y, z + v.z);       }
00665
00669         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 operator -(const NvVec3& v) const               {       return NvVec3(x - v.x, y - v.y, z - v.z);       }
00670
00674         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 operator *(NvReal f) const                              {       return NvVec3(x * f, y * f, z * f);                     }
00675
00679         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 operator /(NvReal f) const
00680         {
00681                 f = 1.0f / f;
00682                 return NvVec3(x * f, y * f, z * f);
00683         }
00684
00688         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3& operator +=(const NvVec3& v)
00689         {
00690                 x += v.x;
00691                 y += v.y;
00692                 z += v.z;
00693                 return *this;
00694         }
00695
00699         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3& operator -=(const NvVec3& v)
00700         {
00701                 x -= v.x;
00702                 y -= v.y;
00703                 z -= v.z;
00704                 return *this;
00705         }
00706
00710         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3& operator *=(NvReal f)
00711         {
00712                 x *= f;
00713                 y *= f;
00714                 z *= f;
00715                 return *this;
00716         }
00720         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3& operator /=(NvReal f)
00721         {
00722                 f = 1.0f/f;
00723                 x *= f;
00724                 y *= f;
00725                 z *= f;
00726                 return *this;
00727         }
00728
00732         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal dot(const NvVec3& v) const
00733         {
00734                 return x * v.x + y * v.y + z * v.z;
00735         }
00736
00740         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 cross(const NvVec3& v) const
00741         {
00742                 return NvVec3(y * v.z - z * v.y,
00743                                           z * v.x - x * v.z,
00744                                           x * v.y - y * v.x);
00745         }
00746
00749         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 getNormalized() const
00750         {
00751                 const NvReal m = magnitudeSquared();
00752                 return m>0.0f ? *this * NvRecipSqrt(m) : NvVec3(0,0,0);
00753         }
00754
00758         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal normalize()
00759         {
00760                 const NvReal m = magnitude();
00761                 if (m>0.0f)
00762                         *this /= m;
00763                 return m;
00764         }
00765
00770         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal normalizeSafe()
00771         {
00772                 const NvReal mag = magnitude();
00773                 if (mag < NV_NORMALIZATION_EPSILON)
00774                         return 0.0f;
00775                 *this *= 1.0f / mag;
00776                 return mag;
00777         }
00778
00783         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal normalizeFast()
00784         {
00785                 const NvReal mag = magnitude();
00786                 NV_ASSERT(mag >= NV_NORMALIZATION_EPSILON);
00787                 *this *= 1.0f / mag;
00788                 return mag;
00789         }
00790
00794         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 multiply(const NvVec3& a) const
00795         {
00796                 return NvVec3(x*a.x, y*a.y, z*a.z);
00797         }
00798
00802         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 minimum(const NvVec3& v) const
00803         {
00804                 return NvVec3(NvMin(x, v.x), NvMin(y,v.y), NvMin(z,v.z));
00805         }
00806
00810         NV_CUDA_CALLABLE NV_FORCE_INLINE float minElement()     const
00811         {
00812                 return NvMin(x, NvMin(y, z));
00813         }
00814
00818         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 maximum(const NvVec3& v) const
00819         {
00820                 return NvVec3(NvMax(x, v.x), NvMax(y,v.y), NvMax(z,v.z));
00821         }
00822
00826         NV_CUDA_CALLABLE NV_FORCE_INLINE float maxElement()     const
00827         {
00828                 return NvMax(x, NvMax(y, z));
00829         }
00830
00834         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 abs()   const
00835         {
00836                 return NvVec3(NvAbs(x), NvAbs(y), NvAbs(z));
00837         }
00838
00839
00840         NvReal x,y,z;
00841 };
00842
00843 NV_CUDA_CALLABLE static NV_FORCE_INLINE NvVec3 operator *(NvReal f, const NvVec3& v)
00844 {
00845         return NvVec3(f * v.x, f * v.y, f * v.z);
00846 }
00847
00848 // ****************************************
00849 // FILE: NvVec4.h
00850 // ****************************************
00851
00858 class NvVec4
00859 {
00860 public:
00861
00865         NV_CUDA_CALLABLE NV_INLINE NvVec4() {}
00866
00870         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec4(NvZERO r): x(0.0f), y(0.0f), z(0.0f), w(0.0f)
00871         {
00872                 NV_UNUSED(r);
00873         }
00874
00882         explicit NV_CUDA_CALLABLE NV_INLINE NvVec4(NvReal a): x(a), y(a), z(a), w(a) {}
00883
00892         NV_CUDA_CALLABLE NV_INLINE NvVec4(NvReal nx, NvReal ny, NvReal nz, NvReal nw): x(nx), y(ny), z(nz), w(nw) {}
00893
00894
00901         NV_CUDA_CALLABLE NV_INLINE NvVec4(const NvVec3& v, NvReal nw): x(v.x), y(v.y), z(v.z), w(nw) {}
00902
00903
00909         explicit NV_CUDA_CALLABLE NV_INLINE NvVec4(const NvReal v[]): x(v[0]), y(v[1]), z(v[2]), w(v[3]) {}
00910
00914         NV_CUDA_CALLABLE NV_INLINE NvVec4(const NvVec4& v): x(v.x), y(v.y), z(v.z), w(v.w) {}
00915
00916         //Operators
00917
00921         NV_CUDA_CALLABLE NV_INLINE      NvVec4& operator=(const NvVec4& p)                      { x = p.x; y = p.y; z = p.z; w = p.w;   return *this;           }
00922
00926         NV_CUDA_CALLABLE NV_INLINE NvReal& operator[](int index)
00927         {
00928                 NV_ASSERT(index>=0 && index<=3);
00929
00930                 return reinterpret_cast<NvReal*>(this)[index];
00931         }
00932
00933         NV_CUDA_CALLABLE NV_INLINE NvReal& operator[](unsigned int index)
00934         {
00935                 NV_ASSERT(index<=3);
00936
00937                 return reinterpret_cast<NvReal*>(this)[index];
00938         }
00942         NV_CUDA_CALLABLE NV_INLINE const NvReal& operator[](int index) const
00943         {
00944                 NV_ASSERT(index>=0 && index<=3);
00945
00946                 return reinterpret_cast<const NvReal*>(this)[index];
00947         }
00948         NV_CUDA_CALLABLE NV_INLINE const NvReal& operator[](unsigned int index) const
00949         {
00950                 NV_ASSERT(index<=3);
00951
00952                 return reinterpret_cast<const NvReal*>(this)[index];
00953         }
00954
00958         NV_CUDA_CALLABLE NV_INLINE bool operator==(const NvVec4&v) const        { return x == v.x && y == v.y && z == v.z && w == v.w; }
00959
00963         NV_CUDA_CALLABLE NV_INLINE bool operator!=(const NvVec4&v) const        { return x != v.x || y != v.y || z != v.z || w!= v.w; }
00964
00968         NV_CUDA_CALLABLE NV_INLINE bool isZero()        const                                   { return x==0 && y==0 && z == 0 && w == 0;                      }
00969
00973         NV_CUDA_CALLABLE NV_INLINE bool isFinite() const
00974         {
00975                 return NvIsFinite(x) && NvIsFinite(y) && NvIsFinite(z) && NvIsFinite(w);
00976         }
00977
00981         NV_CUDA_CALLABLE NV_INLINE bool isNormalized() const
00982         {
00983                 const float unitTolerance = 1e-4f;
00984                 return isFinite() && NvAbs(magnitude()-1)<unitTolerance;
00985         }
00986
00987
00993         NV_CUDA_CALLABLE NV_INLINE NvReal magnitudeSquared() const              {       return x * x + y * y + z * z + w * w;           }
00994
00998         NV_CUDA_CALLABLE NV_INLINE NvReal magnitude() const                             {       return NvSqrt(magnitudeSquared());              }
00999
01003         NV_CUDA_CALLABLE NV_INLINE NvVec4 operator -() const
01004         {
01005                 return NvVec4(-x, -y, -z, -w);
01006         }
01007
01011         NV_CUDA_CALLABLE NV_INLINE NvVec4 operator +(const NvVec4& v) const             {       return NvVec4(x + v.x, y + v.y, z + v.z, w + v.w);      }
01012
01016         NV_CUDA_CALLABLE NV_INLINE NvVec4 operator -(const NvVec4& v) const             {       return NvVec4(x - v.x, y - v.y, z - v.z, w - v.w);      }
01017
01022         NV_CUDA_CALLABLE NV_INLINE NvVec4 operator *(NvReal f) const                            {       return NvVec4(x * f, y * f, z * f, w * f);              }
01023
01027         NV_CUDA_CALLABLE NV_INLINE NvVec4 operator /(NvReal f) const
01028         {
01029                 f = 1.0f / f;
01030                 return NvVec4(x * f, y * f, z * f, w * f);
01031         }
01032
01036         NV_CUDA_CALLABLE NV_INLINE NvVec4& operator +=(const NvVec4& v)
01037         {
01038                 x += v.x;
01039                 y += v.y;
01040                 z += v.z;
01041                 w += v.w;
01042                 return *this;
01043         }
01044
01048         NV_CUDA_CALLABLE NV_INLINE NvVec4& operator -=(const NvVec4& v)
01049         {
01050                 x -= v.x;
01051                 y -= v.y;
01052                 z -= v.z;
01053                 w -= v.w;
01054                 return *this;
01055         }
01056
01060         NV_CUDA_CALLABLE NV_INLINE NvVec4& operator *=(NvReal f)
01061         {
01062                 x *= f;
01063                 y *= f;
01064                 z *= f;
01065                 w *= f;
01066                 return *this;
01067         }
01071         NV_CUDA_CALLABLE NV_INLINE NvVec4& operator /=(NvReal f)
01072         {
01073                 f = 1.0f/f;
01074                 x *= f;
01075                 y *= f;
01076                 z *= f;
01077                 w *= f;
01078                 return *this;
01079         }
01080
01084         NV_CUDA_CALLABLE NV_INLINE NvReal dot(const NvVec4& v) const
01085         {
01086                 return x * v.x + y * v.y + z * v.z + w * v.w;
01087         }
01088
01091         NV_CUDA_CALLABLE NV_INLINE NvVec4 getNormalized() const
01092         {
01093                 NvReal m = magnitudeSquared();
01094                 return m>0.0f ? *this * NvRecipSqrt(m) : NvVec4(0,0,0,0);
01095         }
01096
01097
01101         NV_CUDA_CALLABLE NV_INLINE NvReal normalize()
01102         {
01103                 NvReal m = magnitude();
01104                 if (m>0.0f)
01105                         *this /= m;
01106                 return m;
01107         }
01108
01112         NV_CUDA_CALLABLE NV_INLINE NvVec4 multiply(const NvVec4& a) const
01113         {
01114                 return NvVec4(x*a.x, y*a.y, z*a.z, w*a.w);
01115         }
01116
01120         NV_CUDA_CALLABLE NV_INLINE NvVec4 minimum(const NvVec4& v) const
01121         {
01122                 return NvVec4(NvMin(x, v.x), NvMin(y,v.y), NvMin(z,v.z), NvMin(w,v.w));
01123         }
01124
01128         NV_CUDA_CALLABLE NV_INLINE NvVec4 maximum(const NvVec4& v) const
01129         {
01130                 return NvVec4(NvMax(x, v.x), NvMax(y,v.y), NvMax(z,v.z), NvMax(w,v.w));
01131         }
01132
01133         NV_CUDA_CALLABLE NV_INLINE NvVec3 getXYZ() const
01134         {
01135                 return NvVec3(x,y,z);
01136         }
01137
01141         NV_CUDA_CALLABLE NV_INLINE void setZero() {     x = y = z = w = 0.0f; }
01142
01143         NvReal x,y,z,w;
01144 };
01145
01146
01147 NV_CUDA_CALLABLE static NV_INLINE NvVec4 operator *(NvReal f, const NvVec4& v)
01148 {
01149         return NvVec4(f * v.x, f * v.y, f * v.z, f * v.w);
01150 }
01151
01152 // ********************************
01153 // FILE: NvQuat.h
01154 // ********************************
01155
01162 class NvQuat
01163 {
01164 public:
01168         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat()       {       }
01169
01170
01172         NV_CUDA_CALLABLE NV_INLINE NvQuat(NvIDENTITY r)
01173                 : x(0.0f), y(0.0f), z(0.0f), w(1.0f)
01174         {
01175                 NV_UNUSED(r);
01176         }
01177
01181         explicit NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat(NvReal r)
01182                 : x(0.0f), y(0.0f), z(0.0f), w(r)
01183         {
01184         }
01185
01189         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat(NvReal nx, NvReal ny, NvReal nz, NvReal nw) : x(nx),y(ny),z(nz),w(nw) {}
01190
01200         NV_CUDA_CALLABLE NV_INLINE NvQuat(NvReal angleRadians, const NvVec3& unitAxis)
01201         {
01202                 NV_ASSERT(NvAbs(1.0f-unitAxis.magnitude())<1e-3f);
01203                 const NvReal a = angleRadians * 0.5f;
01204                 const NvReal s = NvSin(a);
01205                 w = NvCos(a);
01206                 x = unitAxis.x * s;
01207                 y = unitAxis.y * s;
01208                 z = unitAxis.z * s;
01209         }
01210
01214         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat(const NvQuat& v): x(v.x), y(v.y), z(v.z), w(v.w) {}
01215
01221         NV_CUDA_CALLABLE NV_INLINE explicit NvQuat(const NvMat33& m); /* defined in NvMat33.h */
01222
01226         NV_CUDA_CALLABLE bool isFinite() const
01227         {
01228                 return NvIsFinite(x)
01229                         && NvIsFinite(y)
01230                         && NvIsFinite(z)
01231                         && NvIsFinite(w);
01232         }
01233
01234
01239         NV_CUDA_CALLABLE bool isUnit() const
01240         {
01241                 const NvReal unitTolerance = 1e-4f;
01242                 return isFinite() && NvAbs(magnitude()-1)<unitTolerance;
01243         }
01244
01245
01250         NV_CUDA_CALLABLE bool isSane() const
01251         {
01252               const NvReal unitTolerance = 1e-2f;
01253               return isFinite() && NvAbs(magnitude()-1)<unitTolerance;
01254         }
01255
01260         NV_CUDA_CALLABLE NV_INLINE void toRadiansAndUnitAxis(NvReal& angle, NvVec3& axis) const
01261         {
01262                 const NvReal quatEpsilon = 1.0e-8f;
01263                 const NvReal s2 = x*x+y*y+z*z;
01264                 if(s2<quatEpsilon*quatEpsilon)  // can't extract a sensible axis
01265                 {
01266                         angle = 0.0f;
01267                         axis = NvVec3(1.0f,0.0f,0.0f);
01268                 }
01269                 else
01270                 {
01271                         const NvReal s = NvRecipSqrt(s2);
01272                         axis = NvVec3(x,y,z) * s;
01273                         angle = NvAbs(w)<quatEpsilon ? NvPi : NvAtan2(s2*s, w) * 2.0f;
01274                 }
01275
01276         }
01277
01283         NV_CUDA_CALLABLE NV_INLINE NvReal getAngle() const
01284         {
01285                 return NvAcos(w) * 2.0f;
01286         }
01287
01288
01294         NV_CUDA_CALLABLE NV_INLINE NvReal getAngle(const NvQuat& q) const
01295         {
01296                 return NvAcos(dot(q)) * 2.0f;
01297         }
01298
01299
01303         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal magnitudeSquared() const
01304         {
01305                 return x*x + y*y + z*z + w*w;
01306         }
01307
01311         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal dot(const NvQuat& v) const
01312         {
01313                 return x * v.x + y * v.y + z * v.z  + w * v.w;
01314         }
01315
01316         NV_CUDA_CALLABLE NV_INLINE NvQuat getNormalized() const
01317         {
01318                 const NvReal s = 1.0f/magnitude();
01319                 return NvQuat(x*s, y*s, z*s, w*s);
01320         }
01321
01322
01323         NV_CUDA_CALLABLE NV_INLINE float magnitude() const
01324         {
01325                 return NvSqrt(magnitudeSquared());
01326         }
01327
01328         //modifiers:
01332         NV_CUDA_CALLABLE NV_INLINE NvReal normalize()                                                                                   // convert this NvQuat to a unit quaternion
01333         {
01334                 const NvReal mag = magnitude();
01335                 if (mag)
01336                 {
01337                         const NvReal imag = 1.0f / mag;
01338
01339                         x *= imag;
01340                         y *= imag;
01341                         z *= imag;
01342                         w *= imag;
01343                 }
01344                 return mag;
01345         }
01346
01347         /*
01348         \brief returns the conjugate.
01349
01350         \note for unit quaternions, this is the inverse.
01351         */
01352         NV_CUDA_CALLABLE NV_INLINE NvQuat getConjugate() const
01353         {
01354                 return NvQuat(-x,-y,-z,w);
01355         }
01356
01357         /*
01358         \brief returns imaginary part.
01359         */
01360         NV_CUDA_CALLABLE NV_INLINE NvVec3 getImaginaryPart() const
01361         {
01362                 return NvVec3(x,y,z);
01363         }
01364
01366         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 getBasisVector0()       const
01367         {
01368 //              return rotate(NvVec3(1,0,0));
01369                 const float x2 = x*2.0f;
01370                 const float w2 = w*2.0f;
01371                 return NvVec3(  (w * w2) - 1.0f + x*x2,
01372                                                 (z * w2)        + y*x2,
01373                                                 (-y * w2)       + z*x2);
01374         }
01375
01377         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 getBasisVector1()       const
01378         {
01379 //              return rotate(NvVec3(0,1,0));
01380                 const float y2 = y*2.0f;
01381                 const float w2 = w*2.0f;
01382                 return NvVec3(  (-z * w2)       + x*y2,
01383                                                 (w * w2) - 1.0f + y*y2,
01384                                                 (x * w2)        + z*y2);
01385         }
01386
01387
01389         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 getBasisVector2() const
01390         {
01391 //              return rotate(NvVec3(0,0,1));
01392                 const float z2 = z*2.0f;
01393                 const float w2 = w*2.0f;
01394                 return NvVec3(  (y * w2)        + x*z2,
01395                                                 (-x * w2)       + y*z2,
01396                                                 (w * w2) - 1.0f + z*z2);
01397         }
01398
01402         NV_CUDA_CALLABLE NV_FORCE_INLINE const NvVec3 rotate(const NvVec3& v) const
01403 //      NV_CUDA_CALLABLE NV_INLINE const NvVec3 rotate(const NvVec3& v) const
01404         {
01405                 const float vx = 2.0f*v.x;
01406                 const float vy = 2.0f*v.y;
01407                 const float vz = 2.0f*v.z;
01408                 const float w2 = w*w-0.5f;
01409                 const float dot2 = (x*vx + y*vy +z*vz);
01410                 return NvVec3
01411                 (
01412                         (vx*w2 + (y * vz - z * vy)*w + x*dot2),
01413                         (vy*w2 + (z * vx - x * vz)*w + y*dot2),
01414                         (vz*w2 + (x * vy - y * vx)*w + z*dot2)
01415                 );
01416                 /*
01417                 const NvVec3 qv(x,y,z);
01418                 return (v*(w*w-0.5f) + (qv.cross(v))*w + qv*(qv.dot(v)))*2;
01419                 */
01420         }
01421
01425         NV_CUDA_CALLABLE NV_FORCE_INLINE const NvVec3 rotateInv(const NvVec3& v) const
01426 //      NV_CUDA_CALLABLE NV_INLINE const NvVec3 rotateInv(const NvVec3& v) const
01427         {
01428                 const float vx = 2.0f*v.x;
01429                 const float vy = 2.0f*v.y;
01430                 const float vz = 2.0f*v.z;
01431                 const float w2 = w*w-0.5f;
01432                 const float dot2 = (x*vx + y*vy +z*vz);
01433                 return NvVec3
01434                 (
01435                         (vx*w2 - (y * vz - z * vy)*w + x*dot2),
01436                         (vy*w2 - (z * vx - x * vz)*w + y*dot2),
01437                         (vz*w2 - (x * vy - y * vx)*w + z*dot2)
01438                 );
01439 //              const NvVec3 qv(x,y,z);
01440 //              return (v*(w*w-0.5f) - (qv.cross(v))*w + qv*(qv.dot(v)))*2;
01441         }
01442
01446         NV_CUDA_CALLABLE NV_FORCE_INLINE        NvQuat& operator=(const NvQuat& p)                      { x = p.x; y = p.y; z = p.z; w = p.w;   return *this;           }
01447
01448         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat& operator*= (const NvQuat& q)
01449         {
01450                 const NvReal tx = w*q.x + q.w*x + y*q.z - q.y*z;
01451                 const NvReal ty = w*q.y + q.w*y + z*q.x - q.z*x;
01452                 const NvReal tz = w*q.z + q.w*z + x*q.y - q.x*y;
01453
01454                 w = w*q.w - q.x*x - y*q.y - q.z*z;
01455                 x = tx;
01456                 y = ty;
01457                 z = tz;
01458
01459                 return *this;
01460         }
01461
01462         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat& operator+= (const NvQuat& q)
01463         {
01464                 x+=q.x;
01465                 y+=q.y;
01466                 z+=q.z;
01467                 w+=q.w;
01468                 return *this;
01469         }
01470
01471         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat& operator-= (const NvQuat& q)
01472         {
01473                 x-=q.x;
01474                 y-=q.y;
01475                 z-=q.z;
01476                 w-=q.w;
01477                 return *this;
01478         }
01479
01480         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat& operator*= (const NvReal s)
01481         {
01482                 x*=s;
01483                 y*=s;
01484                 z*=s;
01485                 w*=s;
01486                 return *this;
01487         }
01488
01490         NV_CUDA_CALLABLE NV_INLINE NvQuat operator*(const NvQuat& q) const
01491         {
01492                 return NvQuat(w*q.x + q.w*x + y*q.z - q.y*z,
01493                                           w*q.y + q.w*y + z*q.x - q.z*x,
01494                                           w*q.z + q.w*z + x*q.y - q.x*y,
01495                                           w*q.w - x*q.x - y*q.y - z*q.z);
01496         }
01497
01499         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat operator+(const NvQuat& q) const
01500         {
01501                 return NvQuat(x+q.x,y+q.y,z+q.z,w+q.w);
01502         }
01503
01505         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat operator-() const
01506         {
01507                 return NvQuat(-x,-y,-z,-w);
01508         }
01509
01510
01511         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat operator-(const NvQuat& q) const
01512         {
01513                 return NvQuat(x-q.x,y-q.y,z-q.z,w-q.w);
01514         }
01515
01516
01517         NV_CUDA_CALLABLE NV_FORCE_INLINE NvQuat operator*(NvReal r) const
01518         {
01519                 return NvQuat(x*r,y*r,z*r,w*r);
01520         }
01521
01522
01524         NV_DEPRECATED static NV_CUDA_CALLABLE NV_INLINE NvQuat createIdentity() { return NvQuat(NvIdentity); }
01525
01527         NvReal x,y,z,w;
01528 };
01529
01530 // ******************************************
01531 // FILE: NvPlane.h
01532 // ******************************************
01533
01539 class NvPlane
01540 {
01541 public:
01545         NV_CUDA_CALLABLE NV_FORCE_INLINE NvPlane()
01546         {
01547         }
01548
01552         NV_CUDA_CALLABLE NV_FORCE_INLINE NvPlane(NvReal nx, NvReal ny, NvReal nz, NvReal distance)
01553                 : n(nx, ny, nz)
01554                 , d(distance)
01555         {
01556         }
01557
01561         NV_CUDA_CALLABLE NV_FORCE_INLINE NvPlane(const NvVec3& normal, NvReal distance)
01562                 : n(normal)
01563                 , d(distance)
01564         {
01565         }
01566
01567
01571         NV_CUDA_CALLABLE NV_FORCE_INLINE NvPlane(const NvVec3& point, const NvVec3& normal)
01572                 : n(normal)
01573                 , d(-point.dot(n))              // p satisfies normal.dot(p) + d = 0
01574         {
01575         }
01576
01580         NV_CUDA_CALLABLE NV_FORCE_INLINE NvPlane(const NvVec3& p0, const NvVec3& p1, const NvVec3& p2)
01581         {
01582                 n = (p1 - p0).cross(p2 - p0).getNormalized();
01583                 d = -p0.dot(n);
01584         }
01585
01586         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal distance(const NvVec3& p) const
01587         {
01588                 return p.dot(n) + d;
01589         }
01590
01591         NV_CUDA_CALLABLE NV_FORCE_INLINE bool contains(const NvVec3& p) const
01592         {
01593                 return NvAbs(distance(p)) < (1.0e-7f);
01594         }
01595
01599         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 project(const NvVec3 & p) const
01600         {
01601                 return p - n * distance(p);
01602         }
01603
01607         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 pointInPlane() const
01608         {
01609                 return -n*d;
01610         }
01611
01616         NV_CUDA_CALLABLE NV_FORCE_INLINE void normalize()
01617         {
01618                 NvReal denom = 1.0f / n.magnitude();
01619                 n *= denom;
01620                 d *= denom;
01621         }
01622
01623
01624         NvVec3  n;
01625         NvReal  d;
01626 };
01627
01628 // ***************************************
01629 // FILE: NvTransform.h
01630 // ***************************************
01631
01636 class NvTransform
01637 {
01638 public:
01639         NvQuat q;
01640         NvVec3 p;
01641
01642 //#define PXTRANSFORM_DEFAULT_CONSTRUCT_NAN
01643
01644         NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform()
01645 #ifdef PXTRANSFORM_DEFAULT_CONSTRUCT_IDENTITY
01646                 : q(0, 0, 0, 1), p(0, 0, 0)
01647 #elif defined(PXTRANSFORM_DEFAULT_CONSTRUCT_NAN)
01648 #define invalid NvSqrt(-1.0f)
01649                 : q(invalid, invalid, invalid, invalid), p(invalid, invalid, invalid)
01650 #undef invalid
01651 #endif
01652         {
01653         }
01654
01655         NV_CUDA_CALLABLE NV_FORCE_INLINE explicit NvTransform(const NvVec3& position): q(NvIdentity), p(position)
01656         {
01657         }
01658
01659         NV_CUDA_CALLABLE NV_FORCE_INLINE explicit NvTransform(NvIDENTITY r)
01660                 : q(NvIdentity), p(NvZero)
01661         {
01662                 NV_UNUSED(r);
01663         }
01664
01665         NV_CUDA_CALLABLE NV_FORCE_INLINE explicit NvTransform(const NvQuat& orientation): q(orientation), p(0)
01666         {
01667                 NV_ASSERT(orientation.isSane());
01668         }
01669
01670         NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform(NvReal x, NvReal y, NvReal z, NvQuat aQ = NvQuat(NvIdentity))
01671                 : q(aQ), p(x, y, z)
01672         {
01673         }
01674
01675         NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform(const NvVec3& p0, const NvQuat& q0): q(q0), p(p0)
01676         {
01677                 NV_ASSERT(q0.isSane());
01678         }
01679
01680         NV_CUDA_CALLABLE NV_FORCE_INLINE explicit NvTransform(const NvMat44& m);        // defined in NvMat44.h
01681
01682         NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform operator*(const NvTransform& x) const
01683         {
01684                 NV_ASSERT(x.isSane());
01685                 return transform(x);
01686         }
01687
01688         NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform getInverse() const
01689         {
01690                 NV_ASSERT(isFinite());
01691                 return NvTransform(q.rotateInv(-p),q.getConjugate());
01692         }
01693
01694
01695         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 transform(const NvVec3& input) const
01696         {
01697                 NV_ASSERT(isFinite());
01698                 return q.rotate(input) + p;
01699         }
01700
01701         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 transformInv(const NvVec3& input) const
01702         {
01703                 NV_ASSERT(isFinite());
01704                 return q.rotateInv(input-p);
01705         }
01706
01707         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 rotate(const NvVec3& input) const
01708         {
01709                 NV_ASSERT(isFinite());
01710                 return q.rotate(input);
01711         }
01712
01713         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 rotateInv(const NvVec3& input) const
01714         {
01715                 NV_ASSERT(isFinite());
01716                 return q.rotateInv(input);
01717         }
01718
01720         NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform transform(const NvTransform& src) const
01721         {
01722                 NV_ASSERT(src.isSane());
01723                 NV_ASSERT(isSane());
01724                 // src = [srct, srcr] -> [r*srct + t, r*srcr]
01725                 return NvTransform(q.rotate(src.p) + p, q*src.q);
01726         }
01727
01732         NV_CUDA_CALLABLE bool isValid() const
01733         {
01734                 return p.isFinite() && q.isFinite() && q.isUnit();
01735         }
01736
01741         NV_CUDA_CALLABLE bool isSane() const
01742         {
01743               return isFinite() && q.isSane();
01744         }
01745
01746
01750         NV_CUDA_CALLABLE NV_FORCE_INLINE bool isFinite() const { return p.isFinite() && q.isFinite(); }
01751
01753         NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform transformInv(const NvTransform& src) const
01754         {
01755                 NV_ASSERT(src.isSane());
01756                 NV_ASSERT(isFinite());
01757                 // src = [srct, srcr] -> [r^-1*(srct-t), r^-1*srcr]
01758                 NvQuat qinv = q.getConjugate();
01759                 return NvTransform(qinv.rotate(src.p - p), qinv*src.q);
01760         }
01761
01762
01763
01769         NV_DEPRECATED static NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform createIdentity()
01770         {
01771                 return NvTransform(NvIdentity);
01772         }
01773
01778         NV_CUDA_CALLABLE NV_FORCE_INLINE NvPlane transform(const NvPlane& plane) const
01779         {
01780                 NvVec3 transformedNormal = rotate(plane.n);
01781                 return NvPlane(transformedNormal, plane.d - p.dot(transformedNormal));
01782         }
01783
01788         NV_CUDA_CALLABLE NV_FORCE_INLINE NvPlane inverseTransform(const NvPlane& plane) const
01789         {
01790                 NvVec3 transformedNormal = rotateInv(plane.n);
01791                 return NvPlane(transformedNormal, plane.d + p.dot(plane.n));
01792         }
01793
01794
01798         NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform getNormalized() const
01799         {
01800                 return NvTransform(p, q.getNormalized());
01801         }
01802
01803 };
01804
01805 // **************************************
01806 // FILE: NvMat33.h
01807 // **************************************
01808
01856 class NvMat33
01857 {
01858 public:
01860         NV_CUDA_CALLABLE NV_INLINE NvMat33()
01861         {}
01862
01864         NV_CUDA_CALLABLE NV_INLINE NvMat33(NvIDENTITY r)
01865                 : column0(1.0f,0.0f,0.0f), column1(0.0f,1.0f,0.0f), column2(0.0f,0.0f,1.0f)
01866         {
01867                 NV_UNUSED(r);
01868         }
01869
01871         NV_CUDA_CALLABLE NV_INLINE NvMat33(NvZERO r)
01872                 : column0(0.0f), column1(0.0f), column2(0.0f)
01873         {
01874                 NV_UNUSED(r);
01875         }
01876
01877
01879         NV_CUDA_CALLABLE NvMat33(const NvVec3& col0, const NvVec3& col1, const NvVec3& col2)
01880                 : column0(col0), column1(col1), column2(col2)
01881         {}
01882
01883
01885         explicit NV_CUDA_CALLABLE NV_INLINE NvMat33(NvReal r)
01886                 : column0(r,0.0f,0.0f), column1(0.0f,r,0.0f), column2(0.0f,0.0f,r)
01887         {}
01888
01889
01891         explicit NV_CUDA_CALLABLE NV_INLINE NvMat33(NvReal values[]):
01892                 column0(values[0],values[1],values[2]),
01893                 column1(values[3],values[4],values[5]),
01894                 column2(values[6],values[7],values[8])
01895         {
01896         }
01897
01899         explicit NV_CUDA_CALLABLE NV_FORCE_INLINE NvMat33(const NvQuat& q)
01900         {
01901                 const NvReal x = q.x;
01902                 const NvReal y = q.y;
01903                 const NvReal z = q.z;
01904                 const NvReal w = q.w;
01905
01906                 const NvReal x2 = x + x;
01907                 const NvReal y2 = y + y;
01908                 const NvReal z2 = z + z;
01909
01910                 const NvReal xx = x2*x;
01911                 const NvReal yy = y2*y;
01912                 const NvReal zz = z2*z;
01913
01914                 const NvReal xy = x2*y;
01915                 const NvReal xz = x2*z;
01916                 const NvReal xw = x2*w;
01917
01918                 const NvReal yz = y2*z;
01919                 const NvReal yw = y2*w;
01920                 const NvReal zw = z2*w;
01921
01922                 column0 = NvVec3(1.0f - yy - zz, xy + zw, xz - yw);
01923                 column1 = NvVec3(xy - zw, 1.0f - xx - zz, yz + xw);
01924                 column2 = NvVec3(xz + yw, yz - xw, 1.0f - xx - yy);
01925         }
01926
01928         NV_CUDA_CALLABLE NV_INLINE NvMat33(const NvMat33& other)
01929                 : column0(other.column0), column1(other.column1), column2(other.column2)
01930         {}
01931
01933         NV_CUDA_CALLABLE NV_FORCE_INLINE NvMat33& operator=(const NvMat33& other)
01934         {
01935                 column0 = other.column0;
01936                 column1 = other.column1;
01937                 column2 = other.column2;
01938                 return *this;
01939         }
01940
01942         NV_DEPRECATED NV_CUDA_CALLABLE NV_INLINE static NvMat33 createIdentity()
01943         {
01944                 return NvMat33(NvIdentity);
01945         }
01946
01948         NV_DEPRECATED NV_CUDA_CALLABLE NV_INLINE static NvMat33 createZero()
01949         {
01950                 return NvMat33(NvZero); // NvMat33(0) is ambiguous, it can either be the array constructor or the scalar constructor
01951         }
01952
01954         NV_CUDA_CALLABLE NV_INLINE static NvMat33 createDiagonal(const NvVec3& d)
01955         {
01956                 return NvMat33(NvVec3(d.x,0.0f,0.0f), NvVec3(0.0f,d.y,0.0f), NvVec3(0.0f,0.0f,d.z));
01957         }
01958
01959
01961         NV_CUDA_CALLABLE NV_FORCE_INLINE NvMat33 getTranspose() const
01962         {
01963                 const NvVec3 v0(column0.x, column1.x, column2.x);
01964                 const NvVec3 v1(column0.y, column1.y, column2.y);
01965                 const NvVec3 v2(column0.z, column1.z, column2.z);
01966
01967                 return NvMat33(v0,v1,v2);
01968         }
01969
01971         NV_CUDA_CALLABLE NV_INLINE NvMat33 getInverse() const
01972         {
01973                 const NvReal det = getDeterminant();
01974                 NvMat33 inverse;
01975
01976                 if(det != 0)
01977                 {
01978                         const NvReal invDet = 1.0f/det;
01979
01980                         inverse.column0[0] = invDet * (column1[1]*column2[2] - column2[1]*column1[2]);
01981                         inverse.column0[1] = invDet *-(column0[1]*column2[2] - column2[1]*column0[2]);
01982                         inverse.column0[2] = invDet * (column0[1]*column1[2] - column0[2]*column1[1]);
01983
01984                         inverse.column1[0] = invDet *-(column1[0]*column2[2] - column1[2]*column2[0]);
01985                         inverse.column1[1] = invDet * (column0[0]*column2[2] - column0[2]*column2[0]);
01986                         inverse.column1[2] = invDet *-(column0[0]*column1[2] - column0[2]*column1[0]);
01987
01988                         inverse.column2[0] = invDet * (column1[0]*column2[1] - column1[1]*column2[0]);
01989                         inverse.column2[1] = invDet *-(column0[0]*column2[1] - column0[1]*column2[0]);
01990                         inverse.column2[2] = invDet * (column0[0]*column1[1] - column1[0]*column0[1]);
01991
01992                         return inverse;
01993                 }
01994                 else
01995                 {
01996                         return createIdentity();
01997                 }
01998         }
01999
02001         NV_CUDA_CALLABLE NV_INLINE NvReal getDeterminant() const
02002         {
02003                 return column0.dot(column1.cross(column2));
02004         }
02005
02007         NV_CUDA_CALLABLE NV_INLINE NvMat33 operator-() const
02008         {
02009                 return NvMat33(-column0, -column1, -column2);
02010         }
02011
02013         NV_CUDA_CALLABLE NV_INLINE NvMat33 operator+(const NvMat33& other) const
02014         {
02015                 return NvMat33( column0+other.column0,
02016                                           column1+other.column1,
02017                                           column2+other.column2);
02018         }
02019
02021         NV_CUDA_CALLABLE NV_INLINE NvMat33 operator-(const NvMat33& other) const
02022         {
02023                 return NvMat33( column0-other.column0,
02024                                           column1-other.column1,
02025                                           column2-other.column2);
02026         }
02027
02029         NV_CUDA_CALLABLE NV_INLINE NvMat33 operator*(NvReal scalar) const
02030         {
02031                 return NvMat33(column0*scalar, column1*scalar, column2*scalar);
02032         }
02033
02034         friend NvMat33 operator*(NvReal, const NvMat33&);
02035
02037         NV_CUDA_CALLABLE NV_INLINE NvVec3 operator*(const NvVec3& vec) const
02038         {
02039                 return transform(vec);
02040         }
02041
02043         NV_CUDA_CALLABLE NV_FORCE_INLINE NvMat33 operator*(const NvMat33& other) const
02044         {
02045                 //Rows from this <dot> columns from other
02046                 //column0 = transform(other.column0) etc
02047                 return NvMat33(transform(other.column0), transform(other.column1), transform(other.column2));
02048         }
02049
02050         // a <op>= b operators
02051
02053         NV_CUDA_CALLABLE NV_INLINE NvMat33& operator+=(const NvMat33& other)
02054         {
02055                 column0 += other.column0;
02056                 column1 += other.column1;
02057                 column2 += other.column2;
02058                 return *this;
02059         }
02060
02062         NV_CUDA_CALLABLE NV_INLINE NvMat33& operator-=(const NvMat33& other)
02063         {
02064                 column0 -= other.column0;
02065                 column1 -= other.column1;
02066                 column2 -= other.column2;
02067                 return *this;
02068         }
02069
02071         NV_CUDA_CALLABLE NV_INLINE NvMat33& operator*=(NvReal scalar)
02072         {
02073                 column0 *= scalar;
02074                 column1 *= scalar;
02075                 column2 *= scalar;
02076                 return *this;
02077         }
02078
02080         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal operator()(unsigned int row, unsigned int col) const
02081         {
02082                 return (*this)[col][row];
02083         }
02084
02086         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal& operator()(unsigned int row, unsigned int col)
02087         {
02088                 return (*this)[col][row];
02089         }
02090
02091         // Transform etc
02092
02094         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 transform(const NvVec3& other) const
02095         {
02096                 return column0*other.x + column1*other.y + column2*other.z;
02097         }
02098
02100         NV_CUDA_CALLABLE NV_INLINE NvVec3 transformTranspose(const NvVec3& other) const
02101         {
02102                 return NvVec3(  column0.dot(other),
02103                                                 column1.dot(other),
02104                                                 column2.dot(other));
02105         }
02106
02107         NV_CUDA_CALLABLE NV_FORCE_INLINE const NvReal* front() const
02108         {
02109                 return &column0.x;
02110         }
02111
02112         NV_CUDA_CALLABLE NV_FORCE_INLINE                        NvVec3& operator[](int num)                     {return (&column0)[num];}
02113         NV_CUDA_CALLABLE NV_FORCE_INLINE                        NvVec3& operator[](unsigned int num)                    {return (&column0)[num];}
02114         NV_CUDA_CALLABLE NV_FORCE_INLINE const  NvVec3& operator[](int num) const       {return (&column0)[num];}
02115         NV_CUDA_CALLABLE NV_FORCE_INLINE const  NvVec3& operator[](unsigned int num) const      {return (&column0)[num];}
02116
02117         //Data, see above for format!
02118
02119         NvVec3 column0, column1, column2; //the three base vectors
02120 };
02121
02122 // implementation from NvQuat.h
02123 NV_CUDA_CALLABLE NV_INLINE NvQuat::NvQuat(const NvMat33& m)
02124 {
02125         NvReal tr = m(0,0) + m(1,1) + m(2,2), h;
02126         if(tr >= 0)
02127         {
02128                 h = NvSqrt(tr +1);
02129                 w = 0.5f * h;
02130                 h = 0.5f / h;
02131
02132                 x = (m(2,1) - m(1,2)) * h;
02133                 y = (m(0,2) - m(2,0)) * h;
02134                 z = (m(1,0) - m(0,1)) * h;
02135         }
02136         else
02137         {
02138                 unsigned int i = 0;
02139                 if (m(1,1) > m(0,0))
02140                         i = 1;
02141                 if (m(2,2) > m(i,i))
02142                         i = 2;
02143                 switch (i)
02144                 {
02145                 case 0:
02146                         h = NvSqrt((m(0,0) - (m(1,1) + m(2,2))) + 1);
02147                         x = 0.5f * h;
02148                         h = 0.5f / h;
02149
02150                         y = (m(0,1) + m(1,0)) * h;
02151                         z = (m(2,0) + m(0,2)) * h;
02152                         w = (m(2,1) - m(1,2)) * h;
02153                         break;
02154                 case 1:
02155                         h = NvSqrt((m(1,1) - (m(2,2) + m(0,0))) + 1);
02156                         y = 0.5f * h;
02157                         h = 0.5f / h;
02158
02159                         z = (m(1,2) + m(2,1)) * h;
02160                         x = (m(0,1) + m(1,0)) * h;
02161                         w = (m(0,2) - m(2,0)) * h;
02162                         break;
02163                 case 2:
02164                         h = NvSqrt((m(2,2) - (m(0,0) + m(1,1))) + 1);
02165                         z = 0.5f * h;
02166                         h = 0.5f / h;
02167
02168                         x = (m(2,0) + m(0,2)) * h;
02169                         y = (m(1,2) + m(2,1)) * h;
02170                         w = (m(1,0) - m(0,1)) * h;
02171                         break;
02172                 default: // Make compiler happy
02173                         x = y = z = w = 0;
02174                         break;
02175                 }
02176         }
02177 }
02178
02179 // *******************************
02180 // FILE: NvBounds3.h
02181 // *******************************
02182
02183 // maximum extents defined such that floating point exceptions are avoided for standard use cases
02184 #define NV_MAX_BOUNDS_EXTENTS (NV_MAX_REAL * 0.25f)
02185
02195 class NvBounds3
02196 {
02197 public:
02198
02203         NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3()    {}
02204
02208         NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3(const NvVec3& minimum, const NvVec3& maximum);
02209
02213         static NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3 empty();
02214
02220         static NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3 boundsOfPoints(const NvVec3& v0, const NvVec3& v1);
02221
02227         static NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3 centerExtents(const NvVec3& center, const NvVec3& extent);
02228
02232         static NV_CUDA_CALLABLE NV_INLINE NvBounds3 basisExtent(const NvVec3& center, const NvMat33& basis, const NvVec3& extent);
02233
02237         static NV_CUDA_CALLABLE NV_INLINE NvBounds3 poseExtent(const NvTransform& pose, const NvVec3& extent);
02238
02247         static NV_CUDA_CALLABLE NV_INLINE NvBounds3 transformSafe(const NvMat33& matrix, const NvBounds3& bounds);
02248
02257         static NV_CUDA_CALLABLE NV_INLINE NvBounds3 transformFast(const NvMat33& matrix, const NvBounds3& bounds);
02258
02267         static NV_CUDA_CALLABLE NV_INLINE NvBounds3 transformSafe(const NvTransform& transform, const NvBounds3& bounds);
02268
02277         static NV_CUDA_CALLABLE NV_INLINE NvBounds3 transformFast(const NvTransform& transform, const NvBounds3& bounds);
02278
02282         NV_CUDA_CALLABLE NV_FORCE_INLINE void setEmpty();
02283
02287         NV_CUDA_CALLABLE NV_FORCE_INLINE void setMaximal();
02288
02293         NV_CUDA_CALLABLE NV_FORCE_INLINE void include(const NvVec3& v);
02294
02299         NV_CUDA_CALLABLE NV_FORCE_INLINE void include(const NvBounds3& b);
02300
02301         NV_CUDA_CALLABLE NV_FORCE_INLINE bool isEmpty() const;
02302
02307         NV_CUDA_CALLABLE NV_FORCE_INLINE bool intersects(const NvBounds3& b) const;
02308
02314         NV_CUDA_CALLABLE NV_FORCE_INLINE bool intersects1D(const NvBounds3& a, uint32_t axis)   const;
02315
02320         NV_CUDA_CALLABLE NV_FORCE_INLINE bool contains(const NvVec3& v) const;
02321
02326         NV_CUDA_CALLABLE NV_FORCE_INLINE bool isInside(const NvBounds3& box) const;
02327
02331         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 getCenter() const;
02332
02336         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal getCenter(uint32_t axis)        const;
02337
02341         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal getExtents(uint32_t axis)       const;
02342
02346         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 getDimensions() const;
02347
02351         NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 getExtents() const;
02352
02360         NV_CUDA_CALLABLE NV_FORCE_INLINE void scaleSafe(float scale);
02361
02369         NV_CUDA_CALLABLE NV_FORCE_INLINE void scaleFast(float scale);
02370
02376         NV_CUDA_CALLABLE NV_FORCE_INLINE void fattenSafe(NvReal distance);
02377
02383         NV_CUDA_CALLABLE NV_FORCE_INLINE void fattenFast(NvReal distance);
02384
02388         NV_CUDA_CALLABLE NV_FORCE_INLINE bool isFinite() const;
02389
02393         NV_CUDA_CALLABLE NV_FORCE_INLINE bool isValid() const;
02394
02395         NvVec3 minimum, maximum;
02396 };
02397
02398
02399 NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3::NvBounds3(const NvVec3& minimum, const NvVec3& maximum)
02400 : minimum(minimum), maximum(maximum)
02401 {
02402 }
02403
02404 NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3 NvBounds3::empty()
02405 {
02406         return NvBounds3(NvVec3(NV_MAX_BOUNDS_EXTENTS), NvVec3(-NV_MAX_BOUNDS_EXTENTS));
02407 }
02408
02409 NV_CUDA_CALLABLE NV_FORCE_INLINE bool NvBounds3::isFinite() const
02410 {
02411         return minimum.isFinite() && maximum.isFinite();
02412 }
02413
02414 NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3 NvBounds3::boundsOfPoints(const NvVec3& v0, const NvVec3& v1)
02415 {
02416         return NvBounds3(v0.minimum(v1), v0.maximum(v1));
02417 }
02418
02419 NV_CUDA_CALLABLE NV_FORCE_INLINE NvBounds3 NvBounds3::centerExtents(const NvVec3& center, const NvVec3& extent)
02420 {
02421         return NvBounds3(center - extent, center + extent);
02422 }
02423
02424 NV_CUDA_CALLABLE NV_INLINE NvBounds3 NvBounds3::basisExtent(const NvVec3& center, const NvMat33& basis, const NvVec3& extent)
02425 {
02426         // extended basis vectors
02427         NvVec3 c0 = basis.column0 * extent.x;
02428         NvVec3 c1 = basis.column1 * extent.y;
02429         NvVec3 c2 = basis.column2 * extent.z;
02430
02431         NvVec3 w;
02432         // find combination of base vectors that produces max. distance for each component = sum of abs()
02433         w.x = NvAbs(c0.x) + NvAbs(c1.x) + NvAbs(c2.x);
02434         w.y = NvAbs(c0.y) + NvAbs(c1.y) + NvAbs(c2.y);
02435         w.z = NvAbs(c0.z) + NvAbs(c1.z) + NvAbs(c2.z);
02436
02437         return NvBounds3(center - w, center + w);
02438 }
02439
02440 NV_CUDA_CALLABLE NV_INLINE NvBounds3 NvBounds3::poseExtent(const NvTransform& pose, const NvVec3& extent)
02441 {
02442         return basisExtent(pose.p, NvMat33(pose.q), extent);
02443 }
02444
02445 NV_CUDA_CALLABLE NV_FORCE_INLINE void NvBounds3::setEmpty()
02446 {
02447         minimum = NvVec3(NV_MAX_BOUNDS_EXTENTS);
02448         maximum = NvVec3(-NV_MAX_BOUNDS_EXTENTS);
02449 }
02450
02451 NV_CUDA_CALLABLE NV_FORCE_INLINE void NvBounds3::setMaximal()
02452 {
02453         minimum = NvVec3(-NV_MAX_BOUNDS_EXTENTS);
02454         maximum = NvVec3(NV_MAX_BOUNDS_EXTENTS);
02455 }
02456
02457 NV_CUDA_CALLABLE NV_FORCE_INLINE void NvBounds3::include(const NvVec3& v)
02458 {
02459         NV_ASSERT(isValid());
02460         minimum = minimum.minimum(v);
02461         maximum = maximum.maximum(v);
02462 }
02463
02464 NV_CUDA_CALLABLE NV_FORCE_INLINE void NvBounds3::include(const NvBounds3& b)
02465 {
02466         NV_ASSERT(isValid());
02467         minimum = minimum.minimum(b.minimum);
02468         maximum = maximum.maximum(b.maximum);
02469 }
02470
02471 NV_CUDA_CALLABLE NV_FORCE_INLINE bool NvBounds3::isEmpty() const
02472 {
02473         NV_ASSERT(isValid());
02474         return minimum.x > maximum.x;
02475 }
02476
02477 NV_CUDA_CALLABLE NV_FORCE_INLINE bool NvBounds3::intersects(const NvBounds3& b) const
02478 {
02479         NV_ASSERT(isValid() && b.isValid());
02480         return !(b.minimum.x > maximum.x || minimum.x > b.maximum.x ||
02481                          b.minimum.y > maximum.y || minimum.y > b.maximum.y ||
02482                          b.minimum.z > maximum.z || minimum.z > b.maximum.z);
02483 }
02484
02485 NV_CUDA_CALLABLE NV_FORCE_INLINE bool NvBounds3::intersects1D(const NvBounds3& a, uint32_t axis)        const
02486 {
02487         NV_ASSERT(isValid() && a.isValid());
02488         return maximum[axis] >= a.minimum[axis] && a.maximum[axis] >= minimum[axis];
02489 }
02490
02491 NV_CUDA_CALLABLE NV_FORCE_INLINE bool NvBounds3::contains(const NvVec3& v) const
02492 {
02493         NV_ASSERT(isValid());
02494
02495         return !(v.x < minimum.x || v.x > maximum.x ||
02496                 v.y < minimum.y || v.y > maximum.y ||
02497                 v.z < minimum.z || v.z > maximum.z);
02498 }
02499
02500 NV_CUDA_CALLABLE NV_FORCE_INLINE bool NvBounds3::isInside(const NvBounds3& box) const
02501 {
02502         NV_ASSERT(isValid() && box.isValid());
02503         if(box.minimum.x>minimum.x)     return false;
02504         if(box.minimum.y>minimum.y)     return false;
02505         if(box.minimum.z>minimum.z)     return false;
02506         if(box.maximum.x<maximum.x)     return false;
02507         if(box.maximum.y<maximum.y)     return false;
02508         if(box.maximum.z<maximum.z)     return false;
02509         return true;
02510 }
02511
02512 NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 NvBounds3::getCenter() const
02513 {
02514         NV_ASSERT(isValid());
02515         return (minimum+maximum) * 0.5f;
02516 }
02517
02518 NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal NvBounds3::getCenter(uint32_t axis)     const
02519 {
02520         NV_ASSERT(isValid());
02521         return (minimum[axis] + maximum[axis]) * 0.5f;
02522 }
02523
02524 NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal NvBounds3::getExtents(uint32_t axis)    const
02525 {
02526         NV_ASSERT(isValid());
02527         return (maximum[axis] - minimum[axis]) * 0.5f;
02528 }
02529
02530 NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 NvBounds3::getDimensions() const
02531 {
02532         NV_ASSERT(isValid());
02533         return maximum - minimum;
02534 }
02535
02536 NV_CUDA_CALLABLE NV_FORCE_INLINE NvVec3 NvBounds3::getExtents() const
02537 {
02538         NV_ASSERT(isValid());
02539         return getDimensions() * 0.5f;
02540 }
02541
02542 NV_CUDA_CALLABLE NV_FORCE_INLINE void NvBounds3::scaleSafe(float scale)
02543 {
02544         NV_ASSERT(isValid());
02545         if (!isEmpty())
02546                 scaleFast(scale);
02547 }
02548
02549 NV_CUDA_CALLABLE NV_FORCE_INLINE void NvBounds3::scaleFast(float scale)
02550 {
02551         NV_ASSERT(isValid());
02552         *this = centerExtents(getCenter(), getExtents() * scale);
02553 }
02554
02555 NV_CUDA_CALLABLE NV_FORCE_INLINE void NvBounds3::fattenSafe(NvReal distance)
02556 {
02557         NV_ASSERT(isValid());
02558         if (!isEmpty())
02559                 fattenFast(distance);
02560 }
02561
02562 NV_CUDA_CALLABLE NV_FORCE_INLINE void NvBounds3::fattenFast(NvReal distance)
02563 {
02564         NV_ASSERT(isValid());
02565         minimum.x -= distance;
02566         minimum.y -= distance;
02567         minimum.z -= distance;
02568
02569         maximum.x += distance;
02570         maximum.y += distance;
02571         maximum.z += distance;
02572 }
02573
02574 NV_CUDA_CALLABLE NV_INLINE NvBounds3 NvBounds3::transformSafe(const NvMat33& matrix, const NvBounds3& bounds)
02575 {
02576         NV_ASSERT(bounds.isValid());
02577         return !bounds.isEmpty() ? transformFast(matrix, bounds) : bounds;
02578 }
02579
02580 NV_CUDA_CALLABLE NV_INLINE NvBounds3 NvBounds3::transformFast(const NvMat33& matrix, const NvBounds3& bounds)
02581 {
02582         NV_ASSERT(bounds.isValid());
02583         return NvBounds3::basisExtent(matrix * bounds.getCenter(), matrix, bounds.getExtents());
02584 }
02585
02586 NV_CUDA_CALLABLE NV_INLINE NvBounds3 NvBounds3::transformSafe(const NvTransform& transform, const NvBounds3& bounds)
02587 {
02588         NV_ASSERT(bounds.isValid());
02589         return !bounds.isEmpty() ? transformFast(transform, bounds) : bounds;
02590 }
02591
02592 NV_CUDA_CALLABLE NV_INLINE NvBounds3 NvBounds3::transformFast(const NvTransform& transform, const NvBounds3& bounds)
02593 {
02594         NV_ASSERT(bounds.isValid());
02595         return NvBounds3::basisExtent(transform.transform(bounds.getCenter()), NvMat33(transform.q), bounds.getExtents());
02596 }
02597
02598 NV_CUDA_CALLABLE NV_FORCE_INLINE bool NvBounds3::isValid() const
02599 {
02600         return (isFinite() &&
02601                         (((minimum.x <= maximum.x) && (minimum.y <= maximum.y) && (minimum.z <= maximum.z)) ||
02602                          ((minimum.x == NV_MAX_BOUNDS_EXTENTS) && (minimum.y == NV_MAX_BOUNDS_EXTENTS) && (minimum.z == NV_MAX_BOUNDS_EXTENTS) &&
02603                           (maximum.x == -NV_MAX_BOUNDS_EXTENTS) && (maximum.y == -NV_MAX_BOUNDS_EXTENTS) && (maximum.z == -NV_MAX_BOUNDS_EXTENTS)))
02604                 );
02605 }
02606
02607 // ***********************************
02608 // FILE: NvMat44.h
02609 // ***********************************
02610
02619 class NvMat44
02620 {
02621 public:
02623         NV_CUDA_CALLABLE NV_INLINE NvMat44()
02624         {}
02625
02627         NV_CUDA_CALLABLE NV_INLINE NvMat44(NvIDENTITY r)
02628                 : column0(1.0f,0.0f,0.0f,0.0f), column1(0.0f,1.0f,0.0f,0.0f), column2(0.0f,0.0f,1.0f,0.0f), column3(0.0f,0.0f,0.0f,1.0f)
02629         {
02630                 NV_UNUSED(r);
02631         }
02632
02634         NV_CUDA_CALLABLE NV_INLINE NvMat44(NvZERO r)
02635                 : column0(NvZero), column1(NvZero), column2(NvZero), column3(NvZero)
02636         {
02637                 NV_UNUSED(r);
02638         }
02639
02641         NV_CUDA_CALLABLE NvMat44(const NvVec4& col0, const NvVec4& col1, const NvVec4& col2, const NvVec4 &col3)
02642                 : column0(col0), column1(col1), column2(col2), column3(col3)
02643         {}
02644
02646         explicit NV_CUDA_CALLABLE NV_INLINE NvMat44(NvReal r)
02647                 : column0(r,0.0f,0.0f,0.0f), column1(0.0f,r,0.0f,0.0f), column2(0.0f,0.0f,r,0.0f), column3(0.0f,0.0f,0.0f,r)
02648         {}
02649
02650
02652         NV_CUDA_CALLABLE NvMat44(const NvVec3& column0, const NvVec3& column1, const NvVec3& column2, const NvVec3& column3)
02653                 : column0(column0,0), column1(column1,0), column2(column2,0), column3(column3,1)
02654         {}
02655
02657         explicit NV_CUDA_CALLABLE NV_INLINE NvMat44(NvReal values[]):
02658                 column0(values[0],values[1],values[2], values[3]),
02659                 column1(values[4],values[5],values[6], values[7]),
02660                 column2(values[8],values[9],values[10], values[11]),
02661                 column3(values[12], values[13], values[14], values[15])
02662         {
02663         }
02664
02666         explicit NV_CUDA_CALLABLE NV_INLINE NvMat44(const NvQuat& q)
02667         {
02668                 const NvReal x = q.x;
02669                 const NvReal y = q.y;
02670                 const NvReal z = q.z;
02671                 const NvReal w = q.w;
02672
02673                 const NvReal x2 = x + x;
02674                 const NvReal y2 = y + y;
02675                 const NvReal z2 = z + z;
02676
02677                 const NvReal xx = x2*x;
02678                 const NvReal yy = y2*y;
02679                 const NvReal zz = z2*z;
02680
02681                 const NvReal xy = x2*y;
02682                 const NvReal xz = x2*z;
02683                 const NvReal xw = x2*w;
02684
02685                 const NvReal yz = y2*z;
02686                 const NvReal yw = y2*w;
02687                 const NvReal zw = z2*w;
02688
02689                 column0 = NvVec4(1.0f - yy - zz, xy + zw, xz - yw, 0.0f);
02690                 column1 = NvVec4(xy - zw, 1.0f - xx - zz, yz + xw, 0.0f);
02691                 column2 = NvVec4(xz + yw, yz - xw, 1.0f - xx - yy, 0.0f);
02692                 column3 = NvVec4(0.0f, 0.0f, 0.0f, 1.0f);
02693         }
02694
02696         explicit NV_CUDA_CALLABLE NV_INLINE NvMat44(const NvVec4& diagonal):
02697                 column0(diagonal.x,0.0f,0.0f,0.0f),
02698                 column1(0.0f,diagonal.y,0.0f,0.0f),
02699                 column2(0.0f,0.0f,diagonal.z,0.0f),
02700                 column3(0.0f,0.0f,0.0f,diagonal.w)
02701         {
02702         }
02703
02704         NV_CUDA_CALLABLE NvMat44(const NvMat33& orientation, const NvVec3& position):
02705                 column0(orientation.column0,0.0f),
02706                 column1(orientation.column1,0.0f),
02707                 column2(orientation.column2,0.0f),
02708                 column3(position,1)
02709         {
02710         }
02711
02712         NV_CUDA_CALLABLE NvMat44(const NvTransform& t)
02713         {
02714                 *this = NvMat44(NvMat33(t.q), t.p);
02715         }
02716
02718         NV_CUDA_CALLABLE NV_INLINE NvMat44(const NvMat44& other)
02719                 : column0(other.column0), column1(other.column1), column2(other.column2), column3(other.column3)
02720         {}
02721
02723         NV_CUDA_CALLABLE NV_INLINE const NvMat44& operator=(const NvMat44& other)
02724         {
02725                 column0 = other.column0;
02726                 column1 = other.column1;
02727                 column2 = other.column2;
02728                 column3 = other.column3;
02729                 return *this;
02730         }
02731
02733         NV_DEPRECATED NV_CUDA_CALLABLE NV_INLINE static NvMat44 createIdentity()
02734         {
02735                 return NvMat44(NvIdentity);
02736         }
02737
02738
02740         NV_DEPRECATED NV_CUDA_CALLABLE NV_INLINE static NvMat44 createZero()
02741         {
02742                 return NvMat44(NvZero);
02743         }
02744
02746         NV_CUDA_CALLABLE NV_INLINE NvMat44 getTranspose() const
02747         {
02748                 return NvMat44(NvVec4(column0.x, column1.x, column2.x, column3.x),
02749                                  NvVec4(column0.y, column1.y, column2.y, column3.y),
02750                                          NvVec4(column0.z, column1.z, column2.z, column3.z),
02751                                      NvVec4(column0.w, column1.w, column2.w, column3.w));
02752         }
02753
02755         NV_CUDA_CALLABLE NV_INLINE NvMat44 operator-() const
02756         {
02757                 return NvMat44(-column0, -column1, -column2, -column3);
02758         }
02759
02761         NV_CUDA_CALLABLE NV_INLINE NvMat44 operator+(const NvMat44& other) const
02762         {
02763                 return NvMat44( column0+other.column0,
02764                                           column1+other.column1,
02765                                           column2+other.column2,
02766                                           column3+other.column3);
02767         }
02768
02770         NV_CUDA_CALLABLE NV_INLINE NvMat44 operator-(const NvMat44& other) const
02771         {
02772                 return NvMat44( column0-other.column0,
02773                                           column1-other.column1,
02774                                           column2-other.column2,
02775                                           column3-other.column3);
02776         }
02777
02779         NV_CUDA_CALLABLE NV_INLINE NvMat44 operator*(NvReal scalar) const
02780         {
02781                 return NvMat44(column0*scalar, column1*scalar, column2*scalar, column3*scalar);
02782         }
02783
02784         friend NvMat44 operator*(NvReal, const NvMat44&);
02785
02787         NV_CUDA_CALLABLE NV_INLINE NvMat44 operator*(const NvMat44& other) const
02788         {
02789                 //Rows from this <dot> columns from other
02790                 //column0 = transform(other.column0) etc
02791                 return NvMat44(transform(other.column0), transform(other.column1), transform(other.column2), transform(other.column3));
02792         }
02793
02794         // a <op>= b operators
02795
02797         NV_CUDA_CALLABLE NV_INLINE NvMat44& operator+=(const NvMat44& other)
02798         {
02799                 column0 += other.column0;
02800                 column1 += other.column1;
02801                 column2 += other.column2;
02802                 column3 += other.column3;
02803                 return *this;
02804         }
02805
02807         NV_CUDA_CALLABLE NV_INLINE NvMat44& operator-=(const NvMat44& other)
02808         {
02809                 column0 -= other.column0;
02810                 column1 -= other.column1;
02811                 column2 -= other.column2;
02812                 column3 -= other.column3;
02813                 return *this;
02814         }
02815
02817         NV_CUDA_CALLABLE NV_INLINE NvMat44& operator*=(NvReal scalar)
02818         {
02819                 column0 *= scalar;
02820                 column1 *= scalar;
02821                 column2 *= scalar;
02822                 column3 *= scalar;
02823                 return *this;
02824         }
02825
02827         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal operator()(unsigned int row, unsigned int col) const
02828         {
02829                 return (*this)[(int)col][(int)row];
02830         }
02831
02833         NV_CUDA_CALLABLE NV_FORCE_INLINE NvReal& operator()(unsigned int row, unsigned int col)
02834         {
02835                 return (*this)[(int)col][(int)row];
02836         }
02837
02839         NV_CUDA_CALLABLE NV_INLINE NvVec4 transform(const NvVec4& other) const
02840         {
02841                 return column0*other.x + column1*other.y + column2*other.z + column3*other.w;
02842         }
02843
02845         NV_CUDA_CALLABLE NV_INLINE NvVec3 transform(const NvVec3& other) const
02846         {
02847                 return transform(NvVec4(other,1)).getXYZ();
02848         }
02849
02851         NV_CUDA_CALLABLE NV_INLINE const NvVec4 rotate(const NvVec4& other) const
02852         {
02853                 return column0*other.x + column1*other.y + column2*other.z;// + column3*0;
02854         }
02855
02857         NV_CUDA_CALLABLE NV_INLINE const NvVec3 rotate(const NvVec3& other) const
02858         {
02859                 return rotate(NvVec4(other,1)).getXYZ();
02860         }
02861
02862
02863         NV_CUDA_CALLABLE NV_INLINE NvVec3 getBasis(int num) const
02864         {
02865                 NV_ASSERT(num>=0 && num<3);
02866                 return (&column0)[num].getXYZ();
02867         }
02868
02869         NV_CUDA_CALLABLE NV_INLINE NvVec3 getPosition() const
02870         {
02871                 return column3.getXYZ();
02872         }
02873
02874         NV_CUDA_CALLABLE NV_INLINE void setPosition(const NvVec3& position)
02875         {
02876                 column3.x = position.x;
02877                 column3.y = position.y;
02878                 column3.z = position.z;
02879         }
02880
02881         NV_CUDA_CALLABLE NV_FORCE_INLINE const NvReal* front() const
02882         {
02883                 return &column0.x;
02884         }
02885
02886         NV_CUDA_CALLABLE NV_FORCE_INLINE                        NvVec4& operator[](int num)                     {return (&column0)[num];}
02887         NV_CUDA_CALLABLE NV_FORCE_INLINE const  NvVec4& operator[](int num)     const   {return (&column0)[num];}
02888
02889         NV_CUDA_CALLABLE NV_INLINE void scale(const NvVec4& p)
02890         {
02891                 column0 *= p.x;
02892                 column1 *= p.y;
02893                 column2 *= p.z;
02894                 column3 *= p.w;
02895         }
02896
02897         NV_CUDA_CALLABLE NV_INLINE NvMat44 inverseRT(void) const
02898         {
02899                 NvVec3 r0(column0.x, column1.x, column2.x),
02900                         r1(column0.y, column1.y, column2.y),
02901                         r2(column0.z, column1.z, column2.z);
02902
02903                 return NvMat44(r0, r1, r2, -(r0 * column3.x + r1 * column3.y + r2 * column3.z));
02904         }
02905
02906         NV_CUDA_CALLABLE NV_INLINE bool isFinite() const
02907         {
02908                 return column0.isFinite() && column1.isFinite() && column2.isFinite() && column3.isFinite();
02909         }
02910
02911
02912         //Data, see above for format!
02913
02914         NvVec4 column0, column1, column2, column3; //the four base vectors
02915 };
02916
02917 // implementation from NvTransform.h
02918 NV_CUDA_CALLABLE NV_FORCE_INLINE NvTransform::NvTransform(const NvMat44& m)
02919 {
02920         NvVec3 column0  = NvVec3(m.column0.x, m.column0.y, m.column0.z);
02921         NvVec3 column1  = NvVec3(m.column1.x, m.column1.y, m.column1.z);
02922         NvVec3 column2  = NvVec3(m.column2.x, m.column2.y, m.column2.z);
02923
02924         q = NvQuat(NvMat33(column0, column1, column2));
02925         p = NvVec3(m.column3.x, m.column3.y, m.column3.z);
02926 }
02927
02928 // *********************************
02929 // FILE: NvFlags.h
02930 // *********************************
02931
02961         template<typename enumtype, typename storagetype=uint32_t>
02962         class NvFlags
02963         {
02964         public:
02965                 typedef storagetype InternalType;
02966
02967                 NV_INLINE       explicit        NvFlags(const NvEMPTY&) {}
02968                 NV_INLINE                               NvFlags(void);
02969                 NV_INLINE                               NvFlags(enumtype e);
02970                 NV_INLINE                               NvFlags(const NvFlags<enumtype,storagetype> &f);
02971                 NV_INLINE       explicit        NvFlags(storagetype b);
02972
02973                 NV_INLINE bool                                                   isSet     (enumtype e) const;
02974                 NV_INLINE NvFlags<enumtype,storagetype> &set       (enumtype e);
02975                 NV_INLINE bool                           operator==(enumtype e) const;
02976                 NV_INLINE bool                           operator==(const NvFlags<enumtype,storagetype> &f) const;
02977                 NV_INLINE bool                           operator==(bool b) const;
02978                 NV_INLINE bool                           operator!=(enumtype e) const;
02979                 NV_INLINE bool                           operator!=(const NvFlags<enumtype,storagetype> &f) const;
02980
02981                 NV_INLINE NvFlags<enumtype,storagetype> &operator =(enumtype e);
02982
02983                 NV_INLINE NvFlags<enumtype,storagetype> &operator|=(enumtype e);
02984                 NV_INLINE NvFlags<enumtype,storagetype> &operator|=(const NvFlags<enumtype,storagetype> &f);
02985                 NV_INLINE NvFlags<enumtype,storagetype>  operator| (enumtype e) const;
02986                 NV_INLINE NvFlags<enumtype,storagetype>  operator| (const NvFlags<enumtype,storagetype> &f) const;
02987
02988                 NV_INLINE NvFlags<enumtype,storagetype> &operator&=(enumtype e);
02989                 NV_INLINE NvFlags<enumtype,storagetype> &operator&=(const NvFlags<enumtype,storagetype> &f);
02990                 NV_INLINE NvFlags<enumtype,storagetype>  operator& (enumtype e) const;
02991                 NV_INLINE NvFlags<enumtype,storagetype>  operator& (const NvFlags<enumtype,storagetype> &f) const;
02992
02993                 NV_INLINE NvFlags<enumtype,storagetype> &operator^=(enumtype e);
02994                 NV_INLINE NvFlags<enumtype,storagetype> &operator^=(const NvFlags<enumtype,storagetype> &f);
02995                 NV_INLINE NvFlags<enumtype,storagetype>  operator^ (enumtype e) const;
02996                 NV_INLINE NvFlags<enumtype,storagetype>  operator^ (const NvFlags<enumtype,storagetype> &f) const;
02997
02998                 NV_INLINE NvFlags<enumtype,storagetype>  operator~ (void) const;
02999
03000                 NV_INLINE                                operator bool(void) const;
03001                 NV_INLINE                                                                operator uint8_t(void) const;
03002                 NV_INLINE                                operator uint16_t(void) const;
03003                 NV_INLINE                                operator uint32_t(void) const;
03004
03005                 NV_INLINE void                           clear(enumtype e);
03006
03007         public:
03008                 friend NV_INLINE NvFlags<enumtype,storagetype> operator&(enumtype a, NvFlags<enumtype,storagetype> &b)
03009                 {
03010                         NvFlags<enumtype,storagetype> out;
03011                         out.mBits = a & b.mBits;
03012                         return out;
03013                 }
03014
03015         private:
03016                 storagetype  mBits;
03017         };
03018
03019         #define NV_FLAGS_OPERATORS(enumtype, storagetype)                                                                                         \
03020                 NV_INLINE NvFlags<enumtype, storagetype> operator|(enumtype a, enumtype b) { NvFlags<enumtype, storagetype> r(a); r |= b; return r; } \
03021                 NV_INLINE NvFlags<enumtype, storagetype> operator&(enumtype a, enumtype b) { NvFlags<enumtype, storagetype> r(a); r &= b; return r; } \
03022                 NV_INLINE NvFlags<enumtype, storagetype> operator~(enumtype a)             { return ~NvFlags<enumtype, storagetype>(a);             }
03023
03024         #define NV_FLAGS_TYPEDEF(x, y)  typedef NvFlags<x::Enum, y> x##s;       \
03025         NV_FLAGS_OPERATORS(x::Enum, y);
03026
03027         template<typename enumtype, typename storagetype>
03028         NV_INLINE NvFlags<enumtype,storagetype>::NvFlags(void)
03029         {
03030                 mBits = 0;
03031         }
03032
03033         template<typename enumtype, typename storagetype>
03034         NV_INLINE NvFlags<enumtype,storagetype>::NvFlags(enumtype e)
03035         {
03036                 mBits = static_cast<storagetype>(e);
03037         }
03038
03039         template<typename enumtype, typename storagetype>
03040         NV_INLINE NvFlags<enumtype,storagetype>::NvFlags(const NvFlags<enumtype,storagetype> &f)
03041         {
03042                 mBits = f.mBits;
03043         }
03044
03045         template<typename enumtype, typename storagetype>
03046         NV_INLINE NvFlags<enumtype,storagetype>::NvFlags(storagetype b)
03047         {
03048                 mBits = b;
03049         }
03050
03051         template<typename enumtype, typename storagetype>
03052         NV_INLINE bool NvFlags<enumtype,storagetype>::isSet(enumtype e) const
03053         {
03054                 return (mBits & static_cast<storagetype>(e)) == static_cast<storagetype>(e);
03055         }
03056
03057         template<typename enumtype, typename storagetype>
03058         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::set(enumtype e)
03059         {
03060                 mBits = static_cast<storagetype>(e);
03061                 return *this;
03062         }
03063
03064         template<typename enumtype, typename storagetype>
03065         NV_INLINE bool NvFlags<enumtype,storagetype>::operator==(enumtype e) const
03066         {
03067                 return mBits == static_cast<storagetype>(e);
03068         }
03069
03070         template<typename enumtype, typename storagetype>
03071         NV_INLINE bool NvFlags<enumtype,storagetype>::operator==(const NvFlags<enumtype,storagetype>& f) const
03072         {
03073                 return mBits == f.mBits;
03074         }
03075
03076         template<typename enumtype, typename storagetype>
03077         NV_INLINE bool NvFlags<enumtype,storagetype>::operator==(bool b) const
03078         {
03079                 return ((bool)*this) == b;
03080         }
03081
03082         template<typename enumtype, typename storagetype>
03083         NV_INLINE bool NvFlags<enumtype,storagetype>::operator!=(enumtype e) const
03084         {
03085                 return mBits != static_cast<storagetype>(e);
03086         }
03087
03088         template<typename enumtype, typename storagetype>
03089         NV_INLINE bool NvFlags<enumtype,storagetype>::operator!=(const NvFlags<enumtype,storagetype> &f) const
03090         {
03091                 return mBits != f.mBits;
03092         }
03093
03094         template<typename enumtype, typename storagetype>
03095         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator =(enumtype e)
03096         {
03097                 mBits = static_cast<storagetype>(e);
03098                 return *this;
03099         }
03100
03101         template<typename enumtype, typename storagetype>
03102         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator|=(enumtype e)
03103         {
03104                 mBits |= static_cast<storagetype>(e);
03105                 return *this;
03106         }
03107
03108         template<typename enumtype, typename storagetype>
03109         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator|=(const NvFlags<enumtype,storagetype> &f)
03110         {
03111                 mBits |= f.mBits;
03112                 return *this;
03113         }
03114
03115         template<typename enumtype, typename storagetype>
03116         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator| (enumtype e) const
03117         {
03118                 NvFlags<enumtype,storagetype> out(*this);
03119                 out |= e;
03120                 return out;
03121         }
03122
03123         template<typename enumtype, typename storagetype>
03124         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator| (const NvFlags<enumtype,storagetype> &f) const
03125         {
03126                 NvFlags<enumtype,storagetype> out(*this);
03127                 out |= f;
03128                 return out;
03129         }
03130
03131         template<typename enumtype, typename storagetype>
03132         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator&=(enumtype e)
03133         {
03134                 mBits &= static_cast<storagetype>(e);
03135                 return *this;
03136         }
03137
03138         template<typename enumtype, typename storagetype>
03139         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator&=(const NvFlags<enumtype,storagetype> &f)
03140         {
03141                 mBits &= f.mBits;
03142                 return *this;
03143         }
03144
03145         template<typename enumtype, typename storagetype>
03146         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator&(enumtype e) const
03147         {
03148                 NvFlags<enumtype,storagetype> out = *this;
03149                 out.mBits &= static_cast<storagetype>(e);
03150                 return out;
03151         }
03152
03153         template<typename enumtype, typename storagetype>
03154         NV_INLINE NvFlags<enumtype,storagetype>  NvFlags<enumtype,storagetype>::operator& (const NvFlags<enumtype,storagetype> &f) const
03155         {
03156                 NvFlags<enumtype,storagetype> out = *this;
03157                 out.mBits &= f.mBits;
03158                 return out;
03159         }
03160
03161         template<typename enumtype, typename storagetype>
03162         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator^=(enumtype e)
03163         {
03164                 mBits ^= static_cast<storagetype>(e);
03165                 return *this;
03166         }
03167
03168         template<typename enumtype, typename storagetype>
03169         NV_INLINE NvFlags<enumtype,storagetype> &NvFlags<enumtype,storagetype>::operator^=(const NvFlags<enumtype,storagetype> &f)
03170         {
03171                 mBits ^= f.mBits;
03172                 return *this;
03173         }
03174
03175         template<typename enumtype, typename storagetype>
03176         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator^ (enumtype e) const
03177         {
03178                 NvFlags<enumtype,storagetype> out = *this;
03179                 out.mBits ^= static_cast<storagetype>(e);
03180                 return out;
03181         }
03182
03183         template<typename enumtype, typename storagetype>
03184         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator^ (const NvFlags<enumtype,storagetype> &f) const
03185         {
03186                 NvFlags<enumtype,storagetype> out = *this;
03187                 out.mBits ^= f.mBits;
03188                 return out;
03189         }
03190
03191         template<typename enumtype, typename storagetype>
03192         NV_INLINE NvFlags<enumtype,storagetype> NvFlags<enumtype,storagetype>::operator~ (void) const
03193         {
03194                 NvFlags<enumtype,storagetype> out;
03195                 out.mBits = (storagetype)~mBits;
03196                 return out;
03197         }
03198
03199         template<typename enumtype, typename storagetype>
03200         NV_INLINE NvFlags<enumtype,storagetype>::operator bool(void) const
03201         {
03202                 return mBits ? true : false;
03203         }
03204
03205         template<typename enumtype, typename storagetype>
03206         NV_INLINE NvFlags<enumtype,storagetype>::operator uint8_t(void) const
03207         {
03208                 return static_cast<uint8_t>(mBits);
03209         }
03210
03211         template<typename enumtype, typename storagetype>
03212         NV_INLINE NvFlags<enumtype,storagetype>::operator uint16_t(void) const
03213         {
03214                 return static_cast<uint16_t>(mBits);
03215         }
03216
03217         template<typename enumtype, typename storagetype>
03218         NV_INLINE NvFlags<enumtype,storagetype>::operator uint32_t(void) const
03219         {
03220                 return static_cast<uint32_t>(mBits);
03221         }
03222
03223         template<typename enumtype, typename storagetype>
03224         NV_INLINE void NvFlags<enumtype,storagetype>::clear(enumtype e)
03225         {
03226                 mBits &= ~static_cast<storagetype>(e);
03227         }
03228
03229 #ifndef NV_DOXYGEN
03230 } // namespace nvidia
03231 #endif
03232
03236 #endif // NV_FOUNDATION_H


NVIDIA(R) NvFoundation Reference: Alphabetical List

Class Index

N

N
NvErrorCode (nvidia) NvMat33 (nvidia) NvPlane (nvidia) NvVec2 (nvidia)
NvAllocatorCallback (nvidia) | NvFlags (nvidia) | NvMat44 (nvidia) | NvQuat (nvidia) | NvVec3 (nvidia)
NvBounds3 (nvidia) | NvInputData (nvidia) | NvOutputStream (nvidia) | NvTransform (nvidia) | NvVec4 (nvidia)
NvErrorCallback (nvidia) | NvInputStream (nvidia)

N


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvAllocatorCallback Member List

This is the complete list of members for nvidia::NvAllocatorCallback, including all inherited members.

allocate(size_t size, const char *typeName, const char *filename, int line)=0 | nvidia::NvAllocatorCallback | [pure virtual]
deallocate(void *ptr)=0 | nvidia::NvAllocatorCallback | [pure virtual]
~NvAllocatorCallback() | nvidia::NvAllocatorCallback | [inline, virtual]


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvBounds3 Member List

This is the complete list of members for nvidia::NvBounds3, including all inherited members.

basisExtent(const NvVec3 &center, const NvMat33 &basis, const NvVec3 &extent) | nvidia::NvBounds3 | [static]
boundsOfPoints(const NvVec3 &v0, const NvVec3 &v1) | nvidia::NvBounds3 | [static]
centerExtents(const NvVec3 &center, const NvVec3 &extent) | nvidia::NvBounds3 | [static]
contains(const NvVec3 &v) const | nvidia::NvBounds3 |
empty() | nvidia::NvBounds3 | [static]
fattenFast(NvReal distance) | nvidia::NvBounds3 |
fattenSafe(NvReal distance) | nvidia::NvBounds3 |
getCenter() const | nvidia::NvBounds3 |
getCenter(uint32_t axis) const | nvidia::NvBounds3 |
getDimensions() const | nvidia::NvBounds3 |
getExtents(uint32_t axis) const | nvidia::NvBounds3 |
getExtents() const | nvidia::NvBounds3 |
include(const NvVec3 &v) | nvidia::NvBounds3 |
include(const NvBounds3 &b) | nvidia::NvBounds3 |
intersects(const NvBounds3 &b) const | nvidia::NvBounds3 |
intersects1D(const NvBounds3 &a, uint32_t axis) const | nvidia::NvBounds3 |
isEmpty() const (defined in nvidia::NvBounds3) | nvidia::NvBounds3 |
isFinite() const | nvidia::NvBounds3 |
isInside(const NvBounds3 &box) const | nvidia::NvBounds3 |
isValid() const | nvidia::NvBounds3 |
maximum (defined in nvidia::NvBounds3) | nvidia::NvBounds3 |
minimum (defined in nvidia::NvBounds3) | nvidia::NvBounds3 |
NvBounds3() | nvidia::NvBounds3 | [inline]
NvBounds3(const NvVec3 &minimum, const NvVec3 &maximum) | nvidia::NvBounds3 |
poseExtent(const NvTransform &pose, const NvVec3 &extent) | nvidia::NvBounds3 | [static]
scaleFast(float scale) | nvidia::NvBounds3 |
scaleSafe(float scale) | nvidia::NvBounds3 |
setEmpty() | nvidia::NvBounds3 |
setMaximal() | nvidia::NvBounds3 |
transformFast(const NvMat33 &matrix, const NvBounds3 &bounds) | nvidia::NvBounds3 | [static]
transformFast(const NvTransform &transform, const NvBounds3 &bounds) | nvidia::NvBounds3 | [static]
transformSafe(const NvMat33 &matrix, const NvBounds3 &bounds) | nvidia::NvBounds3 | [static]
transformSafe(const NvTransform &transform, const NvBounds3 &bounds) | nvidia::NvBounds3 | [static]

Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvErrorCallback Member List

This is the complete list of members for nvidia::NvErrorCallback, including all inherited members.

reportError(NvErrorCode::Enum code, const char *message, const char *file, int line)=0 | nvidia::NvErrorCallback | [pure virtual]
~NvErrorCallback() (defined in nvidia::NvErrorCallback) | nvidia::NvErrorCallback | [inline, virtual]


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvFlags< enumtype, storagetype > Member List

This is the complete list of members for nvidia::NvFlags< enumtype, storagetype >, including all inherited members.

clear(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
clear(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
InternalType typedef (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
InternalType typedef (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
isSet(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
isSet(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
NvFlags(const NvEMPTY &) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline, explicit]
NvFlags(void) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
NvFlags(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
NvFlags(const NvFlags< enumtype, storagetype > &f) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
NvFlags(storagetype b) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline, explicit]
NvFlags(const NvEMPTY &) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline, explicit]
NvFlags(void) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
NvFlags(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
NvFlags(const NvFlags< enumtype, storagetype > &f) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
NvFlags(storagetype b) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [explicit]
operator bool(void) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator bool(void) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator uint16_t(void) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator uint16_t(void) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator uint32_t(void) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator uint32_t(void) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator uint8_t(void) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator uint8_t(void) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator!=(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator!=(const NvFlags< enumtype, storagetype > &f) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator!=(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator!=(const NvFlags< enumtype, storagetype > &f) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator&(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator&(const NvFlags< enumtype, storagetype > &f) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator& (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [friend]
operator&(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator&(const NvFlags< enumtype, storagetype > &f) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator& (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [friend]
operator&=(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator&=(const NvFlags< enumtype, storagetype > &f) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator&=(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator&=(const NvFlags< enumtype, storagetype > &f) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator=(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator=(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator==(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator==(const NvFlags< enumtype, storagetype > &f) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator==(bool b) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator==(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator==(const NvFlags< enumtype, storagetype > &f) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator==(bool b) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator^(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator^(const NvFlags< enumtype, storagetype > &f) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator^(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator^(const NvFlags< enumtype, storagetype > &f) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator^=(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator^=(const NvFlags< enumtype, storagetype > &f) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator^=(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator^=(const NvFlags< enumtype, storagetype > &f) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator|(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator|(const NvFlags< enumtype, storagetype > &f) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator|(enumtype e) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator|(const NvFlags< enumtype, storagetype > &f) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator|=(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator|=(const NvFlags< enumtype, storagetype > &f) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator|=(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator|=(const NvFlags< enumtype, storagetype > &f) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
operator~(void) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
operator~(void) const (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |
set(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > | [inline]
set(enumtype e) (defined in nvidia::NvFlags< enumtype, storagetype >) | nvidia::NvFlags< enumtype, storagetype > |


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvInputData Member List

This is the complete list of members for nvidia::NvInputData, including all inherited members.

getLength() const =0 | nvidia::NvInputData | [pure virtual]
read(void *dest, uint32_t count)=0 | nvidia::NvInputStream | [pure virtual]
seek(uint32_t offset)=0 | nvidia::NvInputData | [pure virtual]
tell() const =0 | nvidia::NvInputData | [pure virtual]
~NvInputData() (defined in nvidia::NvInputData) | nvidia::NvInputData | [inline, virtual]
~NvInputStream() (defined in nvidia::NvInputStream) | nvidia::NvInputStream | [inline, virtual]


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvInputStream Member List

This is the complete list of members for nvidia::NvInputStream, including all inherited members.

read(void *dest, uint32_t count)=0 | nvidia::NvInputStream | [pure virtual]
~NvInputStream() (defined in nvidia::NvInputStream) | nvidia::NvInputStream | [inline, virtual]


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvMat33 Member List

This is the complete list of members for nvidia::NvMat33, including all inherited members.

column0 (defined in nvidia::NvMat33) | nvidia::NvMat33 |
column1 (defined in nvidia::NvMat33) | nvidia::NvMat33 |
column2 (defined in nvidia::NvMat33) | nvidia::NvMat33 |
createDiagonal(const NvVec3 &d) | nvidia::NvMat33 | [inline, static]
createIdentity() | nvidia::NvMat33 | [inline, static]
createZero() | nvidia::NvMat33 | [inline, static]
front() const (defined in nvidia::NvMat33) | nvidia::NvMat33 | [inline]
getDeterminant() const | nvidia::NvMat33 | [inline]
getInverse() const | nvidia::NvMat33 | [inline]
getTranspose() const | nvidia::NvMat33 | [inline]
NvMat33() | nvidia::NvMat33 | [inline]
NvMat33(NvIDENTITY r) | nvidia::NvMat33 | [inline]
NvMat33(NvZERO r) | nvidia::NvMat33 | [inline]
NvMat33(const NvVec3 &col0, const NvVec3 &col1, const NvVec3 &col2) | nvidia::NvMat33 | [inline]
NvMat33(NvReal r) | nvidia::NvMat33 | [inline, explicit]
NvMat33(NvReal values[]) | nvidia::NvMat33 | [inline, explicit]
NvMat33(const NvQuat &q) | nvidia::NvMat33 | [inline, explicit]
NvMat33(const NvMat33 &other) | nvidia::NvMat33 | [inline]
operator()(unsigned int row, unsigned int col) const | nvidia::NvMat33 | [inline]
operator()(unsigned int row, unsigned int col) | nvidia::NvMat33 | [inline]
operator*(NvReal scalar) const | nvidia::NvMat33 | [inline]
operator* (defined in nvidia::NvMat33) | nvidia::NvMat33 | [friend]
operator*(const NvVec3 &vec) const | nvidia::NvMat33 | [inline]
operator*(const NvMat33 &other) const | nvidia::NvMat33 | [inline]
operator*=(NvReal scalar) | nvidia::NvMat33 | [inline]
operator+(const NvMat33 &other) const | nvidia::NvMat33 | [inline]
operator+=(const NvMat33 &other) | nvidia::NvMat33 | [inline]
operator-() const | nvidia::NvMat33 | [inline]
operator-(const NvMat33 &other) const | nvidia::NvMat33 | [inline]
operator-=(const NvMat33 &other) | nvidia::NvMat33 | [inline]
operator=(const NvMat33 &other) | nvidia::NvMat33 | [inline]
operator[](int num) (defined in nvidia::NvMat33) | nvidia::NvMat33 | [inline]
operator[](unsigned int num) (defined in nvidia::NvMat33) | nvidia::NvMat33 | [inline]
operator[](int num) const (defined in nvidia::NvMat33) | nvidia::NvMat33 | [inline]
operator[](unsigned int num) const (defined in nvidia::NvMat33) | nvidia::NvMat33 | [inline]
transform(const NvVec3 &other) const | nvidia::NvMat33 | [inline]
transformTranspose(const NvVec3 &other) const | nvidia::NvMat33 | [inline]

Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvMat44 Member List

This is the complete list of members for nvidia::NvMat44, including all inherited members.

column0 (defined in nvidia::NvMat44) | nvidia::NvMat44 |
column1 (defined in nvidia::NvMat44) | nvidia::NvMat44 |
column2 (defined in nvidia::NvMat44) | nvidia::NvMat44 |
column3 (defined in nvidia::NvMat44) | nvidia::NvMat44 |
createIdentity() | nvidia::NvMat44 | [inline, static]
createZero() | nvidia::NvMat44 | [inline, static]
front() const (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
getBasis(int num) const (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
getPosition() const (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
getTranspose() const | nvidia::NvMat44 | [inline]
inverseRT(void) const (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
isFinite() const (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
NvMat44() | nvidia::NvMat44 | [inline]
NvMat44(NvIDENTITY r) | nvidia::NvMat44 | [inline]
NvMat44(NvZERO r) | nvidia::NvMat44 | [inline]
NvMat44(const NvVec4 &col0, const NvVec4 &col1, const NvVec4 &col2, const NvVec4 &col3) | nvidia::NvMat44 | [inline]
NvMat44(NvReal r) | nvidia::NvMat44 | [inline, explicit]
NvMat44(const NvVec3 &column0, const NvVec3 &column1, const NvVec3 &column2, const NvVec3 &column3) | nvidia::NvMat44 | [inline]
NvMat44(NvReal values[]) | nvidia::NvMat44 | [inline, explicit]
NvMat44(const NvQuat &q) | nvidia::NvMat44 | [inline, explicit]
NvMat44(const NvVec4 &diagonal) | nvidia::NvMat44 | [inline, explicit]
NvMat44(const NvMat33 &orientation, const NvVec3 &position) (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
NvMat44(const NvTransform &t) (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
NvMat44(const NvMat44 &other) | nvidia::NvMat44 | [inline]
operator()(unsigned int row, unsigned int col) const | nvidia::NvMat44 | [inline]
operator()(unsigned int row, unsigned int col) | nvidia::NvMat44 | [inline]
operator*(NvReal scalar) const | nvidia::NvMat44 | [inline]
operator* (defined in nvidia::NvMat44) | nvidia::NvMat44 | [friend]
operator*(const NvMat44 &other) const | nvidia::NvMat44 | [inline]
operator*=(NvReal scalar) | nvidia::NvMat44 | [inline]
operator+(const NvMat44 &other) const | nvidia::NvMat44 | [inline]
operator+=(const NvMat44 &other) | nvidia::NvMat44 | [inline]
operator-() const | nvidia::NvMat44 | [inline]
operator-(const NvMat44 &other) const | nvidia::NvMat44 | [inline]
operator-=(const NvMat44 &other) | nvidia::NvMat44 | [inline]
operator=(const NvMat44 &other) | nvidia::NvMat44 | [inline]
operator[](int num) (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
operator[](int num) const (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
rotate(const NvVec4 &other) const | nvidia::NvMat44 | [inline]
rotate(const NvVec3 &other) const | nvidia::NvMat44 | [inline]
scale(const NvVec4 &p) (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
setPosition(const NvVec3 &position) (defined in nvidia::NvMat44) | nvidia::NvMat44 | [inline]
transform(const NvVec4 &other) const | nvidia::NvMat44 | [inline]
transform(const NvVec3 &other) const | nvidia::NvMat44 | [inline]

Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvOutputStream Member List

This is the complete list of members for nvidia::NvOutputStream, including all inherited members.

write(const void *src, uint32_t count)=0 | nvidia::NvOutputStream | [pure virtual]
~NvOutputStream() (defined in nvidia::NvOutputStream) | nvidia::NvOutputStream | [inline, virtual]


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvPlane Member List

This is the complete list of members for nvidia::NvPlane, including all inherited members.

contains(const NvVec3 &p) const (defined in nvidia::NvPlane) | nvidia::NvPlane | [inline]
d | nvidia::NvPlane |
distance(const NvVec3 &p) const (defined in nvidia::NvPlane) | nvidia::NvPlane | [inline]
n | nvidia::NvPlane |
normalize() | nvidia::NvPlane | [inline]
NvPlane() | nvidia::NvPlane | [inline]
NvPlane(NvReal nx, NvReal ny, NvReal nz, NvReal distance) | nvidia::NvPlane | [inline]
NvPlane(const NvVec3 &normal, NvReal distance) | nvidia::NvPlane | [inline]
NvPlane(const NvVec3 &point, const NvVec3 &normal) | nvidia::NvPlane | [inline]
NvPlane(const NvVec3 &p0, const NvVec3 &p1, const NvVec3 &p2) | nvidia::NvPlane | [inline]
pointInPlane() const | nvidia::NvPlane | [inline]
project(const NvVec3 &p) const | nvidia::NvPlane | [inline]

Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvQuat Member List

This is the complete list of members for nvidia::NvQuat, including all inherited members.

createIdentity() | nvidia::NvQuat | [inline, static]
dot(const NvQuat &v) const | nvidia::NvQuat | [inline]
getAngle() const | nvidia::NvQuat | [inline]
getAngle(const NvQuat &q) const | nvidia::NvQuat | [inline]
getBasisVector0() const | nvidia::NvQuat | [inline]
getBasisVector1() const | nvidia::NvQuat | [inline]
getBasisVector2() const | nvidia::NvQuat | [inline]
getConjugate() const (defined in nvidia::NvQuat) | nvidia::NvQuat | [inline]
getImaginaryPart() const (defined in nvidia::NvQuat) | nvidia::NvQuat | [inline]
getNormalized() const (defined in nvidia::NvQuat) | nvidia::NvQuat | [inline]
isFinite() const | nvidia::NvQuat | [inline]
isSane() const | nvidia::NvQuat | [inline]
isUnit() const | nvidia::NvQuat | [inline]
magnitude() const (defined in nvidia::NvQuat) | nvidia::NvQuat | [inline]
magnitudeSquared() const | nvidia::NvQuat | [inline]
normalize() | nvidia::NvQuat | [inline]
NvQuat() | nvidia::NvQuat | [inline]
NvQuat(NvIDENTITY r) | nvidia::NvQuat | [inline]
NvQuat(NvReal r) | nvidia::NvQuat | [inline, explicit]
NvQuat(NvReal nx, NvReal ny, NvReal nz, NvReal nw) | nvidia::NvQuat | [inline]
NvQuat(NvReal angleRadians, const NvVec3 &unitAxis) | nvidia::NvQuat | [inline]
NvQuat(const NvQuat &v) | nvidia::NvQuat | [inline]
NvQuat(const NvMat33 &m) | nvidia::NvQuat | [explicit]
operator*(const NvQuat &q) const | nvidia::NvQuat | [inline]
operator*(NvReal r) const (defined in nvidia::NvQuat) | nvidia::NvQuat | [inline]
operator*=(const NvQuat &q) (defined in nvidia::NvQuat) | nvidia::NvQuat | [inline]
operator*=(const NvReal s) (defined in nvidia::NvQuat) | nvidia::NvQuat | [inline]
operator+(const NvQuat &q) const | nvidia::NvQuat | [inline]
operator+=(const NvQuat &q) (defined in nvidia::NvQuat) | nvidia::NvQuat | [inline]
operator-() const | nvidia::NvQuat | [inline]
operator-(const NvQuat &q) const (defined in nvidia::NvQuat) | nvidia::NvQuat | [inline]
operator-=(const NvQuat &q) (defined in nvidia::NvQuat) | nvidia::NvQuat | [inline]
operator=(const NvQuat &p) | nvidia::NvQuat | [inline]
rotate(const NvVec3 &v) const | nvidia::NvQuat | [inline]
rotateInv(const NvVec3 &v) const | nvidia::NvQuat | [inline]
toRadiansAndUnitAxis(NvReal &angle, NvVec3 &axis) const | nvidia::NvQuat | [inline]
w (defined in nvidia::NvQuat) | nvidia::NvQuat |
x | nvidia::NvQuat |
y (defined in nvidia::NvQuat) | nvidia::NvQuat |
z (defined in nvidia::NvQuat) | nvidia::NvQuat |

Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvTransform Member List

This is the complete list of members for nvidia::NvTransform, including all inherited members.

createIdentity() | nvidia::NvTransform | [inline, static]
getInverse() const (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline]
getNormalized() const | nvidia::NvTransform | [inline]
inverseTransform(const NvPlane &plane) const | nvidia::NvTransform | [inline]
isFinite() const | nvidia::NvTransform | [inline]
isSane() const | nvidia::NvTransform | [inline]
isValid() const | nvidia::NvTransform | [inline]
NvTransform() (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline]
NvTransform(const NvVec3 &position) (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline, explicit]
NvTransform(NvIDENTITY r) (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline, explicit]
NvTransform(const NvQuat &orientation) (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline, explicit]
NvTransform(NvReal x, NvReal y, NvReal z, NvQuat aQ=NvQuat(NvIdentity)) (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline]
NvTransform(const NvVec3 &p0, const NvQuat &q0) (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline]
NvTransform(const NvMat44 &m) (defined in nvidia::NvTransform) | nvidia::NvTransform | [explicit]
operator*(const NvTransform &x) const (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline]
p (defined in nvidia::NvTransform) | nvidia::NvTransform |
q (defined in nvidia::NvTransform) | nvidia::NvTransform |
rotate(const NvVec3 &input) const (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline]
rotateInv(const NvVec3 &input) const (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline]
transform(const NvVec3 &input) const (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline]
transform(const NvTransform &src) const | nvidia::NvTransform | [inline]
transform(const NvPlane &plane) const | nvidia::NvTransform | [inline]
transformInv(const NvVec3 &input) const (defined in nvidia::NvTransform) | nvidia::NvTransform | [inline]
transformInv(const NvTransform &src) const | nvidia::NvTransform | [inline]

Generated on Thu Jan 23 16:18:00 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvVec2 Member List

This is the complete list of members for nvidia::NvVec2, including all inherited members.

dot(const NvVec2 &v) const | nvidia::NvVec2 | [inline]
getNormalized() const | nvidia::NvVec2 | [inline]
isFinite() const | nvidia::NvVec2 | [inline]
isNormalized() const | nvidia::NvVec2 | [inline]
isZero() const | nvidia::NvVec2 | [inline]
magnitude() const | nvidia::NvVec2 | [inline]
magnitudeSquared() const | nvidia::NvVec2 | [inline]
maxElement() const | nvidia::NvVec2 | [inline]
maximum(const NvVec2 &v) const | nvidia::NvVec2 | [inline]
minElement() const | nvidia::NvVec2 | [inline]
minimum(const NvVec2 &v) const | nvidia::NvVec2 | [inline]
multiply(const NvVec2 &a) const | nvidia::NvVec2 | [inline]
normalize() | nvidia::NvVec2 | [inline]
NvVec2() | nvidia::NvVec2 | [inline]
NvVec2(NvZERO r) | nvidia::NvVec2 | [inline]
NvVec2(NvReal a) | nvidia::NvVec2 | [inline, explicit]
NvVec2(NvReal nx, NvReal ny) | nvidia::NvVec2 | [inline]
NvVec2(const NvVec2 &v) | nvidia::NvVec2 | [inline]
operator!=(const NvVec2 &v) const | nvidia::NvVec2 | [inline]
operator*(NvReal f) const | nvidia::NvVec2 | [inline]
operator*=(NvReal f) | nvidia::NvVec2 | [inline]
operator+(const NvVec2 &v) const | nvidia::NvVec2 | [inline]
operator+=(const NvVec2 &v) | nvidia::NvVec2 | [inline]
operator-() const | nvidia::NvVec2 | [inline]
operator-(const NvVec2 &v) const | nvidia::NvVec2 | [inline]
operator-=(const NvVec2 &v) | nvidia::NvVec2 | [inline]
operator/(NvReal f) const | nvidia::NvVec2 | [inline]
operator/=(NvReal f) | nvidia::NvVec2 | [inline]
operator=(const NvVec2 &p) | nvidia::NvVec2 | [inline]
operator==(const NvVec2 &v) const | nvidia::NvVec2 | [inline]
operator[](int index) | nvidia::NvVec2 | [inline]
operator[](int index) const | nvidia::NvVec2 | [inline]
x (defined in nvidia::NvVec2) | nvidia::NvVec2 |
y (defined in nvidia::NvVec2) | nvidia::NvVec2 |


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvVec3 Member List

This is the complete list of members for nvidia::NvVec3, including all inherited members.

abs() const | nvidia::NvVec3 | [inline]
cross(const NvVec3 &v) const | nvidia::NvVec3 | [inline]
dot(const NvVec3 &v) const | nvidia::NvVec3 | [inline]
getNormalized() const | nvidia::NvVec3 | [inline]
isFinite() const | nvidia::NvVec3 | [inline]
isNormalized() const | nvidia::NvVec3 | [inline]
isZero() const | nvidia::NvVec3 | [inline]
magnitude() const | nvidia::NvVec3 | [inline]
magnitudeSquared() const | nvidia::NvVec3 | [inline]
maxElement() const | nvidia::NvVec3 | [inline]
maximum(const NvVec3 &v) const | nvidia::NvVec3 | [inline]
minElement() const | nvidia::NvVec3 | [inline]
minimum(const NvVec3 &v) const | nvidia::NvVec3 | [inline]
multiply(const NvVec3 &a) const | nvidia::NvVec3 | [inline]
normalize() | nvidia::NvVec3 | [inline]
normalizeFast() | nvidia::NvVec3 | [inline]
normalizeSafe() | nvidia::NvVec3 | [inline]
NvVec3() | nvidia::NvVec3 | [inline]
NvVec3(NvZERO r) | nvidia::NvVec3 | [inline]
NvVec3(NvReal a) | nvidia::NvVec3 | [inline, explicit]
NvVec3(NvReal nx, NvReal ny, NvReal nz) | nvidia::NvVec3 | [inline]
NvVec3(const NvVec3 &v) | nvidia::NvVec3 | [inline]
operator!=(const NvVec3 &v) const | nvidia::NvVec3 | [inline]
operator*(NvReal f) const | nvidia::NvVec3 | [inline]
operator*=(NvReal f) | nvidia::NvVec3 | [inline]
operator+(const NvVec3 &v) const | nvidia::NvVec3 | [inline]
operator+=(const NvVec3 &v) | nvidia::NvVec3 | [inline]
operator-() const | nvidia::NvVec3 | [inline]
operator-(const NvVec3 &v) const | nvidia::NvVec3 | [inline]
operator-=(const NvVec3 &v) | nvidia::NvVec3 | [inline]
operator/(NvReal f) const | nvidia::NvVec3 | [inline]
operator/=(NvReal f) | nvidia::NvVec3 | [inline]
operator=(const NvVec3 &p) | nvidia::NvVec3 | [inline]
operator==(const NvVec3 &v) const | nvidia::NvVec3 | [inline]
operator[](int index) | nvidia::NvVec3 | [inline]
operator[](unsigned int index) (defined in nvidia::NvVec3) | nvidia::NvVec3 | [inline]
operator[](int index) const | nvidia::NvVec3 | [inline]
operator[](unsigned int index) const (defined in nvidia::NvVec3) | nvidia::NvVec3 | [inline]
x (defined in nvidia::NvVec3) | nvidia::NvVec3 |
y (defined in nvidia::NvVec3) | nvidia::NvVec3 |
z (defined in nvidia::NvVec3) | nvidia::NvVec3 |


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvVec4 Member List

This is the complete list of members for nvidia::NvVec4, including all inherited members.

dot(const NvVec4 &v) const | nvidia::NvVec4 | [inline]
getNormalized() const | nvidia::NvVec4 | [inline]
getXYZ() const (defined in nvidia::NvVec4) | nvidia::NvVec4 | [inline]
isFinite() const | nvidia::NvVec4 | [inline]
isNormalized() const | nvidia::NvVec4 | [inline]
isZero() const | nvidia::NvVec4 | [inline]
magnitude() const | nvidia::NvVec4 | [inline]
magnitudeSquared() const | nvidia::NvVec4 | [inline]
maximum(const NvVec4 &v) const | nvidia::NvVec4 | [inline]
minimum(const NvVec4 &v) const | nvidia::NvVec4 | [inline]
multiply(const NvVec4 &a) const | nvidia::NvVec4 | [inline]
normalize() | nvidia::NvVec4 | [inline]
NvVec4() | nvidia::NvVec4 | [inline]
NvVec4(NvZERO r) | nvidia::NvVec4 | [inline]
NvVec4(NvReal a) | nvidia::NvVec4 | [inline, explicit]
NvVec4(NvReal nx, NvReal ny, NvReal nz, NvReal nw) | nvidia::NvVec4 | [inline]
NvVec4(const NvVec3 &v, NvReal nw) | nvidia::NvVec4 | [inline]
NvVec4(const NvReal v[]) | nvidia::NvVec4 | [inline, explicit]
NvVec4(const NvVec4 &v) | nvidia::NvVec4 | [inline]
operator!=(const NvVec4 &v) const | nvidia::NvVec4 | [inline]
operator*(NvReal f) const | nvidia::NvVec4 | [inline]
operator*=(NvReal f) | nvidia::NvVec4 | [inline]
operator+(const NvVec4 &v) const | nvidia::NvVec4 | [inline]
operator+=(const NvVec4 &v) | nvidia::NvVec4 | [inline]
operator-() const | nvidia::NvVec4 | [inline]
operator-(const NvVec4 &v) const | nvidia::NvVec4 | [inline]
operator-=(const NvVec4 &v) | nvidia::NvVec4 | [inline]
operator/(NvReal f) const | nvidia::NvVec4 | [inline]
operator/=(NvReal f) | nvidia::NvVec4 | [inline]
operator=(const NvVec4 &p) | nvidia::NvVec4 | [inline]
operator==(const NvVec4 &v) const | nvidia::NvVec4 | [inline]
operator[](int index) | nvidia::NvVec4 | [inline]
operator[](unsigned int index) (defined in nvidia::NvVec4) | nvidia::NvVec4 | [inline]
operator[](int index) const | nvidia::NvVec4 | [inline]
operator[](unsigned int index) const (defined in nvidia::NvVec4) | nvidia::NvVec4 | [inline]
setZero() | nvidia::NvVec4 | [inline]
w (defined in nvidia::NvVec4) | nvidia::NvVec4 |
x (defined in nvidia::NvVec4) | nvidia::NvVec4 |
y (defined in nvidia::NvVec4) | nvidia::NvVec4 |
z (defined in nvidia::NvVec4) | nvidia::NvVec4 |


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- m -

  • magnitude()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
  • magnitudeSquared()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvQuat
  • maxElement()
: nvidia::NvVec2
, nvidia::NvVec3
  • maximum()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
  • minElement()
: nvidia::NvVec2
, nvidia::NvVec3
  • minimum()
: nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvVec2
  • multiply()
: nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvVec2


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- n -

  • n : nvidia::NvPlane
  • normalize()
: nvidia::NvVec2
, nvidia::NvVec4
, nvidia::NvQuat
, nvidia::NvVec3
, nvidia::NvPlane
  • normalizeFast() : nvidia::NvVec3
  • normalizeSafe() : nvidia::NvVec3
  • NvBounds3() : nvidia::NvBounds3
  • NvMat33() : nvidia::NvMat33
  • NvMat44() : nvidia::NvMat44
  • NvPlane() : nvidia::NvPlane
  • NvQuat() : nvidia::NvQuat
  • NvVec2() : nvidia::NvVec2
  • NvVec3() : nvidia::NvVec3
  • NvVec4() : nvidia::NvVec4


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- o -

  • operator!=()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
  • operator()()
: nvidia::NvMat33
, nvidia::NvMat44
  • operator*()
: nvidia::NvVec2
, nvidia::NvMat44
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvQuat
, nvidia::NvMat33
, nvidia::NvMat44
  • operator*=()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvMat33
, nvidia::NvMat44
  • operator+()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvQuat
, nvidia::NvMat33
, nvidia::NvMat44
  • operator+=()
: nvidia::NvMat44
, nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvMat33
  • operator-()
: nvidia::NvMat44
, nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvMat33
, nvidia::NvMat44
, nvidia::NvQuat
  • operator-=()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvMat44
, nvidia::NvMat33
  • operator/()
: nvidia::NvVec3
, nvidia::NvVec2
, nvidia::NvVec4
  • operator/=()
: nvidia::NvVec4
, nvidia::NvVec3
, nvidia::NvVec2
  • operator=()
: nvidia::NvMat33
, nvidia::NvVec4
, nvidia::NvMat44
, nvidia::NvVec2
, nvidia::NvQuat
, nvidia::NvVec3
  • operator==()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
  • operator[]()
: nvidia::NvVec4
, nvidia::NvVec2
, nvidia::NvVec4
, nvidia::NvVec3
, nvidia::NvVec2


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- ~ -

  • ~NvAllocatorCallback() : nvidia::NvAllocatorCallback


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- b -

  • basisExtent() : nvidia::NvBounds3
  • boundsOfPoints() : nvidia::NvBounds3


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- c -

  • centerExtents() : nvidia::NvBounds3
  • contains() : nvidia::NvBounds3
  • createDiagonal() : nvidia::NvMat33
  • createIdentity()
: nvidia::NvQuat
, nvidia::NvMat44
, nvidia::NvTransform
, nvidia::NvMat33
  • createZero()
: nvidia::NvMat33
, nvidia::NvMat44
  • cross() : nvidia::NvVec3


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- d -

  • d : nvidia::NvPlane
  • deallocate() : nvidia::NvAllocatorCallback
  • dot()
: nvidia::NvVec4
, nvidia::NvVec3
, nvidia::NvVec2
, nvidia::NvQuat


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- e -

  • eABORT : nvidia::NvErrorCode
  • eDEBUG_INFO : nvidia::NvErrorCode
  • eDEBUG_WARNING : nvidia::NvErrorCode
  • eINTERNAL_ERROR : nvidia::NvErrorCode
  • eINVALID_OPERATION : nvidia::NvErrorCode
  • eINVALID_PARAMETER : nvidia::NvErrorCode
  • eMASK_ALL : nvidia::NvErrorCode
  • empty() : nvidia::NvBounds3
  • Enum : nvidia::NvErrorCode
  • eOUT_OF_MEMORY : nvidia::NvErrorCode
  • ePERF_WARNING : nvidia::NvErrorCode


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- f -

  • fattenFast() : nvidia::NvBounds3
  • fattenSafe() : nvidia::NvBounds3


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- g -

  • getAngle() : nvidia::NvQuat
  • getBasisVector0() : nvidia::NvQuat
  • getBasisVector1() : nvidia::NvQuat
  • getBasisVector2() : nvidia::NvQuat
  • getCenter() : nvidia::NvBounds3
  • getDeterminant() : nvidia::NvMat33
  • getDimensions() : nvidia::NvBounds3
  • getExtents() : nvidia::NvBounds3
  • getInverse() : nvidia::NvMat33
  • getLength() : nvidia::NvInputData
  • getNormalized()
: nvidia::NvVec2
, nvidia::NvVec4
, nvidia::NvTransform
, nvidia::NvVec3
  • getTranspose()
: nvidia::NvMat33
, nvidia::NvMat44


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- i -

  • include() : nvidia::NvBounds3
  • intersects() : nvidia::NvBounds3
  • intersects1D() : nvidia::NvBounds3
  • inverseTransform() : nvidia::NvTransform
  • isFinite()
: nvidia::NvVec4
, nvidia::NvQuat
, nvidia::NvTransform
, nvidia::NvBounds3
, nvidia::NvVec2
, nvidia::NvVec3
  • isInside() : nvidia::NvBounds3
  • isNormalized()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
  • isSane()
: nvidia::NvQuat
, nvidia::NvTransform
  • isUnit() : nvidia::NvQuat
  • isValid()
: nvidia::NvTransform
, nvidia::NvBounds3
  • isZero()
: nvidia::NvVec4
, nvidia::NvVec2
, nvidia::NvVec3


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- p -

  • pointInPlane() : nvidia::NvPlane
  • poseExtent() : nvidia::NvBounds3
  • project() : nvidia::NvPlane


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- r -

  • read() : nvidia::NvInputStream
  • reportError() : nvidia::NvErrorCallback
  • rotate()
: nvidia::NvMat44
, nvidia::NvQuat
  • rotateInv() : nvidia::NvQuat


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- s -

  • scaleFast() : nvidia::NvBounds3
  • scaleSafe() : nvidia::NvBounds3
  • seek() : nvidia::NvInputData
  • setEmpty() : nvidia::NvBounds3
  • setMaximal() : nvidia::NvBounds3
  • setZero() : nvidia::NvVec4


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- t -

  • tell() : nvidia::NvInputData
  • toRadiansAndUnitAxis() : nvidia::NvQuat
  • transform()
: nvidia::NvTransform
, nvidia::NvMat33
, nvidia::NvTransform
, nvidia::NvMat44
  • transformFast() : nvidia::NvBounds3
  • transformInv() : nvidia::NvTransform
  • transformSafe() : nvidia::NvBounds3
  • transformTranspose() : nvidia::NvMat33


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- w -

  • write() : nvidia::NvOutputStream


NVIDIA(R) NvFoundation Reference: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • x
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- x -

  • x : nvidia::NvQuat


NVIDIA(R) NvFoundation Reference: Class Members - Enumerations

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator

  • Enum : nvidia::NvErrorCode


NVIDIA(R) NvFoundation Reference: Class Members - Enumerator

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator

  • eABORT : nvidia::NvErrorCode
  • eDEBUG_INFO : nvidia::NvErrorCode
  • eDEBUG_WARNING : nvidia::NvErrorCode
  • eINTERNAL_ERROR : nvidia::NvErrorCode
  • eINVALID_OPERATION : nvidia::NvErrorCode
  • eINVALID_PARAMETER : nvidia::NvErrorCode
  • eMASK_ALL : nvidia::NvErrorCode
  • eOUT_OF_MEMORY : nvidia::NvErrorCode
  • ePERF_WARNING : nvidia::NvErrorCode


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- a -

  • abs() : nvidia::NvVec3
  • allocate() : nvidia::NvAllocatorCallback


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- m -

  • magnitude()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
  • magnitudeSquared()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvQuat
  • maxElement()
: nvidia::NvVec2
, nvidia::NvVec3
  • maximum()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
  • minElement()
: nvidia::NvVec2
, nvidia::NvVec3
  • minimum()
: nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvVec2
  • multiply()
: nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvVec2


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- n -

  • normalize()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvQuat
, nvidia::NvPlane
, nvidia::NvVec4
  • normalizeFast() : nvidia::NvVec3
  • normalizeSafe() : nvidia::NvVec3
  • NvBounds3() : nvidia::NvBounds3
  • NvMat33() : nvidia::NvMat33
  • NvMat44() : nvidia::NvMat44
  • NvPlane() : nvidia::NvPlane
  • NvQuat() : nvidia::NvQuat
  • NvVec2() : nvidia::NvVec2
  • NvVec3() : nvidia::NvVec3
  • NvVec4() : nvidia::NvVec4


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- o -

  • operator!=()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
  • operator()()
: nvidia::NvMat33
, nvidia::NvMat44
  • operator*()
: nvidia::NvVec2
, nvidia::NvMat44
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvQuat
, nvidia::NvMat33
, nvidia::NvMat44
  • operator*=()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvMat33
, nvidia::NvMat44
  • operator+()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvQuat
, nvidia::NvMat33
, nvidia::NvMat44
  • operator+=()
: nvidia::NvMat44
, nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvMat33
  • operator-()
: nvidia::NvMat44
, nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvMat33
, nvidia::NvMat44
, nvidia::NvQuat
  • operator-=()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
, nvidia::NvMat44
, nvidia::NvMat33
  • operator/()
: nvidia::NvVec3
, nvidia::NvVec2
, nvidia::NvVec4
  • operator/=()
: nvidia::NvVec4
, nvidia::NvVec3
, nvidia::NvVec2
  • operator=()
: nvidia::NvMat33
, nvidia::NvVec4
, nvidia::NvMat44
, nvidia::NvVec2
, nvidia::NvQuat
, nvidia::NvVec3
  • operator==()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
  • operator[]()
: nvidia::NvVec4
, nvidia::NvVec2
, nvidia::NvVec4
, nvidia::NvVec3
, nvidia::NvVec2


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- ~ -

  • ~NvAllocatorCallback() : nvidia::NvAllocatorCallback


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- b -

  • basisExtent() : nvidia::NvBounds3
  • boundsOfPoints() : nvidia::NvBounds3


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- c -

  • centerExtents() : nvidia::NvBounds3
  • contains() : nvidia::NvBounds3
  • createDiagonal() : nvidia::NvMat33
  • createIdentity()
: nvidia::NvQuat
, nvidia::NvMat44
, nvidia::NvTransform
, nvidia::NvMat33
  • createZero()
: nvidia::NvMat33
, nvidia::NvMat44
  • cross() : nvidia::NvVec3


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- d -

  • deallocate() : nvidia::NvAllocatorCallback
  • dot()
: nvidia::NvQuat
, nvidia::NvVec4
, nvidia::NvVec3
, nvidia::NvVec2


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- e -

  • empty() : nvidia::NvBounds3


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- f -

  • fattenFast() : nvidia::NvBounds3
  • fattenSafe() : nvidia::NvBounds3


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- g -

  • getAngle() : nvidia::NvQuat
  • getBasisVector0() : nvidia::NvQuat
  • getBasisVector1() : nvidia::NvQuat
  • getBasisVector2() : nvidia::NvQuat
  • getCenter() : nvidia::NvBounds3
  • getDeterminant() : nvidia::NvMat33
  • getDimensions() : nvidia::NvBounds3
  • getExtents() : nvidia::NvBounds3
  • getInverse() : nvidia::NvMat33
  • getLength() : nvidia::NvInputData
  • getNormalized()
: nvidia::NvVec2
, nvidia::NvVec4
, nvidia::NvTransform
, nvidia::NvVec3
  • getTranspose()
: nvidia::NvMat33
, nvidia::NvMat44


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- i -

  • include() : nvidia::NvBounds3
  • intersects() : nvidia::NvBounds3
  • intersects1D() : nvidia::NvBounds3
  • inverseTransform() : nvidia::NvTransform
  • isFinite()
: nvidia::NvVec4
, nvidia::NvQuat
, nvidia::NvTransform
, nvidia::NvBounds3
, nvidia::NvVec2
, nvidia::NvVec3
  • isInside() : nvidia::NvBounds3
  • isNormalized()
: nvidia::NvVec2
, nvidia::NvVec3
, nvidia::NvVec4
  • isSane()
: nvidia::NvQuat
, nvidia::NvTransform
  • isUnit() : nvidia::NvQuat
  • isValid()
: nvidia::NvTransform
, nvidia::NvBounds3
  • isZero()
: nvidia::NvVec4
, nvidia::NvVec2
, nvidia::NvVec3


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- p -

  • pointInPlane() : nvidia::NvPlane
  • poseExtent() : nvidia::NvBounds3
  • project() : nvidia::NvPlane


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- r -

  • read() : nvidia::NvInputStream
  • reportError() : nvidia::NvErrorCallback
  • rotate()
: nvidia::NvMat44
, nvidia::NvQuat
  • rotateInv() : nvidia::NvQuat


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- s -

  • scaleFast() : nvidia::NvBounds3
  • scaleSafe() : nvidia::NvBounds3
  • seek() : nvidia::NvInputData
  • setEmpty() : nvidia::NvBounds3
  • setMaximal() : nvidia::NvBounds3
  • setZero() : nvidia::NvVec4


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- t -

  • tell() : nvidia::NvInputData
  • toRadiansAndUnitAxis() : nvidia::NvQuat
  • transform()
: nvidia::NvTransform
, nvidia::NvMat33
, nvidia::NvTransform
, nvidia::NvMat44
  • transformFast() : nvidia::NvBounds3
  • transformInv() : nvidia::NvTransform
  • transformSafe() : nvidia::NvBounds3
  • transformTranspose() : nvidia::NvMat33


NVIDIA(R) NvFoundation Reference: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w
  • ~

- w -

  • write() : nvidia::NvOutputStream


NVIDIA(R) NvFoundation Reference: Class Members - Variables

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator

  • d : nvidia::NvPlane
  • n : nvidia::NvPlane
  • x : nvidia::NvQuat


NVIDIA(R) NvFoundation Reference: Main Page

NVIDIA(R) NvFoundation Reference Documentation

Generated on Thu Jan 23 16:17:59 2014 for NVIDIA(R) NvFoundation Reference by doxygen 1.5.8


NVIDIA(R) NvFoundation Reference: Page Index

Related Pages

Here is a list of all related documentation pages:
  • Deprecated List


NVIDIA(R) NvFoundation Reference: Member List

nvidia::NvErrorCode Member List

This is the complete list of members for nvidia::NvErrorCode, including all inherited members.

eABORT enum value | nvidia::NvErrorCode
eDEBUG_INFO enum value | nvidia::NvErrorCode
eDEBUG_WARNING enum value | nvidia::NvErrorCode
eINTERNAL_ERROR enum value | nvidia::NvErrorCode
eINVALID_OPERATION enum value | nvidia::NvErrorCode
eINVALID_PARAMETER enum value | nvidia::NvErrorCode
eMASK_ALL enum value | nvidia::NvErrorCode
eNO_ERROR enum value (defined in nvidia::NvErrorCode) | nvidia::NvErrorCode
Enum enum name | nvidia::NvErrorCode
eOUT_OF_MEMORY enum value | nvidia::NvErrorCode
ePERF_WARNING enum value | nvidia::NvErrorCode