18#include <matrix/vlVector.h>
19#include <matrix/vlTaitBryan.h>
35 template<
typename InputIterator>
36 bool operator()(InputIterator first, InputIterator last)
const
108 virtual const DtVector&
position(
int vtx = 0)
const;
152 virtual void setColor(
float r,
float g,
float b,
float a);
Contains makVrv::DtUniqueID type.
Contains makVrv::DtVirtualBaseClass class.
Context object passed to DtModel::backgroundLoad().
Definition DtBackgroundLoadContext.h:44
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer,...
Definition DtDe.h:77
A model definition Interaction any number of named parameters, and also can be used to store cached d...
Definition DtModelDefinition.h:45
boost::signalslib::signal< void(DtModelInstance *, DtModel *)> signal_modelInstanceCreated
Signal emitted when the model instance is created.
Definition DtModel.h:258
virtual void backgroundLoad(DtBackgroundLoadContext &context)
The chunk of loading that can safely happen in the background. The context provides the DtModelDefini...
Definition DtModel.h:272
void slot_modelInstanceChanged(DtModelInstance *instance)
Called when the model instance changed.
virtual void removedFromSceneObject()
Called when the model was removed from a scene object.
virtual void getBoundingBoxComponents(DtVector &minimum, DtVector &maximum)
Get the minimum and maximum X,Y,Z components of the bounding box.
virtual void updateMinLastFrameDistance(float distance)
updates the closest distance to an observer over the last frame
bool myIsPropFlag
The unique id is constant after initialization.
Definition DtModel.h:365
virtual const DtTaitBryan & orientationOffset() const
Get the Orientation Offset of the model.
DtLoaderHandle * myInLoadQueueHandle
The unique id is constant after initialization.
Definition DtModel.h:326
virtual void setPosition(int vtx, const DtVector &position)
Set the position of a control vertex in the model.
DtUniqueID myParentSceneObjectID
The unique id is constant after initialization.
Definition DtModel.h:348
virtual bool colorBlendingEnabled() const
Returns whether or not blending is enabled.
virtual bool supportsMultithreadedLoad()
can be quickly overridden to disable background loading
Definition DtModel.h:266
const DtVector & boundingBoxCenter() const
Get the bounding box center of the model instance.
bool contributesToBound() const
void getBoundingBoxExtents(double &x, double &y, double &z) const
Get the bounding box extents of the model instance.
const DtUniqueID myUniqueId
The unique id is constant after initialization.
Definition DtModel.h:342
virtual void resetLastFrameDistance()
resets the closest distance to an observer
DtDe & myDe
The unique id is constant after initialization.
Definition DtModel.h:339
DtModelInstance * myBackgroundModelInstance
holds the model created in the background for a bit
Definition DtModel.h:351
virtual void setSolid(bool isSolid)
Set whether or not other this model is drawn filled in.
virtual void foregroundLoad()
the chunk of loading that must happen happen in the foreground, adding to scene graph etc.
Definition DtModel.h:275
DtTaitBryan myOrientationOffset
The unique id is constant after initialization.
Definition DtModel.h:372
virtual void initializeModelInstance()
Push any state maintained by the model to the model instance.
virtual void setDoneBackgroundLoading()
called by async task, updates myCurrentlyLoading atomic
DtDe & de()
Get the DtDe object.
Definition DtModel.h:192
std::string myModelDefinitionName
The unique id is constant after initialization.
Definition DtModel.h:373
virtual const std::string & modelDefinitionName()
returns the model definition name.
Definition DtModel.h:82
virtual const DtModelInstance * modelInstance() const
boost::signalslib::signal< void(DtModel *)> signal_modelToBeDestroyed
Signal emitted when the model is to be destroyed.
Definition DtModel.h:250
virtual const std::string & className() const
DtVector myPositionOffset
The unique id is constant after initialization.
Definition DtModel.h:371
virtual void setColor(float r, float g, float b, float a)
set the model's color
void deleteModelInstance()
Delete the model instance (and emit signal_modelToBeDestroyed).
virtual void promoteBackgroundModelInstance(const DtModelDefinition &defintion)
Internally set the model instance pointer to the background one, also realizes and sends signal.
virtual DtModelInstance * modelInstance()
Get the model instance.
virtual void removeFromScene()=0
Virtual Functions to be implemented, remove this model from the scene.
virtual void addToScene(const DtUniqueID &sceneObjectId, DtModelSetId modelSet, int visualizerType)=0
Virtual Functions to be implemented, add this model to the scene.
virtual void setPositionAndOrientation(int vtx, const DtVector &positionOffset, const DtTaitBryan &orientation)
Set the position and orientation of a vertex in the model at the same time.
virtual void getBlendColor(float &r, float &g, float &b, float &a)
Returns the blend color.
virtual void setBlendColor(float r, float g, float b, float a)
Set color to use if color blending is enabled.
float myMinLastFrameDistance
last frames mimimal distance to the camera, calculated by the instancing system
Definition DtModel.h:375
virtual void addedToSceneObjectAsProp(const DtUniqueID &sceneObj)
Called when a scene object added the model as a prop.
int visualizerType() const
unsigned int transformSize() const
Get the number of position/orientations this model has.
float myBlendColor[4]
The unique id is constant after initialization.
Definition DtModel.h:369
const DtVector & boundingBoxExtents() const
Get the bounding box extents of the model instance.
virtual void setOrientation(int vtx, const DtTaitBryan &orientation)
Set the orientation of a vertex in the model.
virtual bool visible() const
virtual const DtVector & position(int vtx=0) const
virtual void saveModelToFile(const std::string &filename)
void setContributesToBound(bool trueOrFalse)
bool myColorBlendingEnabled
The color blending enabled is needed to be set by the derived class so it doesn't get down to the mod...
Definition DtModel.h:367
virtual void enableLighting(bool l)
virtual void enableColorBlending(bool b)
Enable / disable color blending for this model.
virtual void removePosition(int vtx)
Remove a transform at the given position.
virtual float minLastFrameDistance() const
gets the closest distance to an observer last frame
virtual void waitAndClearLoadHandle()
avoids race condition, on destruction subclasses need to wait for the model to cleanly finish loading...
virtual DtModelInstance * createModelInstance(const DtModelDefinition &definition, bool realize)
Creates a model instance from a pre-resolved DtModelDefinition. Intended for use inside backgroundLoa...
virtual DtModelSetId modelSet() const
Get the model set this model is part of.
virtual void addToSceneAsProp(const DtUniqueID &sceneObjectId)
Definition DtModel.h:301
boost::signalslib::signal< void(DtModel *)> signal_modelChanged
Definition DtModel.h:251
virtual const DtVector & positionOffset() const
Get the Position Offset of the model.
virtual void removedFromLoadQueue()
deletes the myInLoadQueueHandle handle
virtual void getBoundingBoxCenter(double &x, double &y, double &z) const
Get the bounding box center of the model instance.
std::vector< ObjectTransform > TransformList
The unique id is constant after initialization.
Definition DtModel.h:337
unsigned int mySensorMask
The unique id is constant after initialization.
Definition DtModel.h:370
virtual void setActivelyBackgroundLoading()
called right before tbb task creation
virtual void setIsSupportModel(bool isSupport)=0
virtual void setSensorMask(unsigned int sensorMask)
The the sensor mask uniform of the model instance.
DtUniqueID sceneObjectId() const
Parent of the model.
virtual void setModelDefinition(const std::string &str)
Set the model definition.
bool myRequireModelInstance
The unique id is constant after initialization.
Definition DtModel.h:376
int myVisualizerType
The unique id is constant after initialization.
Definition DtModel.h:363
DtModelSetId myModelSet
The unique id is constant after initialization.
Definition DtModel.h:362
virtual bool isProp()
Return whether or not this model was added as a prop.
bool myVisibleFlag
The unique id is constant after initialization.
Definition DtModel.h:368
DtModelInstance * myModelInstance
The unique id is constant after initialization.
Definition DtModel.h:361
virtual void setOrientationOffset(const DtTaitBryan &orientationOffset)
virtual unsigned int getSensorMask() const
Get the current sensor mask for the model.
virtual void setPositionOffset(const DtVector &positionOffset)
virtual void addedToSceneObject(const DtUniqueID &sceneObj, DtModelSetId modelSet, int visualizerType)
virtual void setVisible(bool isVisible)
virtual bool isActivelyBackgroundLoading()
is this being actively loaded (it has a myInLoadQueueHandle object and it's loading)
boost::signalslib::signal< bool(DtModel *, bool), SlotReturnOR > signal_visibilityChangeRequested
Definition DtModel.h:255
virtual DtUniqueID uniqueId() const
Get the model unique ID.
virtual DtLoaderHandle * getLoadQueueHandle()
returns the load queue object
friend class DtBackgroundLoadAsyncTask
The unique id is constant after initialization.
Definition DtModel.h:325
virtual const DtTaitBryan & orientation(int vtx=0) const
static bool theInittedState
The unique id is constant after initialization.
Definition DtModel.h:328
virtual void setElementId(DtElementID id)
Called when the element ID of the model's parent object is set.
DtModel(DtDe &de, DtUniqueID id)
CTOR.
virtual DtModelInstance * createModelInstance(const std::string &modelDefName, bool realize)
Set the model definition and creates an instance of the model. Looks up the definition by name from t...
boost::signalslib::signal< void(DtModelInstance *, DtModel *)> signal_modelInstanceToBeDestroyed
Signal emitted when the model instance is to be destroyed.
Definition DtModel.h:261
TransformList myTransforms
Definition DtModel.h:360
bool myContributesToBound
The unique id is constant after initialization.
Definition DtModel.h:364
friend class DtBackgroundLoader
The unique id is constant after initialization.
Definition DtModel.h:324
DtUniqueID myElementId
The unique id is constant after initialization.
Definition DtModel.h:345
virtual void setModelInstance(DtModelInstance *modelInstance)
The base class for all model instances.
Definition DtModelInstance.h:44
boost::signalslib::signal< void(DtModelInstance &)> signal_modelCreated
Signal emitted when a model is fully created.
Definition DtModel.h:390
DtModelSignaler & operator=(const DtModelSignaler &)
virtual ~DtModelSignaler()
DTOR.
boost::signalslib::signal< void(DtModelInstance &)> signal_modelChanged
Signal emitted when a model has changed in some way.
Definition DtModel.h:393
DtModelSignaler(const DtModelSignaler &)
static DtModelSignaler & instance(DtDe &)
Instance accessor.
boost::signalslib::signal< void(DtModelInstance &)> signal_modelToBeDestroyed
Definition DtModel.h:397
DtVirtualBaseClass()
Do nothing constructor.
Contains DtCreateSensorFieldOfViewCommand and DtCreateSensorFieldOfViewCommandCreator class declarati...
Definition DtGridLinesSettingsRecord.h:16
DtModelSetId
Definition DtModelSetEnums.h:20
DtUniqueID DtElementID
Definition DtUniqueID.h:23
unsigned long long DtUniqueID
Definition DtUniqueID.h:19
Wrapper object that insulates the loader from other threads destroying an object. The DtModelLoadPara...
Definition DtLoaderHandle.h:29
bool result_type
Definition DtModel.h:34
bool operator()(InputIterator first, InputIterator last) const
Definition DtModel.h:36
Contains DLL export macros.
#define DT_DLL_VRVCORE
Definition vrvCore.h:20