Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CgFx.h File Reference

#include "nvsgcommon.h"
#include "CgFX/ICgFXEffect.h"
#include "nvsg/StateAttribute.h"
#include <string>
#include <vector>

Include dependency graph for CgFx.h:

Go to the source code of this file.

Namespaces

namespace  nvsg

Typedefs

typedef const CgFxAnnotation * CgFxAnnotationHandle
 Handle to a CgFxAnnotation.
typedef const CgFxParameter * CgFxParameterHandle
 Handle to a CgFxParameter.
typedef const CgFxTechnique * CgFxTechniqueHandle
 Handle to a CgFxTechnique.
typedef const CgFxPass * CgFxPassHandle
 Handle to a CgFxPass.
typedef std::pair< eCgFxSemantic,
CgFxParameterHandle
CgFxTransform
 A pair of a eCgFxSemantic and a CgFxParameterHandle.

Enumerations

enum  eCgFxSemantic {
  CGFX_SEMANTIC_UNKNOWN = 0, CGFX_SEMANTIC_WORLD, CGFX_SEMANTIC_FIRST_TRANSFORM = CGFX_SEMANTIC_WORLD, CGFX_SEMANTIC_VIEW,
  CGFX_SEMANTIC_PROJECTION, CGFX_SEMANTIC_WORLDT, CGFX_SEMANTIC_VIEWT, CGFX_SEMANTIC_PROJECTIONT,
  CGFX_SEMANTIC_WORLDI, CGFX_SEMANTIC_VIEWI, CGFX_SEMANTIC_PROJECTIONI, CGFX_SEMANTIC_WORLDIT,
  CGFX_SEMANTIC_VIEWIT, CGFX_SEMANTIC_PROJECTIONIT, CGFX_SEMANTIC_WORLDVIEW, CGFX_SEMANTIC_WORLDVIEWPROJECTION,
  CGFX_SEMANTIC_WORLDVIEWT, CGFX_SEMANTIC_WORLDVIEWPROJECTIONT, CGFX_SEMANTIC_WORLDVIEWI, CGFX_SEMANTIC_WORLDVIEWPROJECTIONI,
  CGFX_SEMANTIC_WORLDVIEWIT, CGFX_SEMANTIC_WORLDVIEWPROJECTIONIT, CGFX_SEMANTIC_LAST_TRANSFORM = CGFX_SEMANTIC_WORLDVIEWPROJECTIONIT
}

Functions

NVSG_API bool CgFx_getTextureFileName (const CgFx *cgfx, CgFxParameterHandle hdl, std::string &file)
 Get texture file name.
NVSG_API void CgFx_setTextureFileName (CgFx *cgfx, CgFxParameterHandle hdl, const std::string &file)
 Set texture file name.
const char * getParameterName (CgFxParameterHandle hdl)
 Get the name for a certain parameter.
const char * getPassName (CgFxPassHandle hdl)
 Get the name for a certain render pass.
const char * getTechniqueName (CgFxTechniqueHandle hdl)
 Get the name for a certain render technique.
const char * getParameterSemantic (CgFxParameterHandle hdl)
 Get the semantic for a certain parameter.
CgFXPARAMETERTYPE getParameterType (CgFxParameterHandle hdl)
 Get the type of a certain parameter.
bool isParameterScalarType (CgFxParameterHandle hdl)
 Detect if the parameter identified by hdl is a scalar type.
bool isParameterVector2Type (CgFxParameterHandle hdl)
 Detect if the parameter identified by hdl is a two-dimensional vector type.
bool isParameterVector3Type (CgFxParameterHandle hdl)
 Detect if the parameter identified by hdl is a three-dimensional vector type.
bool isParameterVector4Type (CgFxParameterHandle hdl)
 Detect if the parameter identified by hdl is a four-dimensional vector type.
bool isParameterMatrix33Type (CgFxParameterHandle hdl)
 Detect if the parameter identified by hdl is a 3x3 matrix type.
bool isParameterMatrix34Type (CgFxParameterHandle hdl)
 Detect if the parameter identified by hdl is a 3x4 matrix type.
bool isParameterMatrix43Type (CgFxParameterHandle hdl)
 Detect if the parameter identified by hdl is a 4x3 matrix type.
bool isParameterMatrix44Type (CgFxParameterHandle hdl)
 Detect if the parameter identified by hdl is a 4x4 matrix type.
bool isParameterTextureType (CgFxParameterHandle hdl)
 Detect if the parameter identified by hdl is a texture type.
bool isParameterSamplerType (CgFxParameterHandle hdl)
 Detect if the parameter identified by hdl is a sampler type.
bool isTechniqueValid (CgFxTechniqueHandle hdl)
 Detect whether the technique identified by hdl is valid.

Variables

class class class class class
typedef const CgFxEntity * 
CgFxEntityHandle
 Handle to a CgFxEntity.


Detailed Description


Typedef Documentation

typedef const CgFxAnnotation* nvsg::CgFxAnnotationHandle
 

Handle to a CgFxAnnotation.

typedef const CgFxParameter* nvsg::CgFxParameterHandle
 

Handle to a CgFxParameter.

typedef const CgFxTechnique* nvsg::CgFxTechniqueHandle
 

Handle to a CgFxTechnique.

typedef const CgFxPass* nvsg::CgFxPassHandle
 

Handle to a CgFxPass.

typedef std::pair<eCgFxSemantic, CgFxParameterHandle> nvsg::CgFxTransform
 

A pair of a eCgFxSemantic and a CgFxParameterHandle.


Enumeration Type Documentation

enum nvsg::eCgFxSemantic
 

Enumeration values:
CGFX_SEMANTIC_WORLD  Object to world transform.
CGFX_SEMANTIC_VIEW  World to eyespace transform.
CGFX_SEMANTIC_PROJECTION  Projection matrix.
CGFX_SEMANTIC_WORLDT  Transposed world transform.
CGFX_SEMANTIC_VIEWT  Transposed view transform.
CGFX_SEMANTIC_PROJECTIONT  Transposed projection matrix.
CGFX_SEMANTIC_WORLDI  World to object transform.
CGFX_SEMANTIC_VIEWI  Eyespace to world transform.
CGFX_SEMANTIC_PROJECTIONI  Inverse projection matrix.
CGFX_SEMANTIC_WORLDIT  Inverse transposed world transform.
CGFX_SEMANTIC_VIEWIT  Inverse transposed view transform.
CGFX_SEMANTIC_PROJECTIONIT  Inverse transposed projection matrix.
CGFX_SEMANTIC_WORLDVIEW  Concatenated modelview matrix.
CGFX_SEMANTIC_WORLDVIEWPROJECTION  Concatenated modelview projection matrix.
CGFX_SEMANTIC_WORLDVIEWT  Transposed modelview matrix.
CGFX_SEMANTIC_WORLDVIEWPROJECTIONT  Transposed modelview projection matrix.
CGFX_SEMANTIC_WORLDVIEWI  Inverse modelview matrix.
CGFX_SEMANTIC_WORLDVIEWPROJECTIONI  Inverse modelview projection matrix.
CGFX_SEMANTIC_WORLDVIEWIT  Inverse transposed modelview matrix.
CGFX_SEMANTIC_WORLDVIEWPROJECTIONIT  Inverse transposed modelview projection matrix.


Function Documentation

NVSG_API bool CgFx_getTextureFileName const CgFx *  cgfx,
CgFxParameterHandle  hdl,
std::string &  file
 

Get texture file name.

If a texture filename is available for a texture type parameter identified by hdl, this function obtains the texture file name in fname.

Returns:
true if a texture file name could be found, false otherwise.
Note:
It doesn't make sense to call this function for non-texture type parameters. It will not crash, though.

NVSG_API void CgFx_setTextureFileName CgFx *  cgfx,
CgFxParameterHandle  hdl,
const std::string &  file
 

Set texture file name.

For a texture type parameter identified by hdl, this function sets the texture file name to file.

Note:
Calling this function for non-texture type parameters yields undefind behaviour!

const char* getParameterName CgFxParameterHandle  hdl  )  [inline]
 

Get the name for a certain parameter.

Returns:
The name of the parameter identified by hdl.

const char* getPassName CgFxPassHandle  hdl  )  [inline]
 

Get the name for a certain render pass.

Returns:
The name of the pass identified by hdl.

const char* getTechniqueName CgFxTechniqueHandle  hdl  )  [inline]
 

Get the name for a certain render technique.

Returns:
The name of the technique identified by hdl.

const char* getParameterSemantic CgFxParameterHandle  hdl  )  [inline]
 

Get the semantic for a certain parameter.

Returns:
The semantic string for the parameter identified by hdl.

CgFXPARAMETERTYPE getParameterType CgFxParameterHandle  hdl  )  [inline]
 

Get the type of a certain parameter.

Returns:
The enum type for the parameter identified by hdl.

bool isParameterScalarType CgFxParameterHandle  hdl  )  [inline]
 

Detect if the parameter identified by hdl is a scalar type.

Returns:
true if the parameter is a scalar type, false otherwise.

bool isParameterVector2Type CgFxParameterHandle  hdl  )  [inline]
 

Detect if the parameter identified by hdl is a two-dimensional vector type.

Returns:
true if the parameter is a two-dimensional vector type, false otherwise.

bool isParameterVector3Type CgFxParameterHandle  hdl  )  [inline]
 

Detect if the parameter identified by hdl is a three-dimensional vector type.

Returns:
true if the parameter is a three-dimensional vector type, false otherwise.

bool isParameterVector4Type CgFxParameterHandle  hdl  )  [inline]
 

Detect if the parameter identified by hdl is a four-dimensional vector type.

Returns:
true if the parameter is a four-dimensional vector type, false otherwise.

bool isParameterMatrix33Type CgFxParameterHandle  hdl  )  [inline]
 

Detect if the parameter identified by hdl is a 3x3 matrix type.

Returns:
true if the parameter is a 3x3 matrix type, false otherwise.

bool isParameterMatrix34Type CgFxParameterHandle  hdl  )  [inline]
 

Detect if the parameter identified by hdl is a 3x4 matrix type.

Returns:
true if the parameter is a 3x4 matrix type, false otherwise.

bool isParameterMatrix43Type CgFxParameterHandle  hdl  )  [inline]
 

Detect if the parameter identified by hdl is a 4x3 matrix type.

Returns:
true if the parameter is a 4x3 matrix type, false otherwise.

bool isParameterMatrix44Type CgFxParameterHandle  hdl  )  [inline]
 

Detect if the parameter identified by hdl is a 4x4 matrix type.

Returns:
true if the parameter is a 4x4 matrix type, false otherwise.

bool isParameterTextureType CgFxParameterHandle  hdl  )  [inline]
 

Detect if the parameter identified by hdl is a texture type.

Returns:
true if the parameter is a texture type, false otherwise.

bool isParameterSamplerType CgFxParameterHandle  hdl  )  [inline]
 

Detect if the parameter identified by hdl is a sampler type.

Returns:
true if the parameter is a sampler type, false otherwise.

bool isTechniqueValid CgFxTechniqueHandle  hdl  )  [inline]
 

Detect whether the technique identified by hdl is valid.

Returns:
true if the technique is valid, false otherwise.


Variable Documentation

class class class class class class typedef const CgFxEntity* nvsg::CgFxEntityHandle
 

Handle to a CgFxEntity.


Generated on Tue Mar 1 13:19:26 2005 for NVSGSDK by NVIDIA