Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::IFSModel Class Reference

Loads the IFS file format. More...

#include <IFSModel.h>

Inherits G3D::ReferenceCountedObject.

List of all members.

Public Member Functions

virtual size_t mainMemorySize () const
virtual PosedModel::Ref pose (const CoordinateFrame &cframe, const GMaterial &material, bool perVertexNormals=true)
virtual PosedModel::Ref pose (const CoordinateFrame &cframe=CoordinateFrame(), bool perVertexNormals=true)
void ReferenceCountedObject_zeroWeakPointers ()
virtual ~IFSModel ()

Static Public Member Functions

static IFSModelRef fromFile (const std::string &filename, const double scale, const CoordinateFrame &cframe=CoordinateFrame(), const bool weld=true, bool removeDegenerateFaces=true)
static IFSModelRef fromFile (const std::string &filename, const Vector3 &scale=Vector3(1, 1, 1), const CoordinateFrame &cframe=CoordinateFrame(), const bool weld=true, bool removeDegenerateFaces=true)
static void load (const std::string &filename, std::string &name, Array< int > &index, Array< Vector3 > &vertex, Array< Vector2 > &texCoord)
static void operator delete (void *p)
static void * operator new (size_t size)
static void save (const std::string &filename, const std::string &name, const Array< int > &index, const Array< Vector3 > &vertex, const Array< Vector2 > &texCoord)

Public Attributes

AtomicInt32 ReferenceCountedObject_refCount
_WeakPtrLinkedListReferenceCountedObject_weakPointer

Friends

class PosedIFSModel

Classes

class  PosedIFSModel


Detailed Description

Loads the IFS file format.

Note that you can convert many other formats (e.g. 3DS, SM, OBJ, MD2) to IFS format using the IFSBuilder sample code provided with G3D.


Constructor & Destructor Documentation

virtual G3D::IFSModel::~IFSModel (  )  [virtual]


Member Function Documentation

static IFSModelRef G3D::IFSModel::fromFile ( const std::string &  filename,
const double  scale,
const CoordinateFrame cframe = CoordinateFrame(),
const bool  weld = true,
bool  removeDegenerateFaces = true 
) [static]

static IFSModelRef G3D::IFSModel::fromFile ( const std::string &  filename,
const Vector3 scale = Vector3(1, 1, 1),
const CoordinateFrame cframe = CoordinateFrame(),
const bool  weld = true,
bool  removeDegenerateFaces = true 
) [static]

Throws an std::string describing the error if anything goes wrong.

Parameters:
scale 3D scale factors to apply to vertices while loading (*after* cframe)
cframe Coordinate transform to apply to vertices while loading. This is not part of the object to world transformation for the model when posed; it really modifies the object space geometry.
weld Toggles welding colocated vertices, an O(n^2) operation. Defaults to true
removeDegenerateFaces Removes any faces that contain two copies of the same vertex

static void G3D::IFSModel::load ( const std::string &  filename,
std::string &  name,
Array< int > &  index,
Array< Vector3 > &  vertex,
Array< Vector2 > &  texCoord 
) [static]

Parses an IFS or PLY2 file from disk into arrays; does no cleanup or welding.

virtual size_t G3D::IFSModel::mainMemorySize (  )  const [virtual]

static void G3D::IFSModel::operator delete ( void *  p  )  [inline, static]

static void* G3D::IFSModel::operator new ( size_t  size  )  [inline, static]

virtual PosedModel::Ref G3D::IFSModel::pose ( const CoordinateFrame cframe,
const GMaterial material,
bool  perVertexNormals = true 
) [virtual]

If perVertexNormals is false, the model is rendered with per-face normals, which are slower.

virtual PosedModel::Ref G3D::IFSModel::pose ( const CoordinateFrame cframe = CoordinateFrame(),
bool  perVertexNormals = true 
) [virtual]

If perVertexNormals is false, the model is rendered with per-face normals, which are slower.

No color or texture is set when rendered (that is, the existing RenderDevice values are used.)

void G3D::ReferenceCountedObject::ReferenceCountedObject_zeroWeakPointers (  )  [inline, inherited]

Automatically called immediately before the object is deleted.

This is not called from the destructor because it needs to be invoked before the subclass destructor.

static void G3D::IFSModel::save ( const std::string &  filename,
const std::string &  name,
const Array< int > &  index,
const Array< Vector3 > &  vertex,
const Array< Vector2 > &  texCoord 
) [static]

Writes an IFS or PLY2 file from data in arrays.

(Note PLY2 Files do not support texCoords.)


Friends And Related Function Documentation

friend class PosedIFSModel [friend]


Member Data Documentation

The long name is to keep this from accidentally conflicting with a subclass's variable name.

Do not use or explicitly manipulate this value--its type may change in the future and is not part of the supported API.

Linked list of all weak pointers that reference this (some may be on the stack!).

Do not use or explicitly manipulate this value.


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:46 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo