Blender V2.61 - r43446
Public Member Functions | Protected Attributes

ntlGeometryObject Class Reference

#include <ntl_geometryobject.h>

Inheritance diagram for ntlGeometryObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ntlGeometryObject ()
 Default constructor.
virtual ~ntlGeometryObject ()
 Default destructor.
virtual int getTypeId ()
 Return type id.
virtual void initialize (ntlRenderGlobals *glob)
virtual void getTriangles (double t, vector< ntlTriangle > *triangles, vector< ntlVec3Gfx > *vertices, vector< ntlVec3Gfx > *normals, int objectId)=0
virtual void notifyOfDump (int dumptype, int frameNr, char *frameNrStr, string outfilename, double simtime)
void searchMaterial (vector< ntlMaterial * > *mat)
void setMaterial (ntlMaterial *p)
ntlMaterialgetMaterial (void)
void setMaterialName (string set)
string getMaterialName (void)
void setReceiveShadows (int set)
int getReceiveShadows () const
void setCastShadows (int set)
int getCastShadows () const
void setGeoInitType (int set)
int getGeoInitType () const
bool getGeoInitIntersect () const
void setGeoInitIntersect (bool set)
float getGeoPartSlipValue () const
void setGeoPartSlipValue (float set)
float getGeoImpactFactor (double t)
void setGeoImpactFactor (float set)
int getVolumeInit () const
void setVolumeInit (int set)
void setInitialVelocity (ntlVec3Gfx set)
ntlVec3Gfx getInitialVelocity (double t)
bool getLocalCoordInivel () const
void setLocalCoordInivel (bool set)
float getCpsTimeStart () const
void setCpsTimeStart (float set)
float getCpsTimeEnd () const
void setCpsTimeEnd (float set)
float getCpsQuality () const
void setCpsQuality (float set)
AnimChannel< float > getCpsAttrFStr () const
AnimChannel< float > getCpsAttrFRad () const
AnimChannel< float > getCpsVelFStr () const
AnimChannel< float > getCpsVelFRad () const
void initChannels (int nTrans, float *trans, int nRot, float *rot, int nScale, float *scale, int nAct, float *act, int nIvel, float *ivel, int nAttrFStr, float *attrFStr, int nAttrFRad, float *attrFRad, int nVelFStr, float *velFStr, int nVelFRad, float *velFRad)
bool getIsAnimated () const
bool checkIsAnimated ()
virtual bool getMeshAnimated ()
virtual void calcTriangleDivs (vector< ntlVec3Gfx > &verts, vector< ntlTriangle > &tris, gfxReal fsTri)
void applyTransformation (double t, vector< ntlVec3Gfx > *verts, vector< ntlVec3Gfx > *norms, int vstart, int vend, int forceTrafo)
void initMovingPoints (double time, gfxReal featureSize)
void initMovingPointsAnim (double srctime, vector< ntlVec3Gfx > &srcpoints, double dsttime, vector< ntlVec3Gfx > &dstpoints, vector< ntlVec3Gfx > *dstnormals, gfxReal featureSize, ntlVec3Gfx geostart, ntlVec3Gfx geoend)
void getMovingPoints (vector< ntlVec3Gfx > &ret, vector< ntlVec3Gfx > *norms=NULL)
ntlVec3Gfx calculateMaxVel (double t1, double t2)
ntlVec3Gfx getTranslation (double t)
float getGeoActive (double t)
void sceneAddTriangle (ntlVec3Gfx p1, ntlVec3Gfx p2, ntlVec3Gfx p3, ntlVec3Gfx pn1, ntlVec3Gfx pn2, ntlVec3Gfx pn3, ntlVec3Gfx trin, bool smooth, vector< ntlTriangle > *triangles, vector< ntlVec3Gfx > *vertices, vector< ntlVec3Gfx > *vertNormals)
void sceneAddTriangleNoVert (int *trips, ntlVec3Gfx trin, bool smooth, vector< ntlTriangle > *triangles)

Protected Attributes

bool mIsInitialized
ntlMaterialmpMaterial
string mMaterialName
int mCastShadows
int mReceiveShadows
int mGeoInitType
ntlVec3Gfx mInitialVelocity
AnimChannel< ntlVec3GfxmcInitialVelocity
bool mLocalCoordInivel
bool mGeoInitIntersect
float mGeoPartSlipValue
AnimChannel< float > mcGeoImpactFactor
int mVolumeInit
ntlVec3Gfx mInitialPos
AnimChannel< ntlVec3GfxmcTrans
AnimChannel< ntlVec3GfxmcRot
AnimChannel< ntlVec3GfxmcScale
bool mIsAnimated
vector< ntlVec3GfxmMovPoints
vector< ntlVec3GfxmMovNormals
bool mHaveCachedMov
vector< ntlVec3GfxmCachedMovPoints
vector< ntlVec3GfxmCachedMovNormals
vector< int > mTriangleDivs1
vector< int > mTriangleDivs2
vector< int > mTriangleDivs3
float mMovPntsInited
int mMaxMovPnt
AnimChannel< float > mcGeoActive
float mCpsTimeStart
float mCpsTimeEnd
float mCpsQuality
AnimChannel< float > mcAttrFStr
AnimChannel< float > mcAttrFRad
AnimChannel< float > mcVelFStr
AnimChannel< float > mcVelFRad

Detailed Description

Definition at line 29 of file ntl_geometryobject.h.


Constructor & Destructor Documentation

ntlGeometryObject::ntlGeometryObject ( )

Default constructor.

Definition at line 29 of file ntl_geometryobject.cpp.

ntlGeometryObject::~ntlGeometryObject ( ) [virtual]

Default destructor.

Definition at line 57 of file ntl_geometryobject.cpp.


Member Function Documentation

void ntlGeometryObject::applyTransformation ( double  t,
vector< ntlVec3Gfx > *  verts,
vector< ntlVec3Gfx > *  norms,
int  vstart,
int  vend,
int  forceTrafo 
)
void ntlGeometryObject::calcTriangleDivs ( vector< ntlVec3Gfx > &  verts,
vector< ntlTriangle > &  tris,
gfxReal  fsTri 
) [virtual]

init triangle divisions

Reimplemented in ntlGeometryObjModel.

Definition at line 434 of file ntl_geometryobject.cpp.

References i, mTriangleDivs1, mTriangleDivs2, mTriangleDivs3, norm(), and normNoSqrt().

Referenced by initMovingPoints(), and initMovingPointsAnim().

ntlVec3Gfx ntlGeometryObject::calculateMaxVel ( double  t1,
double  t2 
)

Calculate max. velocity on object from t1 to t2

Definition at line 743 of file ntl_geometryobject.cpp.

References applyTransformation(), mMaxMovPnt, mMovPoints, and NULL.

Referenced by LbmFsgrSolver::initMovingObstacles().

bool ntlGeometryObject::checkIsAnimated ( )
int ntlGeometryObject::getCastShadows ( ) const [inline]

Returns the cast shadows attribute

Definition at line 73 of file ntl_geometryobject.h.

References mCastShadows.

Referenced by IsoSurface::getTriangles(), sceneAddTriangle(), and sceneAddTriangleNoVert().

AnimChannel<float> ntlGeometryObject::getCpsAttrFRad ( ) const [inline]

Definition at line 120 of file ntl_geometryobject.h.

References mcAttrFRad.

Referenced by LbmFsgrSolver::initCpdata().

AnimChannel<float> ntlGeometryObject::getCpsAttrFStr ( ) const [inline]

Definition at line 119 of file ntl_geometryobject.h.

References mcAttrFStr.

Referenced by LbmFsgrSolver::initCpdata().

float ntlGeometryObject::getCpsQuality ( ) const [inline]

Set/get the particle control set quality

Definition at line 116 of file ntl_geometryobject.h.

References mCpsQuality.

Referenced by LbmFsgrSolver::initCpdata().

float ntlGeometryObject::getCpsTimeEnd ( ) const [inline]

Set/get the particle control set attract force strength

Definition at line 112 of file ntl_geometryobject.h.

References mCpsTimeEnd.

Referenced by LbmFsgrSolver::initCpdata().

float ntlGeometryObject::getCpsTimeStart ( ) const [inline]

Set/get the particle control set attract force strength

Definition at line 108 of file ntl_geometryobject.h.

References mCpsTimeStart.

Referenced by LbmFsgrSolver::initCpdata().

AnimChannel<float> ntlGeometryObject::getCpsVelFRad ( ) const [inline]

Definition at line 122 of file ntl_geometryobject.h.

References mcVelFRad.

Referenced by LbmFsgrSolver::initCpdata().

AnimChannel<float> ntlGeometryObject::getCpsVelFStr ( ) const [inline]

Definition at line 121 of file ntl_geometryobject.h.

References mcVelFStr.

Referenced by LbmFsgrSolver::initCpdata().

float ntlGeometryObject::getGeoActive ( double  t)

get active flag time t

Definition at line 789 of file ntl_geometryobject.cpp.

References AnimChannel< Scalar >::get(), and mcGeoActive.

Referenced by LbmFsgrSolver::initMovingObstacles().

float ntlGeometryObject::getGeoImpactFactor ( double  t) [inline]

Set/get the impact corr factor channel

Definition at line 89 of file ntl_geometryobject.h.

References AnimChannel< Scalar >::get(), and mcGeoImpactFactor.

Referenced by LbmFsgrSolver::initMovingObstacles().

bool ntlGeometryObject::getGeoInitIntersect ( ) const [inline]

Set/get the intersect init flag

Definition at line 81 of file ntl_geometryobject.h.

References mGeoInitIntersect.

int ntlGeometryObject::getGeoInitType ( ) const [inline]

Returns the geo init typ

Definition at line 78 of file ntl_geometryobject.h.

References mGeoInitType.

Referenced by LbmFsgrSolver::initCpdata(), LbmFsgrSolver::initGeometryFlags(), and LbmFsgrSolver::initMovingObstacles().

float ntlGeometryObject::getGeoPartSlipValue ( ) const [inline]

Set/get the part slip value

Definition at line 85 of file ntl_geometryobject.h.

References mGeoPartSlipValue.

Referenced by ControlParticles::initFromObject().

ntlVec3Gfx ntlGeometryObject::getInitialVelocity ( double  t)
bool ntlGeometryObject::getIsAnimated ( ) const [inline]

is the object animated?

Definition at line 137 of file ntl_geometryobject.h.

References mIsAnimated.

Referenced by elbeemAddMesh(), LbmFsgrSolver::initGeometryFlags(), and LbmFsgrSolver::initMovingObstacles().

bool ntlGeometryObject::getLocalCoordInivel ( ) const [inline]

Set/get the local inivel coords flag

Definition at line 101 of file ntl_geometryobject.h.

References mLocalCoordInivel.

ntlMaterial* ntlGeometryObject::getMaterial ( void  ) [inline]

Get the surface property of this object

Definition at line 59 of file ntl_geometryobject.h.

References mpMaterial.

Referenced by ntlLightObject::illuminatePoint(), and ntlRay::shade().

string ntlGeometryObject::getMaterialName ( void  ) [inline]

Get the object property name

Definition at line 63 of file ntl_geometryobject.h.

References mMaterialName.

Referenced by LbmFsgrSolver::initializeSolverMemory().

bool ntlGeometryObject::getMeshAnimated ( ) [virtual]

is the mesh animated?

Reimplemented in ntlGeometryObjModel.

Definition at line 62 of file ntl_geometryobject.cpp.

Referenced by LbmFsgrSolver::initGeometryFlags(), LbmFsgrSolver::initMovingObstacles(), and initMovingPoints().

void ntlGeometryObject::getMovingPoints ( vector< ntlVec3Gfx > &  ret,
vector< ntlVec3Gfx > *  norms = NULL 
)

Prepare points for moving objects (copy into ret)

Prepare points for moving objects

Definition at line 723 of file ntl_geometryobject.cpp.

References mCachedMovNormals, mCachedMovPoints, mHaveCachedMov, mMovNormals, and mMovPoints.

Referenced by LbmFsgrSolver::initMovingObstacles().

int ntlGeometryObject::getReceiveShadows ( ) const [inline]

Returns the receive shadows attribute

Definition at line 68 of file ntl_geometryobject.h.

References mReceiveShadows.

Referenced by ntlLightObject::illuminatePoint().

ntlVec3Gfx ntlGeometryObject::getTranslation ( double  t)

get translation at time t

Definition at line 759 of file ntl_geometryobject.cpp.

References AnimChannel< Scalar >::get(), and mcTrans.

Referenced by applyTransformation().

virtual void ntlGeometryObject::getTriangles ( double  t,
vector< ntlTriangle > *  triangles,
vector< ntlVec3Gfx > *  vertices,
vector< ntlVec3Gfx > *  normals,
int  objectId 
) [pure virtual]

Get the triangles from this object

Implemented in IsoSurface, ntlGeometryObjModel, and ParticleTracer.

Referenced by initMovingPoints(), and initMovingPointsAnim().

virtual int ntlGeometryObject::getTypeId ( ) [inline, virtual]

Return type id.

Implements ntlGeometryClass.

Reimplemented in ntlGeometryObjModel.

Definition at line 39 of file ntl_geometryobject.h.

References GEOCLASSTID_OBJECT.

int ntlGeometryObject::getVolumeInit ( ) const [inline]

Set/get the part slip value

Definition at line 93 of file ntl_geometryobject.h.

References mVolumeInit.

Referenced by LbmFsgrSolver::initGeometryFlags().

void ntlGeometryObject::initChannels ( int  nTrans,
float *  trans,
int  nRot,
float *  rot,
int  nScale,
float *  scale,
int  nAct,
float *  act,
int  nIvel,
float *  ivel,
int  nAttrFStr,
float *  attrFStr,
int  nAttrFRad,
float *  attrFRad,
int  nVelFStr,
float *  velFStr,
int  nVelFRad,
float *  velFRad 
)
void ntlGeometryObject::initialize ( ntlRenderGlobals glob) [virtual]
void ntlGeometryObject::initMovingPoints ( double  time,
gfxReal  featureSize 
)
void ntlGeometryObject::initMovingPointsAnim ( double  srctime,
vector< ntlVec3Gfx > &  srcmovPoints,
double  dsttime,
vector< ntlVec3Gfx > &  dstmovPoints,
vector< ntlVec3Gfx > *  dstmovNormals,
gfxReal  featureSize,
ntlVec3Gfx  geostart,
ntlVec3Gfx  geoend 
)

Prepare points for animated objects

Prepare points for animated objects, init both sets, never used cached points discardInflowBack ignore

Definition at line 606 of file ntl_geometryobject.cpp.

References ABS, calcTriangleDivs(), channelFindMaxVf(), cross(), debMsgStd, DM_MSG, errMsg, ntlGeometryClass::getName(), getNormalized(), getTriangles(), i, mcScale, mMaxMovPnt, mTriangleDivs1, mTriangleDivs2, and TRI_UVOFFSET.

Referenced by LbmFsgrSolver::initMovingObstacles().

void ntlGeometryObject::notifyOfDump ( int  dumtp,
int  frameNr,
char *  frameNrStr,
string  outfilename,
double  simtime 
) [virtual]

notify object that dump is in progress (e.g. for particles)

Reimplemented in ParticleTracer.

Definition at line 199 of file ntl_geometryobject.cpp.

References debMsgStd, debugOut, DM_MSG, and ntlGeometryClass::getName().

void ntlGeometryObject::sceneAddTriangle ( ntlVec3Gfx  p1,
ntlVec3Gfx  p2,
ntlVec3Gfx  p3,
ntlVec3Gfx  pn1,
ntlVec3Gfx  pn2,
ntlVec3Gfx  pn3,
ntlVec3Gfx  trin,
bool  smooth,
vector< ntlTriangle > *  triangles,
vector< ntlVec3Gfx > *  vertices,
vector< ntlVec3Gfx > *  vertNormals 
)
void ntlGeometryObject::sceneAddTriangleNoVert ( int *  trips,
ntlVec3Gfx  trin,
bool  smooth,
vector< ntlTriangle > *  triangles 
)
void ntlGeometryObject::searchMaterial ( vector< ntlMaterial * > *  mat)

Search the material for this object from the material list

Definition at line 207 of file ntl_geometryobject.cpp.

References errFatal, i, mMaterialName, mpMaterial, and SIMWORLD_INITERROR.

Referenced by ntlGeometryObjModel::initialize(), initialize(), and SimulationObject::initializeLbmSimulation().

void ntlGeometryObject::setCastShadows ( int  set) [inline]

Sets the cast shadows attribute

Definition at line 71 of file ntl_geometryobject.h.

References mCastShadows.

Referenced by SimulationObject::initializeLbmSimulation().

void ntlGeometryObject::setCpsQuality ( float  set) [inline]

Definition at line 117 of file ntl_geometryobject.h.

References mCpsQuality.

Referenced by elbeemAddMesh().

void ntlGeometryObject::setCpsTimeEnd ( float  set) [inline]

Definition at line 113 of file ntl_geometryobject.h.

References mCpsTimeEnd.

Referenced by elbeemAddMesh().

void ntlGeometryObject::setCpsTimeStart ( float  set) [inline]

Definition at line 109 of file ntl_geometryobject.h.

References mCpsTimeStart.

Referenced by elbeemAddMesh().

void ntlGeometryObject::setGeoImpactFactor ( float  set) [inline]

Definition at line 90 of file ntl_geometryobject.h.

References mcGeoImpactFactor.

Referenced by elbeemAddMesh().

void ntlGeometryObject::setGeoInitIntersect ( bool  set) [inline]

Definition at line 82 of file ntl_geometryobject.h.

References mGeoInitIntersect.

Referenced by elbeemAddMesh().

void ntlGeometryObject::setGeoInitType ( int  set) [inline]

Returns the geo init typ

Definition at line 76 of file ntl_geometryobject.h.

References mGeoInitType.

Referenced by elbeemAddMesh(), ControlParticles::initFromMVCMesh(), and ControlParticles::initFromObject().

void ntlGeometryObject::setGeoPartSlipValue ( float  set) [inline]

Definition at line 86 of file ntl_geometryobject.h.

References mGeoPartSlipValue.

Referenced by elbeemAddMesh().

void ntlGeometryObject::setInitialVelocity ( ntlVec3Gfx  set)

Set/get the cast initial veocity attribute

Definition at line 794 of file ntl_geometryobject.cpp.

References mcInitialVelocity, and mInitialVelocity.

void ntlGeometryObject::setLocalCoordInivel ( bool  set) [inline]

Definition at line 102 of file ntl_geometryobject.h.

References mLocalCoordInivel.

Referenced by elbeemAddMesh().

void ntlGeometryObject::setMaterial ( ntlMaterial p) [inline]

Set the property of this object

Definition at line 57 of file ntl_geometryobject.h.

References mpMaterial, and p.

void ntlGeometryObject::setMaterialName ( string  set) [inline]

Set the object property name

Definition at line 61 of file ntl_geometryobject.h.

References mMaterialName.

Referenced by LbmFsgrSolver::initializeSolverMemory(), ParticleTracer::parseAttrList(), and LbmFsgrSolver::parseAttrList().

void ntlGeometryObject::setReceiveShadows ( int  set) [inline]

Sets the receive shadows attribute

Definition at line 66 of file ntl_geometryobject.h.

References mReceiveShadows.

Referenced by SimulationObject::initializeLbmSimulation().

void ntlGeometryObject::setVolumeInit ( int  set) [inline]

Definition at line 94 of file ntl_geometryobject.h.

References mVolumeInit.

Referenced by elbeemAddMesh().


Member Data Documentation

Definition at line 224 of file ntl_geometryobject.h.

Referenced by getMovingPoints(), and initMovingPoints().

Definition at line 223 of file ntl_geometryobject.h.

Referenced by getMovingPoints(), and initMovingPoints().

Cast shadows on/off

Definition at line 190 of file ntl_geometryobject.h.

Referenced by getCastShadows(), initialize(), and setCastShadows().

Definition at line 239 of file ntl_geometryobject.h.

Referenced by getCpsAttrFRad(), and initChannels().

Definition at line 239 of file ntl_geometryobject.h.

Referenced by getCpsAttrFStr(), and initChannels().

animated channels for in/outflow on/off

Definition at line 233 of file ntl_geometryobject.h.

Referenced by checkIsAnimated(), getGeoActive(), initChannels(), and initialize().

obstacle impact correction factor

Definition at line 207 of file ntl_geometryobject.h.

Referenced by getGeoImpactFactor(), initialize(), and setGeoImpactFactor().

float ntlGeometryObject::mCpsQuality [protected]

Definition at line 238 of file ntl_geometryobject.h.

Referenced by getCpsQuality(), and setCpsQuality().

float ntlGeometryObject::mCpsTimeEnd [protected]

Definition at line 237 of file ntl_geometryobject.h.

Referenced by getCpsTimeEnd(), and setCpsTimeEnd().

Definition at line 236 of file ntl_geometryobject.h.

Referenced by getCpsTimeStart(), and setCpsTimeStart().

animated channels for postition, rotation and scale

Definition at line 214 of file ntl_geometryobject.h.

Referenced by applyTransformation(), checkIsAnimated(), getTranslation(), initChannels(), initialize(), and initMovingPoints().

Definition at line 239 of file ntl_geometryobject.h.

Referenced by getCpsVelFRad(), and initChannels().

Definition at line 239 of file ntl_geometryobject.h.

Referenced by getCpsVelFStr(), and initChannels().

perform more accurate intersecting geo init for this object?

Definition at line 203 of file ntl_geometryobject.h.

Referenced by getGeoInitIntersect(), initialize(), and setGeoInitIntersect().

fluid object type (fluid, obstacle, accelerator etc.)

Definition at line 196 of file ntl_geometryobject.h.

Referenced by checkIsAnimated(), getGeoInitType(), IsoSurface::getTriangles(), initialize(), initMovingPoints(), sceneAddTriangle(), sceneAddTriangleNoVert(), and setGeoInitType().

part slip bc value

Definition at line 205 of file ntl_geometryobject.h.

Referenced by getGeoPartSlipValue(), initialize(), and setGeoPartSlipValue().

cached points for non moving objects/timeslots

Definition at line 222 of file ntl_geometryobject.h.

Referenced by applyTransformation(), getMovingPoints(), and initMovingPoints().

initial offset for rot/scale

Definition at line 212 of file ntl_geometryobject.h.

Referenced by applyTransformation().

initial velocity for fluid objects

Definition at line 198 of file ntl_geometryobject.h.

Referenced by initialize(), initMovingPoints(), and setInitialVelocity().

Definition at line 181 of file ntl_geometryobject.h.

Referenced by initialize().

use object local inflow?

Definition at line 201 of file ntl_geometryobject.h.

Referenced by getInitialVelocity(), getLocalCoordInivel(), initialize(), and setLocalCoordInivel().

Name of the surcace property

Definition at line 187 of file ntl_geometryobject.h.

Referenced by getMaterialName(), searchMaterial(), and setMaterialName().

point with max. distance from center

Definition at line 230 of file ntl_geometryobject.h.

Referenced by calculateMaxVel(), initMovingPoints(), and initMovingPointsAnim().

Definition at line 220 of file ntl_geometryobject.h.

Referenced by getMovingPoints(), and initMovingPoints().

inited?

Definition at line 228 of file ntl_geometryobject.h.

Referenced by initMovingPoints().

moving point/normal storage

Definition at line 219 of file ntl_geometryobject.h.

Referenced by calculateMaxVel(), getMovingPoints(), and initMovingPoints().

Point to a property object describing the surface of this object

Definition at line 184 of file ntl_geometryobject.h.

Referenced by getMaterial(), searchMaterial(), and setMaterial().

REceive shadows on/off

Definition at line 192 of file ntl_geometryobject.h.

Referenced by getReceiveShadows(), initialize(), and setReceiveShadows().

vector<int> ntlGeometryObject::mTriangleDivs1 [protected]

precomputed triangle divisions

Definition at line 226 of file ntl_geometryobject.h.

Referenced by calcTriangleDivs(), ntlGeometryObjModel::calcTriangleDivs(), initMovingPoints(), and initMovingPointsAnim().

vector<int> ntlGeometryObject::mTriangleDivs2 [protected]
vector<int> ntlGeometryObject::mTriangleDivs3 [protected]

only init as thin object, dont fill?

Definition at line 209 of file ntl_geometryobject.h.

Referenced by getVolumeInit(), initialize(), sceneAddTriangle(), sceneAddTriangleNoVert(), and setVolumeInit().


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