![]() |
Blender V2.61 - r43446
|
#include <ntl_geometrymodel.h>

Public Member Functions | |
| ntlGeometryObjModel (void) | |
| virtual | ~ntlGeometryObjModel (void) |
| virtual int | getTypeId () |
| Return type id. | |
| virtual void | initialize (ntlRenderGlobals *glob) |
| virtual bool | getMeshAnimated () |
| virtual void | getTriangles (double t, vector< ntlTriangle > *triangles, vector< ntlVec3Gfx > *vertices, vector< ntlVec3Gfx > *normals, int objectId) |
| int | loadBobjModel (string filename) |
| int | initModel (int numVertices, float *vertices, int numTriangles, int *triangles, int channelSize, float *channelVertices) |
| virtual void | calcTriangleDivs (vector< ntlVec3Gfx > &verts, vector< ntlTriangle > &tris, gfxReal fsTri) |
| void | getExtends (ntlVec3Gfx &start, ntlVec3Gfx &end) |
| ntlVec3Gfx | getStart (void) |
| void | setStart (const ntlVec3Gfx &set) |
| ntlVec3Gfx | getEnd (void) |
| void | setEnd (const ntlVec3Gfx &set) |
| bool | getLoaded (void) |
| void | setLoaded (bool set) |
| void | setFilename (string set) |
A simple box object generatedd by 12 triangles
Definition at line 18 of file ntl_geometrymodel.h.
| ntlGeometryObjModel::ntlGeometryObjModel | ( | void | ) |
Definition at line 28 of file ntl_geometrymodel.cpp.
| ntlGeometryObjModel::~ntlGeometryObjModel | ( | void | ) | [virtual] |
Definition at line 41 of file ntl_geometrymodel.cpp.
References errMsg.
| void ntlGeometryObjModel::calcTriangleDivs | ( | vector< ntlVec3Gfx > & | verts, |
| vector< ntlTriangle > & | tris, | ||
| gfxReal | fsTri | ||
| ) | [virtual] |
init triangle divisions
Reimplemented from ntlGeometryObject.
Definition at line 213 of file ntl_geometrymodel.cpp.
References AnimChannel< Scalar >::accessValues(), errMsg, getMeshAnimated(), i, ntlGeometryObject::mTriangleDivs1, ntlGeometryObject::mTriangleDivs2, ntlGeometryObject::mTriangleDivs3, norm(), and normNoSqrt().
| ntlVec3Gfx ntlGeometryObjModel::getEnd | ( | void | ) | [inline] |
Access end vector
Definition at line 84 of file ntl_geometrymodel.h.
| void ntlGeometryObjModel::getExtends | ( | ntlVec3Gfx & | sstart, |
| ntlVec3Gfx & | send | ||
| ) |
calculate max extends of (ani) mesh
Definition at line 57 of file ntl_geometrymodel.cpp.
References AnimChannel< Scalar >::accessValues(), and i.
Referenced by ControlParticles::initFromMVCMesh(), and ControlParticles::initFromObject().
| bool ntlGeometryObjModel::getLoaded | ( | void | ) | [inline] |
Definition at line 87 of file ntl_geometrymodel.h.
| bool ntlGeometryObjModel::getMeshAnimated | ( | ) | [virtual] |
is the mesh animated?
Reimplemented from ntlGeometryObject.
Definition at line 50 of file ntl_geometrymodel.cpp.
References AnimChannel< Scalar >::getSize().
Referenced by calcTriangleDivs(), initialize(), and initModel().
| ntlVec3Gfx ntlGeometryObjModel::getStart | ( | void | ) | [inline] |
Access start vector
Definition at line 81 of file ntl_geometrymodel.h.
| void ntlGeometryObjModel::getTriangles | ( | double | t, |
| vector< ntlTriangle > * | triangles, | ||
| vector< ntlVec3Gfx > * | vertices, | ||
| vector< ntlVec3Gfx > * | normals, | ||
| int | objectId | ||
| ) | [virtual] |
Get the triangles from this object
Implements ntlGeometryObject.
Definition at line 442 of file ntl_geometrymodel.cpp.
References AnimChannel< Scalar >::get(), AnimChannel< Scalar >::getSize(), i, ntlSetVec3f::mVerts, and ntlGeometryObject::sceneAddTriangleNoVert().
Referenced by ControlParticles::initFromMVCMesh(), and ControlParticles::initFromObject().
| virtual int ntlGeometryObjModel::getTypeId | ( | ) | [inline, virtual] |
Return type id.
Reimplemented from ntlGeometryObject.
Definition at line 29 of file ntl_geometrymodel.h.
References GEOCLASSTID_OBJMODEL.
| void ntlGeometryObjModel::initialize | ( | ntlRenderGlobals * | glob | ) | [virtual] |
Filename setting etc.
Reimplemented from ntlGeometryObject.
Definition at line 92 of file ntl_geometrymodel.cpp.
References debMsgStd, DM_WARNING, errMsg, ntlGeometryClass::getAttributeList(), ntlRenderGlobals::getMaterials(), getMeshAnimated(), AnimChannel< Scalar >::isInited(), loadBobjModel(), ntlGeometryObject::mIsAnimated, ntlGeometryClass::mpAttrs, AttributeList::readChannelFloat(), AttributeList::readFloat(), AttributeList::readString(), and ntlGeometryObject::searchMaterial().
| int ntlGeometryObjModel::initModel | ( | int | numVertices, |
| float * | vertices, | ||
| int | numTriangles, | ||
| int * | triangles, | ||
| int | channelSize, | ||
| float * | channelVertices | ||
| ) |
init model from given vertex and triangle arrays
Definition at line 141 of file ntl_geometrymodel.cpp.
References AnimChannel< Scalar >::accessValues(), debMsgStd, DM_MSG, errMsg, getMeshAnimated(), ntlGeometryClass::getName(), i, ntlGeometryObject::mIsAnimated, ntlSetVec3f::mVerts, and p.
Referenced by elbeemAddMesh().
| int ntlGeometryObjModel::loadBobjModel | ( | string | filename | ) |
load model from .bobj file, returns !=0 upon error
Definition at line 259 of file ntl_geometrymodel.cpp.
References AnimChannel< Scalar >::accessValues(), debMsgStd, DM_MSG, errFatal, errMsg, AnimChannel< Scalar >::get(), AnimChannel< Scalar >::getSize(), i, and SIMWORLD_INITERROR.
Referenced by ControlParticles::initFromMVCMesh(), and initialize().
| void ntlGeometryObjModel::setEnd | ( | const ntlVec3Gfx & | set | ) | [inline] |
Definition at line 85 of file ntl_geometrymodel.h.
| void ntlGeometryObjModel::setFilename | ( | string | set | ) | [inline] |
set data file name
Definition at line 91 of file ntl_geometrymodel.h.
| void ntlGeometryObjModel::setLoaded | ( | bool | set | ) | [inline] |
Definition at line 88 of file ntl_geometrymodel.h.
Referenced by ControlParticles::initFromMVCMesh().
| void ntlGeometryObjModel::setStart | ( | const ntlVec3Gfx & | set | ) | [inline] |
Definition at line 82 of file ntl_geometrymodel.h.